[U-Boot] [PATCH] ARM:OMAP3 Change mmc_init to mmc_legacy_init

omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions.
Compile tested on all arm Runtime tested on Zoom1.
Signed-off-by: Tom Rix Tom.Rix@windriver.com --- drivers/mmc/omap3_mmc.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c index 0148702..987adb0 100644 --- a/drivers/mmc/omap3_mmc.c +++ b/drivers/mmc/omap3_mmc.c @@ -28,6 +28,7 @@ #include <mmc.h> #include <part.h> #include <i2c.h> +#include <asm/arch/mmc.h>
const unsigned short mmc_transspeed_val[15][4] = { {CLKD(10, 1), CLKD(10, 10), CLKD(10, 100), CLKD(10, 1000)}, @@ -521,7 +522,7 @@ unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt, return 1; }
-int mmc_init(int verbose) +int mmc_legacy_init(int verbose) { if (configure_mmc(&cur_card_data) != 1) return 1; @@ -542,17 +543,3 @@ int mmc_init(int verbose) return 0; }
-int mmc_read(ulong src, uchar *dst, int size) -{ - return 0; -} - -int mmc_write(uchar *src, ulong dst, int size) -{ - return 0; -} - -int mmc2info(ulong addr) -{ - return 0; -}

Dear Tom Rix,
In message 1235083543-4659-1-git-send-email-Tom.Rix@windriver.com you wrote:
omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions.
Compile tested on all arm Runtime tested on Zoom1.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
drivers/mmc/omap3_mmc.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Tom,
in message 20090219225148.01866832E43F@gemini.denx.de I wrote:
omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions.
Compile tested on all arm Runtime tested on Zoom1.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
drivers/mmc/omap3_mmc.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
Applied, thanks.
...but there are still build errors on ARM:
Configuring for cerf250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for cradle board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for csb226 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for delta board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for innokom board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for lubbock board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for pleb2 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for pxa255_idp board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for wepep250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for xaeniax board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for xm250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for xsengine board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for zylonite board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file
Best regards,
Wolfgang Denk

I will take a look at these failures. Tom
Wolfgang Denk wrote:
Dear Tom,
in message 20090219225148.01866832E43F@gemini.denx.de I wrote:
omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions.
Compile tested on all arm Runtime tested on Zoom1.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
drivers/mmc/omap3_mmc.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
Applied, thanks.
...but there are still build errors on ARM:
Configuring for cerf250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for cradle board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for csb226 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for delta board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for innokom board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for lubbock board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for pleb2 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for pxa255_idp board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for wepep250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for xaeniax board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file Configuring for xm250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for xsengine board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' mmc.c: In function 'mmc_block_write': mmc.c:184: error: 'MMC_CMD_WRITE_BLOCK' undeclared (first use in this function) mmc.c:184: error: (Each undeclared identifier is reported only once mmc.c:184: error: for each function it appears in.) mmc.c: At top level: mmc.c:223: error: conflicting types for 'mmc_read' /home/wd/git/u-boot/work/include/mmc.h:272: error: previous declaration of 'mmc_read' was here make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... arm-linux-size: './u-boot': No such file Configuring for zylonite board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd' make[1]: *** [mmc.o] Error 1 make: *** [cpu/pxa/libpxa.a] Error 2 make: *** Waiting for unfinished jobs.... make: *** wait: No child processes. Stop. arm-linux-size: './u-boot': No such file
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
Dear Tom,
in message 20090219225148.01866832E43F@gemini.denx.de I wrote:
omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions.
Compile tested on all arm Runtime tested on Zoom1.
Signed-off-by: Tom Rix Tom.Rix@windriver.com
drivers/mmc/omap3_mmc.c | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-)
Applied, thanks.
...but there are still build errors on ARM:
Configuring for cerf250 board... In file included from mmc.c:31: mmc.h:139: error: redefinition of 'struct mmc_cid' mmc.h:151: error: redefinition of 'struct mmc_csd'
The recent patches I posted should fix this problems. They appear to be only in pxa. The changes looked obvious. MAKEBUILDALL arm and grep-ing for mmc in the *.ERR file were used to test the compile. I do not have a pxa target so I was unable to do a runtime test.
It would be a good idea for someone with a pxa board like cerf250 to test these changes.
Tom
participants (3)
-
Tom
-
Tom Rix
-
Wolfgang Denk