diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f9f4c4d9c704..000cf7628e6e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \ da850-evm.dtb dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ dove-cubox.dtb \ + dove-d2plug.dtb \ dove-dove-db.dtb dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ exynos4210-smdkv310.dtb \ @@ -85,6 +86,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-mplcec4.dtb \ + kirkwood-mv88f6281gtw-ge.dtb \ kirkwood-netgear_readynas_duo_v2.dtb \ kirkwood-ns2.dtb \ kirkwood-ns2lite.dtb \ diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index 5cae2ab69762..022646ef4b38 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts @@ -42,6 +42,8 @@ usb_power: regulator@1 { regulator-always-on; regulator-boot-on; gpio = <&gpio0 1 0>; + pinctrl-0 = <&pmx_gpio_1>; + pinctrl-names = "default"; }; }; @@ -53,10 +55,24 @@ ref25: oscillator { clock-frequency = <25000000>; }; }; + + ir_recv: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio0 19 1>; + pinctrl-0 = <&pmx_gpio_19>; + pinctrl-names = "default"; + }; }; &uart0 { status = "okay"; }; &sata0 { status = "okay"; }; +&mdio { status = "okay"; }; +ð { status = "okay"; }; + +ðphy { + compatible = "marvell,88e1310"; + reg = <1>; +}; &i2c0 { status = "okay"; @@ -103,6 +119,7 @@ &sdio0 { status = "okay"; /* sdio0 card detect is connected to wrong pin on CuBox */ cd-gpios = <&gpio0 12 1>; + pinctrl-0 = <&pmx_sdio0 &pmx_gpio_12>; }; &spi0 { @@ -115,23 +132,3 @@ spi-flash@0 { reg = <0>; }; }; - -&pinctrl { - pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>; - pinctrl-names = "default"; - - pmx_gpio_1: pmx-gpio-1 { - marvell,pins = "mpp1"; - marvell,function = "gpio"; - }; - - pmx_gpio_12: pmx-gpio-12 { - marvell,pins = "mpp12"; - marvell,function = "gpio"; - }; - - pmx_gpio_18: pmx-gpio-18 { - marvell,pins = "mpp18"; - marvell,function = "gpio"; - }; -}; diff --git a/arch/arm/boot/dts/dove-d2plug.dts b/arch/arm/boot/dts/dove-d2plug.dts new file mode 100644 index 000000000000..e2222ce94f2f --- /dev/null +++ b/arch/arm/boot/dts/dove-d2plug.dts @@ -0,0 +1,69 @@ +/dts-v1/; + +/include/ "dove.dtsi" + +/ { + model = "Globalscale D2Plug"; + compatible = "globalscale,d2plug", "marvell,dove"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x40000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_gpio_0 &pmx_gpio_1 &pmx_gpio_2>; + pinctrl-names = "default"; + + wlan-ap { + label = "wlan-ap"; + gpios = <&gpio0 0 1>; + }; + + wlan-act { + label = "wlan-act"; + gpios = <&gpio0 1 1>; + }; + + bluetooth-act { + label = "bt-act"; + gpios = <&gpio0 2 1>; + }; + }; +}; + +&uart0 { status = "okay"; }; +&sata0 { status = "okay"; }; +&i2c0 { status = "okay"; }; +&mdio { status = "okay"; }; +ð { status = "okay"; }; + +/* Samsung M8G2F eMMC */ +&sdio0 { + status = "okay"; + non-removable; + bus-width = <4>; +}; + +/* Marvell SD8787 WLAN/BT */ +&sdio1 { + status = "okay"; + non-removable; + bus-width = <4>; +}; + +&spi0 { + status = "okay"; + + /* spi0.0: 4M Flash Macronix MX25L3205D */ + spi-flash@0 { + compatible = "st,m25l3205d"; + spi-max-frequency = <20000000>; + reg = <0>; + }; +}; diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 6cab46849cdb..cc279166646f 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -10,6 +10,23 @@ aliases { gpio2 = &gpio2; }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "marvell,pj4a", "marvell,sheeva-v7"; + device_type = "cpu"; + next-level-cache = <&l2>; + reg = <0>; + }; + }; + + l2: l2-cache { + compatible = "marvell,tauros2-cache"; + marvell,tauros2-cache-features = <0>; + }; + soc@f1000000 { compatible = "simple-bus"; #address-cells = <1>; @@ -25,16 +42,28 @@ soc@f1000000 { 0xf2100000 0xf2100000 0x0100000 /* PCIe0 I/O 1M */ 0xf8000000 0xf8000000 0x8000000>; /* BootROM 128M */ - l2: l2-cache { - compatible = "marvell,tauros2-cache"; - marvell,tauros2-cache-features = <0>; + timer: timer@20300 { + compatible = "marvell,orion-timer"; + reg = <0x20300 0x20>; + interrupt-parent = <&bridge_intc>; + interrupts = <1>, <2>; + clocks = <&core_clk 0>; }; - intc: interrupt-controller { + intc: main-interrupt-ctrl@20200 { compatible = "marvell,orion-intc"; interrupt-controller; #interrupt-cells = <1>; - reg = <0x20204 0x04>, <0x20214 0x04>; + reg = <0x20200 0x10>, <0x20210 0x10>; + }; + + bridge_intc: bridge-interrupt-ctrl@20110 { + compatible = "marvell,orion-bridge-intc"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x20110 0x8>; + interrupts = <0>; + marvell,#interrupts = <5>; }; core_clk: core-clocks@d0214 { @@ -43,14 +72,14 @@ core_clk: core-clocks@d0214 { #clock-cells = <1>; }; - gate_clk: clock-gating-control@d0038 { + gate_clk: clock-gating-ctrl@d0038 { compatible = "marvell,dove-gating-clock"; reg = <0xd0038 0x4>; clocks = <&core_clk 0>; #clock-cells = <1>; }; - thermal: thermal@d001c { + thermal: thermal-diode@d001c { compatible = "marvell,dove-thermal"; reg = <0xd001c 0x0c>, <0xd005c 0x08>; }; @@ -70,6 +99,8 @@ uart1: serial@12100 { reg-shift = <2>; interrupts = <8>; clocks = <&core_clk 0>; + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; status = "disabled"; }; @@ -91,7 +122,7 @@ uart3: serial@12300 { status = "disabled"; }; - gpio0: gpio@d0400 { + gpio0: gpio-ctrl@d0400 { compatible = "marvell,orion-gpio"; #gpio-cells = <2>; gpio-controller; @@ -102,7 +133,7 @@ gpio0: gpio@d0400 { interrupts = <12>, <13>, <14>, <60>; }; - gpio1: gpio@d0420 { + gpio1: gpio-ctrl@d0420 { compatible = "marvell,orion-gpio"; #gpio-cells = <2>; gpio-controller; @@ -113,7 +144,7 @@ gpio1: gpio@d0420 { interrupts = <61>; }; - gpio2: gpio@e8400 { + gpio2: gpio-ctrl@e8400 { compatible = "marvell,orion-gpio"; #gpio-cells = <2>; gpio-controller; @@ -121,13 +152,188 @@ gpio2: gpio@e8400 { ngpios = <8>; }; - pinctrl: pinctrl@d0200 { + pinctrl: pin-ctrl@d0200 { compatible = "marvell,dove-pinctrl"; reg = <0xd0200 0x10>; clocks = <&gate_clk 22>; + + pmx_gpio_0: pmx-gpio-0 { + marvell,pins = "mpp0"; + marvell,function = "gpio"; + }; + + pmx_gpio_1: pmx-gpio-1 { + marvell,pins = "mpp1"; + marvell,function = "gpio"; + }; + + pmx_gpio_2: pmx-gpio-2 { + marvell,pins = "mpp2"; + marvell,function = "gpio"; + }; + + pmx_gpio_3: pmx-gpio-3 { + marvell,pins = "mpp3"; + marvell,function = "gpio"; + }; + + pmx_gpio_4: pmx-gpio-4 { + marvell,pins = "mpp4"; + marvell,function = "gpio"; + }; + + pmx_gpio_5: pmx-gpio-5 { + marvell,pins = "mpp5"; + marvell,function = "gpio"; + }; + + pmx_gpio_6: pmx-gpio-6 { + marvell,pins = "mpp6"; + marvell,function = "gpio"; + }; + + pmx_gpio_7: pmx-gpio-7 { + marvell,pins = "mpp7"; + marvell,function = "gpio"; + }; + + pmx_gpio_8: pmx-gpio-8 { + marvell,pins = "mpp8"; + marvell,function = "gpio"; + }; + + pmx_gpio_9: pmx-gpio-9 { + marvell,pins = "mpp9"; + marvell,function = "gpio"; + }; + + pmx_gpio_10: pmx-gpio-10 { + marvell,pins = "mpp10"; + marvell,function = "gpio"; + }; + + pmx_gpio_11: pmx-gpio-11 { + marvell,pins = "mpp11"; + marvell,function = "gpio"; + }; + + pmx_gpio_12: pmx-gpio-12 { + marvell,pins = "mpp12"; + marvell,function = "gpio"; + }; + + pmx_gpio_13: pmx-gpio-13 { + marvell,pins = "mpp13"; + marvell,function = "gpio"; + }; + + pmx_gpio_14: pmx-gpio-14 { + marvell,pins = "mpp14"; + marvell,function = "gpio"; + }; + + pmx_gpio_15: pmx-gpio-15 { + marvell,pins = "mpp15"; + marvell,function = "gpio"; + }; + + pmx_gpio_16: pmx-gpio-16 { + marvell,pins = "mpp16"; + marvell,function = "gpio"; + }; + + pmx_gpio_17: pmx-gpio-17 { + marvell,pins = "mpp17"; + marvell,function = "gpio"; + }; + + pmx_gpio_18: pmx-gpio-18 { + marvell,pins = "mpp18"; + marvell,function = "gpio"; + }; + + pmx_gpio_19: pmx-gpio-19 { + marvell,pins = "mpp19"; + marvell,function = "gpio"; + }; + + pmx_gpio_20: pmx-gpio-20 { + marvell,pins = "mpp20"; + marvell,function = "gpio"; + }; + + pmx_gpio_21: pmx-gpio-21 { + marvell,pins = "mpp21"; + marvell,function = "gpio"; + }; + + pmx_camera: pmx-camera { + marvell,pins = "mpp_camera"; + marvell,function = "camera"; + }; + + pmx_camera_gpio: pmx-camera-gpio { + marvell,pins = "mpp_camera"; + marvell,function = "gpio"; + }; + + pmx_sdio0: pmx-sdio0 { + marvell,pins = "mpp_sdio0"; + marvell,function = "sdio0"; + }; + + pmx_sdio0_gpio: pmx-sdio0-gpio { + marvell,pins = "mpp_sdio0"; + marvell,function = "gpio"; + }; + + pmx_sdio1: pmx-sdio1 { + marvell,pins = "mpp_sdio1"; + marvell,function = "sdio1"; + }; + + pmx_sdio1_gpio: pmx-sdio1-gpio { + marvell,pins = "mpp_sdio1"; + marvell,function = "gpio"; + }; + + pmx_audio1_gpio: pmx-audio1-gpio { + marvell,pins = "mpp_audio1"; + marvell,function = "gpio"; + }; + + pmx_spi0: pmx-spi0 { + marvell,pins = "mpp_spi0"; + marvell,function = "spi0"; + }; + + pmx_spi0_gpio: pmx-spi0-gpio { + marvell,pins = "mpp_spi0"; + marvell,function = "gpio"; + }; + + pmx_uart1: pmx-uart1 { + marvell,pins = "mpp_uart1"; + marvell,function = "uart1"; + }; + + pmx_uart1_gpio: pmx-uart1-gpio { + marvell,pins = "mpp_uart1"; + marvell,function = "gpio"; + }; + + pmx_nand: pmx-nand { + marvell,pins = "mpp_nand"; + marvell,function = "nand"; + }; + + pmx_nand_gpo: pmx-nand-gpo { + marvell,pins = "mpp_nand"; + marvell,function = "gpo"; + }; }; - spi0: spi@10600 { + spi0: spi-ctrl@10600 { compatible = "marvell,orion-spi"; #address-cells = <1>; #size-cells = <0>; @@ -135,10 +341,12 @@ spi0: spi@10600 { interrupts = <6>; reg = <0x10600 0x28>; clocks = <&core_clk 0>; + pinctrl-0 = <&pmx_spi0>; + pinctrl-names = "default"; status = "disabled"; }; - spi1: spi@14600 { + spi1: spi-ctrl@14600 { compatible = "marvell,orion-spi"; #address-cells = <1>; #size-cells = <0>; @@ -149,7 +357,7 @@ spi1: spi@14600 { status = "disabled"; }; - i2c0: i2c@11000 { + i2c0: i2c-ctrl@11000 { compatible = "marvell,mv64xxx-i2c"; reg = <0x11000 0x20>; #address-cells = <1>; @@ -177,23 +385,27 @@ ehci1: usb-host@51000 { status = "okay"; }; - sdio0: sdio@92000 { + sdio0: sdio-host@92000 { compatible = "marvell,dove-sdhci"; reg = <0x92000 0x100>; interrupts = <35>, <37>; clocks = <&gate_clk 8>; + pinctrl-0 = <&pmx_sdio0>; + pinctrl-names = "default"; status = "disabled"; }; - sdio1: sdio@90000 { + sdio1: sdio-host@90000 { compatible = "marvell,dove-sdhci"; reg = <0x90000 0x100>; interrupts = <36>, <38>; clocks = <&gate_clk 9>; + pinctrl-0 = <&pmx_sdio1>; + pinctrl-names = "default"; status = "disabled"; }; - sata0: sata@a0000 { + sata0: sata-host@a0000 { compatible = "marvell,orion-sata"; reg = <0xa0000 0x2400>; interrupts = <62>; @@ -202,12 +414,12 @@ sata0: sata@a0000 { status = "disabled"; }; - rtc@d8500 { + rtc: real-time-clock@d8500 { compatible = "marvell,orion-rtc"; reg = <0xd8500 0x20>; }; - crypto: crypto@30000 { + crypto: crypto-engine@30000 { compatible = "marvell,orion-crypto"; reg = <0x30000 0x10000>, <0xc8000000 0x800>; @@ -258,5 +470,40 @@ channel1 { dmacap,xor; }; }; + + mdio: mdio-bus@72004 { + compatible = "marvell,orion-mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72004 0x84>; + interrupts = <30>; + clocks = <&gate_clk 2>; + status = "disabled"; + + ethphy: ethernet-phy { + device-type = "ethernet-phy"; + /* set phy address in board file */ + }; + }; + + eth: ethernet-controller@72000 { + compatible = "marvell,orion-eth"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72000 0x4000>; + clocks = <&gate_clk 2>; + marvell,tx-checksum-limit = <1600>; + status = "disabled"; + + ethernet-port@0 { + device_type = "network"; + compatible = "marvell,orion-eth-port"; + reg = <0>; + interrupts = <29>; + /* overwrite MAC address in bootloader */ + local-mac-address = [00 00 00 00 00 00]; + phy-handle = <ðphy>; + }; + }; }; }; diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts index 9bf139c5a34d..142b9cd3b454 100644 --- a/arch/arm/boot/dts/kirkwood-cloudbox.dts +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts @@ -89,3 +89,19 @@ gpio_poweroff { gpios = <&gpio0 17 0>; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-db.dtsi b/arch/arm/boot/dts/kirkwood-db.dtsi index 45c1bf74ac00..c0e2a5879174 100644 --- a/arch/arm/boot/dts/kirkwood-db.dtsi +++ b/arch/arm/boot/dts/kirkwood-db.dtsi @@ -79,3 +79,19 @@ mvsdio@90000 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@8 { + device_type = "ethernet-phy"; + reg = <8>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index 2e04284846a0..d544f77a4ca4 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi @@ -219,3 +219,19 @@ sata1_power: regulator@2 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@8 { + device_type = "ethernet-phy"; + reg = <8>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts index 4387ae8e93fe..59a2117c35a7 100644 --- a/arch/arm/boot/dts/kirkwood-dockstar.dts +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts @@ -90,3 +90,20 @@ usb_power: regulator@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + compatible = "marvell,88e1116"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index c62837837246..6f62af99c9cb 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts @@ -99,3 +99,31 @@ wifi-ap { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + device_type = "ethernet-phy"; + reg = <1>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index e57118039277..6f7c7d7ecf2a 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts @@ -170,3 +170,19 @@ usb_power: regulator@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts index 2c5673adb4bd..6548b9dc6855 100644 --- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts @@ -96,3 +96,33 @@ wmode-g { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + compatible = "marvell,88e1121"; + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + device_type = "ethernet-phy"; + compatible = "marvell,88e1121"; + reg = <1>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 158161ff6826..cb711a3bd983 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts @@ -122,3 +122,19 @@ gpio_poweroff { }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@8 { + device_type = "ethernet-phy"; + reg = <8>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index 8314118b6b8a..0323f017eeed 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts @@ -179,3 +179,19 @@ button@2 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@11 { + device_type = "ethernet-phy"; + reg = <11>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts index fd7f053e9c96..df8447442b37 100644 --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts @@ -194,3 +194,27 @@ OTB { }; }; }; + +&mdio { + status = "okay"; + + ethphy1: ethernet-phy@11 { + device_type = "ethernet-phy"; + reg = <11>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + speed = <1000>; + duplex = <1>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts index bd88a236f729..da674bbd49a8 100644 --- a/arch/arm/boot/dts/kirkwood-is2.dts +++ b/arch/arm/boot/dts/kirkwood-is2.dts @@ -30,3 +30,5 @@ blue-sata { }; }; }; + +ðphy0 { reg = <8>; }; diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts index b071d37cc291..6899408482d2 100644 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts @@ -50,3 +50,19 @@ i2c@0 { i2c-gpio,delay-us = <2>; /* ~100 kHz */ }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index f7e247cc925a..4e8f9e42c592 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi @@ -207,3 +207,31 @@ hdd_power: regulator@2 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; + + ethphy1: ethernet-phy@8 { + device_type = "ethernet-phy"; + reg = <8>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts index 21f1954c9e54..ce2b94b513db 100644 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts @@ -194,3 +194,30 @@ misc { }; }; +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@1 { + device_type = "ethernet-phy"; + reg = <1>; + }; + + ethphy1: ethernet-phy@2 { + device_type = "ethernet-phy"; + reg = <2>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts new file mode 100644 index 000000000000..6317e1d088b3 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts @@ -0,0 +1,125 @@ +/* + * Marvell 88F6281 GTW GE Board + * + * Lennert Buytenhek + * Thomas Petazzoni + * + * 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. + * + * This file contains the definitions that are common between the 6281 + * and 6282 variants of the Marvell Kirkwood Development Board. + */ + +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6281.dtsi" + +/ { + model = "Marvell 88F6281 GTW GE Board"; + compatible = "marvell,mv88f6281gtw-ge", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; /* 512 MB */ + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp@f1000000 { + pinctrl@10000 { + pmx_usb_led: pmx-usb-led { + marvell,pins = "mpp12"; + marvell,function = "gpo"; + }; + + pmx_leds: pmx-leds { + marvell,pins = "mpp20", "mpp21"; + marvell,function = "gpio"; + }; + + pmx_keys: pmx-keys { + marvell,pins = "mpp46", "mpp47"; + marvell,function = "gpio"; + }; + }; + + spi@10600 { + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l12805d"; + reg = <0>; + spi-max-frequency = <50000000>; + mode = <0>; + }; + }; + + serial@12000 { + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; + clock-frequency = <200000000>; + status = "ok"; + }; + + ehci@50000 { + status = "okay"; + }; + + pcie-controller { + status = "okay"; + + pcie@1,0 { + status = "okay"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_leds &pmx_usb_led>; + pinctrl-names = "default"; + + green-status { + label = "gtw:green:Status"; + gpios = <&gpio0 20 0>; + }; + + red-status { + label = "gtw:red:Status"; + gpios = <&gpio0 21 0>; + }; + + green-usb { + label = "gtw:green:USB"; + gpios = <&gpio0 12 0>; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&pmx_keys>; + pinctrl-names = "default"; + + button@1 { + label = "SWR Button"; + linux,code = <0x198>; /* KEY_RESTART */ + gpios = <&gpio1 15 1>; + }; + button@2 { + label = "WPS Button"; + linux,code = <0x211>; /* KEY_WPS_BUTTON */ + gpios = <&gpio1 14 1>; + }; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts index cc40f19ae3fc..874857ea9cb8 100644 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts @@ -207,3 +207,19 @@ usb_power: regulator@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index d0fb34dc1667..2fcb82e20828 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi @@ -84,3 +84,19 @@ gpio_poweroff { }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy { + device_type = "ethernet-phy"; + /* overwrite reg property in board file */ + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts index 0599f3cb844e..53368d1022cc 100644 --- a/arch/arm/boot/dts/kirkwood-ns2.dts +++ b/arch/arm/boot/dts/kirkwood-ns2.dts @@ -30,3 +30,5 @@ blue-sata { }; }; }; + +ðphy0 { reg = <8>; }; diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts index b0e17984aea0..279607093cdb 100644 --- a/arch/arm/boot/dts/kirkwood-ns2lite.dts +++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts @@ -30,3 +30,5 @@ blue-sata { }; }; }; + +ðphy0 { reg = <0>; }; diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts index d4f6a586d553..defdc77fb550 100644 --- a/arch/arm/boot/dts/kirkwood-ns2max.dts +++ b/arch/arm/boot/dts/kirkwood-ns2max.dts @@ -49,3 +49,5 @@ blue-sata { }; }; }; + +ðphy0 { reg = <8>; }; diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts index f30e05af6473..adbafdd90991 100644 --- a/arch/arm/boot/dts/kirkwood-ns2mini.dts +++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts @@ -50,3 +50,5 @@ blue-sata { }; }; }; + +ðphy0 { reg = <0>; }; diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts index 365b792b23a7..85ccf8d8abb1 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts @@ -166,3 +166,19 @@ button@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi index 0cc5f26bbbb6..5696b630b70b 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi @@ -91,3 +91,19 @@ usb_power: regulator@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index 974f1e0f09b2..30842b4ff293 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts @@ -203,3 +203,19 @@ sata0_power: regulator@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts index 3867ae3030be..f755bc1dc604 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts @@ -50,4 +50,6 @@ button@2 { gpios = <&gpio0 16 1>; }; }; -}; \ No newline at end of file +}; + +ðphy0 { reg = <8>; }; diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts index 04f6fe106bb5..9efcd2dc79d3 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts @@ -61,4 +61,6 @@ button@2 { gpios = <&gpio1 5 1>; }; }; -}; \ No newline at end of file +}; + +ðphy0 { reg = <0>; }; diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi index 7019cf675df2..39158cf16258 100644 --- a/arch/arm/boot/dts/kirkwood-ts219.dtsi +++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi @@ -99,3 +99,19 @@ sata@80000 { }; }; }; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy { + device_type = "ethernet-phy"; + /* overwrite reg property in board file */ + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 70f414d9bd9a..cf7aeaf89e9c 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -22,13 +22,6 @@ aliases { gpio0 = &gpio0; gpio1 = &gpio1; }; - intc: interrupt-controller { - compatible = "marvell,orion-intc", "marvell,intc"; - interrupt-controller; - #interrupt-cells = <1>; - reg = <0xf1020204 0x04>, - <0xf1020214 0x04>; - }; mbus { compatible = "marvell,kirkwood-mbus", "simple-bus"; @@ -52,6 +45,30 @@ mbusc: mbus-controller@20000 { reg = <0x20000 0x80>, <0x1500 0x20>; }; + timer: timer@20300 { + compatible = "marvell,orion-timer"; + reg = <0x20300 0x20>; + interrupt-parent = <&bridge_intc>; + interrupts = <1>, <2>; + clocks = <&core_clk 0>; + }; + + intc: main-interrupt-ctrl@20200 { + compatible = "marvell,orion-intc"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x20200 0x10>, <0x20210 0x10>; + }; + + bridge_intc: bridge-interrupt-ctrl@20110 { + compatible = "marvell,orion-bridge-intc"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x20110 0x8>; + interrupts = <1>; + marvell,#interrupts = <6>; + }; + core_clk: core-clocks@10030 { compatible = "marvell,kirkwood-core-clock"; reg = <0x10030 0x4>; @@ -118,9 +135,11 @@ gate_clk: clock-gating-control@2011c { #clock-cells = <1>; }; - wdt@20300 { + wdt: watchdog-timer@20300 { compatible = "marvell,orion-wdt"; reg = <0x20300 0x28>; + interrupt-parent = <&bridge_intc>; + interrupts = <3>; clocks = <&gate_clk 7>; status = "okay"; }; @@ -207,5 +226,57 @@ crypto@30000 { clocks = <&gate_clk 17>; status = "okay"; }; + + mdio: mdio-bus@72004 { + compatible = "marvell,orion-mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72004 0x84>; + interrupts = <46>; + clocks = <&gate_clk 0>; + status = "disabled"; + + /* add phy nodes in board file */ + }; + + eth0: ethernet-controller@72000 { + compatible = "marvell,kirkwood-eth"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72000 0x4000>; + clocks = <&gate_clk 0>; + marvell,tx-checksum-limit = <1600>; + status = "disabled"; + + ethernet0-port@0 { + device_type = "network"; + compatible = "marvell,kirkwood-eth-port"; + reg = <0>; + interrupts = <11>; + /* overwrite MAC address in bootloader */ + local-mac-address = [00 00 00 00 00 00]; + /* set phy-handle property in board file */ + }; + }; + + eth1: ethernet-controller@76000 { + compatible = "marvell,kirkwood-eth"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x76000 0x4000>; + clocks = <&gate_clk 19>; + marvell,tx-checksum-limit = <1600>; + status = "disabled"; + + ethernet1-port@0 { + device_type = "network"; + compatible = "marvell,kirkwood-eth-port"; + reg = <0>; + interrupts = <15>; + /* overwrite MAC address in bootloader */ + local-mac-address = [00 00 00 00 00 00]; + /* set phy-handle property in board file */ + }; + }; }; }; diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts index 0077fc8510b7..aed83deaa991 100644 --- a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts +++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts @@ -53,3 +53,20 @@ led@1 { }; }; }; + +&mdio { + status = "okay"; + + ethphy: ethernet-phy { + device-type = "ethernet-phy"; + reg = <8>; + }; +}; + +ð { + status = "okay"; + + ethernet-port@0 { + phy-handle = <ðphy>; + }; +}; diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi index 892c64e3f1e1..e06c37e91ac6 100644 --- a/arch/arm/boot/dts/orion5x.dtsi +++ b/arch/arm/boot/dts/orion5x.dtsi @@ -16,11 +16,12 @@ / { aliases { gpio0 = &gpio0; }; + intc: interrupt-controller { - compatible = "marvell,orion-intc", "marvell,intc"; + compatible = "marvell,orion-intc"; interrupt-controller; #interrupt-cells = <1>; - reg = <0xf1020204 0x04>; + reg = <0xf1020200 0x08>; }; ocp@f1000000 { @@ -132,5 +133,34 @@ crypto@90000 { interrupts = <28>; status = "okay"; }; + + mdio: mdio-bus@72004 { + compatible = "marvell,orion-mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72004 0x84>; + interrupts = <22>; + status = "disabled"; + + /* add phy nodes in board file */ + }; + + eth: ethernet-controller@72000 { + compatible = "marvell,orion-eth"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x72000 0x4000>; + marvell,tx-checksum-limit = <1600>; + status = "disabled"; + + ethernet-port@0 { + device_type = "network"; + compatible = "marvell,orion-eth-port"; + reg = <0>; + /* overwrite MAC address in bootloader */ + local-mac-address = [00 00 00 00 00 00]; + /* set phy-handle property in board file */ + }; + }; }; }; diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig index dab5a7dfadc6..1ce39940795d 100644 --- a/arch/arm/configs/ape6evm_defconfig +++ b/arch/arm/configs/ape6evm_defconfig @@ -54,7 +54,8 @@ CONFIG_NETDEVICES=y CONFIG_SMC91X=y CONFIG_SMSC911X=y # CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_NONSTANDARD=y @@ -71,6 +72,9 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_GPIO=y # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y # CONFIG_IOMMU_SUPPORT is not set # CONFIG_DNOTIFY is not set CONFIG_TMPFS=y diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index 65edf6d47215..6e4931097dd4 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -42,6 +42,18 @@ CONFIG_VFP=y CONFIG_NEON=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_PM_RUNTIME=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_UNIX_DIAG=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y +CONFIG_TCP_MD5SIG=y +CONFIG_IPV6=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_PROC_DEVICETREE=y @@ -112,7 +124,6 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=110 CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set -CONFIG_DEBUG_LL=y CONFIG_CRC_CCITT=y CONFIG_CRC_T10DIF=y CONFIG_CRC_ITU_T=y diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 4364eff5b01e..110105476848 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -13,6 +13,9 @@ CONFIG_ARCH_DOVE=y CONFIG_MACH_DOVE_DB=y CONFIG_MACH_CM_A510=y CONFIG_MACH_DOVE_DT=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_MVEBU=y CONFIG_AEABI=y CONFIG_HIGHMEM=y CONFIG_ZBOOT_ROM_TEXT=0x0 @@ -78,6 +81,7 @@ CONFIG_SPI_ORION=y CONFIG_THERMAL=y CONFIG_DOVE_THERMAL=y CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_STORAGE=y diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index 0f2aa61911a3..0ae0eaebf6b2 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig @@ -10,49 +10,18 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_ARCH_KIRKWOOD=y CONFIG_MACH_D2NET_V2=y -CONFIG_MACH_DB88F6281_BP=y -CONFIG_MACH_DOCKSTAR=y -CONFIG_MACH_ESATA_SHEEVAPLUG=y -CONFIG_MACH_GURUPLUG=y -CONFIG_MACH_INETSPACE_V2=y -CONFIG_MACH_MV88F6281GTW_GE=y CONFIG_MACH_NET2BIG_V2=y CONFIG_MACH_NET5BIG_V2=y -CONFIG_MACH_NETSPACE_MAX_V2=y -CONFIG_MACH_NETSPACE_V2=y CONFIG_MACH_OPENRD_BASE=y CONFIG_MACH_OPENRD_CLIENT=y CONFIG_MACH_OPENRD_ULTIMATE=y CONFIG_MACH_RD88F6192_NAS=y CONFIG_MACH_RD88F6281=y -CONFIG_MACH_SHEEVAPLUG=y CONFIG_MACH_T5325=y CONFIG_MACH_TS219=y CONFIG_MACH_TS41X=y -CONFIG_MACH_CLOUDBOX_DT=y -CONFIG_MACH_DB88F628X_BP_DT=y -CONFIG_MACH_DLINK_KIRKWOOD_DT=y -CONFIG_MACH_DOCKSTAR_DT=y -CONFIG_MACH_DREAMPLUG_DT=y -CONFIG_MACH_GOFLEXNET_DT=y -CONFIG_MACH_GURUPLUG_DT=y -CONFIG_MACH_IB62X0_DT=y -CONFIG_MACH_ICONNECT_DT=y -CONFIG_MACH_INETSPACE_V2_DT=y -CONFIG_MACH_IOMEGA_IX2_200_DT=y -CONFIG_MACH_KM_KIRKWOOD_DT=y -CONFIG_MACH_LSXL_DT=y -CONFIG_MACH_MPLCEC4_DT=y -CONFIG_MACH_NETSPACE_LITE_V2_DT=y -CONFIG_MACH_NETSPACE_MAX_V2_DT=y -CONFIG_MACH_NETSPACE_MINI_V2_DT=y -CONFIG_MACH_NETSPACE_V2_DT=y -CONFIG_MACH_NSA310_DT=y -CONFIG_MACH_OPENBLOCKS_A6_DT=y -CONFIG_MACH_READYNAS_DT=y -CONFIG_MACH_SHEEVAPLUG_DT=y -CONFIG_MACH_TOPKICK_DT=y -CONFIG_MACH_TS219_DT=y +CONFIG_ARCH_KIRKWOOD_DT=y +CONFIG_MACH_MV88F6281GTW_GE_DT=y # CONFIG_CPU_FEROCEON_OLD_ID is not set CONFIG_PCI_MVEBU=y CONFIG_PREEMPT=y @@ -92,6 +61,7 @@ CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ORION=y CONFIG_BLK_DEV_LOOP=y +CONFIG_EEPROM_AT24=y # CONFIG_SCSI_PROC_FS is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=m @@ -100,9 +70,9 @@ CONFIG_ATA=y CONFIG_SATA_AHCI=y CONFIG_SATA_MV=y CONFIG_NETDEVICES=y -CONFIG_MII=y CONFIG_NET_DSA_MV88E6123_61_65=y CONFIG_MV643XX_ETH=y +CONFIG_R8169=y CONFIG_MARVELL_PHY=y CONFIG_LIBERTAS=y CONFIG_LIBERTAS_SDIO=y @@ -123,9 +93,11 @@ CONFIG_I2C_MV64XXX=y CONFIG_SPI=y CONFIG_SPI_ORION=y CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set +CONFIG_SENSORS_ADT7475=y +CONFIG_SENSORS_LM63=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_LM85=y CONFIG_THERMAL=y -CONFIG_KIRKWOOD_THERMAL=y CONFIG_WATCHDOG=y CONFIG_ORION_WATCHDOG=y CONFIG_HID_DRAGONRISE=y @@ -164,6 +136,8 @@ CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_RS5C372=y +CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_MV=y CONFIG_DMADEVICES=y @@ -171,6 +145,7 @@ CONFIG_MV_XOR=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y CONFIG_ISO9660_FS=m CONFIG_JOLIET=y CONFIG_UDF_FS=m @@ -186,12 +161,12 @@ CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y CONFIG_DEBUG_LL=y diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig new file mode 100644 index 000000000000..e777ef22b801 --- /dev/null +++ b/arch/arm/configs/lager_defconfig @@ -0,0 +1,120 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +CONFIG_SLAB=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_SHMOBILE=y +CONFIG_ARCH_R8A7790=y +CONFIG_MACH_LAGER=y +# CONFIG_SH_TIMER_TMU is not set +# CONFIG_EM_TIMER_STI is not set +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_458693=y +CONFIG_ARM_ERRATA_460075=y +CONFIG_ARM_ERRATA_743622=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_HAVE_ARM_ARCH_TIMER=y +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_FORCE_MAX_ZONEORDER=13 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_KEXEC=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_VFP=y +CONFIG_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_PM_RUNTIME=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_NETDEVICES=y +# CONFIG_NET_CORE is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +CONFIG_SH_ETH=y +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_NR_UARTS=10 +CONFIG_SERIAL_SH_SCI_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_I2C_SH_MOBILE=y +CONFIG_GPIO_SH_PFC=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_RCAR=y +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +CONFIG_RCAR_THERMAL=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_SDHI=y +CONFIG_MMC_SH_MMCIF=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_DMADEVICES=y +CONFIG_SH_DMAE=y +# CONFIG_IOMMU_SUPPORT is not set +# CONFIG_DNOTIFY is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index c50e52be4463..000e9205b2b9 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -29,6 +29,7 @@ CONFIG_AEABI=y CONFIG_HIGHMEM=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on" CONFIG_CMDLINE_FORCE=y CONFIG_KEXEC=y diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 731814e2c189..594d706b641f 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -39,6 +39,8 @@ CONFIG_MVNETA=y CONFIG_MARVELL_PHY=y CONFIG_MWIFIEX=y CONFIG_MWIFIEX_SDIO=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_I2C=y diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index 92d0a149aeb5..ea042e80e54d 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -1,3 +1,4 @@ +CONFIG_SYSVIPC=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_IKCONFIG=y @@ -26,8 +27,11 @@ CONFIG_ARCH_TEGRA=y CONFIG_ARCH_TEGRA_2x_SOC=y CONFIG_ARCH_TEGRA_3x_SOC=y CONFIG_ARCH_TEGRA_114_SOC=y -CONFIG_TEGRA_PCI=y CONFIG_TEGRA_EMC_SCALING_ENABLE=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_TEGRA=y +CONFIG_PCIEPORTBUS=y CONFIG_SMP=y CONFIG_PREEMPT=y CONFIG_AEABI=y @@ -92,6 +96,7 @@ CONFIG_ISL29003=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y +CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_LOWLEVEL is not set CONFIG_NETDEVICES=y CONFIG_DUMMY=y @@ -106,6 +111,7 @@ CONFIG_RT2800USB=m CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_TEGRA=y +CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_INPUT_MISC=y CONFIG_INPUT_MPU3050=y # CONFIG_LEGACY_PTYS is not set @@ -178,6 +184,7 @@ CONFIG_SND_SOC_TEGRA_WM8903=y CONFIG_SND_SOC_TEGRA_TRIMSLICE=y CONFIG_SND_SOC_TEGRA_ALC5632=y CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_ACM=y diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index f11289519c39..69d67f714a2f 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -12,6 +12,7 @@ config ARCH_BCM select GPIO_BCM select SPARSE_IRQ select TICK_ONESHOT + select CACHE_L2X0 help This enables support for system based on Broadcom SoCs. It currently supports the 'BCM281XX' family, which includes diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index 6adb6aecf48f..e3d03033a7e2 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012 Broadcom Corporation +# Copyright (C) 2012-2013 Broadcom Corporation # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -10,6 +10,6 @@ # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -obj-$(CONFIG_ARCH_BCM) := board_bcm.o bcm_kona_smc.o bcm_kona_smc_asm.o +obj-$(CONFIG_ARCH_BCM) := board_bcm281xx.o bcm_kona_smc.o bcm_kona_smc_asm.o kona.o plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec) diff --git a/arch/arm/mach-bcm/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kona_smc.c index 56d9d19b2470..5e31e918f325 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.c +++ b/arch/arm/mach-bcm/bcm_kona_smc.c @@ -36,18 +36,20 @@ struct bcm_kona_smc_data { }; static const struct of_device_id bcm_kona_smc_ids[] __initconst = { - {.compatible = "bcm,kona-smc"}, + {.compatible = "brcm,kona-smc"}, + {.compatible = "bcm,kona-smc"}, /* deprecated name */ {}, }; /* Map in the bounce area */ -void __init bcm_kona_smc_init(void) +int __init bcm_kona_smc_init(void) { struct device_node *node; /* Read buffer addr and size from the device tree node */ node = of_find_matching_node(NULL, bcm_kona_smc_ids); - BUG_ON(!node); + if (!node) + return -ENODEV; /* Don't care about size or flags of the DT node */ bridge_data.buffer_addr = @@ -59,7 +61,9 @@ void __init bcm_kona_smc_init(void) bridge_data.initialized = 1; - pr_info("Secure API initialized!\n"); + pr_info("Kona Secure API initialized\n"); + + return 0; } /* __bcm_kona_smc() should only run on CPU 0, with pre-emption disabled */ diff --git a/arch/arm/mach-bcm/bcm_kona_smc.h b/arch/arm/mach-bcm/bcm_kona_smc.h index 3bedbed1c21b..d098a7e76744 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.h +++ b/arch/arm/mach-bcm/bcm_kona_smc.h @@ -64,7 +64,7 @@ #define SSAPI_BRCM_START_VC_CORE 0x0E000008 #ifndef __ASSEMBLY__ -extern void bcm_kona_smc_init(void); +extern int __init bcm_kona_smc_init(void); extern unsigned bcm_kona_smc(unsigned service_id, unsigned arg0, diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm281xx.c similarity index 68% rename from arch/arm/mach-bcm/board_bcm.c rename to arch/arm/mach-bcm/board_bcm281xx.c index 28599326d4ad..8d9f931164bb 100644 --- a/arch/arm/mach-bcm/board_bcm.c +++ b/arch/arm/mach-bcm/board_bcm281xx.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Broadcom Corporation + * Copyright (C) 2012-2013 Broadcom Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,23 +21,39 @@ #include #include - #include "bcm_kona_smc.h" +#include "kona.h" static int __init kona_l2_cache_init(void) { if (!IS_ENABLED(CONFIG_CACHE_L2X0)) return 0; + if (bcm_kona_smc_init() < 0) { + pr_info("Kona secure API not available. Skipping L2 init\n"); + return 0; + } + bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0); /* * The aux_val and aux_mask have no effect since L2 cache is already * enabled. Pass 0s for aux_val and 1s for aux_mask for default value. */ - l2x0_of_init(0, ~0); + return l2x0_of_init(0, ~0); +} - return 0; +static void bcm_board_setup_restart(void) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "brcm,bcm11351"); + if (np) { + if (of_device_is_available(np)) + bcm_kona_setup_restart(); + of_node_put(np); + } + /* Restart setup for other boards goes here */ } static void __init board_init(void) @@ -45,15 +61,15 @@ static void __init board_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, &platform_bus); - bcm_kona_smc_init(); - + bcm_board_setup_restart(); kona_l2_cache_init(); } -static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; +static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") .init_time = clocksource_of_init, .init_machine = board_init, + .restart = bcm_kona_restart, .dt_compat = bcm11351_dt_compat, MACHINE_END diff --git a/arch/arm/mach-bcm/kona.c b/arch/arm/mach-bcm/kona.c new file mode 100644 index 000000000000..6939d9017f63 --- /dev/null +++ b/arch/arm/mach-bcm/kona.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include + +#include "kona.h" + +static void __iomem *watchdog_base; + +void bcm_kona_setup_restart(void) +{ + struct device_node *np_wdog; + + /* + * The assumption is that whoever calls bcm_kona_setup_restart() + * also needs a Kona Watchdog Timer entry in Device Tree, i.e. we + * report an error if the DT entry is missing. + */ + np_wdog = of_find_compatible_node(NULL, NULL, "brcm,kona-wdt"); + if (!np_wdog) { + pr_err("brcm,kona-wdt not found in DT, reboot disabled\n"); + return; + } + watchdog_base = of_iomap(np_wdog, 0); + WARN(!watchdog_base, "failed to map watchdog base"); + of_node_put(np_wdog); +} + +#define SECWDOG_OFFSET 0x00000000 +#define SECWDOG_RESERVED_MASK 0xE2000000 +#define SECWDOG_WD_LOAD_FLAG_MASK 0x10000000 +#define SECWDOG_EN_MASK 0x08000000 +#define SECWDOG_SRSTEN_MASK 0x04000000 +#define SECWDOG_CLKS_SHIFT 20 +#define SECWDOG_LOCK_SHIFT 0 + +void bcm_kona_restart(enum reboot_mode mode, const char *cmd) +{ + uint32_t val; + + if (!watchdog_base) + panic("Watchdog not mapped. Reboot failed.\n"); + + /* Enable watchdog2 with very short timeout. */ + val = readl(watchdog_base + SECWDOG_OFFSET); + val &= SECWDOG_RESERVED_MASK | SECWDOG_WD_LOAD_FLAG_MASK; + val |= SECWDOG_EN_MASK | SECWDOG_SRSTEN_MASK | + (0x8 << SECWDOG_CLKS_SHIFT) | + (0x8 << SECWDOG_LOCK_SHIFT); + writel(val, watchdog_base + SECWDOG_OFFSET); + + while (1) + ; +} diff --git a/arch/arm/mach-bcm/kona.h b/arch/arm/mach-bcm/kona.h new file mode 100644 index 000000000000..291eca3e06ff --- /dev/null +++ b/arch/arm/mach-bcm/kona.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2013 Broadcom Corporation + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +void bcm_kona_setup_restart(void); +void bcm_kona_restart(enum reboot_mode mode, const char *cmd); diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index dff7b2fd4e20..0bc7cdf8cf46 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig @@ -23,6 +23,8 @@ config MACH_CM_A510 config MACH_DOVE_DT bool "Marvell Dove Flattened Device Tree" select DOVE_CLK + select ORION_IRQCHIP + select ORION_TIMER select REGULATOR select REGULATOR_FIXED_VOLTAGE select USE_OF diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index 4d9d2ffc4535..cbc5c0618788 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile @@ -1,5 +1,5 @@ -obj-y += common.o irq.o -obj-$(CONFIG_DOVE_LEGACY) += mpp.o +obj-y += common.o +obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o obj-$(CONFIG_PCI) += pcie.o obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c index f3755ac81148..49f72a848423 100644 --- a/arch/arm/mach-dove/board-dt.c +++ b/arch/arm/mach-dove/board-dt.c @@ -10,11 +10,14 @@ #include #include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -33,10 +36,6 @@ static void __init dove_legacy_clk_init(void) clkspec.np = np; clkspec.args_count = 1; - clkspec.args[0] = CLOCK_GATING_BIT_GBE; - orion_clkdev_add(NULL, "mv643xx_eth_port.0", - of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CLOCK_GATING_BIT_PCIE0; orion_clkdev_add("0", "pcie", of_clk_get_from_provider(&clkspec)); @@ -46,15 +45,18 @@ static void __init dove_legacy_clk_init(void) of_clk_get_from_provider(&clkspec)); } -static void __init dove_of_clk_init(void) +static void __init dove_dt_time_init(void) { of_clk_init(NULL); - dove_legacy_clk_init(); + clocksource_of_init(); } -static struct mv643xx_eth_platform_data dove_dt_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, -}; +static void __init dove_dt_init_early(void) +{ + mvebu_mbus_init("marvell,dove-mbus", + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, + DOVE_MC_WINS_BASE, DOVE_MC_WINS_SZ); +} static void __init dove_dt_init(void) { @@ -65,11 +67,10 @@ static void __init dove_dt_init(void) #endif dove_setup_cpu_wins(); - /* Setup root of clk tree */ - dove_of_clk_init(); + /* Setup clocks for legacy devices */ + dove_legacy_clk_init(); /* Internal devices not ported to DT yet */ - dove_ge00_init(&dove_dt_ge00_data); dove_pcie_init(1, 1); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -82,9 +83,8 @@ static const char * const dove_dt_board_compat[] = { DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") .map_io = dove_map_io, - .init_early = dove_init_early, - .init_irq = orion_dt_init_irq, - .init_time = dove_timer_init, + .init_early = dove_dt_init_early, + .init_time = dove_dt_time_init, .init_machine = dove_dt_init, .restart = dove_restart, .dt_compat = dove_dt_board_compat, 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 +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 - 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 - 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 - * - * 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 -#include -#include -#include -#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 - * - * 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 -#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) -{ - 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 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 0903242c00dc..000000000000 --- 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 682b7ac8deb8..82d3ad8e87cf 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -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 */ .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 - * - * 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-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 -#include -#include -#include -#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 - * - * 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 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 -#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-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 -#include -#include -#include -#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 - * - * 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 -#include -#include -#include -#include -#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 - * - * 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 938712e248f1..000000000000 --- 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-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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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 - * - * 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,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 - * - * 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-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 - * - * 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 -#include -#include -#include -#include -#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 -#include -#include -#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 - * - * Based on the board file ts219-setup.c: - * - * Copyright (C) 2009 Martin Michlmayr - * Copyright (C) 2008 Byron Bradley - * - * 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 -#include -#include -#include -#include -#include -#include -#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 - * - * 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 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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 */ - .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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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 */ - .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 - * Copyright (C) 2009 Benoît Canet - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#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 */ - .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 diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index 0fc33c56cbb7..f66c1b2ee8c1 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c @@ -23,8 +23,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -95,14 +95,6 @@ static struct platform_device edmini_v2_nor_flash = { .resource = &edmini_v2_nor_flash_resource, }; -/***************************************************************************** - * Ethernet - ****************************************************************************/ - -static struct mv643xx_eth_platform_data edmini_v2_eth_data = { - .phy_addr = 8, -}; - /***************************************************************************** * RTC 5C372a on I2C bus ****************************************************************************/ @@ -152,7 +144,6 @@ void __init edmini_v2_init(void) * Configure peripherals. */ orion5x_ehci0_init(); - orion5x_eth_init(&edmini_v2_eth_data); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, ORION_MBUS_DEVBUS_BOOT_ATTR, diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 403c939ddf99..e817fde6729a 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -162,6 +162,7 @@ config MACH_BOCKW depends on ARCH_R8A7778 select ARCH_REQUIRE_GPIOLIB select RENESAS_INTC_IRQPIN + select REGULATOR_FIXED_VOLTAGE if REGULATOR select USE_OF config MACH_MARZEN diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index c7540710906f..f6d64495c405 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include