From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 13 Jan 2012 13:35:56 +0100 Subject: [U-Boot] [PATCH v3 3/4] zipitz2: use pxa_mmc_gen as MMC driver In-Reply-To: <1326438704-22383-3-git-send-email-anarsoul@gmail.com> References: <1326438704-22383-1-git-send-email-anarsoul@gmail.com> <1326438704-22383-3-git-send-email-anarsoul@gmail.com> Message-ID: <201201131335.57042.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > Signed-off-by: Vasily Khoruzhick > --- > v2: mmcinfo is necessary to scan card for partitions > v3: replace mmcinfo with mmc rescan > > board/zipitz2/zipitz2.c | 8 ++++++++ > include/configs/zipitz2.h | 14 ++++++++------ > 2 files changed, 16 insertions(+), 6 deletions(-) > > diff --git a/board/zipitz2/zipitz2.c b/board/zipitz2/zipitz2.c > index b093c2f..4075fb6 100644 > --- a/board/zipitz2/zipitz2.c > +++ b/board/zipitz2/zipitz2.c > @@ -79,6 +79,14 @@ void dram_init_banksize(void) > gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; > } > > +#ifdef CONFIG_CMD_MMC > +int board_mmc_init(bd_t *bis) > +{ > + pxa_mmc_register(0); > + return 0; > +} > +#endif > + > #ifdef CONFIG_CMD_SPI > > struct { > diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h > index 76054af..4f48d9b 100644 > --- a/include/configs/zipitz2.h > +++ b/include/configs/zipitz2.h > @@ -44,11 +44,12 @@ > #define CONFIG_SYS_MALLOC_LEN (128*1024) > #define CONFIG_ARCH_CPU_INIT > > -#define CONFIG_BOOTCOMMAND \ > - "if mmc init && fatload mmc 0 0xa0000000 uboot.script ; then " \ > - "source 0xa0000000; " \ > - "else " \ > - "bootm 0x60000; " \ > +#define CONFIG_BOOTCOMMAND \ > + "if mmc rescan 0 && ext2load mmc 0 0xa0000000 boot/uboot.script ;" \ Why "mmc rescan 0" ? > + "then " \ > + "source 0xa0000000; " \ > + "else " \ > + "bootm 0x60000; " \ > "fi; " > #define CONFIG_BOOTARGS \ > "console=tty0 console=ttyS2,115200 fbcon=rotate:3" > @@ -91,7 +92,8 @@ > */ > #ifdef CONFIG_CMD_MMC > #define CONFIG_MMC > -#define CONFIG_PXA_MMC > +#define CONFIG_GENERIC_MMC > +#define CONFIG_PXA_MMC_GENERIC > #define CONFIG_SYS_MMC_BASE 0xF0000000 > #define CONFIG_CMD_FAT > #define CONFIG_CMD_EXT2