diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 13:34:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-06 13:34:43 -0700 |
commit | 44598f98b98e54beca34dc836b38eaea40be1abf (patch) | |
tree | 42a498e0267b23289ffe240907fd9bacb9156a2c /arch/arm/mach-kirkwood | |
parent | b4b50fd78b1e31989940dfc647e64453d0f7176a (diff) | |
parent | 4e5f67fa538ded704c904157e3ca23ceef9c7e64 (diff) |
Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates from Olof Johansson:
"Board updates for 3.12. Again, a bit of domain overlap with SoC and
DT branches, but most of this is around legacy code and board support.
We've found that platform maintainers have a hard time separating all
of these out and might move towards fewer branches for next release.
- Removal of a number of Marvell Kirkwood board files, since contents
is now common and mostly configured via DT.
- Device-tree updates for Marvell Dove, including irqchip and
clocksource setup.
- Defconfig updates. Gotta go somewhere. One new one for Renesas
Lager.
- New backlight drivers for backlights used on Renesas shmobile
platforms.
- Removal of Renesas leds driver.
- Shuffling of some of the new Broadcom platforms to give room for
others in the same mach directory. More in 3.13"
* tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits)
mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event
mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
ARM: bcm: Make secure API call optional
ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)
ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona
ARM: bcm: Rename board_bcm
mmc: sdhci-bcm-kona: make linker-section warning go away
ARM: tegra: defconfig updates
ARM: dove: add initial DT file for Globalscale D2Plug
ARM: dove: add GPIO IR receiver node to SolidRun CuBox
ARM: dove: add common pinmux functions to DT
ARM: dove: add cpu device tree node
ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI
arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument
ARM: kirkwood: fix DT building and update defconfig
ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code
ARM: configs: disable DEBUG_LL in bcm_defconfig
ARM: bcm281xx: Board specific reboot code
ARM bcm281xx: Turn on socket & network support.
ARM: bcm281xx: Turn on L2 cache.
...
Diffstat (limited to 'arch/arm/mach-kirkwood')
30 files changed, 99 insertions, 1926 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index b634f9650a7b..fe8319ad3158 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -2,67 +2,32 @@ if ARCH_KIRKWOOD menu "Marvell Kirkwood Implementations" +config KIRKWOOD_LEGACY + bool + config MACH_D2NET_V2 bool "LaCie d2 Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie d2 Network v2 NAS. -config MACH_DOCKSTAR - bool "Seagate FreeAgent DockStar" - help - Say 'Y' here if you want your kernel to support the - Seagate FreeAgent DockStar. - -config MACH_ESATA_SHEEVAPLUG - bool "Marvell eSATA SheevaPlug Reference Board" - help - Say 'Y' here if you want your kernel to support the - Marvell eSATA SheevaPlug Reference Board. - -config MACH_GURUPLUG - bool "Marvell GuruPlug Reference Board" - help - Say 'Y' here if you want your kernel to support the - Marvell GuruPlug Reference Board. - -config MACH_INETSPACE_V2 - bool "LaCie Internet Space v2 NAS Board" - help - Say 'Y' here if you want your kernel to support the - LaCie Internet Space v2 NAS. - -config MACH_MV88F6281GTW_GE - bool "Marvell 88F6281 GTW GE Board" - help - Say 'Y' here if you want your kernel to support the - Marvell 88F6281 GTW GE Board. - config MACH_NET2BIG_V2 bool "LaCie 2Big Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie 2Big Network v2 NAS. config MACH_NET5BIG_V2 bool "LaCie 5Big Network v2 NAS Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the LaCie 5Big Network v2 NAS. -config MACH_NETSPACE_MAX_V2 - bool "LaCie Network Space Max v2 NAS Board" - help - Say 'Y' here if you want your kernel to support the - LaCie Network Space Max v2 NAS. - -config MACH_NETSPACE_V2 - bool "LaCie Network Space v2 NAS Board" - help - Say 'Y' here if you want your kernel to support the - LaCie Network Space v2 NAS. - config MACH_OPENRD + select KIRKWOOD_LEGACY bool config MACH_OPENRD_BASE @@ -88,30 +53,28 @@ config MACH_OPENRD_ULTIMATE config MACH_RD88F6192_NAS bool "Marvell RD-88F6192-NAS Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell RD-88F6192-NAS Reference Board. config MACH_RD88F6281 bool "Marvell RD-88F6281 Reference Board" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the Marvell RD-88F6281 Reference Board. -config MACH_SHEEVAPLUG - bool "Marvell SheevaPlug Reference Board" - help - Say 'Y' here if you want your kernel to support the - Marvell SheevaPlug Reference Board. - config MACH_T5325 bool "HP t5325 Thin Client" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the HP t5325 Thin Client. config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and @@ -119,6 +82,7 @@ config MACH_TS219 config MACH_TS41X bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS" + select KIRKWOOD_LEGACY help Say 'Y' here if you want your kernel to support the QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo @@ -129,6 +93,9 @@ comment "Device tree entries" config ARCH_KIRKWOOD_DT bool "Marvell Kirkwood Flattened Device Tree" select KIRKWOOD_CLK + select OF_IRQ + select ORION_IRQCHIP + select ORION_TIMER select POWER_SUPPLY select POWER_RESET select POWER_RESET_GPIO @@ -139,184 +106,12 @@ config ARCH_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Marvell Kirkwood using flattened device tree. -config MACH_CLOUDBOX_DT - bool "LaCie CloudBox NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the LaCie - CloudBox NAS, using Flattened Device Tree. - -config MACH_DB88F628X_BP_DT - bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)" - help - Say 'Y' here if you want your kernel to support the Marvell - DB-88F6281-BP and DB-88F6282-BP Development Board (Flattened - Device Tree). - -config MACH_DLINK_KIRKWOOD_DT - bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Kirkwood-based D-Link NASes such as DNS-320 & DNS-325, - using Flattened Device Tree. - -config MACH_DOCKSTAR_DT - bool "Seagate FreeAgent Dockstar (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT +config MACH_MV88F6281GTW_GE_DT + bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)" + depends on ARCH_KIRKWOOD_DT help Say 'Y' here if you want your kernel to support the - Seagate FreeAgent Dockstar (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_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_GURUPLUG_DT - bool "Marvell GuruPlug Reference Board (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Marvell GuruPlug Reference Board (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_ICONNECT_DT - bool "Iomega Iconnect (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here to enable Iomega Iconnect support. - -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_IOMEGA_IX2_200_DT - bool "Iomega StorCenter ix2-200 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Iomega StorCenter ix2-200 (Flattened Device Tree). - -config MACH_KM_KIRKWOOD_DT - bool "Keymile Kirkwood Reference Design (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Keymile Kirkwood Reference Desgin, using 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_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_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_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_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 using Flattened Device Tree. - - This board is embedded in a product named CloudBox, which - provides automatic backup on a 100GB cloud storage. This - should not confused with a more recent LaCie NAS also named - CloudBox. For this last, the disk capacity is 1TB or above. - -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_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_READYNAS_DT - bool "NETGEAR ReadyNAS Duo v2 (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - select ARM_APPENDED_DTB - select ARM_ATAG_DTB_COMPAT - help - Say 'Y' here if you want your kernel to support the - NETGEAR ReadyNAS Duo v2 using Fattened Device Tree. - -config MACH_SHEEVAPLUG_DT - bool "Marvell (eSATA) SheevaPlug (Flattened Device Tree)" - select ARCH_KIRKWOOD_DT - help - Say 'Y' here if you want your kernel to support the - Marvell (eSATA) SheevaPlug (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_DT - bool "Device Tree for QNAP TS-11X, TS-21X NAS" - select ARCH_KIRKWOOD_DT - select ARM_APPENDED_DTB - select ARM_ATAG_DTB_COMPAT - select POWER_RESET_QNAP - help - Say 'Y' here if you want your kernel to support the QNAP - TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and - TS-219P+ Turbo NAS devices using Fattened Device Tree. - There are two different Device Tree descriptions, depending - on if the device is based on an if the board uses the MV6281 - or MV6282. If you have the wrong one, the buttons will not - work. + Marvell 88F6281 GTW GE Board (Flattened Device Tree). endmenu diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index ac4cd75dd499..d1f8e3d0793b 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -1,44 +1,14 @@ -obj-y += common.o irq.o pcie.o mpp.o - +obj-y += common.o pcie.o +obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o -obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o -obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o -obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o -obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o -obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o -obj-$(CONFIG_MACH_NETSPACE_MAX_V2) += netspace_v2-setup.o lacie_v2-common.o -obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o -obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o obj-$(CONFIG_MACH_T5325) += t5325-setup.o obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o -obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o -obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o -obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o -obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o -obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o -obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o -obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o -obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o -obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o -obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.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_LSXL_DT) += board-lsxl.o -obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o -obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o -obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o -obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o -obj-$(CONFIG_MACH_SHEEVAPLUG_DT) += board-sheevaplug.o -obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o -obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o +obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o diff --git a/arch/arm/mach-kirkwood/board-db88f628x-bp.c b/arch/arm/mach-kirkwood/board-db88f628x-bp.c deleted file mode 100644 index 2f574bc8ed40..000000000000 --- a/arch/arm/mach-kirkwood/board-db88f628x-bp.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Saeed Bishara <saeed@marvell.com> - * - * Marvell DB-88F628{1,2}-BP Development 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/of.h> -#include <linux/mv643xx_eth.h> -#include "common.h" - -static struct mv643xx_eth_platform_data db88f628x_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - -void __init db88f628x_init(void) -{ - kirkwood_ge00_init(&db88f628x_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c deleted file mode 100644 index a1aa87f09180..000000000000 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2012 (C), Jamie Lentin <jm@lentin.co.uk> - * - * arch/arm/mach-kirkwood/board-dnskw.c - * - * D-link DNS-320 & DNS-325 NAS 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#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) -{ - if (gpio_request(gpio, name) == 0 && - gpio_direction_output(gpio, 0) == 0) { - gpio_set_value(gpio, def); - if (gpio_export(gpio, 0) != 0) - pr_err("dnskw: Failed to export GPIO %s\n", name); - } else - pr_err("dnskw: Failed to register %s\n", name); -} - -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 d7196db33984..000000000000 --- 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 <josh.coombs@gmail.com> based on ArchLinux ARM's - * GoFlex kernel patches. - * - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#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 0903242c00dc..000000000000 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#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 682b7ac8deb8..82d3ad8e87cf 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,6 +15,9 @@ #include <linux/of.h> #include <linux/of_platform.h> #include <linux/clk-provider.h> +#include <linux/clocksource.h> +#include <linux/dma-mapping.h> +#include <linux/irqchip.h> #include <linux/kexec.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> @@ -49,10 +52,6 @@ static void __init kirkwood_legacy_clk_init(void) orion_clkdev_add("1", "pcie", of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CGC_BIT_SDIO; - orion_clkdev_add(NULL, "mvsdio", - of_clk_get_from_provider(&clkspec)); - /* * The ethernet interfaces forget the MAC address assigned by * u-boot if the clocks are turned off. Until proper DT support @@ -60,19 +59,24 @@ static void __init kirkwood_legacy_clk_init(void) */ clkspec.args[0] = CGC_BIT_GE0; clk = of_clk_get_from_provider(&clkspec); - orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk); clk_prepare_enable(clk); clkspec.args[0] = CGC_BIT_GE1; clk = of_clk_get_from_provider(&clkspec); - orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk); clk_prepare_enable(clk); } -static void __init kirkwood_of_clk_init(void) +static void __init kirkwood_dt_time_init(void) { of_clk_init(NULL); - kirkwood_legacy_clk_init(); + clocksource_of_init(); +} + +static void __init kirkwood_dt_init_early(void) +{ + mvebu_mbus_init("marvell,kirkwood-mbus", + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, + DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); } static void __init kirkwood_dt_init(void) @@ -94,8 +98,8 @@ static void __init kirkwood_dt_init(void) kirkwood_cpufreq_init(); - /* Setup root of clk tree */ - kirkwood_of_clk_init(); + /* Setup clocks for legacy devices */ + kirkwood_legacy_clk_init(); kirkwood_cpuidle_init(); @@ -103,105 +107,22 @@ static void __init kirkwood_dt_init(void) kexec_reinit = kirkwood_enable_pcie; #endif - if (of_machine_is_compatible("globalscale,dreamplug")) - dreamplug_init(); - - if (of_machine_is_compatible("globalscale,guruplug")) - guruplug_dt_init(); - - if (of_machine_is_compatible("globalscale,sheevaplug")) - sheevaplug_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,cloudbox") || - of_machine_is_compatible("lacie,inetspace_v2") || - of_machine_is_compatible("lacie,netspace_lite_v2") || - of_machine_is_compatible("lacie,netspace_max_v2") || - of_machine_is_compatible("lacie,netspace_mini_v2") || - of_machine_is_compatible("lacie,netspace_v2")) - ns2_init(); - - if (of_machine_is_compatible("marvell,db-88f6281-bp") || - of_machine_is_compatible("marvell,db-88f6282-bp")) - db88f628x_init(); - - if (of_machine_is_compatible("mpl,cec4")) - mplcec4_init(); - - if (of_machine_is_compatible("netgear,readynas-duo-v2")) - netgear_readynas_init(); - - if (of_machine_is_compatible("plathome,openblocks-a6")) - openblocks_a6_init(); - - if (of_machine_is_compatible("usi,topkick")) - usi_topkick_init(); + if (of_machine_is_compatible("marvell,mv88f6281gtw-ge")) + mv88f6281gtw_ge_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } static const char * const kirkwood_dt_board_compat[] = { - "globalscale,dreamplug", - "globalscale,guruplug", - "globalscale,sheevaplug", - "dlink,dns-320", - "dlink,dns-325", - "iom,iconnect", - "raidsonic,ib-nas62x0", - "qnap,ts219", - "seagate,dockstar", - "seagate,goflexnet", - "buffalo,lsxl", - "iom,ix2-200", - "keymile,km_kirkwood", - "lacie,cloudbox", - "lacie,inetspace_v2", - "lacie,netspace_lite_v2", - "lacie,netspace_max_v2", - "lacie,netspace_mini_v2", - "lacie,netspace_v2", - "marvell,db-88f6281-bp", - "marvell,db-88f6282-bp", - "mpl,cec4", - "netgear,readynas-duo-v2", - "plathome,openblocks-a6", - "usi,topkick", - "zyxel,nsa310", + "marvell,kirkwood", NULL }; DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = orion_dt_init_irq, - .init_time = kirkwood_timer_init, + .init_early = kirkwood_dt_init_early, + .init_time = kirkwood_dt_time_init, .init_machine = kirkwood_dt_init, .restart = kirkwood_restart, .dt_compat = kirkwood_dt_board_compat, diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c deleted file mode 100644 index 9db979aec82e..000000000000 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> - * - * 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 <josh.coombs@gmail.com> based on ArchLinux ARM's - * GoFlex kernel patches. - * - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#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-guruplug.c b/arch/arm/mach-kirkwood/board-guruplug.c deleted file mode 100644 index a857163954a5..000000000000 --- a/arch/arm/mach-kirkwood/board-guruplug.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * arch/arm/mach-kirkwood/board-guruplug.c - * - * Marvell Guruplug 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#include "common.h" - -static struct mv643xx_eth_platform_data guruplug_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct mv643xx_eth_platform_data guruplug_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(1), -}; - -void __init guruplug_dt_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&guruplug_ge00_data); - kirkwood_ge01_init(&guruplug_ge01_data); -} diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c deleted file mode 100644 index 9a857ae83984..000000000000 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012 (C), Simon Baatz <gmbnomis@gmail.com> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#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 98b5ad1bba90..000000000000 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ /dev/null @@ -1,24 +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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/of.h> -#include <linux/mv643xx_eth.h> -#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-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c deleted file mode 100644 index e5f70415905a..000000000000 --- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * arch/arm/mach-kirkwood/board-iomega_ix2_200.c - * - * Iomega StorCenter ix2-200 - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include <linux/ethtool.h> -#include "common.h" - -static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_NONE, - .speed = SPEED_1000, - .duplex = DUPLEX_FULL, -}; - -static struct mv643xx_eth_platform_data iomega_ix2_200_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(11), -}; - -void __init iomega_ix2_200_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&iomega_ix2_200_ge00_data); - kirkwood_ge01_init(&iomega_ix2_200_ge01_data); -} diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c deleted file mode 100644 index 44e4605ba0bf..000000000000 --- a/arch/arm/mach-kirkwood/board-km_kirkwood.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2012 2012 KEYMILE AG, CH-3097 Bern - * Valentin Longchamp <valentin.longchamp@keymile.com> - * - * arch/arm/mach-kirkwood/board-km_kirkwood.c - * - * Keymile km_kirkwood Reference Desing 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include <linux/clk.h> -#include <linux/clk-private.h> -#include "common.h" - -static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init km_kirkwood_init(void) -{ - struct clk *sata_clk; - /* - * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing - * SATA bits (14-15) of the Clock Gating Control Register. Since these - * devices are also not present in this variant, their clocks get - * disabled because unused when clk_disable_unused() gets called. - * That's why we change the flags to these clocks to CLK_IGNORE_UNUSED - */ - sata_clk = clk_get_sys("sata_mv.0", "0"); - if (!IS_ERR(sata_clk)) - sata_clk->flags |= CLK_IGNORE_UNUSED; - sata_clk = clk_get_sys("sata_mv.0", "1"); - if (!IS_ERR(sata_clk)) - sata_clk->flags |= CLK_IGNORE_UNUSED; - - kirkwood_ge00_init(&km_kirkwood_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 348395238df6..000000000000 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 (C), Michael Walle <michael@walle.cc> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mv643xx_eth.h> -#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 938712e248f1..000000000000 --- a/arch/arm/mach-kirkwood/board-mplcec4.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2012 MPL AG, Switzerland - * Stefan Peter <s.peter@mpl.ch> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#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-mv88f6281gtw_ge.c b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c new file mode 100644 index 000000000000..ee5eea678c11 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c @@ -0,0 +1,50 @@ +/* + * arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c + * + * Marvell 88F6281 GTW GE 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 <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/irq.h> +#include <linux/timer.h> +#include <linux/mv643xx_eth.h> +#include <linux/ethtool.h> +#include <linux/gpio.h> +#include <net/dsa.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/pci.h> +#include <mach/kirkwood.h> +#include "common.h" + +static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_NONE, + .speed = SPEED_1000, + .duplex = DUPLEX_FULL, +}; + +static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { + .port_names[0] = "lan1", + .port_names[1] = "lan2", + .port_names[2] = "lan3", + .port_names[3] = "lan4", + .port_names[4] = "wan", + .port_names[5] = "cpu", +}; + +static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { + .nr_chips = 1, + .chip = &mv88f6281gtw_ge_switch_chip_data, +}; + +void __init mv88f6281gtw_ge_init(void) +{ + kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); + kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); +} diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c deleted file mode 100644 index f8f660525ace..000000000000 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mv643xx_eth.h> -#include <linux/of.h> -#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,cloudbox") || - 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 b11d8fdeca93..000000000000 --- a/arch/arm/mach-kirkwood/board-openblocks_a6.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#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-readynas.c b/arch/arm/mach-kirkwood/board-readynas.c deleted file mode 100644 index 341b82d9cadb..000000000000 --- a/arch/arm/mach-kirkwood/board-readynas.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * NETGEAR ReadyNAS Duo v2 Board setup for drivers not already - * converted to DT. - * - * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mv643xx_eth.h> -#include <mach/kirkwood.h> -#include "common.h" - -static struct mv643xx_eth_platform_data netgear_readynas_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init netgear_readynas_init(void) -{ - kirkwood_ge00_init(&netgear_readynas_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-sheevaplug.c b/arch/arm/mach-kirkwood/board-sheevaplug.c deleted file mode 100644 index fa389373ca74..000000000000 --- a/arch/arm/mach-kirkwood/board-sheevaplug.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * arch/arm/mach-kirkwood/board-sheevaplug.c - * - * Marvell Sheevaplug 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include "common.h" - -static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -void __init sheevaplug_dt_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_ge00_init(&sheevaplug_ge00_data); -} diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c deleted file mode 100644 index 860f44ab457d..000000000000 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * QNAP TS-11x/TS-21x Turbo NAS Board Setup via DT - * - * Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch> - * - * Based on the board file ts219-setup.c: - * - * Copyright (C) 2009 Martin Michlmayr <tbm@cyrius.com> - * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mv643xx_eth.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <mach/kirkwood.h> -#include "common.h" - -static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - -void __init qnap_dt_ts219_init(void) -{ - u32 dev, rev; - - 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); -} 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 1cc04ec33f0b..000000000000 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> - * - * 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#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 fcf3ba682e24..1296de94febf 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -59,119 +59,10 @@ void kirkwood_restart(enum reboot_mode, 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); +#ifdef CONFIG_MACH_MV88F6281GTW_GE_DT +void mv88f6281gtw_ge_init(void); #else -static inline void dreamplug_init(void) {}; -#endif -#ifdef CONFIG_MACH_GURUPLUG_DT -void guruplug_dt_init(void); -#else -static inline void guruplug_dt_init(void) {}; -#endif -#ifdef CONFIG_MACH_SHEEVAPLUG_DT -void sheevaplug_dt_init(void); -#else -static inline void sheevaplug_dt_init(void) {}; -#endif -#ifdef CONFIG_MACH_TS219_DT -void qnap_dt_ts219_init(void); -#else -static inline void qnap_dt_ts219_init(void) {}; -#endif - -#ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT -void dnskw_init(void); -#else -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 -static inline void iomega_ix2_200_init(void) {}; -#endif - -#ifdef CONFIG_MACH_KM_KIRKWOOD_DT -void km_kirkwood_init(void); -#else -static inline void km_kirkwood_init(void) {}; -#endif - -#ifdef CONFIG_MACH_DB88F628X_BP_DT -void db88f628x_init(void); -#else -static inline void db88f628x_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_READYNAS_DT -void netgear_readynas_init(void); -#else -static inline void netgear_readynas_init(void) {}; -#endif - -#ifdef CONFIG_MACH_TOPKICK_DT -void usi_topkick_init(void); -#else -static inline void usi_topkick_init(void) {}; -#endif - -#ifdef CONFIG_MACH_CLOUDBOX_DT -void cloudbox_init(void); -#else -static inline void cloudbox_init(void) {}; +static inline void mv88f6281gtw_ge_init(void) {}; #endif /* early init functions not converted to fdt yet */ diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c deleted file mode 100644 index 060ccf9cb63f..000000000000 --- a/arch/arm/mach-kirkwood/dockstar-setup.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * arch/arm/mach-kirkwood/dockstar-setup.c - * - * Seagate FreeAgent DockStar 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/ata_platform.h> -#include <linux/mtd/partitions.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#include <linux/leds.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <mach/kirkwood.h> -#include "common.h" -#include "mpp.h" - -static struct mtd_partition dockstar_nand_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = SZ_1M - }, { - .name = "uImage", - .offset = MTDPART_OFS_NXTBLK, - .size = SZ_4M - }, { - .name = "root", - .offset = MTDPART_OFS_NXTBLK, - .size = MTDPART_SIZ_FULL - }, -}; - -static struct mv643xx_eth_platform_data dockstar_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct gpio_led dockstar_led_pins[] = { - { - .name = "dockstar:green:health", - .default_trigger = "default-on", - .gpio = 46, - .active_low = 1, - }, - { - .name = "dockstar:orange:misc", - .default_trigger = "none", - .gpio = 47, - .active_low = 1, - }, -}; - -static struct gpio_led_platform_data dockstar_led_data = { - .leds = dockstar_led_pins, - .num_leds = ARRAY_SIZE(dockstar_led_pins), -}; - -static struct platform_device dockstar_leds = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &dockstar_led_data, - } -}; - -static unsigned int dockstar_mpp_config[] __initdata = { - MPP29_GPIO, /* USB Power Enable */ - MPP46_GPIO, /* LED green */ - MPP47_GPIO, /* LED orange */ - 0 -}; - -static void __init dockstar_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_init(); - - /* setup gpio pin select */ - kirkwood_mpp_conf(dockstar_mpp_config); - - kirkwood_uart0_init(); - kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25); - - if (gpio_request(29, "USB Power Enable") != 0 || - gpio_direction_output(29, 1) != 0) - pr_err("can't set up GPIO 29 (USB Power Enable)\n"); - kirkwood_ehci_init(); - - kirkwood_ge00_init(&dockstar_ge00_data); - - platform_device_register(&dockstar_leds); -} - -MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") - .atag_offset = 0x100, - .init_machine = dockstar_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c deleted file mode 100644 index 08dd739aa709..000000000000 --- a/arch/arm/mach-kirkwood/guruplug-setup.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * arch/arm/mach-kirkwood/guruplug-setup.c - * - * Marvell GuruPlug Reference 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mtd/partitions.h> -#include <linux/ata_platform.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#include <linux/leds.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <mach/kirkwood.h> -#include <linux/platform_data/mmc-mvsdio.h> -#include "common.h" -#include "mpp.h" - -static struct mtd_partition guruplug_nand_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = SZ_1M - }, { - .name = "uImage", - .offset = MTDPART_OFS_NXTBLK, - .size = SZ_4M - }, { - .name = "root", - .offset = MTDPART_OFS_NXTBLK, - .size = MTDPART_SIZ_FULL - }, -}; - -static struct mv643xx_eth_platform_data guruplug_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct mv643xx_eth_platform_data guruplug_ge01_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(1), -}; - -static struct mv_sata_platform_data guruplug_sata_data = { - .n_ports = 1, -}; - -static struct mvsdio_platform_data guruplug_mvsdio_data = { - /* unfortunately the CD signal has not been connected */ - .gpio_card_detect = -1, - .gpio_write_protect = -1, -}; - -static struct gpio_led guruplug_led_pins[] = { - { - .name = "guruplug:red:health", - .gpio = 46, - .active_low = 1, - }, - { - .name = "guruplug:green:health", - .gpio = 47, - .active_low = 1, - }, - { - .name = "guruplug:red:wmode", - .gpio = 48, - .active_low = 1, - }, - { - .name = "guruplug:green:wmode", - .gpio = 49, - .active_low = 1, - }, -}; - -static struct gpio_led_platform_data guruplug_led_data = { - .leds = guruplug_led_pins, - .num_leds = ARRAY_SIZE(guruplug_led_pins), -}; - -static struct platform_device guruplug_leds = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &guruplug_led_data, - } -}; - -static unsigned int guruplug_mpp_config[] __initdata = { - MPP46_GPIO, /* M_RLED */ - MPP47_GPIO, /* M_GLED */ - MPP48_GPIO, /* B_RLED */ - MPP49_GPIO, /* B_GLED */ - 0 -}; - -static void __init guruplug_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_init(); - kirkwood_mpp_conf(guruplug_mpp_config); - - kirkwood_uart0_init(); - kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); - - kirkwood_ehci_init(); - kirkwood_ge00_init(&guruplug_ge00_data); - kirkwood_ge01_init(&guruplug_ge01_data); - kirkwood_sata_init(&guruplug_sata_data); - kirkwood_sdio_init(&guruplug_mvsdio_data); - - platform_device_register(&guruplug_leds); -} - -MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") - /* Maintainer: Siddarth Gore <gores@marvell.com> */ - .atag_offset = 0x100, - .init_machine = guruplug_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c deleted file mode 100644 index ba384b992bef..000000000000 --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c - * - * Marvell 88F6281 GTW GE 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/pci.h> -#include <linux/irq.h> -#include <linux/mtd/physmap.h> -#include <linux/timer.h> -#include <linux/mv643xx_eth.h> -#include <linux/ethtool.h> -#include <linux/gpio.h> -#include <linux/leds.h> -#include <linux/input.h> -#include <linux/gpio_keys.h> -#include <linux/spi/flash.h> -#include <linux/spi/spi.h> -#include <net/dsa.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/pci.h> -#include <mach/kirkwood.h> -#include "common.h" -#include "mpp.h" - -static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_NONE, - .speed = SPEED_1000, - .duplex = DUPLEX_FULL, -}; - -static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = { - .port_names[0] = "lan1", - .port_names[1] = "lan2", - .port_names[2] = "lan3", - .port_names[3] = "lan4", - .port_names[4] = "wan", - .port_names[5] = "cpu", -}; - -static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = { - .nr_chips = 1, - .chip = &mv88f6281gtw_ge_switch_chip_data, -}; - -static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = { - .type = "mx25l12805d", -}; - -static struct spi_board_info __initdata mv88f6281gtw_ge_spi_slave_info[] = { - { - .modalias = "m25p80", - .platform_data = &mv88f6281gtw_ge_spi_slave_data, - .irq = -1, - .max_speed_hz = 50000000, - .bus_num = 0, - .chip_select = 0, - }, -}; - -static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { - { - .code = KEY_RESTART, - .gpio = 47, - .desc = "SWR Button", - .active_low = 1, - }, { - .code = KEY_WPS_BUTTON, - .gpio = 46, - .desc = "WPS Button", - .active_low = 1, - }, -}; - -static struct gpio_keys_platform_data mv88f6281gtw_ge_button_data = { - .buttons = mv88f6281gtw_ge_button_pins, - .nbuttons = ARRAY_SIZE(mv88f6281gtw_ge_button_pins), -}; - -static struct platform_device mv88f6281gtw_ge_buttons = { - .name = "gpio-keys", - .id = -1, - .num_resources = 0, - .dev = { - .platform_data = &mv88f6281gtw_ge_button_data, - }, -}; - -static struct gpio_led mv88f6281gtw_ge_led_pins[] = { - { - .name = "gtw:green:Status", - .gpio = 20, - .active_low = 0, - }, { - .name = "gtw:red:Status", - .gpio = 21, - .active_low = 0, - }, { - .name = "gtw:green:USB", - .gpio = 12, - .active_low = 0, - }, -}; - -static struct gpio_led_platform_data mv88f6281gtw_ge_led_data = { - .leds = mv88f6281gtw_ge_led_pins, - .num_leds = ARRAY_SIZE(mv88f6281gtw_ge_led_pins), -}; - -static struct platform_device mv88f6281gtw_ge_leds = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &mv88f6281gtw_ge_led_data, - }, -}; - -static unsigned int mv88f6281gtw_ge_mpp_config[] __initdata = { - MPP12_GPO, /* Status#_USB pin */ - MPP20_GPIO, /* Status#_GLED pin */ - MPP21_GPIO, /* Status#_RLED pin */ - MPP46_GPIO, /* WPS_Switch pin */ - MPP47_GPIO, /* SW_Init pin */ - 0 -}; - -static void __init mv88f6281gtw_ge_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_init(); - kirkwood_mpp_conf(mv88f6281gtw_ge_mpp_config); - - kirkwood_ehci_init(); - kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data); - kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ); - spi_register_board_info(mv88f6281gtw_ge_spi_slave_info, - ARRAY_SIZE(mv88f6281gtw_ge_spi_slave_info)); - kirkwood_spi_init(); - kirkwood_uart0_init(); - platform_device_register(&mv88f6281gtw_ge_leds); - platform_device_register(&mv88f6281gtw_ge_buttons); -} - -static int __init mv88f6281gtw_ge_pci_init(void) -{ - if (machine_is_mv88f6281gtw_ge()) - kirkwood_pcie_init(KW_PCIE0); - - return 0; -} -subsys_initcall(mv88f6281gtw_ge_pci_init); - -MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") - /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */ - .atag_offset = 0x100, - .init_machine = mv88f6281gtw_ge_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c deleted file mode 100644 index 3b706611da8e..000000000000 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - * arch/arm/mach-kirkwood/netspace_v2-setup.c - * - * LaCie Network Space v2 board setup - * - * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com> - * Copyright (C) 2009 Benoît Canet <benoit.canet@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/ata_platform.h> -#include <linux/mv643xx_eth.h> -#include <linux/input.h> -#include <linux/gpio.h> -#include <linux/gpio_keys.h> -#include <linux/leds.h> -#include <linux/gpio-fan.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <mach/kirkwood.h> -#include <linux/platform_data/leds-kirkwood-ns2.h> -#include "common.h" -#include "mpp.h" -#include "lacie_v2-common.h" - -/***************************************************************************** - * Ethernet - ****************************************************************************/ - -static struct mv643xx_eth_platform_data netspace_v2_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(8), -}; - -/***************************************************************************** - * SATA - ****************************************************************************/ - -static struct mv_sata_platform_data netspace_v2_sata_data = { - .n_ports = 2, -}; - -/***************************************************************************** - * GPIO keys - ****************************************************************************/ - -#define NETSPACE_V2_PUSH_BUTTON 32 - -static struct gpio_keys_button netspace_v2_buttons[] = { - [0] = { - .code = KEY_POWER, - .gpio = NETSPACE_V2_PUSH_BUTTON, - .desc = "Power push button", - .active_low = 0, - }, -}; - -static struct gpio_keys_platform_data netspace_v2_button_data = { - .buttons = netspace_v2_buttons, - .nbuttons = ARRAY_SIZE(netspace_v2_buttons), -}; - -static struct platform_device netspace_v2_gpio_buttons = { - .name = "gpio-keys", - .id = -1, - .dev = { - .platform_data = &netspace_v2_button_data, - }, -}; - -/***************************************************************************** - * GPIO LEDs - ****************************************************************************/ - -#define NETSPACE_V2_GPIO_RED_LED 12 - -static struct gpio_led netspace_v2_gpio_led_pins[] = { - { - .name = "ns_v2:red:fail", - .gpio = NETSPACE_V2_GPIO_RED_LED, - }, -}; - -static struct gpio_led_platform_data netspace_v2_gpio_leds_data = { - .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins), - .leds = netspace_v2_gpio_led_pins, -}; - -static struct platform_device netspace_v2_gpio_leds = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &netspace_v2_gpio_leds_data, - }, -}; - -/***************************************************************************** - * Dual-GPIO CPLD LEDs - ****************************************************************************/ - -#define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29 -#define NETSPACE_V2_GPIO_BLUE_LED_CMD 30 - -static struct ns2_led netspace_v2_led_pins[] = { - { - .name = "ns_v2:blue:sata", - .cmd = NETSPACE_V2_GPIO_BLUE_LED_CMD, - .slow = NETSPACE_V2_GPIO_BLUE_LED_SLOW, - }, -}; - -static struct ns2_led_platform_data netspace_v2_leds_data = { - .num_leds = ARRAY_SIZE(netspace_v2_led_pins), - .leds = netspace_v2_led_pins, -}; - -static struct platform_device netspace_v2_leds = { - .name = "leds-ns2", - .id = -1, - .dev = { - .platform_data = &netspace_v2_leds_data, - }, -}; - -/***************************************************************************** - * GPIO fan - ****************************************************************************/ - -/* Designed for fan 40x40x16: ADDA AD0412LB-D50 6000rpm@12v */ -static struct gpio_fan_speed netspace_max_v2_fan_speed[] = { - { 0, 0 }, - { 1500, 15 }, - { 1700, 14 }, - { 1800, 13 }, - { 2100, 12 }, - { 3100, 11 }, - { 3300, 10 }, - { 4300, 9 }, - { 5500, 8 }, -}; - -static unsigned netspace_max_v2_fan_ctrl[] = { 22, 7, 33, 23 }; - -static struct gpio_fan_alarm netspace_max_v2_fan_alarm = { - .gpio = 25, - .active_low = 1, -}; - -static struct gpio_fan_platform_data netspace_max_v2_fan_data = { - .num_ctrl = ARRAY_SIZE(netspace_max_v2_fan_ctrl), - .ctrl = netspace_max_v2_fan_ctrl, - .alarm = &netspace_max_v2_fan_alarm, - .num_speed = ARRAY_SIZE(netspace_max_v2_fan_speed), - .speed = netspace_max_v2_fan_speed, -}; - -static struct platform_device netspace_max_v2_gpio_fan = { - .name = "gpio-fan", - .id = -1, - .dev = { - .platform_data = &netspace_max_v2_fan_data, - }, -}; - -/***************************************************************************** - * General Setup - ****************************************************************************/ - -static unsigned int netspace_v2_mpp_config[] __initdata = { - MPP0_SPI_SCn, - MPP1_SPI_MOSI, - MPP2_SPI_SCK, - MPP3_SPI_MISO, - MPP4_NF_IO6, - MPP5_NF_IO7, - MPP6_SYSRST_OUTn, - MPP7_GPO, /* Fan speed (bit 1) */ - MPP8_TW0_SDA, - MPP9_TW0_SCK, - MPP10_UART0_TXD, - MPP11_UART0_RXD, - MPP12_GPO, /* Red led */ - MPP14_GPIO, /* USB fuse */ - MPP16_GPIO, /* SATA 0 power */ - MPP17_GPIO, /* SATA 1 power */ - MPP18_NF_IO0, - MPP19_NF_IO1, - MPP20_SATA1_ACTn, - MPP21_SATA0_ACTn, - MPP22_GPIO, /* Fan speed (bit 0) */ - MPP23_GPIO, /* Fan power */ - MPP24_GPIO, /* USB mode select */ - MPP25_GPIO, /* Fan rotation fail */ - MPP26_GPIO, /* USB device vbus */ - MPP28_GPIO, /* USB enable host vbus */ - MPP29_GPIO, /* Blue led (slow register) */ - MPP30_GPIO, /* Blue led (command register) */ - MPP31_GPIO, /* Board power off */ - MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ - MPP33_GPO, /* Fan speed (bit 2) */ - 0 -}; - -#define NETSPACE_V2_GPIO_POWER_OFF 31 - -static void netspace_v2_power_off(void) -{ - gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1); -} - -static void __init netspace_v2_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_init(); - kirkwood_mpp_conf(netspace_v2_mpp_config); - - if (machine_is_netspace_max_v2()) - lacie_v2_hdd_power_init(2); - else - lacie_v2_hdd_power_init(1); - - kirkwood_ehci_init(); - kirkwood_ge00_init(&netspace_v2_ge00_data); - kirkwood_sata_init(&netspace_v2_sata_data); - kirkwood_uart0_init(); - lacie_v2_register_flash(); - lacie_v2_register_i2c_devices(); - - platform_device_register(&netspace_v2_leds); - platform_device_register(&netspace_v2_gpio_leds); - platform_device_register(&netspace_v2_gpio_buttons); - if (machine_is_netspace_max_v2()) - platform_device_register(&netspace_max_v2_gpio_fan); - - if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 && - gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0) - pm_power_off = netspace_v2_power_off; - else - pr_err("netspace_v2: failed to configure power-off GPIO\n"); -} - -#ifdef CONFIG_MACH_NETSPACE_V2 -MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") - .atag_offset = 0x100, - .init_machine = netspace_v2_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END -#endif - -#ifdef CONFIG_MACH_INETSPACE_V2 -MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") - .atag_offset = 0x100, - .init_machine = netspace_v2_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END -#endif - -#ifdef CONFIG_MACH_NETSPACE_MAX_V2 -MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") - .atag_offset = 0x100, - .init_machine = netspace_v2_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END -#endif diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index 6a6eb548307d..e5cf84103583 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c @@ -158,7 +158,8 @@ static void __init openrd_init(void) kirkwood_mpp_conf(openrd_mpp_config); kirkwood_uart0_init(); - kirkwood_nand_init(ARRAY_AND_SIZE(openrd_nand_parts), 25); + kirkwood_nand_init(openrd_nand_parts, ARRAY_SIZE(openrd_nand_parts), + 25); kirkwood_ehci_init(); diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index d24223166e06..5154bd2a3ad3 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c @@ -87,7 +87,9 @@ static void __init rd88f6281_init(void) kirkwood_init(); kirkwood_mpp_conf(rd88f6281_mpp_config); - kirkwood_nand_init(ARRAY_AND_SIZE(rd88f6281_nand_parts), 25); + kirkwood_nand_init(rd88f6281_nand_parts, + ARRAY_SIZE(rd88f6281_nand_parts), + 25); kirkwood_ehci_init(); kirkwood_ge00_init(&rd88f6281_ge00_data); diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c deleted file mode 100644 index 55b68fa39f45..000000000000 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * arch/arm/mach-kirkwood/sheevaplug-setup.c - * - * Marvell SheevaPlug Reference 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 <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/ata_platform.h> -#include <linux/mtd/partitions.h> -#include <linux/mv643xx_eth.h> -#include <linux/gpio.h> -#include <linux/leds.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <mach/kirkwood.h> -#include <linux/platform_data/mmc-mvsdio.h> -#include "common.h" -#include "mpp.h" - -static struct mtd_partition sheevaplug_nand_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = SZ_1M - }, { - .name = "uImage", - .offset = MTDPART_OFS_NXTBLK, - .size = SZ_4M - }, { - .name = "root", - .offset = MTDPART_OFS_NXTBLK, - .size = MTDPART_SIZ_FULL - }, -}; - -static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR(0), -}; - -static struct mv_sata_platform_data sheeva_esata_sata_data = { - .n_ports = 2, -}; - -static struct mvsdio_platform_data sheevaplug_mvsdio_data = { - /* unfortunately the CD signal has not been connected */ -}; - -static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { - .gpio_write_protect = 44, /* MPP44 used as SD write protect */ - .gpio_card_detect = 47, /* MPP47 used as SD card detect */ -}; - -static struct gpio_led sheevaplug_led_pins[] = { - { - .name = "plug:red:misc", - .default_trigger = "none", - .gpio = 46, - .active_low = 1, - }, - { - .name = "plug:green:health", - .default_trigger = "default-on", - .gpio = 49, - .active_low = 1, - }, -}; - -static struct gpio_led_platform_data sheevaplug_led_data = { - .leds = sheevaplug_led_pins, - .num_leds = ARRAY_SIZE(sheevaplug_led_pins), -}; - -static struct platform_device sheevaplug_leds = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &sheevaplug_led_data, - } -}; - -static unsigned int sheevaplug_mpp_config[] __initdata = { - MPP29_GPIO, /* USB Power Enable */ - MPP46_GPIO, /* LED Red */ - MPP49_GPIO, /* LED */ - 0 -}; - -static unsigned int sheeva_esata_mpp_config[] __initdata = { - MPP29_GPIO, /* USB Power Enable */ - MPP44_GPIO, /* SD Write Protect */ - MPP47_GPIO, /* SD Card Detect */ - MPP49_GPIO, /* LED Green */ - 0 -}; - -static void __init sheevaplug_init(void) -{ - /* - * Basic setup. Needs to be called early. - */ - kirkwood_init(); - - /* setup gpio pin select */ - if (machine_is_esata_sheevaplug()) - kirkwood_mpp_conf(sheeva_esata_mpp_config); - else - kirkwood_mpp_conf(sheevaplug_mpp_config); - - kirkwood_uart0_init(); - kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); - - if (gpio_request(29, "USB Power Enable") != 0 || - gpio_direction_output(29, 1) != 0) - pr_err("can't set up GPIO 29 (USB Power Enable)\n"); - kirkwood_ehci_init(); - - kirkwood_ge00_init(&sheevaplug_ge00_data); - - /* honor lower power consumption for plugs with out eSATA */ - if (machine_is_esata_sheevaplug()) - kirkwood_sata_init(&sheeva_esata_sata_data); - - /* enable sd wp and sd cd on plugs with esata */ - if (machine_is_esata_sheevaplug()) - kirkwood_sdio_init(&sheeva_esata_mvsdio_data); - else - kirkwood_sdio_init(&sheevaplug_mvsdio_data); - - platform_device_register(&sheevaplug_leds); -} - -#ifdef CONFIG_MACH_SHEEVAPLUG -MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") - /* Maintainer: shadi Ammouri <shadi@marvell.com> */ - .atag_offset = 0x100, - .init_machine = sheevaplug_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END -#endif - -#ifdef CONFIG_MACH_ESATA_SHEEVAPLUG -MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") - .atag_offset = 0x100, - .init_machine = sheevaplug_init, - .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = kirkwood_init_irq, - .init_time = kirkwood_timer_init, - .restart = kirkwood_restart, -MACHINE_END -#endif |