Commit d6906cb812fe3264339a62874d4463b2e1d3f902
Committed by
Albert ARIBAUD
1 parent
eaff60d738
Exists in
master
and in
54 other branches
OMAP3: Zoom1: Use generic MMC driver
Switch from the legacy omap3 mmc driver to the new generic omap hsmmc driver. This patch is based on the work done for Beagle, etc. Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Showing 2 changed files with 15 additions and 4 deletions Side-by-side Diff
board/logicpd/zoom1/zoom1.c
... | ... | @@ -34,6 +34,7 @@ |
34 | 34 | #include <netdev.h> |
35 | 35 | #include <twl4030.h> |
36 | 36 | #include <asm/io.h> |
37 | +#include <asm/arch/mmc_host_def.h> | |
37 | 38 | #include <asm/arch/mux.h> |
38 | 39 | #include <asm/arch/sys_proto.h> |
39 | 40 | #include <asm/mach-types.h> |
... | ... | @@ -87,6 +88,14 @@ |
87 | 88 | /* platform specific muxes */ |
88 | 89 | MUX_ZOOM1_MDK(); |
89 | 90 | } |
91 | + | |
92 | +#ifdef CONFIG_GENERIC_MMC | |
93 | +int board_mmc_init(bd_t *bis) | |
94 | +{ | |
95 | + omap_mmc_init(0); | |
96 | + return 0; | |
97 | +} | |
98 | +#endif | |
90 | 99 | |
91 | 100 | #ifdef CONFIG_CMD_NET |
92 | 101 | int board_eth_init(bd_t *bis) |
include/configs/omap3_zoom1.h
... | ... | @@ -95,8 +95,9 @@ |
95 | 95 | #define CONFIG_BAUDRATE 115200 |
96 | 96 | #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ |
97 | 97 | 115200} |
98 | +#define CONFIG_GENERIC_MMC 1 | |
98 | 99 | #define CONFIG_MMC 1 |
99 | -#define CONFIG_OMAP3_MMC 1 | |
100 | +#define CONFIG_OMAP_HSMMC 1 | |
100 | 101 | #define CONFIG_DOS_PARTITION 1 |
101 | 102 | |
102 | 103 | /* DDR - I use Micron DDR */ |
... | ... | @@ -178,6 +179,7 @@ |
178 | 179 | "loadaddr=0x82000000\0" \ |
179 | 180 | "usbtty=cdc_acm\0" \ |
180 | 181 | "console=ttyS2,115200n8\0" \ |
182 | + "mmcdev=0\0" \ | |
181 | 183 | "videomode=1024x768@60,vxres=1024,vyres=768\0" \ |
182 | 184 | "videospec=omapfb:vram:2M,vram:4M\0" \ |
183 | 185 | "mmcargs=setenv bootargs console=${console} " \ |
184 | 186 | |
... | ... | @@ -188,10 +190,10 @@ |
188 | 190 | "video=${videospec},mode:${videomode} " \ |
189 | 191 | "root=/dev/mtdblock4 rw " \ |
190 | 192 | "rootfstype=jffs2\0" \ |
191 | - "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr ${loadaddr} boot.scr\0" \" \ | |
193 | + "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr ${loadaddr} boot.scr\0" \" \ | |
192 | 194 | "bootscript=echo Running bootscript from mmc ...; " \ |
193 | 195 | "source ${loadaddr}\0" \ |
194 | - "loaduimage=fatload mmc 0 ${loadaddr} uImage ${loadaddr} uImage\0" \" \ | |
196 | + "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage ${loadaddr} uImage\0" \" \ | |
195 | 197 | "mmcboot=echo Booting from mmc ...; " \ |
196 | 198 | "run mmcargs; " \ |
197 | 199 | "bootm ${loadaddr}\0" \ |
... | ... | @@ -201,7 +203,7 @@ |
201 | 203 | "bootm ${loadaddr}\0" \ |
202 | 204 | |
203 | 205 | #define CONFIG_BOOTCOMMAND \ |
204 | - "if mmc init; then " \ | |
206 | + "if mmc rescan ${mmcdev}; then " \ | |
205 | 207 | "if run loadbootscript; then " \ |
206 | 208 | "run bootscript; " \ |
207 | 209 | "else " \ |