From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
zmxu@marvell.com, jszhang@marvell.com,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
"linux-mtd\@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/4] mtd: pxa3xx_nand: rework the timing setup
Date: Tue, 04 Aug 2015 18:56:23 +0200 [thread overview]
Message-ID: <87d1z3m1qg.fsf@belgarion.home> (raw)
In-Reply-To: <CAAEAJfBMpQ8nf5aLTUqrCsJkMQbnkQTB1yA5MBiJ6R4h6RgupQ@mail.gmail.com> (Ezequiel Garcia's message of "Mon, 3 Aug 2015 10:48:55 -0300")
Ezequiel Garcia <ezequiel@vanguardiasur.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.
next prev parent reply other threads:[~2015-08-04 17:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 15:08 [PATCH v2 0/4] mtd: pxa3xx_nand: rework the timing setup Antoine Tenart
2015-07-07 15:08 ` [PATCH v2 1/4] mtd: pxa3xx_nand: add a default chunk size Antoine Tenart
2015-07-07 15:08 ` [PATCH v2 2/4] mtd: pxa3xx_nand: add helpers to setup the timings Antoine Tenart
2015-07-19 0:53 ` Ezequiel Garcia
2015-07-07 15:08 ` [PATCH v2 3/4] mtd: pxa3xx_nand: rework flash detection and timing setup Antoine Tenart
2015-07-19 0:58 ` Ezequiel Garcia
2015-07-07 15:08 ` [PATCH v2 4/4] mtd: pxa3xx_nand: clean up the pxa3xx timings Antoine Tenart
2015-07-17 13:41 ` [PATCH v2 0/4] mtd: pxa3xx_nand: rework the timing setup Antoine Tenart
2015-07-17 14:36 ` Ezequiel Garcia
2015-07-17 17:55 ` Robert Jarzmik
2015-07-18 17:18 ` Ezequiel Garcia
2015-07-20 19:49 ` Robert Jarzmik
2015-08-03 2:49 ` Ezequiel Garcia
2015-08-03 4:44 ` Robert Jarzmik
2015-08-03 13:48 ` Ezequiel Garcia
2015-08-04 16:56 ` Robert Jarzmik [this message]
2015-09-03 15:18 ` Ezequiel Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1z3m1qg.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=antoine.tenart@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=jszhang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=zmxu@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox