lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 20 Dec 2020 16:36:00 +0100
From:   Bert Vermeulen <bert@...t.com>
To:     Chuanhong Guo <gch981213@...il.com>
Cc:     Tudor Ambarus <Tudor.Ambarus@...rochip.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Mark Brown <broonie@...nel.org>, john.garry@...wei.com,
        Boris Brezillon <bbrezillon@...nel.org>,
        vadivel.muruganx.ramuthevar@...ux.intel.com,
        open list <linux-kernel@...r.kernel.org>,
        linux-mtd@...ts.infradead.org
Subject: Re: [PATCH] Add spi-nor driver for Realtek RTL838x/RTL839x switch
 SoCs

On 12/20/20 9:51 AM, Chuanhong Guo wrote:
> Hi!
> 
> On Sun, Dec 20, 2020 at 7:01 AM Bert Vermeulen <bert@...t.com> wrote:
>>
>> On 12/16/20 9:30 AM, Tudor.Ambarus@...rochip.com wrote:
>> > On 12/15/20 11:46 PM, Bert Vermeulen wrote:
>> >> This driver supports the spiflash core in all RTL838x/RTL839x SoCs,
>> >> and likely some older models as well (RTL8196C).
>> >>
>> > Can we use SPIMEM and move this under drivers/spi/ instead?
>>
>> I wasn't aware spimem was the thing to use for new drivers. I will rewrite
>> the driver to that API.
> 
> Are there any limitations preventing this from being implemented as a
> generic SPI controller?
> spi-nor and spi-mem are designed for controllers which can only perform
> spi-mem/spi-nor specific transfers. I can't find such limitations from
> your current driver code.
 >
 > BTW I found a SPI controller driver for RTL8196C here: [0]
 > It seems pretty similar to the controller you are working on.
 >
 > [0]: 
https://github.com/hackpascal/lede-rtl8196c/blob/realtek/target/linux/realtek/files/drivers/spi/spi-realtek.c

The SoC's SPI core is very much intended for SPI flash use only, and indeed 
we haven't come across anything else connected to that SPI bus in dozens of 
devices.

I wrote my driver based on Realtek code and a datasheet for the (older) 
RTL8196C found floating around the net, and found no inconsistencies.

I hadn't seen that RTL8196C driver, but if it works that proves a plain SPI 
driver will do. I'll investigate.


-- 
Bert Vermeulen
bert@...t.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ