mmc: modify setting tran_speed and change csd's instead of response value
PATCH 1/1 mmc: modify setting tran_speed and change csd's instead of response value
This patch do the following
1. we need not use cmd.response, because we assinged cmd.response value to mmc->csd.
2. mmc_set_clock() is hard setting, that is not good solution
and if mmc is not MMC_MODE_HS, mmc will set card's tran_speed.
--- drivers/mmc/mmc.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
drivers/mmc/mmc.c +10 -9
@@ -666,7 +666,7 @@ int mmc_startup(struct mmc *mmc) mmc->csd[3 ] = cmd.response[3 ];if (mmc->version ==MMC_VERSION_UNKNOWN ) { -int version = (cmd.response[0 ] >>26 ) &0xf ; +int version = (mmc->csd[0 ] >>26 ) &0xf ;switch (version) {case 0 :
@@ -691,17 +691,17 @@ int mmc_startup(struct mmc *mmc) }/* divide frequency by 10, since the mults are 10x bigger */ - freq = fbase[(cmd.response[0 ] &0x7 )]; - mult = multipliers[((cmd.response[0 ] >>3 ) &0xf )]; + freq = fbase[(mmc->csd[0 ] &0x7 )]; + mult = multipliers[((mmc->csd[0 ] >>3 ) &0xf )]; mmc->tran_speed = freq * mult; - mmc->read_bl_len =1 << ((cmd.response[1 ] >>16 ) &0xf ); + mmc->read_bl_len =1 << ((mmc->csd[1 ] >>16 ) &0xf );if (IS_SD (mmc)) mmc->write_bl_len = mmc->read_bl_len;else - mmc->write_bl_len =1 << ((cmd.response[3 ] >>22 ) &0xf ); + mmc->write_bl_len =1 << ((mmc->csd[3 ] >>22 ) &0xf );if (mmc->high_capacity) { csize = (mmc->csd[1 ] &0x3f ) <<16
@@ -794,11 +794,12 @@ int mmc_startup(struct mmc *mmc)if (mmc->card_caps &MMC_MODE_HS ) {if (mmc->card_caps & MMC_MODE_HS_52MHz) -mmc_set_clock (mmc,52000000 ); + mmc->tran_speed =52000000 ;else -mmc_set_clock (mmc,26000000 ); - }else -mmc_set_clock (mmc,20000000 ); + mmc->tran_speed =26000000 ; + } + +mmc_set_clock (mmc, mmc->tran_speed); }/* fill in device description */
Signature · 1 line
1.6.0.4
PATCH 1/1 mmc: modify setting tran_speed and change csd's instead of response value
Quoted 11 lines · Jaehoon Chung
This patch do the following
1. we need not use cmd.response, because we assinged cmd.response value tommc->csd.
2.mmc_set_clock()is hard setting, that is not good solution
? and if mmc is notMMC_MODE_HS, mmc will set card'stran_speed.?Signed-off-by: Jaehoon Chung <[email protected]>
---
?drivers/mmc/mmc.c | ? 19 ++++++++++--------- ?1 files changed, 10 insertions(+), 9 deletions(-)
Thanks.
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH 1/1 mmc: modify setting tran_speed and change csd's instead of response value
Dear Andy,
Quoted 6 lines · Minkyu Kang
Quoted 5 lines · Jaehoon Chung
This patch do the following
1. we need not use cmd.response, because we assinged cmd.response value tommc->csd.
2.mmc_set_clock()is hard setting, that is not good solution
? and if mmc is notMMC_MODE_HS, mmc will set card'stran_speed.
Quoted 9 lines
Quoted 6 lines
?Signed-off-by: Jaehoon Chung <[email protected]>
---
?drivers/mmc/mmc.c | ? 19 ++++++++++--------- ?1 files changed, 10 insertions(+), 9 deletions(-)Acked-by Minkyu Kang <[email protected]>
Please let me know your opinion.
Thanks.
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH 1/1 mmc: modify setting tran_speed and change csd's instead of response value
In reply to Jaehoon ChungDear Andy
Quoted 10 lines · In message <[email protected]> Jaehoon Chung wrote:
This patch do the following
1. we need not use cmd.response, because we assinged cmd.response value tommc->csd.
2.mmc_set_clock()is hard setting, that is not good solution
and if mmc is notMMC_MODE_HS, mmc will set card'stran_speed.Signed-off-by Jaehoon Chung <[email protected]>--- drivers/mmc/mmc.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
See http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/80067
Is this patch in your queue?
Best regards,
Wolfgang Denk
Signature · 4 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 Democracy is mob rule, but with income taxes.