From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Thu, 19 Feb 2009 18:22:01 +0100 Subject: [U-Boot] [PATCH] ARM:OMAP3 Change mmc_init to mmc_legacy_init In-Reply-To: <1235062231-21917-1-git-send-email-Tom.Rix@windriver.com> References: <1235062231-21917-1-git-send-email-Tom.Rix@windriver.com> Message-ID: <499D9539.6070504@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Tom Rix wrote: > 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. > > Signed-off-by: Tom Rix Acked-by: for the basic functionality in this patch. > --- > common/cmd_mmc.c | 5 ++++- > drivers/mmc/omap3_mmc.c | 5 +++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c > index 73ec7bf..111f169 100644 > --- a/common/cmd_mmc.c > +++ b/common/cmd_mmc.c > @@ -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 addr blk# cnt\n" > "mmc rescan \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. > diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c > index 0148702..dc9a9ed 100644 > --- a/drivers/mmc/omap3_mmc.c > +++ b/drivers/mmc/omap3_mmc.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > > 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; > } I additionally removed some now unused functions like in http://pastebin.com/m43f9d61 But this is only an additional improvement of this patch and not strictly necessary to make things work again. Best regards Dirk