s5p_mmc: support 8-bit bus width
Subsystems (2)
PATCH 1/1 s5p_mmc: support 8-bit bus width
This Patch do support 8-bit bus width for s5p
So we add parameter for bus_width (in s5p_mmc_init(), s5p_mmc_initialize()) If want to use 8-bit bus width, only change (0, 8) instead of (0, 4).
Signed-off-by Jaehoon Chung <[email protected]>
Signed-off-by Minkyu Kang <[email protected]>
Signed-off-by Kyungmin Park <[email protected]>
--- arch/arm/include/asm/arch-s5pc1xx/mmc.h | 2 +- board/samsung/goni/goni.c | 2 +- drivers/mmc/s5p_mmc.c | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-)
arch/arm/include/asm/arch-s5pc1xx/mmc.h +1 -1
@@ -65,7 +65,7 @@ struct mmc_host {unsigned int clock;/* Current clock (MHz) */ }; -int s5p_mmc_init (int dev_index); +int s5p_mmc_init (int dev_index,int bus_width);#endif /* __ASSEMBLY__ */ #endif
board/samsung/goni/goni.c +1 -1
@@ -87,6 +87,6 @@ int board_mmc_init(bd_t *bis) gpio_set_drv(&s5pc110_gpio->g0, i, GPIO_DRV_4X); } -return s5p_mmc_init (0 ); +return s5p_mmc_init (0 ,4 ); }#endif
drivers/mmc/s5p_mmc.c +14 -5
@@ -352,11 +352,16 @@ static void mmc_set_ios(struct mmc *mmc) ctrl =readb (&host->reg->hostctl);/* +* WIDE8[5] +* 0 = Depend on WIDE4 +* 1 = 8-bit mode * WIDE4[1] * 1 = 4-bit mode * 0 = 1-bit mode */ -if (mmc->bus_width ==4 ) +if (mmc->bus_width ==8 ) + ctrl |= (1 <<5 ); +else if (mmc->bus_width ==4 ) ctrl |= (1 <<1 );else ctrl &= ~(1 <<1 );
@@ -437,7 +442,7 @@ static int mmc_core_init(struct mmc *mmc)return 0 ; } -static int s5p_mmc_initialize (int dev_index) +static int s5p_mmc_initialize (int dev_index,int bus_width) {struct mmc *mmc;
@@ -450,7 +455,11 @@ static int s5p_mmc_initialize(int dev_index) mmc->init = mmc_core_init; mmc->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 |MMC_VDD_165_195 ; - mmc->host_caps =MMC_MODE_4BIT | MMC_MODE_HS_52MHz |MMC_MODE_HS ; +if (bus_width ==8 ) + mmc->host_caps =MMC_MODE_8BIT ; +else + mmc->host_caps =MMC_MODE_4BIT ; + mmc->host_caps |= MMC_MODE_HS_52MHz |MMC_MODE_HS ; mmc->f_min =400000 ; mmc->f_max =52000000 ;
@@ -462,7 +471,7 @@ static int s5p_mmc_initialize(int dev_index)return 0 ; } -int s5p_mmc_init (int dev_index) +int s5p_mmc_init (int dev_index,int bus_width) { -return s5p_mmc_initialize (dev_index); +return s5p_mmc_initialize (dev_index, bus_width); }
Signature · 1 line
1.6.0.4
PATCH 1/1 s5p_mmc: support 8-bit bus width
Dear Jaehoon Chung,
Quoted 8 lines · Jaehoon Chung
This Patch do support 8-bit bus width for s5p
So we add parameter forbus_width(ins5p_mmc_init(),s5p_mmc_initialize()) If want to use 8-bit bus width, only change (0, 8) instead of (0, 4).?Signed-off-by: Jaehoon Chung <[email protected]> ?Signed-off-by: Minkyu Kang <[email protected]> ?Signed-off-by: Kyungmin Park <[email protected]>
Quoted 6 lines
---
?arch/arm/include/asm/arch-s5pc1xx/mmc.h | ? ?2 +- ?board/samsung/goni/goni.c ? ? ? ? ? ? ? | ? ?2 +- ?drivers/mmc/s5p_mmc.c ? ? ? ? ? ? ? ? ? | ? 19 ++++++++++++++-----?3 files changed, 16 insertions(+), 7 deletions(-)
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net