From patchwork Thu Jan 24 18:43:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 2034291 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 2C360DF264 for ; Thu, 24 Jan 2013 18:46:29 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyRls-0001re-5D; Thu, 24 Jan 2013 18:43:32 +0000 Received: from mho-04-ewr.mailhop.org ([204.13.248.74] helo=mho-02-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TyRlo-0001rL-Dm for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2013 18:43:29 +0000 Received: from pool-72-84-113-162.nrflva.fios.verizon.net ([72.84.113.162] helo=titan) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1TyRln-0002vW-Gl; Thu, 24 Jan 2013 18:43:27 +0000 Received: from titan.lakedaemon.net (localhost [127.0.0.1]) by titan (Postfix) with ESMTP id BBD453E1466; Thu, 24 Jan 2013 13:43:23 -0500 (EST) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 72.84.113.162 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19W3rXeFUc63i3zMhC19qSb09r1Kw1kmq0= Date: Thu, 24 Jan 2013 13:43:23 -0500 From: Jason Cooper To: Florian Fainelli , Andrew Lunn , Olof Johansson , Arnd Bergmann Subject: Fwd: [PATCH v3 6/7] DT: Convert all kirkwood boards with mv643xx that use DT Message-ID: <20130124184323.GE1758@titan.lakedaemon.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130124_134328_526970_C12C0882 X-CRM114-Status: GOOD ( 21.21 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [204.13.248.74 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linux ARM Kernel 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org All, Here's the patch converting all the kirkwood DT boards to Ian's mv643xx_eth binding. Unfortunately, what I don't like is that the call to kirkwood_ge00_init() remains, but with a NULL argument. thx, Jason. ----- Forwarded message from Ian Molton ----- Date: Tue, 7 Aug 2012 15:34:51 +0100 From: Ian Molton To: linux-arm-kernel@lists.infradead.org Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, ben.dooks@codethink.co.uk, arnd@arndb.de, netdev@vger.kernel.org Subject: [PATCH v3 6/7] DT: Convert all kirkwood boards with mv643xx that use DT This patch converts all present DT capable kirkwood board configurations to use DT to configure the mv643xx ethernet controller. Signed-off-by: Ian Molton --- arch/arm/boot/dts/kirkwood-dnskw.dtsi | 9 +++++++++ arch/arm/boot/dts/kirkwood-dreamplug.dts | 18 ++++++++++++++++++ arch/arm/boot/dts/kirkwood-goflexnet.dts | 8 ++++++++ arch/arm/boot/dts/kirkwood-ib62x0.dts | 10 ++++++++++ arch/arm/boot/dts/kirkwood-iconnect.dts | 10 ++++++++++ arch/arm/boot/dts/kirkwood-lsxl.dtsi | 17 +++++++++++++++++ arch/arm/boot/dts/kirkwood-ts219-6281.dts | 8 +++++++- arch/arm/boot/dts/kirkwood-ts219-6282.dts | 8 +++++++- arch/arm/boot/dts/kirkwood-ts219.dtsi | 3 +++ arch/arm/mach-kirkwood/board-dnskw.c | 7 +------ arch/arm/mach-kirkwood/board-dreamplug.c | 13 ++----------- arch/arm/mach-kirkwood/board-goflexnet.c | 7 +------ arch/arm/mach-kirkwood/board-ib62x0.c | 7 +------ arch/arm/mach-kirkwood/board-iconnect.c | 7 +------ arch/arm/mach-kirkwood/board-lsxl.c | 13 ++----------- arch/arm/mach-kirkwood/board-ts219.c | 10 +--------- 16 files changed, 98 insertions(+), 57 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index 7408655..214fe0b 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi @@ -65,5 +65,14 @@ reg = <0x7b00000 0x500000>; }; }; + + smi0: mdio@72000 { + status = "ok"; + }; + + egiga0 { + phy_addr = <8>; + status = "ok"; + }; }; }; diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index 26e281f..c27ed1c 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts @@ -53,6 +53,24 @@ status = "okay"; nr-ports = <1>; }; + + smi0: mdio@72000 { + status = "ok"; + }; + + smi1: mdio@76000 { + status = "ok"; + }; + + egiga0 { + phy_addr = <0>; + status = "ok"; + }; + + egiga1 { + phy_addr = <1>; + status = "ok"; + }; }; gpio-leds { diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index 7c8238f..f03dbd0 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts @@ -50,6 +50,14 @@ nr-ports = <2>; }; + smi0: mdio@72000 { + status = "ok"; + }; + + egiga0 { + phy_addr = <0>; + status = "ok"; + }; }; gpio-leds { compatible = "gpio-leds"; diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 66794ed..8c462a1 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts @@ -45,6 +45,16 @@ }; }; + + smi0: mdio@72000 { + status = "ok"; + }; + + egiga0 { + phy_addr = <8>; + status = "ok"; + }; + }; gpio_keys { diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index 52d9470..9fc82be 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts @@ -30,6 +30,16 @@ clock-frequency = <200000000>; status = "ok"; }; + + smi0: mdio@72000 { + status = "ok"; + }; + + egiga0 { + phy_addr = ; + status = "ok"; + }; + }; gpio-leds { compatible = "gpio-leds"; diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 8ac51c0..2f47661 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi @@ -40,6 +40,23 @@ }; }; }; + smi0: mdio@72000 { + status = "ok"; + }; + + smi1: mdio@76000 { + status = "ok"; + }; + + egiga0 { + phy_addr = <0>; + status = "ok"; + }; + + egiga1 { + phy_addr = <8>; + status = "ok"; + }; }; gpio_keys { diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts index ccbf327..4ca49b5 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts @@ -3,6 +3,12 @@ /include/ "kirkwood-ts219.dtsi" / { + ocp@f1000000 { + egiga0 { + phy_addr = <8>; + status = "ok"; + }; + }; gpio_keys { compatible = "gpio-keys"; #address-cells = <1>; @@ -18,4 +24,4 @@ gpios = <&gpio0 16 1>; }; }; -}; \ No newline at end of file +}; diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts index fbe9932..40f3c61 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts @@ -3,6 +3,12 @@ /include/ "kirkwood-ts219.dtsi" / { + ocp@f1000000 { + egiga0 { + phy_addr = <0>; + status = "ok"; + }; + }; gpio_keys { compatible = "gpio-keys"; #address-cells = <1>; @@ -18,4 +24,4 @@ gpios = <&gpio1 5 1>; }; }; -}; \ No newline at end of file +}; diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi index 64ea27c..06caf41 100644 --- a/arch/arm/boot/dts/kirkwood-ts219.dtsi +++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi @@ -74,5 +74,8 @@ status = "okay"; nr-ports = <2>; }; + smi0: mdio@72000 { + status = "ok"; + }; }; }; diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 4ab3506..4d8216b 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -29,10 +28,6 @@ #include "common.h" #include "mpp.h" -static struct mv643xx_eth_platform_data dnskw_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - static unsigned int dnskw_mpp_config[] __initdata = { MPP13_UART1_TXD, /* Custom ... */ MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */ @@ -112,7 +107,7 @@ void __init dnskw_init(void) kirkwood_mpp_conf(dnskw_mpp_config); kirkwood_ehci_init(); - kirkwood_ge00_init(&dnskw_ge00_data); + kirkwood_ge00_init(NULL); platform_device_register(&dnskw_fan_device); diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c index aeb234d..b97a112 100644 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ b/arch/arm/mach-kirkwood/board-dreamplug.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -34,14 +33,6 @@ #include "common.h" #include "mpp.h" -static struct mv643xx_eth_platform_data dreamplug_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct mv643xx_eth_platform_data dreamplug_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(1), -}; - static struct mvsdio_platform_data dreamplug_mvsdio_data = { /* unfortunately the CD signal has not been connected */ }; @@ -65,7 +56,7 @@ void __init dreamplug_init(void) kirkwood_mpp_conf(dreamplug_mpp_config); kirkwood_ehci_init(); - kirkwood_ge00_init(&dreamplug_ge00_data); - kirkwood_ge01_init(&dreamplug_ge01_data); + kirkwood_ge00_init(NULL); + kirkwood_ge01_init(NULL); kirkwood_sdio_init(&dreamplug_mvsdio_data); } diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c index 413e2c8..be7437d 100644 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ b/arch/arm/mach-kirkwood/board-goflexnet.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -36,10 +35,6 @@ #include "common.h" #include "mpp.h" -static struct mv643xx_eth_platform_data goflexnet_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - static unsigned int goflexnet_mpp_config[] __initdata = { MPP29_GPIO, /* USB Power Enable */ MPP47_GPIO, /* LED Orange */ @@ -67,5 +62,5 @@ void __init goflexnet_init(void) pr_err("can't setup GPIO 29 (USB Power Enable)\n"); kirkwood_ehci_init(); - kirkwood_ge00_init(&goflexnet_ge00_data); + kirkwood_ge00_init(NULL); } diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index cfc47f8..0a29183 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -27,10 +26,6 @@ #define IB62X0_GPIO_POWER_OFF 24 -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, @@ -62,7 +57,7 @@ void __init ib62x0_init(void) kirkwood_mpp_conf(ib62x0_mpp_config); kirkwood_ehci_init(); - kirkwood_ge00_init(&ib62x0_ge00_data); + kirkwood_ge00_init(NULL); if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 && gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0) pm_power_off = ib62x0_power_off; diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index d7a9198..220f0d4 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -26,10 +25,6 @@ #include "common.h" #include "mpp.h" -static struct mv643xx_eth_platform_data iconnect_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(11), -}; - static unsigned int iconnect_mpp_config[] __initdata = { MPP12_GPIO, MPP35_GPIO, @@ -92,7 +87,7 @@ void __init iconnect_init(void) kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25); kirkwood_ehci_init(); - kirkwood_ge00_init(&iconnect_ge00_data); + kirkwood_ge00_init(NULL); platform_device_register(&iconnect_button_device); } diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c index 83d8975..60331d1 100644 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ b/arch/arm/mach-kirkwood/board-lsxl.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -28,14 +27,6 @@ #include "common.h" #include "mpp.h" -static struct mv643xx_eth_platform_data lsxl_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct mv643xx_eth_platform_data lsxl_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - static unsigned int lsxl_mpp_config[] __initdata = { MPP10_GPO, /* HDD Power Enable */ MPP11_GPIO, /* USB Vbus Enable */ @@ -126,8 +117,8 @@ void __init lsxl_init(void) gpio_set_value(LSXL_GPIO_HDD_POWER, 1); kirkwood_ehci_init(); - kirkwood_ge00_init(&lsxl_ge00_data); - kirkwood_ge01_init(&lsxl_ge01_data); + kirkwood_ge00_init(NULL); + kirkwood_ge01_init(NULL); platform_device_register(&lsxl_fan_device); /* register power-off method */ diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c index 1750e68..7e7fe6c 100644 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ b/arch/arm/mach-kirkwood/board-ts219.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -29,10 +28,6 @@ #include "mpp.h" #include "tsx1x-common.h" -static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - static unsigned int qnap_ts219_mpp_config[] __initdata = { MPP0_SPI_SCn, MPP1_SPI_MOSI, @@ -62,10 +57,7 @@ void __init qnap_dt_ts219_init(void) kirkwood_mpp_conf(qnap_ts219_mpp_config); kirkwood_pcie_id(&dev, &rev); - if (dev == MV88F6282_DEV_ID) - qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); - - kirkwood_ge00_init(&qnap_ts219_ge00_data); + kirkwood_ge00_init(NULL); kirkwood_ehci_init(); pm_power_off = qnap_tsx1x_power_off;