[PATCH] mtd: nand: marvell: Fix clock resource by adding a register clock

Gregory CLEMENT gregory.clement at bootlin.com
Wed Mar 7 06:23:30 PST 2018


Hi Boris,
 
 On mar., mars 06 2018, Boris Brezillon <boris.brezillon at bootlin.com> wrote:

>> >
>> > Another solution would be to retrieve the reg clk only on platforms
>> > that need it (based on the compatible). This way you won't have to test
>> > for -ENOENT and could simply propagate the error to the upper layer.  
>> 
>> We can't do this because we need to be bacwkard compatible.
>
> I don't get it. If the clock is missing in the DT, the NAND is
> already not working on these platforms, right? How could we break
> something that is already broken?

As you probably know this patch have been tested on an Armada 7K based
board, so it more or less works.

But it works because the second clock used by the nand controller is
also used by other IP and already setup by the drivers of these IP. So
today it is only if you boot a kernel without crypto, i2c, spi and uart
support that the nand won't work.

Then the current representation is wrong, but it is still usable in most
of the case. So that's why we still need to support the case where we
have only one clock in the device tree.

Gregory


>
> Regards,
>
> Boris
>
> -- 
> Boris Brezillon, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com

-- 
Gregory Clement, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com



More information about the linux-arm-kernel mailing list