Hi Wolfgang, On Fri, Oct 14, 2011 at 4:09 AM, Wolfgang Denk <w...@denx.de> wrote: > Dear Lei Wen, > > In message > <CALButC+bZZwYhE0VT99Yjh_=p0lvjqnmm1yvzsex3inutn7...@mail.gmail.com> Graeme > Russ wrote: >> >> > So do you means I should keep the EXT_CSD_HS_TIMING? Or I change like >> > below? >> > >> > from >> > err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1); >> > to: >> > err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, &ext_csd.hs_timing - >> > &ext_csd, 1); >> >> I imagine the compiler will complain that the types for &ext_csd.hs_timing >> and &ext_csd are different. >> >> Try: >> struct ext_csd *ext_csd_ptr = 0; >> >> err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, &ext_csd_ptr->hs_timing, >> 1); > > Umm... no. > > The signature of mmc_switch() [as used here - there is also a two > argument version; what a mess!] is: > > int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value) > > The "set" argument is bous, as the function never uses it anywhere. > > And both the "index" and "value" arguments are never used in I/O > context, i. e. they are actual plain integer parameters. So just keep > it as > > err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1); > >
Should I also keep the EXT_CSD_HS_TIMING like macro for previous ext_csd parsing? Or just add another ext_csd structure definition to the parse the ext_csd, while keep macros to be called by mmc_switch? Thanks, Lei _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot