From patchwork Wed Oct 24 14:53:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 1639011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 1D657DF2AB for ; Wed, 24 Oct 2012 14:58:14 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TR2Mp-0005NS-Ou; Wed, 24 Oct 2012 14:55:36 +0000 Received: from londo.lunn.ch ([80.238.139.98]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TR2Ln-00053o-QP for linux-arm-kernel@lists.infradead.org; Wed, 24 Oct 2012 14:54:33 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1TR2LR-0007xX-00; Wed, 24 Oct 2012 16:54:09 +0200 From: Andrew Lunn To: jm@lentin.co.uk, Sebastian Hesselbarth , Jason Cooper , josh.coombs@gmail.com, gmbnomis@gmail.com, arnaud.patard@rtp-net.org, alanbutty12@gmail.com, michael@walle.cc Subject: [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 to pinctrl. Date: Wed, 24 Oct 2012 16:53:52 +0200 Message-Id: <1351090434-30499-8-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351090434-30499-1-git-send-email-andrew@lunn.ch> References: <1351090434-30499-1-git-send-email-andrew@lunn.ch> X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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: valentin.longchamp@keymile.com, linux ARM , Andrew Lunn 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 Signed-off-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood-ib62x0.dts | 41 +++++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-ib62x0.c | 21 ----------------- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 66794ed..713b39b 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts @@ -16,6 +16,47 @@ }; ocp@f1000000 { + pinctrl: pinctrl@10000 { + compatible = "marvell,88f6281-pinctrl"; + reg = <0x10000 0x20>; + + pinctrl-0 = < &pmx_nand + &pmx_led_os_red &pmx_power_off + &pmx_led_os_green &pmx_led_usb_transfer + &pmx_button_reset &pmx_button_usb_copy >; + pinctrl-names = "default"; + + pmx_nand: pmx-nand { + marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3", + "mpp04", "mpp5", "mpp18", + "mpp19"; + marvell,function = "nand"; + }; + pmx_led_os_red: pmx-led-os-red { + marvell,pins = "mpp22"; + marvell,function = "gpio"; + }; + pmx_power_off: pmx-power-off { + marvell,pins = "mpp24"; + marvell,function = "gpio"; + }; + pmx_led_os_green: pmx-led-os-green { + marvell,pins = "mpp25"; + marvell,function = "gpio"; + }; + pmx_led_usb_transfer: pmx-led-usb-transfer { + marvell,pins = "mpp27"; + marvell,function = "gpio"; + }; + pmx_button_reset: pmx-button-reset { + marvell,pins = "mpp28"; + marvell,function = "gpio"; + }; + pmx_button_usb_copy: pmx-button-usb-copy { + marvell,pins = "mpp29"; + marvell,function = "gpio"; + }; + }; serial@12000 { clock-frequency = <200000000>; status = "okay"; diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index cfc47f8..1b2a4a4 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c @@ -23,7 +23,6 @@ #include #include #include "common.h" -#include "mpp.h" #define IB62X0_GPIO_POWER_OFF 24 @@ -31,24 +30,6 @@ static struct mv643xx_eth_platform_data ib62x0_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; -static unsigned int ib62x0_mpp_config[] __initdata = { - MPP0_NF_IO2, - MPP1_NF_IO3, - MPP2_NF_IO4, - MPP3_NF_IO5, - MPP4_NF_IO6, - MPP5_NF_IO7, - MPP18_NF_IO0, - MPP19_NF_IO1, - MPP22_GPIO, /* OS LED red */ - MPP24_GPIO, /* Power off device */ - MPP25_GPIO, /* OS LED green */ - MPP27_GPIO, /* USB transfer LED */ - MPP28_GPIO, /* Reset button */ - MPP29_GPIO, /* USB Copy button */ - 0 -}; - static void ib62x0_power_off(void) { gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); @@ -59,8 +40,6 @@ void __init ib62x0_init(void) /* * Basic setup. Needs to be called early. */ - kirkwood_mpp_conf(ib62x0_mpp_config); - kirkwood_ehci_init(); kirkwood_ge00_init(&ib62x0_ge00_data); if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&