From patchwork Wed Jan 23 23:34:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 2027271 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 7EB233FD1A for ; Thu, 24 Jan 2013 00:14:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyAPF-0002Jl-Cz; Thu, 24 Jan 2013 00:11:01 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TyAO7-00026K-56 for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2013 00:09:59 +0000 Received: from pool-72-84-113-162.nrflva.fios.verizon.net ([72.84.113.162] helo=titan) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1TyAO6-0000Sc-MV; Thu, 24 Jan 2013 00:09:50 +0000 Received: from triton.lakedaemon.net (triton.lakedaemon.net [10.16.5.78]) by titan (Postfix) with ESMTP id CC7983E094A; Wed, 23 Jan 2013 18:34:44 -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: U2FsdGVkX18UhkqWdw4GZrqFtMWu42mJraG7tudg89g= From: Jason Cooper To: andrew@lunn.ch, arnd@arndb.de, olof@lixom.net Subject: [RFC PATCH 6/6] ARM: kirkwood: consolidate mv643xx_eth init for DT Date: Wed, 23 Jan 2013 23:34:24 +0000 Message-Id: X-Mailer: git-send-email 1.8.1.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130123_190951_353573_8B8EEDE6 X-CRM114-Status: GOOD ( 22.51 ) 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.66 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: jcooper@lakedaemon.net, Jason Cooper , linux-arm-kernel@lists.infradead.org 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 replace a lot of unneeded code and files with a lookup table. Signed-off-by: Jason Cooper --- arch/arm/mach-kirkwood/Kconfig | 101 ------------------------ arch/arm/mach-kirkwood/Makefile | 14 ---- arch/arm/mach-kirkwood/board-dnskw.c | 7 -- arch/arm/mach-kirkwood/board-dockstar.c | 32 -------- arch/arm/mach-kirkwood/board-dreamplug.c | 35 -------- arch/arm/mach-kirkwood/board-dt.c | 114 +++++++++++++++++++-------- arch/arm/mach-kirkwood/board-goflexnet.c | 34 -------- arch/arm/mach-kirkwood/board-ib62x0.c | 29 ------- arch/arm/mach-kirkwood/board-iconnect.c | 23 ------ arch/arm/mach-kirkwood/board-lsxl.c | 36 --------- arch/arm/mach-kirkwood/board-mplcec4.c | 35 -------- arch/arm/mach-kirkwood/board-ns2.c | 34 -------- arch/arm/mach-kirkwood/board-openblocks_a6.c | 26 ------ arch/arm/mach-kirkwood/board-usi_topkick.c | 29 ------- arch/arm/mach-kirkwood/common.h | 63 --------------- 15 files changed, 81 insertions(+), 531 deletions(-) delete mode 100644 arch/arm/mach-kirkwood/board-dockstar.c delete mode 100644 arch/arm/mach-kirkwood/board-dreamplug.c delete mode 100644 arch/arm/mach-kirkwood/board-goflexnet.c delete mode 100644 arch/arm/mach-kirkwood/board-ib62x0.c delete mode 100644 arch/arm/mach-kirkwood/board-iconnect.c delete mode 100644 arch/arm/mach-kirkwood/board-lsxl.c delete mode 100644 arch/arm/mach-kirkwood/board-mplcec4.c delete mode 100644 arch/arm/mach-kirkwood/board-ns2.c delete mode 100644 arch/arm/mach-kirkwood/board-openblocks_a6.c delete mode 100644 arch/arm/mach-kirkwood/board-usi_topkick.c diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 432bee0..188651b 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -58,19 +58,6 @@ config ARCH_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Marvell Kirkwood using flattened device tree. -config MACH_DREAMPLUG_DT - bool "Marvell DreamPlug (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Marvell DreamPlug (Flattened Device Tree). - -config MACH_ICONNECT_DT - bool "Iomega Iconnect (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here to enable Iomega Iconnect support. - config MACH_DLINK_KIRKWOOD_DT bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" select ARCH_KIRKWOOD_DT @@ -79,14 +66,6 @@ config MACH_DLINK_KIRKWOOD_DT Kirkwood-based D-Link NASes such as DNS-320 & DNS-325, using Flattened Device Tree. -config MACH_IB62X0_DT - bool "RaidSonic IB-NAS6210, IB-NAS6220 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - RaidSonic IB-NAS6210 & IB-NAS6220 devices, using - Flattened Device Tree. - config MACH_TS219_DT bool "Device Tree for QNAP TS-11X, TS-21X NAS" select ARCH_KIRKWOOD_DT @@ -102,29 +81,6 @@ config MACH_TS219_DT or MV6282. If you have the wrong one, the buttons will not work. -config MACH_DOCKSTAR_DT - bool "Seagate FreeAgent Dockstar (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Seagate FreeAgent Dockstar (Flattened Device Tree). - -config MACH_GOFLEXNET_DT - bool "Seagate GoFlex Net (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Seagate GoFlex Net (Flattened Device Tree). - -config MACH_LSXL_DT - bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - select POWER_RESET_RESTART - help - Say 'Y' here if you want your kernel to support the - Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using - Flattened Device Tree. - config MACH_IOMEGA_IX2_200_DT bool "Iomega StorCenter ix2-200 (Flattened Device Tree)" select ARCH_KIRKWOOD_DT @@ -139,63 +95,6 @@ config MACH_KM_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Keymile Kirkwood Reference Desgin, using Flattened Device Tree. -config MACH_INETSPACE_V2_DT - bool "LaCie Internet Space v2 NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - Internet Space v2 NAS, using Flattened Device Tree. - -config MACH_MPLCEC4_DT - bool "MPL CEC4 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - MPL CEC4 (Flattened Device Tree). - -config MACH_NETSPACE_V2_DT - bool "LaCie Network Space v2 NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - Network Space v2 NAS, using Flattened Device Tree. - -config MACH_NETSPACE_MAX_V2_DT - bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - Network Space Max v2 NAS, using Flattened Device Tree. - -config MACH_NETSPACE_LITE_V2_DT - bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - Network Space Lite v2 NAS, using Flattened Device Tree. - -config MACH_NETSPACE_MINI_V2_DT - bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - Network Space Mini v2 NAS (aka SafeBox), using Flattened - Device Tree. - -config MACH_OPENBLOCKS_A6_DT - bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Plat'Home OpenBlocks A6 (Flattened Device Tree). - -config MACH_TOPKICK_DT - bool "USI Topkick (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - USI Topkick, using Flattened Device Tree - config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" help diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index ee3aa77..ab739b0 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -20,21 +20,7 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_T5325) += t5325-setup.o obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o -obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o -obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o -obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o -obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o -obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o -obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o -obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o -obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o -obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index a1aa87f..2af7a95 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c @@ -14,14 +14,9 @@ #include #include #include -#include #include #include "common.h" -static struct mv643xx_eth_platform_data dnskw_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - /* Register any GPIO for output and set the value */ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) { @@ -36,8 +31,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) void __init dnskw_init(void) { - kirkwood_ge00_init(&dnskw_ge00_data); - /* Set NAS to turn back on after a power failure */ dnskw_gpio_register(37, "dnskw:power:recover", 1); } diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c deleted file mode 100644 index d7196db..0000000 --- a/arch/arm/mach-kirkwood/board-dockstar.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * arch/arm/mach-kirkwood/board-dockstar.c - * - * Seagate FreeAgent Dockstar Board Init for drivers not converted to - * flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - * Copied and modified for Seagate GoFlex Net support by - * Joshua Coombs based on ArchLinux ARM's - * GoFlex kernel patches. - * - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data dockstar_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init dockstar_dt_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&dockstar_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c deleted file mode 100644 index 0903242..0000000 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper - * - * arch/arm/mach-kirkwood/board-dreamplug.c - * - * Marvell DreamPlug Reference Board Init for drivers not converted to - * flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include "common.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), -}; - -void __init dreamplug_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&dreamplug_ge00_data); - kirkwood_ge01_init(&dreamplug_ge01_data); -} diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 73b76e4..f5bd640 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -93,6 +93,86 @@ static int __init kirkwood_pcie_dt_init(void) } subsys_initcall(kirkwood_pcie_dt_init); +struct kirkwood_dt_gige { + const char *compatible; + int phy_addr00; + int phy_addr01; +}; + +static struct kirkwood_dt_gige kw_dt_gige[] = { + { .compatible = "buffalo,lsxl", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_ADDR(8) }, + { .compatible = "dlink,dns-kirkwood", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(8), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "globalscale,dreamplug", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_ADDR(1) }, + { .compatible = "iom,iconnect", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(11), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "lacie,inetspace_v2", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(8), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "lacie,netspace_v2", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(8), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "lacie,netspace_max_v2", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(8), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "lacie,netspace_lite_v2", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "lacie,netspace_mini_v2", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "mpl,cec4", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(1), + .phy_addr01 = MV643XX_ETH_PHY_ADDR(2) }, + { .compatible = "plathome,openblocks-a6", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "raidsonic,ib-nas62x0", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(8), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "seagate,dockstar", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "seagate,goflexnet", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { .compatible = "usi,topkick", + .phy_addr00 = MV643XX_ETH_PHY_ADDR(0), + .phy_addr01 = MV643XX_ETH_PHY_NONE }, + { NULL, MV643XX_ETH_PHY_NONE, MV643XX_ETH_PHY_NONE }, +}; + +static void kirkwood_gige_dt_init(void) { + int i; + + for (i = 0; kw_dt_gige[i].compatible != NULL; i++) { + if (of_machine_is_compatible(kw_dt_gige[i].compatible)) { + + if (kw_dt_gige[i].phy_addr00 != MV643XX_ETH_PHY_NONE) { + struct mv643xx_eth_platform_data d = { + .phy_addr = kw_dt_gige[i].phy_addr00, + }; + kirkwood_ge00_init(&d); + } + + if (kw_dt_gige[i].phy_addr01 != MV643XX_ETH_PHY_NONE) { + struct mv643xx_eth_platform_data d = { + .phy_addr = kw_dt_gige[i].phy_addr01, + }; + kirkwood_ge01_init(&d); + } + + break; + } + } +} + static void __init kirkwood_dt_init(void) { pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); @@ -118,52 +198,20 @@ static void __init kirkwood_dt_init(void) kexec_reinit = kirkwood_enable_pcie; #endif - if (of_machine_is_compatible("globalscale,dreamplug")) - dreamplug_init(); + kirkwood_gige_dt_init(); if (of_machine_is_compatible("dlink,dns-kirkwood")) dnskw_init(); - if (of_machine_is_compatible("iom,iconnect")) - iconnect_init(); - - if (of_machine_is_compatible("raidsonic,ib-nas62x0")) - ib62x0_init(); - if (of_machine_is_compatible("qnap,ts219")) qnap_dt_ts219_init(); - if (of_machine_is_compatible("seagate,dockstar")) - dockstar_dt_init(); - - if (of_machine_is_compatible("seagate,goflexnet")) - goflexnet_init(); - - if (of_machine_is_compatible("buffalo,lsxl")) - lsxl_init(); - if (of_machine_is_compatible("iom,ix2-200")) iomega_ix2_200_init(); if (of_machine_is_compatible("keymile,km_kirkwood")) km_kirkwood_init(); - if (of_machine_is_compatible("lacie,inetspace_v2") || - of_machine_is_compatible("lacie,netspace_v2") || - of_machine_is_compatible("lacie,netspace_max_v2") || - of_machine_is_compatible("lacie,netspace_lite_v2") || - of_machine_is_compatible("lacie,netspace_mini_v2")) - ns2_init(); - - if (of_machine_is_compatible("mpl,cec4")) - mplcec4_init(); - - if (of_machine_is_compatible("plathome,openblocks-a6")) - openblocks_a6_init(); - - if (of_machine_is_compatible("usi,topkick")) - usi_topkick_init(); - of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); } diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c deleted file mode 100644 index 9db979a..0000000 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper - * - * arch/arm/mach-kirkwood/board-goflexnet.c - * - * Seagate GoFlext Net Board Init for drivers not converted to - * flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - * Copied and modified for Seagate GoFlex Net support by - * Joshua Coombs based on ArchLinux ARM's - * GoFlex kernel patches. - * - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data goflexnet_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init goflexnet_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&goflexnet_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c deleted file mode 100644 index 9a857ae..0000000 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012 (C), Simon Baatz - * - * arch/arm/mach-kirkwood/board-ib62x0.c - * - * RaidSonic ICY BOX IB-NAS6210 & IB-NAS6220 init for drivers not - * converted to flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data ib62x0_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - -void __init ib62x0_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&ib62x0_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c deleted file mode 100644 index ff042dc..0000000 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * arch/arm/mach-kirkwood/board-iconnect.c - * - * Iomega i-connect Board Setup - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data iconnect_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(11), -}; - -void __init iconnect_init(void) -{ - kirkwood_ge00_init(&iconnect_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c deleted file mode 100644 index 3483952..0000000 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 (C), Michael Walle - * - * arch/arm/mach-kirkwood/board-lsxl.c - * - * Buffalo Linkstation LS-XHL and LS-CHLv2 init for drivers not - * converted to flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include "common.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), -}; - -void __init lsxl_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - - kirkwood_ge00_init(&lsxl_ge00_data); - kirkwood_ge01_init(&lsxl_ge01_data); -} diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c deleted file mode 100644 index 938712e..0000000 --- a/arch/arm/mach-kirkwood/board-mplcec4.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2012 MPL AG, Switzerland - * Stefan Peter - * - * arch/arm/mach-kirkwood/board-mplcec4.c - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data mplcec4_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(1), -}; - -static struct mv643xx_eth_platform_data mplcec4_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(2), -}; - -void __init mplcec4_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&mplcec4_ge00_data); - kirkwood_ge01_init(&mplcec4_ge01_data); -} - - - diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c deleted file mode 100644 index f2ea3b7..0000000 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2012 (C), Simon Guinot - * - * arch/arm/mach-kirkwood/board-ns2.c - * - * LaCie Network Space v2 board (and parents) initialization for drivers - * not converted to flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data ns2_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - -void __init ns2_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - if (of_machine_is_compatible("lacie,netspace_lite_v2") || - of_machine_is_compatible("lacie,netspace_mini_v2")) - ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); - kirkwood_ge00_init(&ns2_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c deleted file mode 100644 index b11d8fd..0000000 --- a/arch/arm/mach-kirkwood/board-openblocks_a6.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2012 Nobuhiro Iwamatsu - * - * arch/arm/mach-kirkwood/board-openblocks_a6.c - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data openblocks_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init openblocks_a6_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&openblocks_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c deleted file mode 100644 index 1cc04ec..0000000 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper - * - * arch/arm/mach-kirkwood/board-usi_topkick.c - * - * USI Topkick Init for drivers not converted to flattened device tree yet. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include "common.h" - -static struct mv643xx_eth_platform_data topkick_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init usi_topkick_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&topkick_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 1c42cb8..ba6eb9c 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -55,11 +55,6 @@ void kirkwood_restart(char, const char *); void kirkwood_clk_init(void); /* board init functions for boards not fully converted to fdt */ -#ifdef CONFIG_MACH_DREAMPLUG_DT -void dreamplug_init(void); -#else -static inline void dreamplug_init(void) {}; -#endif #ifdef CONFIG_MACH_TS219_DT void qnap_dt_ts219_init(void); #else @@ -72,36 +67,6 @@ void dnskw_init(void); static inline void dnskw_init(void) {}; #endif -#ifdef CONFIG_MACH_ICONNECT_DT -void iconnect_init(void); -#else -static inline void iconnect_init(void) {}; -#endif - -#ifdef CONFIG_MACH_IB62X0_DT -void ib62x0_init(void); -#else -static inline void ib62x0_init(void) {}; -#endif - -#ifdef CONFIG_MACH_DOCKSTAR_DT -void dockstar_dt_init(void); -#else -static inline void dockstar_dt_init(void) {}; -#endif - -#ifdef CONFIG_MACH_GOFLEXNET_DT -void goflexnet_init(void); -#else -static inline void goflexnet_init(void) {}; -#endif - -#ifdef CONFIG_MACH_LSXL_DT -void lsxl_init(void); -#else -static inline void lsxl_init(void) {}; -#endif - #ifdef CONFIG_MACH_IOMEGA_IX2_200_DT void iomega_ix2_200_init(void); #else @@ -114,34 +79,6 @@ void km_kirkwood_init(void); static inline void km_kirkwood_init(void) {}; #endif -#ifdef CONFIG_MACH_MPLCEC4_DT -void mplcec4_init(void); -#else -static inline void mplcec4_init(void) {}; -#endif - -#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ - defined(CONFIG_MACH_NETSPACE_V2_DT) || \ - defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ - defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \ - defined(CONFIG_MACH_NETSPACE_MINI_V2_DT) -void ns2_init(void); -#else -static inline void ns2_init(void) {}; -#endif - -#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT -void openblocks_a6_init(void); -#else -static inline void openblocks_a6_init(void) {}; -#endif - -#ifdef CONFIG_MACH_TOPKICK_DT -void usi_topkick_init(void); -#else -static inline void usi_topkick_init(void) {}; -#endif - /* early init functions not converted to fdt yet */ char *kirkwood_id(void); void kirkwood_l2_init(void);