From patchwork Fri Dec 21 14:49:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1903491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 5480D3FC66 for ; Fri, 21 Dec 2012 14:57:42 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tm3z2-0002wk-7f; Fri, 21 Dec 2012 14:53:56 +0000 Received: from mail.free-electrons.com ([94.23.32.191]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tm3vp-00011O-8O for linux-arm-kernel@lists.infradead.org; Fri, 21 Dec 2012 14:50:38 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id CA99927D; Fri, 21 Dec 2012 15:50:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2D850E5; Fri, 21 Dec 2012 15:50:26 +0100 (CET) From: Thomas Petazzoni To: Andrew Lunn , Jason Cooper , Gregory Clement , Nicolas Pitre Subject: [PATCH v2 13/20] arm: kirkwood: mplcec4: use Device Tree to probe SDIO Date: Fri, 21 Dec 2012 15:49:12 +0100 Message-Id: <1356101359-6054-14-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1356101359-6054-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1356101359-6054-1-git-send-email-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121221_095037_604279_1AFC7316 X-CRM114-Status: GOOD ( 15.82 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lior Amsalem , Maen Suleiman , Stefan Peter , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly. This patch has not been tested, it remains to be tested by a person having access to the hardware. Signed-off-by: Thomas Petazzoni Cc: Stefan Peter Tested-by: Stefan Peter --- Changes since v1: * Remove the useless header inclusion from board-mplcec4.c, now that the SDIO interface is probed from the Device Tree. * Reference the pmx_sdio muxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface. --- arch/arm/boot/dts/kirkwood-mplcec4.dts | 11 +++++++++-- arch/arm/mach-kirkwood/board-mplcec4.c | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts index 262c654..662dfd8 100644 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts @@ -20,12 +20,11 @@ pinctrl: pinctrl@10000 { pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health &pmx_sdio + &pmx_led_health &pmx_sata0 &pmx_sata1 &pmx_led_user1o &pmx_led_user1g &pmx_led_user0o &pmx_led_user0g &pmx_led_misc - &pmx_sdio_cd >; pinctrl-names = "default"; @@ -133,6 +132,14 @@ status = "okay"; }; + + mvsdio@90000 { + pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; + pinctrl-names = "default"; + status = "okay"; + cd-gpios = <&gpio1 15 0>; + /* No WP GPIO */ + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c index 56bfe5a..73a0332 100644 --- a/arch/arm/mach-kirkwood/board-mplcec4.c +++ b/arch/arm/mach-kirkwood/board-mplcec4.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "common.h" #include "mpp.h" @@ -24,11 +23,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(2), }; -static struct mvsdio_platform_data mplcec4_mvsdio_data = { - .gpio_card_detect = 47, /* MPP47 used as SD card detect */ -}; - - void __init mplcec4_init(void) { /* @@ -36,7 +30,6 @@ void __init mplcec4_init(void) */ kirkwood_ge00_init(&mplcec4_ge00_data); kirkwood_ge01_init(&mplcec4_ge01_data); - kirkwood_sdio_init(&mplcec4_mvsdio_data); kirkwood_pcie_init(KW_PCIE0); }