From patchwork Thu Nov 8 08:35:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 1714461 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0FA933FC8F for ; Thu, 8 Nov 2012 08:35:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549Ab2KHIfs (ORCPT ); Thu, 8 Nov 2012 03:35:48 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:56560 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751979Ab2KHIfq (ORCPT ); Thu, 8 Nov 2012 03:35:46 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD500KXJUIDMOG0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Thu, 08 Nov 2012 17:35:45 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.46]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 51.84.01231.1EE6B905; Thu, 08 Nov 2012 17:35:45 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-a2-509b6ee1ecfe Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D0.84.01231.1EE6B905; Thu, 08 Nov 2012 17:35:45 +0900 (KST) Received: from [10.90.51.55] by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD500LRAUJKJM70@mmp1.samsung.com> for linux-mmc@vger.kernel.org; Thu, 08 Nov 2012 17:35:45 +0900 (KST) Message-id: <509B6ED3.2000003@samsung.com> Date: Thu, 08 Nov 2012 17:35:31 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-version: 1.0 To: linux-mmc Cc: Chris Ball , Kyungmin Park , Will Newton , James Hogan , Seungwon Jeon Subject: [PATCH v3 2/4] mmc: dw-mmc: remove the duplicated code Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+Znu7DvNkBBj965C2O/O9ndGD0+LxJ LoAxissmJTUnsyy1SN8ugSvj39TDzAWLOSq2X1nM0sD4gK2LkZNDQsBEor+3lRXCFpO4cG89 UJyLQ0hgGaPErkNrWWCKfnevYoRILGKUuNnfwALhtDNJ7JixAWwUr4CWxPtD69lBbBYBVYnz y66CjWUT0JHY/u04UxcjB4eoQJjEzs3pEOWCEj8m3wNbICKgKdG5fSXYZmaBA4wSez9+BZsj LGAv0TrzCCOIzQw0Z3/rNDYIW15i85q3zBC7BCS+TT7EAjJfQkBWYtMBZpA5EgKv2SQ2zL8H 9ZqkxMEVN1gmMIrMQrJ7FpKxs5CMXcDIvIpRNLUguaA4KT3XUK84Mbe4NC9dLzk/dxMjJMil djCubLA4xCjAwajEw6shOTtAiDWxrLgy9xCjBAezkgjvMmegEG9KYmVValF+fFFpTmrxIUYf oGsnMkuJJucDIzCvJN7Q2MDY0NDS0MzU0tQAh7CSOG+zR0qAkEB6YklqdmpqQWoRzDgmDk6p BsaK940NzZfd9j3vbZirUPDhm4pF8bSngmsy7j9eFHY/4+rB2jw5vfSc6tvvu7rnr2f3VXz/ /dNrs5VP16/ZwVD4h3/WF17vNLODOz+Z/n7pmXjvy4rPP42SzaYf4+CP/H4zaJHyotObxZjf TY1q/ZjUz2e4PCv24MrfQry7KiYbXhCvFZMSzlymxFKckWioxVxUnAgAK3a4Wp8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsVy+t9jAd2HebMDDPo3SVsc+d/P6MDo8XmT XABjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYR1jxr+ph5kLFnNUbL+ymKWB 8QFbFyMnh4SAicTv7lWMELaYxIV764HiXBxCAosYJW72N7BAOO1MEjtmbADr4BXQknh/aD07 iM0ioCpxftlVVhCbTUBHYvu340xdjBwcogJhEjs3p0OUC0r8mHyPBcQWEdCU6Ny+EmwBs8AB Rom9H7+CzREWsJdonXkE7ApmoDn7W6exQdjyEpvXvGWewMg3C8msWUjKZiEpW8DIvIpRNLUg uaA4KT3XUK84Mbe4NC9dLzk/dxMjOIaeSe1gXNlgcYhRgINRiYdXQ3J2gBBrYllxZe4hRgkO ZiUR3mXOQCHelMTKqtSi/Pii0pzU4kOMPkCfTmSWEk3OB8Z3Xkm8obGJmZGlkZmxibmxMQ5h JXHeZo+UACGB9MSS1OzU1ILUIphxTBycUg2MHZrf7lirNETOYzOP0Ts8TaJmdUDdjlUqd1ye vVSsmfe5w83hLYvObY7Ca0e/LpDT2b6b+Vjj3EMHju2vSCuacyfkz+7b1hNvPzKeEhjsFTFp lefHT7cN3/RHMLQ/M3ZOv3f1Tvqi5VZtRxVvzH3/dI3BPvH1XHbht6Ns09UswlJsqp5mXlo1 RYmlOCPRUIu5qDgRALag8AzOAgAA X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org ctype is used 1-bit buswidth mode by default. Signed-off-by: Jaehoon Chung Signed-off-by: Kyungmin Park Acked-by: Seungwon Jeon Acked-by: James Hogan Acked-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index a1369aa..0a80b5c 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) struct dw_mci_drv_data *drv_data = slot->host->drv_data; u32 regs; - /* set default 1 bit mode */ - slot->ctype = SDMMC_CTYPE_1BIT; - switch (ios->bus_width) { - case MMC_BUS_WIDTH_1: - slot->ctype = SDMMC_CTYPE_1BIT; - break; case MMC_BUS_WIDTH_4: slot->ctype = SDMMC_CTYPE_4BIT; break; case MMC_BUS_WIDTH_8: slot->ctype = SDMMC_CTYPE_8BIT; break; + default: + /* set default 1 bit mode */ + slot->ctype = SDMMC_CTYPE_1BIT; } regs = mci_readl(slot->host, UHS_REG);