From patchwork Mon Jun 20 08:23:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 896332 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5K8VP6S007005 for ; Mon, 20 Jun 2011 08:31:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750844Ab1FTIbZ (ORCPT ); Mon, 20 Jun 2011 04:31:25 -0400 Received: from ganesha.gnumonks.org ([213.95.27.120]:57867 "EHLO ganesha.gnumonks.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972Ab1FTIbX (ORCPT ); Mon, 20 Jun 2011 04:31:23 -0400 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.72) (envelope-from ) id 1QYZtA-0003LM-0d; Mon, 20 Jun 2011 10:31:20 +0200 Received: from [12.23.102.184] (helo=starstone.dsn.sec.samsung.com) by jackpot.kr.gnumonks.org with esmtp (Exim 4.69) (envelope-from ) id 1QYZ9M-000097-Er; Mon, 20 Jun 2011 16:44:00 +0900 From: Seungwon Jeon To: linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org Cc: akpm@linux-foundation.org, cjb@laptop.org, kgene.kim@samsung.com, Seungwon Jeon Subject: [PATCH] mmc: dw_mmc: set the card_width bit per card. Date: Mon, 20 Jun 2011 17:23:53 +0900 Message-Id: <1308558233-20545-1-git-send-email-tgih.jun@samsung.com> X-Mailer: git-send-email 1.7.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 20 Jun 2011 08:31:25 +0000 (UTC) This patch sets the card_width bit of CTYPE for the corresponding card. CTYPE[31] and CTYPE[16] correspond respectively to card[15] and card[0] for 8-bit mode. And CTYPE[15] and CTYPE[0] correspond respectively to card[15] and CTYPE[0] for 1-bit or 4-bit mode. Signed-off-by: Seungwon Jeon Acked-by: Will Newton --- drivers/mmc/host/dw_mmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 66dcddb..1ca830c 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -574,7 +574,7 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot) } /* Set the current slot bus width */ - mci_writel(host, CTYPE, slot->ctype); + mci_writel(host, CTYPE, (slot->ctype << slot->id)); } static void dw_mci_start_request(struct dw_mci *host,