From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Wed, 31 Aug 2011 17:33:01 +0900 Subject: [U-Boot] [PATCH] s5p-mmc: Fix ambiguous setting of data transfer width In-Reply-To: <1314701731-19099-1-git-send-email-chander.kashyap@linaro.org> References: <1314701731-19099-1-git-send-email-chander.kashyap@linaro.org> Message-ID: <4E5DF1BD.2070601@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Chander. this patch is correct. Acked-by: Jaehoon Chung Chander Kashyap wrote: > mmc data transfer width is set as following: > WIDE8[5]: > 0 = Depend on WIDE4 > 1 = 8-bit mode > WIDE4[1]: > 1 = 4-bit mode > 0 = 1-bit mode > > In case of 4-bit mode reset 8-bit mode and > in case of 1-bit mode reset 8-bit mode and 4-bit mode > > Signed-off-by: Chander Kashyap > --- > drivers/mmc/s5p_mmc.c | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c > index 7786ecf..6e6ad08 100644 > --- a/drivers/mmc/s5p_mmc.c > +++ b/drivers/mmc/s5p_mmc.c > @@ -368,12 +368,16 @@ static void mmc_set_ios(struct mmc *mmc) > * 1 = 4-bit mode > * 0 = 1-bit mode > */ > - if (mmc->bus_width == 8) > + if (mmc->bus_width == 8) { > ctrl |= (1 << 5); > - else if (mmc->bus_width == 4) > + ctrl &= ~(1 << 1); > + } else if (mmc->bus_width == 4) { > ctrl |= (1 << 1); > - else > + ctrl &= ~(1 << 5); > + } else { > ctrl &= ~(1 << 1); > + ctrl &= ~(1 << 5); > + } > > /* > * OUTEDGEINV[2]