* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
@ 2008-11-29 14:03 Oliver Ford
2008-11-29 14:25 ` Daniel Mack
2008-12-01 18:01 ` Adrian Filipi
0 siblings, 2 replies; 6+ messages in thread
From: Oliver Ford @ 2008-11-29 14:03 UTC (permalink / raw)
To: u-boot
Hi,
I've recently started trying to use U-boot on an iPAQ 214 which runs on
a PXA310 cpu.
I've got the basic boot up, NAND flash and MMC systems working so far.
I originally tried to use the zylonite's nand.c that's already in u-boot
but it was very flaky and didn't support several things I needed like
large-page command set and the hardware ecc.
I've now copied the latest pxa3xx nand flash code from the kernel and
just modified it to cope without DMA and without IRQs.
I'm not sure it exactly fits in with the u-boot nand code (eg. it does
an internal read ID scan to find the right command set) but it works a
lot better than the board/zylonite/nand.c. Would this be useful to
anyone else?
Also, can I, and how do I go about submitting the stuff for the iPAQ
21x. The only change outside it's own config header and board/ dir is
the a slight change to get the MMC code working on the pxa3xx (below).
Thanks,
Oliver
diff --git a/cpu/pxa/mmc.c b/cpu/pxa/mmc.c
index d735c8d..3b281d5 100644
--- a/cpu/pxa/mmc.c
+++ b/cpu/pxa/mmc.c
@@ -126,7 +126,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len)
MMC_I_MASK = ~MMC_I_MASK_RXFIFO_RD_REQ;
while (len) {
if (MMC_I_REG & MMC_I_REG_RXFIFO_RD_REQ) {
-#ifdef CONFIG_PXA27X
+#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
int i;
for (i = min(len, 32); i; i--) {
*dst++ = *((volatile uchar *)&MMC_RXFIFO);
@@ -558,7 +558,11 @@ mmc_init(int verbose)
set_GPIO_mode(GPIO6_MMCCLK_MD);
set_GPIO_mode(GPIO8_MMCCS0_MD);
#endif
+#ifdef CONFIG_CPU_MONAHANS
+ CKENA |= CKENA_12_MMC0;
+#else
CKEN |= CKEN12_MMC; /* enable MMC unit clock */
+#endif
MMC_CLKRT = MMC_CLKRT_0_3125MHZ;
MMC_RESTO = MMC_RES_TO_MAX;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
2008-11-29 14:03 [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC) Oliver Ford
@ 2008-11-29 14:25 ` Daniel Mack
[not found] ` <49315AB3.8010606@oliford.co.uk>
2008-12-01 18:01 ` Adrian Filipi
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Mack @ 2008-11-29 14:25 UTC (permalink / raw)
To: u-boot
Hi Oliver,
On Sat, Nov 29, 2008 at 02:03:25PM +0000, Oliver Ford wrote:
> I've recently started trying to use U-boot on an iPAQ 214 which runs on
> a PXA310 cpu.
> I've got the basic boot up, NAND flash and MMC systems working so far.
>
> I originally tried to use the zylonite's nand.c that's already in u-boot
> but it was very flaky and didn't support several things I needed like
> large-page command set and the hardware ecc.
>
> I've now copied the latest pxa3xx nand flash code from the kernel and
> just modified it to cope without DMA and without IRQs.
Great.
> I'm not sure it exactly fits in with the u-boot nand code (eg. it does
> an internal read ID scan to find the right command set) but it works a
> lot better than the board/zylonite/nand.c. Would this be useful to
> anyone else?
Yes, absolutely - to me. I'm sitting on this at this very moment :)
I was also thinking about implementing this as a PXA3xx generic layer
for small pages, large pages, 8bit and 16bit so the same code does not
need to be copied to all the board implementations over and over again.
But I'm not sure whether there are any plans to do this as I didn't
follow the development of this project for a long time.
Anyways, I'd appreciate if you could send over what you got.
Many thanks,
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
2008-11-29 14:03 [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC) Oliver Ford
2008-11-29 14:25 ` Daniel Mack
@ 2008-12-01 18:01 ` Adrian Filipi
2008-12-01 19:19 ` Oliver Ford
1 sibling, 1 reply; 6+ messages in thread
From: Adrian Filipi @ 2008-12-01 18:01 UTC (permalink / raw)
To: u-boot
--On Saturday, November 29, 2008 09:03:25 AM -0500 Oliver Ford
<ipaqlinux@oliford.co.uk> wrote:
> Hi,
>
> I've recently started trying to use U-boot on an iPAQ 214 which runs on
> a PXA310 cpu.
> I've got the basic boot up, NAND flash and MMC systems working so far.
>
....
>
> I'm not sure it exactly fits in with the u-boot nand code (eg. it does
> an internal read ID scan to find the right command set) but it works a
> lot better than the board/zylonite/nand.c. Would this be useful to
> anyone else?
>
I'm pretty interested. NAND on the pxa320 is proving to be a pain to us.
What's your boot sequence look like? Are you using the mobm from the BSP?
Are you using the nand_spl from u-boot?
Adrian
--
Linux Software Engineer | EuroTech, Inc. | www.eurotech-inc.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
2008-12-01 18:01 ` Adrian Filipi
@ 2008-12-01 19:19 ` Oliver Ford
2008-12-02 13:07 ` Daniel Mack
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Ford @ 2008-12-01 19:19 UTC (permalink / raw)
To: u-boot
Adrian Filipi wrote:
>
> I'm pretty interested. NAND on the pxa320 is proving to be a pain
> to us.
It seems I'd forgotten to cc' the list on my reply to Daniel so I've
fw'ed that on now - see that msg for some of the details and the source.
It should work ok for the pxa320 but I think there is a #define that
needs changing because the controller clock speed is different. I think
the docs said that that was the only difference.
>
> What's your boot sequence look like?
Not much at the moment, I've just been playing with it. Currently I let
the OBM load u-boot from flash and then u-boot loads the kernel off of
the MMC card because I'm having problems with JFFS2 on the NAND within
linux itself (Is JFFS2 supposed to be that slow??).
> Are you using the mobm from the BSP?
Bear in mind this is an iPAQ so a complete retailed system. I can't get
any help or info from Marvell or HP so I'm doing everything by poking it
and seeing.
If the MOBM is what I know as just the OBM then yes, but it's the winCE
one (they are apparently slightly different). The OBM loaded the winCE
bootloader from 0x40000-0x80000 in the flash to 0x83C00000 in RAM. I've
just put U-Boot there and let the OBM load it up. The other advantage
being that the MMC and NAND MFP configs and basics have already been set.
I daren't touch the OBM because I can't reflash the device if it fails
to boot and the OBM lets me boot off of the MMC card (it's "diagnostic
function") if I wipe the later boot stages.
> Are you using the nand_spl from u-boot?
Not sure what that is. I'm afraid I'm still on the learning curve as I
only saw u-boot for the first time on Thursday and hadn't touched the
NAND flash before the weekend before.
Hope that helps,
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
2008-12-01 19:19 ` Oliver Ford
@ 2008-12-02 13:07 ` Daniel Mack
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Mack @ 2008-12-02 13:07 UTC (permalink / raw)
To: u-boot
On Mon, Dec 01, 2008 at 07:19:47PM +0000, Oliver Ford wrote:
> > I'm pretty interested. NAND on the pxa320 is proving to be a pain
> > to us.
> It seems I'd forgotten to cc' the list on my reply to Daniel so I've
> fw'ed that on now - see that msg for some of the details and the source.
>
> It should work ok for the pxa320 but I think there is a #define that
> needs changing because the controller clock speed is different. I think
> the docs said that that was the only difference.
What about the idea adding PXA3xx generic NAND flash support code? As
far as I've seen, every board so far duplicates NAND code from some
other board implementation which can't be intended.
Best regards,
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
[not found] ` <20090407112947.GA14671@buzzloop.caiaq.de>
@ 2009-04-07 12:51 ` Oliver Ford
0 siblings, 0 replies; 6+ messages in thread
From: Oliver Ford @ 2009-04-07 12:51 UTC (permalink / raw)
To: u-boot
Daniel Mack wrote:
> Hi Oliver,
>
> getting back to this ancient thread now as I just got back to this
> project.
>
...
>
> Very cool - this helped me a lot and works well on a PXA303 board.
> Thanks again. Did you try any further to bring this upstream?
>
>
>
Good to hear it helped and no, I've not even looked at getting the ipaq
stuff into either the mainline kernel or u-boot. I don't really have the
time to even read the u-boot mailing list posts let alone commit to
merging it.
> And would you share the relevant parts of your config, especially those
> which define the environment storage?
>
Iirc, I have it set with no environment but just set a big boot command
to set it all up.
The ipaq214 config is here:
http://www.oliford.co.uk/hpipaq214/public/u-boot/ipaq214.h
(ignore the other files in that dir)
and my u-boot git tree is here if you want anything else:
http://www.oliford.co.uk/hpipaq214/u-boot.git/
It also now has in there MMC/SD and basic keypad and LCD support for the
PXA310.
Let me know if there's anything else you want.
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-07 12:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-29 14:03 [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC) Oliver Ford
2008-11-29 14:25 ` Daniel Mack
[not found] ` <49315AB3.8010606@oliford.co.uk>
[not found] ` <20090407112947.GA14671@buzzloop.caiaq.de>
2009-04-07 12:51 ` Oliver Ford
2008-12-01 18:01 ` Adrian Filipi
2008-12-01 19:19 ` Oliver Ford
2008-12-02 13:07 ` Daniel Mack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox