From patchwork Tue Jan 13 04:59:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5617841 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE1C59F2ED for ; Tue, 13 Jan 2015 04:59:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2B30205F7 for ; Tue, 13 Jan 2015 04:59:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E61D203A5 for ; Tue, 13 Jan 2015 04:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbbAME7h (ORCPT ); Mon, 12 Jan 2015 23:59:37 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:56903 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751083AbbAME7g (ORCPT ); Mon, 12 Jan 2015 23:59:36 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 13 Jan 2015 13:59:35 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id E6BD23E4DF; Tue, 13 Jan 2015 13:59:35 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id B61112806F; Tue, 13 Jan 2015 13:59:35 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id A7C652806D; Tue, 13 Jan 2015 13:59:35 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id PAA04748; Tue, 13 Jan 2015 13:59:35 +0900 X-IronPort-AV: E=Sophos;i="5.07,747,1413212400"; d="scan'208";a="178567647" Received: from mail-hk1lp0119.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.119]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 13 Jan 2015 13:59:34 +0900 Received: from remon.renesas.com (211.11.155.132) by SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) with Microsoft SMTP Server (TLS) id 15.1.53.17; Tue, 13 Jan 2015 04:59:33 +0000 Message-ID: <87bnm3uvfl.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 13/17] mmc: sh_mobile_sdhi: tidyup mmc_data->bus_shift for latest SoC User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson CC: Arnd Bergmann , Chris Ball , Simon , Linux-SH , linux-mmc In-Reply-To: <87twzvuvl1.wl%kuninori.morimoto.gx@renesas.com> References: <87twzvuvl1.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Date: Tue, 13 Jan 2015 04:59:33 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: SG2PR03CA0038.apcprd03.prod.outlook.com (25.160.233.48) To SINPR06MB169.apcprd06.prod.outlook.com (10.242.57.14) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:SINPR06MB169; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SINPR06MB169; X-Forefront-PRVS: 045584D28C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(106356001)(81156004)(50986999)(83506001)(2950100001)(54356999)(36756003)(77096005)(64706001)(66066001)(229853001)(46406003)(68736005)(47776003)(50466002)(76176999)(105586002)(86362001)(92566002)(19580395003)(19580405001)(69596002)(110136001)(33646002)(97736003)(40100003)(23726002)(122386002)(53416004)(77156002)(42186005)(87976001)(101416001)(46102003)(62966003); DIR:OUT; SFP:1102; SCL:1; SRVR:SINPR06MB169; H:remon.renesas.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:SINPR06MB169; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2015 04:59:33.7234 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SINPR06MB169 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Latest SDHI on Renesas has expand register mapping. update mmc_data->bus_shift for it. Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/sh_mobile_sdhi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 48a3be8..26eeeb6 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -202,7 +202,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) host->clk_disable = sh_mobile_sdhi_clk_disable; host->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; /* SD control register space size is 0x100, 0x200 for bus_shift=1 */ - host->bus_shift = resource_size(res) >> 9; + if (resource_size(res) > 0x100) + host->bus_shift = 1; + else + host->bus_shift = 0; mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; if (p) {