[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d1z3m1qg.fsf@belgarion.home>
Date: Tue, 04 Aug 2015 18:56:23 +0200
From: Robert Jarzmik <robert.jarzmik@...e.fr>
To: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
Cc: Antoine Tenart <antoine.tenart@...e-electrons.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
zmxu@...vell.com, jszhang@...vell.com,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"linux-mtd\@lists.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 0/4] mtd: pxa3xx_nand: rework the timing setup
Ezequiel Garcia <ezequiel@...guardiasur.com.ar> writes:
>>
>> The issue I see is that :
>> - there is a bug in the clk driver for pxa3xx I introduced (CKEN_AB)
>> - and shutting down the GCU clock prevents the NAND from working (I can't
>> explain that one yet)
Ah actually it's even trickier, but it has nothing to do with the GCU clock,
that was a wrong interpretation of the test sequence.
What actually happens is that on the platform I have, the NAND is sharing the
DFI bus with the Static Memory Controller. Now let's see what happens on
boot-up, knowing that my pxa3xx-nand is a module, not builtin :
- the kernel boots
- the core clock initializes
- the ethernet card initializes (it is on the static memory controller)
- the kernel finishes the boot sequence
=> the NAND clock is unused
=> as such, the core clock framework disables it
And here is the catch : on the next ethernet access, the system bus will be
stalled forever. The reason behind is that because the bootloader left the
"NDCR_ND_ARB_EN" bit enabled, the DFI bus sees the ethernet register access, and
asks for arbitration; as the NAND clock is down, the arbitration never happens,
and the pxa3xx is stalled forever.
The very same thing happens when you load and unload pxa3xx-nand with a platform
where it was loaded with "enable-arbiter" platform-data, and if that platform
has any driver mapped in the SMC address space (0x0 .. 0x14000000).
If you have an opportunity to load/unload a pxa3xx-nand, I'd be glad to have
someone verify this theory.
The first fix comming to my mind would be to :
- disable the NDCR_ND_ARB_EN in the pxa3xx core bring up
- keep enablement in pxa3xx-nand
- ensure it is disabled on the probe error path or remove of pxa3xx-nand
Cheers.
--
Robert
PS: That also means that the fix I posted for CKENA/CKENB inversion should fix
the issues you see.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists