ARM:OMAP3 Change mmc_init to mmc_legacy_init
PATCH 1/1 ARM:OMAP3 Change mmc_init to mmc_legacy_init
omap3_mmc.c was changed to define mmc_legacy_init. Definition of mmc_read was changed to match declaration in mmc.h
cmd_mmc.c ifndef was strengthened to disable use of generic mmc functions if the generic mmc interface is not used.
Compile tested on all arm
Runtime tested on Zoom1.
--- common/cmd_mmc.c | 5 ++++- drivers/mmc/omap3_mmc.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-)
common/cmd_mmc.c +4 -1
@@ -40,7 +40,8 @@ U_BOOT_CMD("init mmc card" ,NULL ); -#endif /* !CONFIG_GENERIC_MMC */ + +#else static void print_mmcinfo (struct mmc *mmc) {
@@ -171,3 +172,5 @@ U_BOOT_CMD("mmc write <device num> addr blk# cnt\n" "mmc rescan <device num>\n" "mmc list - lists available devices\n"); + +#endif
drivers/mmc/omap3_mmc.c +3 -2
@@ -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,7 +543,7 @@ int mmc_init(int verbose)return 0 ; } -int mmc_read (ulong src,uchar *dst,int size) +int mmc_read (struct mmc *mmc,u64 src,uchar *dst,int size) {return 0 ; }
Signature · 1 line
1.5.4.3
PATCH 1/1 ARM:OMAP3 Change mmc_init to mmc_legacy_init
Quoted 10 lines · Tom Rix
omap3_mmc.cwas changed to definemmc_legacy_init. Definition ofmmc_readwas changed to match declaration inmmc.h
cmd_mmc.cifndef was strengthened to disable use of generic mmc functions if the generic mmc interface is not used.Compile tested on all arm
Runtime tested on Zoom1.Signed-off-by Tom Rix <[email protected]>
for the basic functionality in this patch.
Quoted 20 lines
--- common/cmd_mmc.c | 5 ++++- drivers/mmc/omap3_mmc.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-)common/cmd_mmc.c +2
-1@@ -40,7 +40,8 @@ U_BOOT_CMD("init mmc card" ,NULL ); -#endif /* !CONFIG_GENERIC_MMC */ + +#else static void print_mmcinfo (struct mmc *mmc) {
common/cmd_mmc.c U_BOOT_CMD( · line 176
Quoted 5 lines
common/cmd_mmc.c +2
-0@@ -171,3 +172,5 @@ U_BOOT_CMD("mmc write <device num> addr blk# cnt\n" "mmc rescan <device num>\n" "mmc list - lists available devices\n"); + +#endif
This is already done by
http://lists.denx.de/pipermail/u-boot/2009-February/047916.html
As I (wrongly?) learned from Jean-Christophe not to mix generic changes and board specific changes in one patch, my plan was to send a separate OMAP3 patch. If the patch is accepted this way, I'm fine with this.
Quoted 22 lines
drivers/mmc/omap3_mmc.c +2
-1@@ -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 ;
drivers/mmc/omap3_mmc.c int mmc_init(int verbose) · line 549
Quoted 8 lines
drivers/mmc/omap3_mmc.c +1
-1@@ -542,7 +543,7 @@ int mmc_init(int verbose)return 0 ; } -int mmc_read (ulong src,uchar *dst,int size) +int mmc_read (struct mmc *mmc,u64 src,uchar *dst,int size) {return 0 ; }
I additionally removed some now unused functions like in
But this is only an additional improvement of this patch and not strictly necessary to make things work again.
Best regards
Dirk
PATCH 1/1 ARM:OMAP3 Change mmc_init to mmc_legacy_init
Tom,
Quoted 9 lines · Dirk Behme
Quoted 8 lines · Tom Rix
omap3_mmc.cwas changed to definemmc_legacy_init. Definition ofmmc_readwas
changed to match declaration inmmc.h
cmd_mmc.cifndef was strengthened to disable use of generic mmc functions if
the generic mmc interface is not used.
Quoted 6 lines
Quoted 4 lines
Compile tested on all arm
Runtime tested on Zoom1.Signed-off-by Tom Rix <[email protected]>Acked-by <[email protected]>
After
http://lists.denx.de/pipermail/u-boot/2009-February/048052.html
it seems that we still need only the OMAP3 part of this patch. Do you like to resend the OMAP3 part (omap3_mmc.c)? And maybe you like to add the additional removal of unused functions I mentioned below like in
?
Many thanks
Dirk
Quoted 78 lines
Quoted 20 lines
--- common/cmd_mmc.c | 5 ++++- drivers/mmc/omap3_mmc.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-)common/cmd_mmc.c +2
-1@@ -40,7 +40,8 @@ U_BOOT_CMD("init mmc card" ,NULL ); -#endif /* !CONFIG_GENERIC_MMC */ + +#else static void print_mmcinfo (struct mmc *mmc) {common/cmd_mmc.c U_BOOT_CMD( · line 176
Quoted 5 lines
common/cmd_mmc.c +2
-0@@ -171,3 +172,5 @@ U_BOOT_CMD("mmc write <device num> addr blk# cnt\n" "mmc rescan <device num>\n" "mmc list - lists available devices\n"); + +#endif This is already done by
http://lists.denx.de/pipermail/u-boot/2009-February/047916.html
As I (wrongly?) learned from Jean-Christophe not to mix generic changes and board specific changes in one patch, my plan was to send a separate OMAP3 patch. If the patch is accepted this way, I'm fine with this.
Quoted 23 lines
drivers/mmc/omap3_mmc.c +2
-1@@ -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;drivers/mmc/omap3_mmc.c int mmc_init(int verbose) · line 549
Quoted 8 lines
drivers/mmc/omap3_mmc.c +1
-1@@ -542,7 +543,7 @@ int mmc_init(int verbose)return 0 ; } -int mmc_read (ulong src,uchar *dst,int size) +int mmc_read (struct mmc *mmc,u64 src,uchar *dst,int size) {return 0 ; }I additionally removed some now unused functions like in
But this is only an additional improvement of this patch and not strictly necessary to make things work again.
Best regards
Dirk
PATCH 1/1 ARM:OMAP3 Change mmc_init to mmc_legacy_init
In reply to Tom RixDear Tom Rix,
Quoted 6 lines · In message <[email protected]> you wrote:
omap3_mmc.cwas changed to definemmc_legacy_init. Definition ofmmc_readwas changed to match declaration inmmc.h
cmd_mmc.cifndef was strengthened to disable use of generic mmc functions if the generic mmc interface is not used.
Quoted 8 lines
Compile tested on all arm
Runtime tested on Zoom1.Signed-off-by Tom Rix <[email protected]>--- common/cmd_mmc.c | 5 ++++- drivers/mmc/omap3_mmc.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-)
Sorry, doesn't apply any more.
Please rebase and repost. Thanks
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Presidency: The greased pig in the field game of American politics. - Ambrose Bierce