public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] [rfc] mmc, sh: Read MMCIF during zboot
@ 2010-11-26 23:05 Simon Horman
  2010-11-26 23:05 ` [PATCH 1/2] " Simon Horman
  2010-11-26 23:05 ` [PATCH 2/2] [hack] sh: disable initialisation of SDRAM Simon Horman
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Horman @ 2010-11-26 23:05 UTC (permalink / raw)
  To: linux-mmc, linux-sh
  Cc: Yusuke Goda, Magnus Damm, Kuninori Morimoto, Chris Ball,
	Paul Mundt

The first patch of this short series prototype of code to read MMC during
zboot on AP4EV boards.

The second patch is a hack to allow it to be tested from uboot.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] [rfc] mmc, sh: Read MMCIF during zboot
  2010-11-26 23:05 [PATCH 0/2] [rfc] mmc, sh: Read MMCIF during zboot Simon Horman
@ 2010-11-26 23:05 ` Simon Horman
  2010-11-30  5:11   ` Magnus Damm
  2010-11-26 23:05 ` [PATCH 2/2] [hack] sh: disable initialisation of SDRAM Simon Horman
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2010-11-26 23:05 UTC (permalink / raw)
  To: linux-mmc, linux-sh
  Cc: Yusuke Goda, Magnus Damm, Kuninori Morimoto, Chris Ball,
	Paul Mundt, Simon Horman

This is a prototype of code to read the MMCIF during
zboot initialisation. The intention is that it will form
part of enabling booting from MMC. Very roughly the plan is

1) The Mask Rom will load a small boot program from MMC.
   Essentially this will be the first portion of
   the kernel to be booted.
2) That program will load the remainder of the kernel
   from MMC and boot from it.

This patch demonstrates code to perform the read portion of 2).
It uses a dummy buffer and only reads in one 512 byte sector.
A full implementation of 2) would of course read much more.

The patch currently hooks into head-shmobile.S as it
depends on initialisation that occurs in that file.
However, it is likely that the final implementation
will need to be located in head.S where relocation is
currently handled.

I used a multi-voltage MMC mobile card to test this code.
I observed that a single-voltage MMC and MMCplus card caused
the code to time-out in sh_mmcif_boot_init() which causes
the boot to stop.

This patch depends on "ARM: mach-shmobile: Add zboot support for SuperH
Mobile ARM" and "mmc, sh: Correct value for reset".

Signed-off-by: Simon Horman <horms@verge.net.au>
---
 arch/arm/boot/compressed/Makefile        |    4 +
 arch/arm/boot/compressed/head-shmobile.S |   16 +++++
 arch/arm/boot/compressed/mmcif-sh7372.c  |  100 ++++++++++++++++++++++++++++++
 3 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/compressed/mmcif-sh7372.c

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 0a8f748..f730c10 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -49,6 +49,10 @@ ifeq ($(CONFIG_ARCH_SHMOBILE),y)
 OBJS		+= head-shmobile.o
 endif
 
+ifeq ($(CONFIG_ARCH_SH7372),y)
+OBJS		+= mmcif-sh7372.o
+endif
+
 #
 # We now have a PIC decompressor implementation.  Decompressors running
 # from RAM should not define ZTEXTADDR.  Decompressors running directly
diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
index 30973b7..700d622 100644
--- a/arch/arm/boot/compressed/head-shmobile.S
+++ b/arch/arm/boot/compressed/head-shmobile.S
@@ -26,6 +26,22 @@
 #include <mach/zboot.h>
 
 	b	1f
+	.align
+__tmp_stack:
+	.space	128
+__dummy_buf:
+	.space	512
+__dummy_buf_size:
+	.long	512
+1:
+	adr	sp, __tmp_stack
+	add	sp, sp, #128
+	adr	r0, __dummy_buf
+	ldr	r1, __dummy_buf_size
+	mov	lr, pc
+	b	mmcif_loader
+
+	b	1f
 __atags:@ tag #1
 	.long	12			@ tag->hdr.size = tag_size(tag_core);
 	.long	0x54410001		@ tag->hdr.tag = ATAG_CORE;
diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c
new file mode 100644
index 0000000..7ffaf27
--- /dev/null
+++ b/arch/arm/boot/compressed/mmcif-sh7372.c
@@ -0,0 +1,100 @@
+/*
+ * sh7372 MMCIF loader
+ *
+ * Copyright (C) 2010 Magnus Damm
+ * Copyright (C) 2010 Simon Horman
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/mmc/sh_mmcif.h>
+
+#define MMCIF_BASE      (void __iomem *)0xe6bd0000
+
+#define PORT84CR	0xe6050054
+#define PORT85CR	0xe6050055
+#define PORT86CR	0xe6050056
+#define PORT87CR	0xe6050057
+#define PORT88CR	0xe6050058
+#define PORT89CR	0xe6050059
+#define PORT90CR	0xe605005a
+#define PORT91CR	0xe605005b
+#define PORT92CR	0xe605005c
+#define PORT99CR	0xe6050063
+#define PORT185CR	0xe60520b9
+#define PORT186CR	0xe60520ba
+#define PORT187CR	0xe60520bb
+#define PORT188CR	0xe60520bc
+#define PORTR191_160DR  0xe6056014
+
+#define SMSTPCR3	0xe615013c
+
+enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT,
+       MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE };
+
+static void mmcif_update_progress(int n)
+{
+	__raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
+		     (1 << (25 + n)), PORTR191_160DR);
+}
+
+/* SH7372 specific MMCIF loader
+ *
+ * loads the romImage from an MMC card starting from block 512
+ * use the following line to write the romImage to an MMC card
+ * # dd if=arch/sh/boot/romImage of=/dev/sdx bs=512 seek=512
+ */
+asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes)
+{
+	/* Initialise LEDS1-4
+	 * registers: PORT185CR-PORT188CR (LED1-LED4 Control)
+	 * value:     0x10 - enable output
+	 */
+	__raw_writeb(0x10, PORT185CR);
+	__raw_writeb(0x10, PORT186CR);
+	__raw_writeb(0x10, PORT187CR);
+	__raw_writeb(0x10, PORT188CR);
+
+	mmcif_update_progress(MMCIF_PROGRESS_ENTER);
+
+	/* Initialise MMC
+	 * registers: PORT84CR-PORT92CR
+	 *            (MMCD0_0-MMCD0_7,MMCCMD0 Control)
+	 * value: 0x04 - select function 4
+	 */
+	 __raw_writeb(0x04, PORT84CR);
+	 __raw_writeb(0x04, PORT85CR);
+	 __raw_writeb(0x04, PORT86CR);
+	 __raw_writeb(0x04, PORT87CR);
+	 __raw_writeb(0x04, PORT88CR);
+	 __raw_writeb(0x04, PORT89CR);
+	 __raw_writeb(0x04, PORT90CR);
+	 __raw_writeb(0x04, PORT91CR);
+	 __raw_writeb(0x04, PORT92CR);
+
+	/* Initialise MMC
+	 * registers: PORT99CR (MMCCLK0 Control)
+	 * value: 0x10 | 0x04 - enable output | select function 4
+	 */
+	__raw_writeb(0x14, PORT99CR);
+
+	/* Enable clock to MMC hardware block */
+	__raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3);
+
+	mmcif_update_progress(MMCIF_PROGRESS_INIT);
+
+	/* setup MMCIF hardware */
+	sh_mmcif_boot_init(MMCIF_BASE);
+
+	mmcif_update_progress(MMCIF_PROGRESS_LOAD);
+
+	/* load kernel via MMCIF interface */
+	sh_mmcif_boot_slurp(MMCIF_BASE, buf, no_bytes);
+
+	/* Disable clock to MMC hardware block */
+	__raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3);
+
+	mmcif_update_progress(MMCIF_PROGRESS_DONE);
+}
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] [hack] sh: disable initialisation of SDRAM
  2010-11-26 23:05 [PATCH 0/2] [rfc] mmc, sh: Read MMCIF during zboot Simon Horman
  2010-11-26 23:05 ` [PATCH 1/2] " Simon Horman
@ 2010-11-26 23:05 ` Simon Horman
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Horman @ 2010-11-26 23:05 UTC (permalink / raw)
  To: linux-mmc, linux-sh
  Cc: Yusuke Goda, Magnus Damm, Kuninori Morimoto, Chris Ball,
	Paul Mundt, Simon Horman

This disables SDRAM initialisation in very early boot
to allow a zImage to be booted from uboot.

This change applies on top of "ARM: mach-shmobile: Add zboot support for
SuperH Mobile ARM".

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
===================================================================
--- linux-2.6.orig/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt	2010-11-27 07:17:38.000000000 +0900
+++ linux-2.6/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt	2010-11-27 07:18:01.000000000 +0900
@@ -40,6 +40,7 @@ WAIT 1, 0xFE40009C
 LIST "BSC"
 ED 0xFEC10000, 0x00E0001B

+#if 0
 LIST "SBSC1"
 ED 0xFE400354, 0x01AD8000
 ED 0xFE400354, 0x01AD8001
@@ -77,6 +78,7 @@ ED 0xFE400028, 0xA55A0032
 ED 0xFE40002C, 0xA55A000C
 ED 0xFE400020, 0xA55A2048
 ED 0xFE400008, 0xBCC90959
+#endif

 LIST "Change CPGA setting"
 ED 0xE61500E0, 0x9E40352E
---
 .../arm/mach-shmobile/include/mach/head-ap4evb.txt |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
index e3ebfa7..1e06943 100644
--- a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
+++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
@@ -40,6 +40,7 @@ WAIT 1, 0xFE40009C
 LIST "BSC"
 ED 0xFEC10000, 0x00E0001B
 
+#if 0
 LIST "SBSC1"
 ED 0xFE400354, 0x01AD8000
 ED 0xFE400354, 0x01AD8001
@@ -77,6 +78,7 @@ ED 0xFE400028, 0xA55A0032
 ED 0xFE40002C, 0xA55A000C
 ED 0xFE400020, 0xA55A2048
 ED 0xFE400008, 0xBCC90959
+#endif
 
 LIST "Change CPGA setting"
 ED 0xE61500E0, 0x9E40352E
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] [rfc] mmc, sh: Read MMCIF during zboot
  2010-11-26 23:05 ` [PATCH 1/2] " Simon Horman
@ 2010-11-30  5:11   ` Magnus Damm
  2010-11-30  7:18     ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Magnus Damm @ 2010-11-30  5:11 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-mmc, linux-sh, Yusuke Goda, Kuninori Morimoto, Chris Ball,
	Paul Mundt

Hi Simon,

Thanks for your work on this! It's nice to see that you can actually
load some data early on.

On Sat, Nov 27, 2010 at 8:05 AM, Simon Horman <horms@verge.net.au> wrote:
> This is a prototype of code to read the MMCIF during
> zboot initialisation. The intention is that it will form
> part of enabling booting from MMC. Very roughly the plan is
>
> 1) The Mask Rom will load a small boot program from MMC.
>   Essentially this will be the first portion of
>   the kernel to be booted.
> 2) That program will load the remainder of the kernel
>   from MMC and boot from it.
>
> This patch demonstrates code to perform the read portion of 2).
> It uses a dummy buffer and only reads in one 512 byte sector.
> A full implementation of 2) would of course read much more.
>
> The patch currently hooks into head-shmobile.S as it
> depends on initialisation that occurs in that file.
> However, it is likely that the final implementation
> will need to be located in head.S where relocation is
> currently handled.
>
> I used a multi-voltage MMC mobile card to test this code.
> I observed that a single-voltage MMC and MMCplus card caused
> the code to time-out in sh_mmcif_boot_init() which causes
> the boot to stop.
>
> This patch depends on "ARM: mach-shmobile: Add zboot support for SuperH
> Mobile ARM" and "mmc, sh: Correct value for reset".
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
>  arch/arm/boot/compressed/Makefile        |    4 +
>  arch/arm/boot/compressed/head-shmobile.S |   16 +++++
>  arch/arm/boot/compressed/mmcif-sh7372.c  |  100 ++++++++++++++++++++++++++++++
>  3 files changed, 120 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/compressed/mmcif-sh7372.c
>
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index 0a8f748..f730c10 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -49,6 +49,10 @@ ifeq ($(CONFIG_ARCH_SHMOBILE),y)
>  OBJS           += head-shmobile.o
>  endif
>
> +ifeq ($(CONFIG_ARCH_SH7372),y)
> +OBJS           += mmcif-sh7372.o
> +endif
> +
>  #
>  # We now have a PIC decompressor implementation.  Decompressors running
>  # from RAM should not define ZTEXTADDR.  Decompressors running directly
> diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
> index 30973b7..700d622 100644
> --- a/arch/arm/boot/compressed/head-shmobile.S
> +++ b/arch/arm/boot/compressed/head-shmobile.S
> @@ -26,6 +26,22 @@
>  #include <mach/zboot.h>
>
>        b       1f
> +       .align
> +__tmp_stack:
> +       .space  128
> +__dummy_buf:
> +       .space  512
> +__dummy_buf_size:
> +       .long   512
> +1:
> +       adr     sp, __tmp_stack
> +       add     sp, sp, #128
> +       adr     r0, __dummy_buf
> +       ldr     r1, __dummy_buf_size

Regarding the destination address, look into using CONFIG_MEMORY_START
or perhaps something more advanced like the actual destination address
for the kernel - see arch/arm/boot/compressed/head.S and TEXT_OFFSET
or zreladdr.

As for the number of bytes to load, please have a look at the sh7724
implementation.

> +       mov     lr, pc
> +       b       mmcif_loader
> +
> +       b       1f
>  __atags:@ tag #1
>        .long   12                      @ tag->hdr.size = tag_size(tag_core);
>        .long   0x54410001              @ tag->hdr.tag = ATAG_CORE;
> diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c
> new file mode 100644
> index 0000000..7ffaf27
> --- /dev/null
> +++ b/arch/arm/boot/compressed/mmcif-sh7372.c
> @@ -0,0 +1,100 @@
> +/*
> + * sh7372 MMCIF loader
> + *
> + * Copyright (C) 2010 Magnus Damm
> + * Copyright (C) 2010 Simon Horman
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/mmc/sh_mmcif.h>
> +
> +#define MMCIF_BASE      (void __iomem *)0xe6bd0000
> +
> +#define PORT84CR       0xe6050054
> +#define PORT85CR       0xe6050055
> +#define PORT86CR       0xe6050056
> +#define PORT87CR       0xe6050057
> +#define PORT88CR       0xe6050058
> +#define PORT89CR       0xe6050059
> +#define PORT90CR       0xe605005a
> +#define PORT91CR       0xe605005b
> +#define PORT92CR       0xe605005c
> +#define PORT99CR       0xe6050063
> +#define PORT185CR      0xe60520b9
> +#define PORT186CR      0xe60520ba
> +#define PORT187CR      0xe60520bb
> +#define PORT188CR      0xe60520bc
> +#define PORTR191_160DR  0xe6056014
> +
> +#define SMSTPCR3       0xe615013c
> +
> +enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT,
> +       MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE };
> +
> +static void mmcif_update_progress(int n)
> +{
> +       __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
> +                    (1 << (25 + n)), PORTR191_160DR);
> +}

This seems like a board specific property to me. So please break it
out in to a per-board header or similar.

I guess next step is to extend the prototype code so it loads the
entire kernel from MMC and then jumps to it. =)

Cheers,

/ magnus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] [rfc] mmc, sh: Read MMCIF during zboot
  2010-11-30  5:11   ` Magnus Damm
@ 2010-11-30  7:18     ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2010-11-30  7:18 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-mmc, linux-sh, Yusuke Goda, Kuninori Morimoto, Chris Ball,
	Paul Mundt

On Tue, Nov 30, 2010 at 02:11:43PM +0900, Magnus Damm wrote:
> Hi Simon,
> 
> Thanks for your work on this! It's nice to see that you can actually
> load some data early on.
> 
> On Sat, Nov 27, 2010 at 8:05 AM, Simon Horman <horms@verge.net.au> wrote:
> > This is a prototype of code to read the MMCIF during
> > zboot initialisation. The intention is that it will form
> > part of enabling booting from MMC. Very roughly the plan is
> >
> > 1) The Mask Rom will load a small boot program from MMC.
> >   Essentially this will be the first portion of
> >   the kernel to be booted.
> > 2) That program will load the remainder of the kernel
> >   from MMC and boot from it.
> >
> > This patch demonstrates code to perform the read portion of 2).
> > It uses a dummy buffer and only reads in one 512 byte sector.
> > A full implementation of 2) would of course read much more.
> >
> > The patch currently hooks into head-shmobile.S as it
> > depends on initialisation that occurs in that file.
> > However, it is likely that the final implementation
> > will need to be located in head.S where relocation is
> > currently handled.
> >
> > I used a multi-voltage MMC mobile card to test this code.
> > I observed that a single-voltage MMC and MMCplus card caused
> > the code to time-out in sh_mmcif_boot_init() which causes
> > the boot to stop.
> >
> > This patch depends on "ARM: mach-shmobile: Add zboot support for SuperH
> > Mobile ARM" and "mmc, sh: Correct value for reset".
> >
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> >  arch/arm/boot/compressed/Makefile        |    4 +
> >  arch/arm/boot/compressed/head-shmobile.S |   16 +++++
> >  arch/arm/boot/compressed/mmcif-sh7372.c  |  100 ++++++++++++++++++++++++++++++
> >  3 files changed, 120 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/boot/compressed/mmcif-sh7372.c
> >
> > diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> > index 0a8f748..f730c10 100644
> > --- a/arch/arm/boot/compressed/Makefile
> > +++ b/arch/arm/boot/compressed/Makefile
> > @@ -49,6 +49,10 @@ ifeq ($(CONFIG_ARCH_SHMOBILE),y)
> >  OBJS           += head-shmobile.o
> >  endif
> >
> > +ifeq ($(CONFIG_ARCH_SH7372),y)
> > +OBJS           += mmcif-sh7372.o
> > +endif
> > +
> >  #
> >  # We now have a PIC decompressor implementation.  Decompressors running
> >  # from RAM should not define ZTEXTADDR.  Decompressors running directly
> > diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
> > index 30973b7..700d622 100644
> > --- a/arch/arm/boot/compressed/head-shmobile.S
> > +++ b/arch/arm/boot/compressed/head-shmobile.S
> > @@ -26,6 +26,22 @@
> >  #include <mach/zboot.h>
> >
> >        b       1f
> > +       .align
> > +__tmp_stack:
> > +       .space  128
> > +__dummy_buf:
> > +       .space  512
> > +__dummy_buf_size:
> > +       .long   512
> > +1:
> > +       adr     sp, __tmp_stack
> > +       add     sp, sp, #128
> > +       adr     r0, __dummy_buf
> > +       ldr     r1, __dummy_buf_size
> 
> Regarding the destination address, look into using CONFIG_MEMORY_START
> or perhaps something more advanced like the actual destination address
> for the kernel - see arch/arm/boot/compressed/head.S and TEXT_OFFSET
> or zreladdr.

Thanks, I'll take a look at that

> As for the number of bytes to load, please have a look at the sh7724
> implementation.

Thanks, will do.

> 
> > +       mov     lr, pc
> > +       b       mmcif_loader
> > +
> > +       b       1f
> >  __atags:@ tag #1
> >        .long   12                      @ tag->hdr.size = tag_size(tag_core);
> >        .long   0x54410001              @ tag->hdr.tag = ATAG_CORE;
> > diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c
> > new file mode 100644
> > index 0000000..7ffaf27
> > --- /dev/null
> > +++ b/arch/arm/boot/compressed/mmcif-sh7372.c
> > @@ -0,0 +1,100 @@
> > +/*
> > + * sh7372 MMCIF loader
> > + *
> > + * Copyright (C) 2010 Magnus Damm
> > + * Copyright (C) 2010 Simon Horman
> > + *
> > + * This file is subject to the terms and conditions of the GNU General Public
> > + * License.  See the file "COPYING" in the main directory of this archive
> > + * for more details.
> > + */
> > +
> > +#include <linux/mmc/sh_mmcif.h>
> > +
> > +#define MMCIF_BASE      (void __iomem *)0xe6bd0000
> > +
> > +#define PORT84CR       0xe6050054
> > +#define PORT85CR       0xe6050055
> > +#define PORT86CR       0xe6050056
> > +#define PORT87CR       0xe6050057
> > +#define PORT88CR       0xe6050058
> > +#define PORT89CR       0xe6050059
> > +#define PORT90CR       0xe605005a
> > +#define PORT91CR       0xe605005b
> > +#define PORT92CR       0xe605005c
> > +#define PORT99CR       0xe6050063
> > +#define PORT185CR      0xe60520b9
> > +#define PORT186CR      0xe60520ba
> > +#define PORT187CR      0xe60520bb
> > +#define PORT188CR      0xe60520bc
> > +#define PORTR191_160DR  0xe6056014
> > +
> > +#define SMSTPCR3       0xe615013c
> > +
> > +enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT,
> > +       MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE };
> > +
> > +static void mmcif_update_progress(int n)
> > +{
> > +       __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
> > +                    (1 << (25 + n)), PORTR191_160DR);
> > +}
> 
> This seems like a board specific property to me. So please break it
> out in to a per-board header or similar.

Sure.

> I guess next step is to extend the prototype code so it loads the
> entire kernel from MMC and then jumps to it. =)

Yes :-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-30  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 23:05 [PATCH 0/2] [rfc] mmc, sh: Read MMCIF during zboot Simon Horman
2010-11-26 23:05 ` [PATCH 1/2] " Simon Horman
2010-11-30  5:11   ` Magnus Damm
2010-11-30  7:18     ` Simon Horman
2010-11-26 23:05 ` [PATCH 2/2] [hack] sh: disable initialisation of SDRAM Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox