From: Oliver Ford <ipaqlinux@oliford.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC)
Date: Sat, 29 Nov 2008 14:03:25 +0000 [thread overview]
Message-ID: <49314BAD.1020002@oliford.co.uk> (raw)
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;
next reply other threads:[~2008-11-29 14:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-29 14:03 Oliver Ford [this message]
2008-11-29 14:25 ` [U-Boot] iPAQ 21x support (+PXA3xx NAND flash and MMC) 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
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=49314BAD.1020002@oliford.co.uk \
--to=ipaqlinux@oliford.co.uk \
--cc=u-boot@lists.denx.de \
/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