[Letux-kernel] X1600 / LX16 support - here: adding MMC - MAJOR BREAKTHROUGH

H. Nikolaus Schaller hns at goldelico.com
Sun Feb 11 21:10:37 CET 2024


Hi Andreas,

> Am 11.02.2024 um 20:51 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> On Sun, 11 Feb 2024 17:00:58 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
> [...]
>> b) lx16: fix card detection on mmc1 and heartbeat led
>> 
>> -       if (0 && is_soc_or_above(jzpc, ID_X1000)) {
>> +       if (!(enabled_socs & (1 << ID_X1600)) && is_soc_or_above(jzpc, ID_X1000)) {
>> 
>> so that it is only effective for the X1600 (but not jz4780 where it did work
>> before).
>> 
> hmm, why do you think my change affects the jz4780?

Ah, you are right, the jz4780 comes before ID_X1000 and it probably has no
shadow registers at all.

Well, I thought it should be disabled only for the x1600 because we don't know
about x1000, x1500, x1830, x2000, x2100 where it is also enabled by the
is_soc_or_above(jzpc, ID_X1000). And I was mislead by the JZ4770 register names
assuming that this is code for jz4780 as well.

An alternative could be to do

if (enabled_socs & (BIT(ID_X1000) | BIT(ID_X1500) | ...)

> I understand my change as if Xxxxxx is treated like jz4780 in these cases.
> Well, for upstreaming purposes, it has probably be rechecked anyways.

Yes, for upstreaming we probably have to find out why the shadow register isn't working
instead of disabling the mechanism.

So for the moment we are on the safe side.

BR,
Nikolaus


More information about the Letux-kernel mailing list