Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc Marvell Orion device-tree updates from Olof Johansson:
"This contains a set of device-tree conversions for Marvell Orion
platforms that were staged early but took a few tries to get the
branch into a format where it was suitable for us to pick up.

Given that most people working on these platforms are hobbyists with
limited time, we were a bit more flexible with merging it even though
it came in late."

* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
ARM: Kirkwood: Replace mrvl with marvell
ARM: Kirkwood: Describe GoFlex Net LEDs and SATA in DT.
ARM: Kirkwood: Describe Dreamplug LEDs in DT.
ARM: Kirkwood: Describe iConnects LEDs in DT.
ARM: Kirkwood: Describe iConnects temperature sensor in DT.
ARM: Kirkwood: Describe IB62x0 LEDs in DT.
ARM: Kirkwood: Describe IB62x0 gpio-keys in DT.
ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
ARM: Kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
ARM: Kirkwood: Use DT to configure SATA device.
ARM: kirkwood: use devicetree for SPI on dreamplug
ARM: kirkwood: Add LS-XHL and LS-CHLv2 support
ARM: Kirkwood: Initial DTS support for Kirkwood GoFlex Net
ARM: Kirkwood: Add basic device tree support for QNAP TS219.
ATA: sata_mv: Add device tree support
ARM: Orion: DTify the watchdog timer.
ARM: Orion: Add arch support needed for I2C via DT.
ARM: kirkwood: use devicetree for orion-spi
...

Conflicts:
drivers/watchdog/orion_wdt.c

+1422 -604
+20
Documentation/devicetree/bindings/arm/mrvl/intc.txt
··· 38 38 reg-names = "mux status", "mux mask"; 39 39 mrvl,intc-nr-irqs = <2>; 40 40 }; 41 + 42 + * Marvell Orion Interrupt controller 43 + 44 + Required properties 45 + - compatible : Should be "marvell,orion-intc". 46 + - #interrupt-cells: Specifies the number of cells needed to encode an 47 + interrupt source. Supported value is <1>. 48 + - interrupt-controller : Declare this node to be an interrupt controller. 49 + - reg : Interrupt mask address. A list of 4 byte ranges, one per controller. 50 + One entry in the list represents 32 interrupts. 51 + 52 + Example: 53 + 54 + intc: interrupt-controller { 55 + compatible = "marvell,orion-intc", "marvell,intc"; 56 + interrupt-controller; 57 + #interrupt-cells = <1>; 58 + reg = <0xfed20204 0x04>, 59 + <0xfed20214 0x04>; 60 + };
+16
Documentation/devicetree/bindings/ata/marvell.txt
··· 1 + * Marvell Orion SATA 2 + 3 + Required Properties: 4 + - compatibility : "marvell,orion-sata" 5 + - reg : Address range of controller 6 + - interrupts : Interrupt controller is using 7 + - nr-ports : Number of SATA ports in use. 8 + 9 + Example: 10 + 11 + sata@80000 { 12 + compatible = "marvell,orion-sata"; 13 + reg = <0x80000 0x5000>; 14 + interrupts = <21>; 15 + nr-ports = <2>; 16 + }
+23
Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
··· 27 27 interrupt-controller; 28 28 #interrupt-cells = <1>; 29 29 }; 30 + 31 + * Marvell Orion GPIO Controller 32 + 33 + Required properties: 34 + - compatible : Should be "marvell,orion-gpio" 35 + - reg : Address and length of the register set for controller. 36 + - gpio-controller : So we know this is a gpio controller. 37 + - ngpio : How many gpios this controller has. 38 + - interrupts : Up to 4 Interrupts for the controller. 39 + 40 + Optional properties: 41 + - mask-offset : For SMP Orions, offset for Nth CPU 42 + 43 + Example: 44 + 45 + gpio0: gpio@10100 { 46 + compatible = "marvell,orion-gpio"; 47 + #gpio-cells = <2>; 48 + gpio-controller; 49 + reg = <0x10100 0x40>; 50 + ngpio = <32>; 51 + interrupts = <35>, <36>, <37>, <38>; 52 + };
+14
Documentation/devicetree/bindings/watchdog/marvel.txt
··· 1 + * Marvell Orion Watchdog Time 2 + 3 + Required Properties: 4 + 5 + - Compatibility : "marvell,orion-wdt" 6 + - reg : Address of the timer registers 7 + 8 + Example: 9 + 10 + wdt@20300 { 11 + compatible = "marvell,orion-wdt"; 12 + reg = <0x20300 0x28>; 13 + status = "okay"; 14 + };
+1
arch/arm/Kconfig
··· 1151 1151 bool 1152 1152 select CLKSRC_MMIO 1153 1153 select GENERIC_IRQ_CHIP 1154 + select IRQ_DOMAIN 1154 1155 select COMMON_CLK 1155 1156 1156 1157 config PLAT_PXA
+26 -36
arch/arm/boot/dts/kirkwood-dns320.dts
··· 1 1 /dts-v1/; 2 2 3 - /include/ "kirkwood.dtsi" 3 + /include/ "kirkwood-dnskw.dtsi" 4 4 5 5 / { 6 6 model = "D-Link DNS-320 NAS (Rev A1)"; ··· 15 15 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 16 }; 17 17 18 + gpio-leds { 19 + compatible = "gpio-leds"; 20 + blue-power { 21 + label = "dns320:blue:power"; 22 + gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ 23 + linux,default-trigger = "default-on"; 24 + }; 25 + blue-usb { 26 + label = "dns320:blue:usb"; 27 + gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */ 28 + }; 29 + orange-l_hdd { 30 + label = "dns320:orange:l_hdd"; 31 + gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */ 32 + }; 33 + orange-r_hdd { 34 + label = "dns320:orange:r_hdd"; 35 + gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */ 36 + }; 37 + orange-usb { 38 + label = "dns320:orange:usb"; 39 + gpios = <&gpio1 3 1>; /* GPIO 35 Active Low */ 40 + }; 41 + }; 42 + 18 43 ocp@f1000000 { 19 44 serial@12000 { 20 45 clock-frequency = <166666667>; ··· 49 24 serial@12100 { 50 25 clock-frequency = <166666667>; 51 26 status = "okay"; 52 - }; 53 - 54 - nand@3000000 { 55 - status = "okay"; 56 - 57 - partition@0 { 58 - label = "u-boot"; 59 - reg = <0x0000000 0x100000>; 60 - read-only; 61 - }; 62 - 63 - partition@100000 { 64 - label = "uImage"; 65 - reg = <0x0100000 0x500000>; 66 - }; 67 - 68 - partition@600000 { 69 - label = "ramdisk"; 70 - reg = <0x0600000 0x500000>; 71 - }; 72 - 73 - partition@b00000 { 74 - label = "image"; 75 - reg = <0x0b00000 0x6600000>; 76 - }; 77 - 78 - partition@7100000 { 79 - label = "mini firmware"; 80 - reg = <0x7100000 0xa00000>; 81 - }; 82 - 83 - partition@7b00000 { 84 - label = "config"; 85 - reg = <0x7b00000 0x500000>; 86 - }; 87 27 }; 88 28 }; 89 29 };
+34 -36
arch/arm/boot/dts/kirkwood-dns325.dts
··· 1 1 /dts-v1/; 2 2 3 - /include/ "kirkwood.dtsi" 3 + /include/ "kirkwood-dnskw.dtsi" 4 4 5 5 / { 6 6 model = "D-Link DNS-325 NAS (Rev A1)"; ··· 15 15 bootargs = "console=ttyS0,115200n8 earlyprintk"; 16 16 }; 17 17 18 + gpio-leds { 19 + compatible = "gpio-leds"; 20 + white-power { 21 + label = "dns325:white:power"; 22 + gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ 23 + linux,default-trigger = "default-on"; 24 + }; 25 + white-usb { 26 + label = "dns325:white:usb"; 27 + gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */ 28 + }; 29 + red-l_hdd { 30 + label = "dns325:red:l_hdd"; 31 + gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */ 32 + }; 33 + red-r_hdd { 34 + label = "dns325:red:r_hdd"; 35 + gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */ 36 + }; 37 + red-usb { 38 + label = "dns325:red:usb"; 39 + gpios = <&gpio0 29 1>; /* GPIO 29 Active Low */ 40 + }; 41 + }; 42 + 18 43 ocp@f1000000 { 44 + i2c@11000 { 45 + status = "okay"; 46 + 47 + lm75: lm75@48 { 48 + compatible = "national,lm75"; 49 + reg = <0x48>; 50 + }; 51 + }; 19 52 serial@12000 { 20 53 clock-frequency = <200000000>; 21 54 status = "okay"; 22 - }; 23 - 24 - nand@3000000 { 25 - status = "okay"; 26 - 27 - partition@0 { 28 - label = "u-boot"; 29 - reg = <0x0000000 0x100000>; 30 - read-only; 31 - }; 32 - 33 - partition@100000 { 34 - label = "uImage"; 35 - reg = <0x0100000 0x500000>; 36 - }; 37 - 38 - partition@600000 { 39 - label = "ramdisk"; 40 - reg = <0x0600000 0x500000>; 41 - }; 42 - 43 - partition@b00000 { 44 - label = "image"; 45 - reg = <0x0b00000 0x6600000>; 46 - }; 47 - 48 - partition@7100000 { 49 - label = "mini firmware"; 50 - reg = <0x7100000 0xa00000>; 51 - }; 52 - 53 - partition@7b00000 { 54 - label = "config"; 55 - reg = <0x7b00000 0x500000>; 56 - }; 57 55 }; 58 56 }; 59 57 };
+69
arch/arm/boot/dts/kirkwood-dnskw.dtsi
··· 1 + /include/ "kirkwood.dtsi" 2 + 3 + / { 4 + model = "D-Link DNS NASes (kirkwood-based)"; 5 + compatible = "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 6 + 7 + gpio_keys { 8 + compatible = "gpio-keys"; 9 + #address-cells = <1>; 10 + #size-cells = <0>; 11 + button@1 { 12 + label = "Power button"; 13 + linux,code = <116>; 14 + gpios = <&gpio1 2 1>; 15 + }; 16 + button@2 { 17 + label = "USB unmount button"; 18 + linux,code = <161>; 19 + gpios = <&gpio1 15 1>; 20 + }; 21 + button@3 { 22 + label = "Reset button"; 23 + linux,code = <0x198>; 24 + gpios = <&gpio1 16 1>; 25 + }; 26 + }; 27 + 28 + ocp@f1000000 { 29 + sata@80000 { 30 + status = "okay"; 31 + nr-ports = <2>; 32 + }; 33 + 34 + nand@3000000 { 35 + status = "okay"; 36 + 37 + partition@0 { 38 + label = "u-boot"; 39 + reg = <0x0000000 0x100000>; 40 + read-only; 41 + }; 42 + 43 + partition@100000 { 44 + label = "uImage"; 45 + reg = <0x0100000 0x500000>; 46 + }; 47 + 48 + partition@600000 { 49 + label = "ramdisk"; 50 + reg = <0x0600000 0x500000>; 51 + }; 52 + 53 + partition@b00000 { 54 + label = "image"; 55 + reg = <0x0b00000 0x6600000>; 56 + }; 57 + 58 + partition@7100000 { 59 + label = "mini firmware"; 60 + reg = <0x7100000 0xa00000>; 61 + }; 62 + 63 + partition@7b00000 { 64 + label = "config"; 65 + reg = <0x7b00000 0x500000>; 66 + }; 67 + }; 68 + }; 69 + };
+50
arch/arm/boot/dts/kirkwood-dreamplug.dts
··· 20 20 clock-frequency = <200000000>; 21 21 status = "ok"; 22 22 }; 23 + 24 + spi@10600 { 25 + status = "okay"; 26 + 27 + m25p40@0 { 28 + #address-cells = <1>; 29 + #size-cells = <1>; 30 + compatible = "mx25l1606e"; 31 + reg = <0>; 32 + spi-max-frequency = <50000000>; 33 + mode = <0>; 34 + 35 + partition@0 { 36 + reg = <0x0 0x80000>; 37 + label = "u-boot"; 38 + }; 39 + 40 + partition@100000 { 41 + reg = <0x100000 0x10000>; 42 + label = "u-boot env"; 43 + }; 44 + 45 + partition@180000 { 46 + reg = <0x180000 0x10000>; 47 + label = "dtb"; 48 + }; 49 + }; 50 + }; 51 + 52 + sata@80000 { 53 + status = "okay"; 54 + nr-ports = <1>; 55 + }; 56 + }; 57 + 58 + gpio-leds { 59 + compatible = "gpio-leds"; 60 + 61 + bluetooth { 62 + label = "dreamplug:blue:bluetooth"; 63 + gpios = <&gpio1 15 1>; 64 + }; 65 + wifi { 66 + label = "dreamplug:green:wifi"; 67 + gpios = <&gpio1 16 1>; 68 + }; 69 + wifi-ap { 70 + label = "dreamplug:green:wifi_ap"; 71 + gpios = <&gpio1 17 1>; 72 + }; 23 73 }; 24 74 };
+99
arch/arm/boot/dts/kirkwood-goflexnet.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "kirkwood.dtsi" 4 + 5 + / { 6 + model = "Seagate GoFlex Net"; 7 + compatible = "seagate,goflexnet", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 + 9 + memory { 10 + device_type = "memory"; 11 + reg = <0x00000000 0x8000000>; 12 + }; 13 + 14 + chosen { 15 + bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/sda1 rootdelay=10"; 16 + }; 17 + 18 + ocp@f1000000 { 19 + serial@12000 { 20 + clock-frequency = <200000000>; 21 + status = "ok"; 22 + }; 23 + 24 + nand@3000000 { 25 + status = "okay"; 26 + 27 + partition@0 { 28 + label = "u-boot"; 29 + reg = <0x0000000 0x100000>; 30 + read-only; 31 + }; 32 + 33 + partition@100000 { 34 + label = "uImage"; 35 + reg = <0x0100000 0x400000>; 36 + }; 37 + 38 + partition@500000 { 39 + label = "pogoplug"; 40 + reg = <0x0500000 0x2000000>; 41 + }; 42 + 43 + partition@2500000 { 44 + label = "root"; 45 + reg = <0x02500000 0xd800000>; 46 + }; 47 + }; 48 + sata@80000 { 49 + status = "okay"; 50 + nr-ports = <2>; 51 + }; 52 + 53 + }; 54 + gpio-leds { 55 + compatible = "gpio-leds"; 56 + 57 + health { 58 + label = "status:green:health"; 59 + gpios = <&gpio1 14 1>; 60 + linux,default-trigger = "default-on"; 61 + }; 62 + fault { 63 + label = "status:orange:fault"; 64 + gpios = <&gpio1 15 1>; 65 + }; 66 + left0 { 67 + label = "status:white:left0"; 68 + gpios = <&gpio1 10 0>; 69 + }; 70 + left1 { 71 + label = "status:white:left1"; 72 + gpios = <&gpio1 11 0>; 73 + }; 74 + left2 { 75 + label = "status:white:left2"; 76 + gpios = <&gpio1 12 0>; 77 + }; 78 + left3 { 79 + label = "status:white:left3"; 80 + gpios = <&gpio1 13 0>; 81 + }; 82 + right0 { 83 + label = "status:white:right0"; 84 + gpios = <&gpio1 6 0>; 85 + }; 86 + right1 { 87 + label = "status:white:right1"; 88 + gpios = <&gpio1 7 0>; 89 + }; 90 + right2 { 91 + label = "status:white:right2"; 92 + gpios = <&gpio1 8 0>; 93 + }; 94 + right3 { 95 + label = "status:white:right3"; 96 + gpios = <&gpio1 9 0>; 97 + }; 98 + }; 99 + };
+38
arch/arm/boot/dts/kirkwood-ib62x0.dts
··· 21 21 status = "okay"; 22 22 }; 23 23 24 + sata@80000 { 25 + status = "okay"; 26 + nr-ports = <2>; 27 + }; 28 + 24 29 nand@3000000 { 25 30 status = "okay"; 26 31 ··· 44 39 reg = <0x0700000 0xf900000>; 45 40 }; 46 41 42 + }; 43 + }; 44 + 45 + gpio_keys { 46 + compatible = "gpio-keys"; 47 + #address-cells = <1>; 48 + #size-cells = <0>; 49 + button@1 { 50 + label = "USB Copy"; 51 + linux,code = <133>; 52 + gpios = <&gpio0 29 1>; 53 + }; 54 + button@2 { 55 + label = "Reset"; 56 + linux,code = <0x198>; 57 + gpios = <&gpio0 28 1>; 58 + }; 59 + }; 60 + gpio-leds { 61 + compatible = "gpio-leds"; 62 + 63 + green-os { 64 + label = "ib62x0:green:os"; 65 + gpios = <&gpio0 25 0>; 66 + linux,default-trigger = "default-on"; 67 + }; 68 + red-os { 69 + label = "ib62x0:red:os"; 70 + gpios = <&gpio0 22 0>; 71 + }; 72 + usb-copy { 73 + label = "ib62x0:red:usb_copy"; 74 + gpios = <&gpio0 27 0>; 47 75 }; 48 76 }; 49 77 };
+42
arch/arm/boot/dts/kirkwood-iconnect.dts
··· 18 18 }; 19 19 20 20 ocp@f1000000 { 21 + i2c@11000 { 22 + status = "okay"; 23 + 24 + lm63: lm63@4c { 25 + compatible = "national,lm63"; 26 + reg = <0x4c>; 27 + }; 28 + }; 21 29 serial@12000 { 22 30 clock-frequency = <200000000>; 23 31 status = "ok"; 32 + }; 33 + }; 34 + gpio-leds { 35 + compatible = "gpio-leds"; 36 + 37 + led-level { 38 + label = "led_level"; 39 + gpios = <&gpio1 9 0>; 40 + linux,default-trigger = "default-on"; 41 + }; 42 + power-blue { 43 + label = "power:blue"; 44 + gpios = <&gpio1 11 0>; 45 + linux,default-trigger = "timer"; 46 + }; 47 + usb1 { 48 + label = "usb1:blue"; 49 + gpios = <&gpio1 12 0>; 50 + }; 51 + usb2 { 52 + label = "usb2:blue"; 53 + gpios = <&gpio1 13 0>; 54 + }; 55 + usb3 { 56 + label = "usb3:blue"; 57 + gpios = <&gpio1 14 0>; 58 + }; 59 + usb4 { 60 + label = "usb4:blue"; 61 + gpios = <&gpio1 15 0>; 62 + }; 63 + otb { 64 + label = "otb:blue"; 65 + gpios = <&gpio1 16 0>; 24 66 }; 25 67 }; 26 68 };
+20
arch/arm/boot/dts/kirkwood-lschlv2.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "kirkwood-lsxl.dtsi" 4 + 5 + / { 6 + model = "Buffalo Linkstation LS-CHLv2"; 7 + compatible = "buffalo,lschlv2", "buffalo,lsxl", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 + 9 + memory { 10 + device_type = "memory"; 11 + reg = <0x00000000 0x4000000>; 12 + }; 13 + 14 + ocp@f1000000 { 15 + serial@12000 { 16 + clock-frequency = <166666667>; 17 + status = "okay"; 18 + }; 19 + }; 20 + };
+20
arch/arm/boot/dts/kirkwood-lsxhl.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "kirkwood-lsxl.dtsi" 4 + 5 + / { 6 + model = "Buffalo Linkstation LS-XHL"; 7 + compatible = "buffalo,lsxhl", "buffalo,lsxl", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 8 + 9 + memory { 10 + device_type = "memory"; 11 + reg = <0x00000000 0x10000000>; 12 + }; 13 + 14 + ocp@f1000000 { 15 + serial@12000 { 16 + clock-frequency = <200000000>; 17 + status = "okay"; 18 + }; 19 + }; 20 + };
+95
arch/arm/boot/dts/kirkwood-lsxl.dtsi
··· 1 + /include/ "kirkwood.dtsi" 2 + 3 + / { 4 + chosen { 5 + bootargs = "console=ttyS0,115200n8 earlyprintk"; 6 + }; 7 + 8 + ocp@f1000000 { 9 + sata@80000 { 10 + status = "okay"; 11 + nr-ports = <1>; 12 + }; 13 + 14 + spi@10600 { 15 + status = "okay"; 16 + 17 + m25p40@0 { 18 + #address-cells = <1>; 19 + #size-cells = <1>; 20 + compatible = "m25p40"; 21 + reg = <0>; 22 + spi-max-frequency = <25000000>; 23 + mode = <0>; 24 + 25 + partition@0 { 26 + reg = <0x0 0x60000>; 27 + label = "uboot"; 28 + read-only; 29 + }; 30 + 31 + partition@60000 { 32 + reg = <0x60000 0x10000>; 33 + label = "dtb"; 34 + read-only; 35 + }; 36 + 37 + partition@70000 { 38 + reg = <0x70000 0x10000>; 39 + label = "uboot_env"; 40 + }; 41 + }; 42 + }; 43 + }; 44 + 45 + gpio_keys { 46 + compatible = "gpio-keys"; 47 + #address-cells = <1>; 48 + #size-cells = <0>; 49 + button@1 { 50 + label = "Function Button"; 51 + linux,code = <132>; 52 + gpios = <&gpio1 9 1>; 53 + }; 54 + button@2 { 55 + label = "Power-on Switch"; 56 + linux,code = <116>; 57 + gpios = <&gpio1 10 1>; 58 + }; 59 + button@3 { 60 + label = "Power-auto Switch"; 61 + linux,code = <142>; 62 + gpios = <&gpio1 11 1>; 63 + }; 64 + }; 65 + 66 + gpio_leds { 67 + compatible = "gpio-leds"; 68 + 69 + led@1 { 70 + label = "lschlv2:blue:func"; 71 + gpios = <&gpio1 4 1>; 72 + }; 73 + 74 + led@2 { 75 + label = "lschlv2:red:alarm"; 76 + gpios = <&gpio1 5 1>; 77 + }; 78 + 79 + led@3 { 80 + label = "lschlv2:amber:info"; 81 + gpios = <&gpio1 6 1>; 82 + }; 83 + 84 + led@4 { 85 + label = "lschlv2:blue:power"; 86 + gpios = <&gpio1 7 1>; 87 + linux,default-trigger = "default-on"; 88 + }; 89 + 90 + led@5 { 91 + label = "lschlv2:red:func"; 92 + gpios = <&gpio1 16 1>; 93 + }; 94 + }; 95 + };
+21
arch/arm/boot/dts/kirkwood-ts219-6281.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "kirkwood-ts219.dtsi" 4 + 5 + / { 6 + gpio_keys { 7 + compatible = "gpio-keys"; 8 + #address-cells = <1>; 9 + #size-cells = <0>; 10 + button@1 { 11 + label = "USB Copy"; 12 + linux,code = <133>; 13 + gpios = <&gpio0 15 1>; 14 + }; 15 + button@2 { 16 + label = "Reset"; 17 + linux,code = <0x198>; 18 + gpios = <&gpio0 16 1>; 19 + }; 20 + }; 21 + };
+21
arch/arm/boot/dts/kirkwood-ts219-6282.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "kirkwood-ts219.dtsi" 4 + 5 + / { 6 + gpio_keys { 7 + compatible = "gpio-keys"; 8 + #address-cells = <1>; 9 + #size-cells = <0>; 10 + button@1 { 11 + label = "USB Copy"; 12 + linux,code = <133>; 13 + gpios = <&gpio1 11 1>; 14 + }; 15 + button@2 { 16 + label = "Reset"; 17 + linux,code = <0x198>; 18 + gpios = <&gpio1 5 1>; 19 + }; 20 + }; 21 + };
+78
arch/arm/boot/dts/kirkwood-ts219.dtsi
··· 1 + /include/ "kirkwood.dtsi" 2 + 3 + / { 4 + model = "QNAP TS219 family"; 5 + compatible = "qnap,ts219", "marvell,kirkwood"; 6 + 7 + memory { 8 + device_type = "memory"; 9 + reg = <0x00000000 0x20000000>; 10 + }; 11 + 12 + chosen { 13 + bootargs = "console=ttyS0,115200n8"; 14 + }; 15 + 16 + ocp@f1000000 { 17 + i2c@11000 { 18 + status = "okay"; 19 + clock-frequency = <400000>; 20 + 21 + s35390a: s35390a@30 { 22 + compatible = "s35390a"; 23 + reg = <0x30>; 24 + }; 25 + }; 26 + serial@12000 { 27 + clock-frequency = <200000000>; 28 + status = "okay"; 29 + }; 30 + serial@12100 { 31 + clock-frequency = <200000000>; 32 + status = "okay"; 33 + }; 34 + spi@10600 { 35 + status = "okay"; 36 + 37 + m25p128@0 { 38 + #address-cells = <1>; 39 + #size-cells = <1>; 40 + compatible = "m25p128"; 41 + reg = <0>; 42 + spi-max-frequency = <20000000>; 43 + mode = <0>; 44 + 45 + partition@0000000 { 46 + reg = <0x00000000 0x00080000>; 47 + label = "U-Boot"; 48 + }; 49 + 50 + partition@00200000 { 51 + reg = <0x00200000 0x00200000>; 52 + label = "Kernel"; 53 + }; 54 + 55 + partition@00400000 { 56 + reg = <0x00400000 0x00900000>; 57 + label = "RootFS1"; 58 + }; 59 + partition@00d00000 { 60 + reg = <0x00d00000 0x00300000>; 61 + label = "RootFS2"; 62 + }; 63 + partition@00040000 { 64 + reg = <0x00080000 0x00040000>; 65 + label = "U-Boot Config"; 66 + }; 67 + partition@000c0000 { 68 + reg = <0x000c0000 0x00140000>; 69 + label = "NAS Config"; 70 + }; 71 + }; 72 + }; 73 + sata@80000 { 74 + status = "okay"; 75 + nr-ports = <2>; 76 + }; 77 + }; 78 + };
+60
arch/arm/boot/dts/kirkwood.dtsi
··· 2 2 3 3 / { 4 4 compatible = "marvell,kirkwood"; 5 + interrupt-parent = <&intc>; 6 + 7 + intc: interrupt-controller { 8 + compatible = "marvell,orion-intc", "marvell,intc"; 9 + interrupt-controller; 10 + #interrupt-cells = <1>; 11 + reg = <0xf1020204 0x04>, 12 + <0xf1020214 0x04>; 13 + }; 5 14 6 15 ocp@f1000000 { 7 16 compatible = "simple-bus"; 8 17 ranges = <0 0xf1000000 0x4000000>; 9 18 #address-cells = <1>; 10 19 #size-cells = <1>; 20 + 21 + gpio0: gpio@10100 { 22 + compatible = "marvell,orion-gpio"; 23 + #gpio-cells = <2>; 24 + gpio-controller; 25 + reg = <0x10100 0x40>; 26 + ngpio = <32>; 27 + interrupts = <35>, <36>, <37>, <38>; 28 + }; 29 + 30 + gpio1: gpio@10140 { 31 + compatible = "marvell,orion-gpio"; 32 + #gpio-cells = <2>; 33 + gpio-controller; 34 + reg = <0x10140 0x40>; 35 + ngpio = <18>; 36 + interrupts = <39>, <40>, <41>; 37 + }; 11 38 12 39 serial@12000 { 13 40 compatible = "ns16550a"; ··· 60 33 interrupts = <53>; 61 34 }; 62 35 36 + spi@10600 { 37 + compatible = "marvell,orion-spi"; 38 + #address-cells = <1>; 39 + #size-cells = <0>; 40 + cell-index = <0>; 41 + interrupts = <23>; 42 + reg = <0x10600 0x28>; 43 + status = "disabled"; 44 + }; 45 + 46 + wdt@20300 { 47 + compatible = "marvell,orion-wdt"; 48 + reg = <0x20300 0x28>; 49 + status = "okay"; 50 + }; 51 + 52 + sata@80000 { 53 + compatible = "marvell,orion-sata"; 54 + reg = <0x80000 0x5000>; 55 + interrupts = <21>; 56 + status = "disabled"; 57 + }; 58 + 63 59 nand@3000000 { 64 60 #address-cells = <1>; 65 61 #size-cells = <1>; ··· 93 43 reg = <0x3000000 0x400>; 94 44 chip-delay = <25>; 95 45 /* set partition map and/or chip-delay in board dts */ 46 + status = "disabled"; 47 + }; 48 + 49 + i2c@11000 { 50 + compatible = "marvell,mv64xxx-i2c"; 51 + reg = <0x11000 0x20>; 52 + #address-cells = <1>; 53 + #size-cells = <0>; 54 + interrupts = <29>; 55 + clock-frequency = <100000>; 96 56 status = "disabled"; 97 57 }; 98 58 };
+27 -27
arch/arm/mach-dove/irq.c
··· 20 20 #include <mach/bridge-regs.h> 21 21 #include "common.h" 22 22 23 - static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 24 - { 25 - int irqoff; 26 - BUG_ON(irq < IRQ_DOVE_GPIO_0_7 || irq > IRQ_DOVE_HIGH_GPIO); 27 - 28 - irqoff = irq <= IRQ_DOVE_GPIO_16_23 ? irq - IRQ_DOVE_GPIO_0_7 : 29 - 3 + irq - IRQ_DOVE_GPIO_24_31; 30 - 31 - orion_gpio_irq_handler(irqoff << 3); 32 - if (irq == IRQ_DOVE_HIGH_GPIO) { 33 - orion_gpio_irq_handler(40); 34 - orion_gpio_irq_handler(48); 35 - orion_gpio_irq_handler(56); 36 - } 37 - } 38 - 39 23 static void pmu_irq_mask(struct irq_data *d) 40 24 { 41 25 int pin = irq_to_pmu(d->irq); ··· 74 90 } 75 91 } 76 92 93 + static int __initdata gpio0_irqs[4] = { 94 + IRQ_DOVE_GPIO_0_7, 95 + IRQ_DOVE_GPIO_8_15, 96 + IRQ_DOVE_GPIO_16_23, 97 + IRQ_DOVE_GPIO_24_31, 98 + }; 99 + 100 + static int __initdata gpio1_irqs[4] = { 101 + IRQ_DOVE_HIGH_GPIO, 102 + 0, 103 + 0, 104 + 0, 105 + }; 106 + 107 + static int __initdata gpio2_irqs[4] = { 108 + 0, 109 + 0, 110 + 0, 111 + 0, 112 + }; 113 + 77 114 void __init dove_init_irq(void) 78 115 { 79 116 int i; ··· 105 100 /* 106 101 * Initialize gpiolib for GPIOs 0-71. 107 102 */ 108 - orion_gpio_init(0, 32, DOVE_GPIO_LO_VIRT_BASE, 0, 109 - IRQ_DOVE_GPIO_START); 110 - irq_set_chained_handler(IRQ_DOVE_GPIO_0_7, gpio_irq_handler); 111 - irq_set_chained_handler(IRQ_DOVE_GPIO_8_15, gpio_irq_handler); 112 - irq_set_chained_handler(IRQ_DOVE_GPIO_16_23, gpio_irq_handler); 113 - irq_set_chained_handler(IRQ_DOVE_GPIO_24_31, gpio_irq_handler); 103 + orion_gpio_init(NULL, 0, 32, (void __iomem *)DOVE_GPIO_LO_VIRT_BASE, 0, 104 + IRQ_DOVE_GPIO_START, gpio0_irqs); 114 105 115 - orion_gpio_init(32, 32, DOVE_GPIO_HI_VIRT_BASE, 0, 116 - IRQ_DOVE_GPIO_START + 32); 117 - irq_set_chained_handler(IRQ_DOVE_HIGH_GPIO, gpio_irq_handler); 106 + orion_gpio_init(NULL, 32, 32, (void __iomem *)DOVE_GPIO_HI_VIRT_BASE, 0, 107 + IRQ_DOVE_GPIO_START + 32, gpio1_irqs); 118 108 119 - orion_gpio_init(64, 8, DOVE_GPIO2_VIRT_BASE, 0, 120 - IRQ_DOVE_GPIO_START + 64); 109 + orion_gpio_init(NULL, 64, 8, (void __iomem *)DOVE_GPIO2_VIRT_BASE, 0, 110 + IRQ_DOVE_GPIO_START + 64, gpio2_irqs); 121 111 122 112 /* 123 113 * Mask and clear PMU interrupts
+29
arch/arm/mach-kirkwood/Kconfig
··· 80 80 RaidSonic IB-NAS6210 & IB-NAS6220 devices, using 81 81 Flattened Device Tree. 82 82 83 + config MACH_TS219_DT 84 + bool "Device Tree for QNAP TS-11X, TS-21X NAS" 85 + select ARCH_KIRKWOOD_DT 86 + select ARM_APPENDED_DTB 87 + select ARM_ATAG_DTB_COMPAT 88 + help 89 + Say 'Y' here if you want your kernel to support the QNAP 90 + TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and 91 + TS-219P+ Turbo NAS devices using Fattened Device Tree. 92 + There are two different Device Tree descriptions, depending 93 + on if the device is based on an if the board uses the MV6281 94 + or MV6282. If you have the wrong one, the buttons will not 95 + work. 96 + 97 + config MACH_GOFLEXNET_DT 98 + bool "Seagate GoFlex Net (Flattened Device Tree)" 99 + select ARCH_KIRKWOOD_DT 100 + help 101 + Say 'Y' here if you want your kernel to support the 102 + Seagate GoFlex Net (Flattened Device Tree). 103 + 104 + config MACH_LSXL_DT 105 + bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" 106 + select ARCH_KIRKWOOD_DT 107 + help 108 + Say 'Y' here if you want your kernel to support the 109 + Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using 110 + Flattened Device Tree. 111 + 83 112 config MACH_TS219 84 113 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" 85 114 help
+3
arch/arm/mach-kirkwood/Makefile
··· 25 25 obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o 26 26 obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 27 27 obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o 28 + obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o 29 + obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o 30 + obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
+4
arch/arm/mach-kirkwood/Makefile.boot
··· 7 7 dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns325.dtb 8 8 dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb 9 9 dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb 10 + dtb-$(CONFIG_MACH_TS219_DT) += kirkwood-qnap-ts219.dtb 11 + dtb-$(CONFIG_MACH_GOFLEXNET_DT) += kirkwood-goflexnet.dtb 12 + dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lschlv2.dtb 13 + dbt-$(CONFIG_MACH_LSXL_DT) += kirkwood-lsxhl.dtb
-143
arch/arm/mach-kirkwood/board-dnskw.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/init.h> 16 16 #include <linux/platform_device.h> 17 - #include <linux/i2c.h> 18 17 #include <linux/ata_platform.h> 19 18 #include <linux/mv643xx_eth.h> 20 19 #include <linux/of.h> 21 20 #include <linux/gpio.h> 22 21 #include <linux/input.h> 23 - #include <linux/gpio_keys.h> 24 22 #include <linux/gpio-fan.h> 25 23 #include <linux/leds.h> 26 24 #include <asm/mach-types.h> ··· 31 33 32 34 static struct mv643xx_eth_platform_data dnskw_ge00_data = { 33 35 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 34 - }; 35 - 36 - static struct mv_sata_platform_data dnskw_sata_data = { 37 - .n_ports = 2, 38 36 }; 39 37 40 38 static unsigned int dnskw_mpp_config[] __initdata = { ··· 65 71 MPP48_GPIO, /* Button: Back reset */ 66 72 MPP49_GPIO, /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */ 67 73 0 68 - }; 69 - 70 - static struct gpio_led dns325_led_pins[] = { 71 - { 72 - .name = "dns325:white:power", 73 - .gpio = 26, 74 - .active_low = 1, 75 - .default_trigger = "default-on", 76 - }, 77 - { 78 - .name = "dns325:white:usb", 79 - .gpio = 43, 80 - .active_low = 1, 81 - }, 82 - { 83 - .name = "dns325:red:l_hdd", 84 - .gpio = 28, 85 - .active_low = 1, 86 - }, 87 - { 88 - .name = "dns325:red:r_hdd", 89 - .gpio = 27, 90 - .active_low = 1, 91 - }, 92 - { 93 - .name = "dns325:red:usb", 94 - .gpio = 29, 95 - .active_low = 1, 96 - }, 97 - }; 98 - 99 - static struct gpio_led_platform_data dns325_led_data = { 100 - .num_leds = ARRAY_SIZE(dns325_led_pins), 101 - .leds = dns325_led_pins, 102 - }; 103 - 104 - static struct platform_device dns325_led_device = { 105 - .name = "leds-gpio", 106 - .id = -1, 107 - .dev = { 108 - .platform_data = &dns325_led_data, 109 - }, 110 - }; 111 - 112 - static struct gpio_led dns320_led_pins[] = { 113 - { 114 - .name = "dns320:blue:power", 115 - .gpio = 26, 116 - .active_low = 1, 117 - .default_trigger = "default-on", 118 - }, 119 - { 120 - .name = "dns320:blue:usb", 121 - .gpio = 43, 122 - .active_low = 1, 123 - }, 124 - { 125 - .name = "dns320:orange:l_hdd", 126 - .gpio = 28, 127 - .active_low = 1, 128 - }, 129 - { 130 - .name = "dns320:orange:r_hdd", 131 - .gpio = 27, 132 - .active_low = 1, 133 - }, 134 - { 135 - .name = "dns320:orange:usb", 136 - .gpio = 35, 137 - .active_low = 1, 138 - }, 139 - }; 140 - 141 - static struct gpio_led_platform_data dns320_led_data = { 142 - .num_leds = ARRAY_SIZE(dns320_led_pins), 143 - .leds = dns320_led_pins, 144 - }; 145 - 146 - static struct platform_device dns320_led_device = { 147 - .name = "leds-gpio", 148 - .id = -1, 149 - .dev = { 150 - .platform_data = &dns320_led_data, 151 - }, 152 - }; 153 - 154 - static struct i2c_board_info dns325_i2c_board_info[] __initdata = { 155 - { 156 - I2C_BOARD_INFO("lm75", 0x48), 157 - }, 158 - /* Something at 0x0c also */ 159 - }; 160 - 161 - static struct gpio_keys_button dnskw_button_pins[] = { 162 - { 163 - .code = KEY_POWER, 164 - .gpio = 34, 165 - .desc = "Power button", 166 - .active_low = 1, 167 - }, 168 - { 169 - .code = KEY_EJECTCD, 170 - .gpio = 47, 171 - .desc = "USB unmount button", 172 - .active_low = 1, 173 - }, 174 - { 175 - .code = KEY_RESTART, 176 - .gpio = 48, 177 - .desc = "Reset button", 178 - .active_low = 1, 179 - }, 180 - }; 181 - 182 - static struct gpio_keys_platform_data dnskw_button_data = { 183 - .buttons = dnskw_button_pins, 184 - .nbuttons = ARRAY_SIZE(dnskw_button_pins), 185 - }; 186 - 187 - static struct platform_device dnskw_button_device = { 188 - .name = "gpio-keys", 189 - .id = -1, 190 - .num_resources = 0, 191 - .dev = { 192 - .platform_data = &dnskw_button_data, 193 - } 194 74 }; 195 75 196 76 /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ ··· 113 245 114 246 kirkwood_ehci_init(); 115 247 kirkwood_ge00_init(&dnskw_ge00_data); 116 - kirkwood_sata_init(&dnskw_sata_data); 117 - kirkwood_i2c_init(); 118 248 119 - platform_device_register(&dnskw_button_device); 120 249 platform_device_register(&dnskw_fan_device); 121 - 122 - if (of_machine_is_compatible("dlink,dns-325")) { 123 - i2c_register_board_info(0, dns325_i2c_board_info, 124 - ARRAY_SIZE(dns325_i2c_board_info)); 125 - platform_device_register(&dns325_led_device); 126 - 127 - } else if (of_machine_is_compatible("dlink,dns-320")) 128 - platform_device_register(&dns320_led_device); 129 250 130 251 /* Register power-off GPIO. */ 131 252 if (gpio_request(36, "dnskw:power:off") == 0
-80
arch/arm/mach-kirkwood/board-dreamplug.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/init.h> 16 16 #include <linux/platform_device.h> 17 - #include <linux/mtd/partitions.h> 18 17 #include <linux/ata_platform.h> 19 18 #include <linux/mv643xx_eth.h> 20 19 #include <linux/of.h> ··· 22 23 #include <linux/of_irq.h> 23 24 #include <linux/of_platform.h> 24 25 #include <linux/gpio.h> 25 - #include <linux/leds.h> 26 26 #include <linux/mtd/physmap.h> 27 27 #include <linux/spi/flash.h> 28 28 #include <linux/spi/spi.h> ··· 34 36 #include "common.h" 35 37 #include "mpp.h" 36 38 37 - struct mtd_partition dreamplug_partitions[] = { 38 - { 39 - .name = "u-boot", 40 - .size = SZ_512K, 41 - .offset = 0, 42 - }, 43 - { 44 - .name = "u-boot env", 45 - .size = SZ_64K, 46 - .offset = SZ_512K + SZ_512K, 47 - }, 48 - { 49 - .name = "dtb", 50 - .size = SZ_64K, 51 - .offset = SZ_512K + SZ_512K + SZ_512K, 52 - }, 53 - }; 54 - 55 - static const struct flash_platform_data dreamplug_spi_slave_data = { 56 - .type = "mx25l1606e", 57 - .name = "spi_flash", 58 - .parts = dreamplug_partitions, 59 - .nr_parts = ARRAY_SIZE(dreamplug_partitions), 60 - }; 61 - 62 - static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { 63 - { 64 - .modalias = "m25p80", 65 - .platform_data = &dreamplug_spi_slave_data, 66 - .irq = -1, 67 - .max_speed_hz = 50000000, 68 - .bus_num = 0, 69 - .chip_select = 0, 70 - }, 71 - }; 72 - 73 39 static struct mv643xx_eth_platform_data dreamplug_ge00_data = { 74 40 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 75 41 }; ··· 42 80 .phy_addr = MV643XX_ETH_PHY_ADDR(1), 43 81 }; 44 82 45 - static struct mv_sata_platform_data dreamplug_sata_data = { 46 - .n_ports = 1, 47 - }; 48 - 49 83 static struct mvsdio_platform_data dreamplug_mvsdio_data = { 50 84 /* unfortunately the CD signal has not been connected */ 51 - }; 52 - 53 - static struct gpio_led dreamplug_led_pins[] = { 54 - { 55 - .name = "dreamplug:blue:bluetooth", 56 - .gpio = 47, 57 - .active_low = 1, 58 - }, 59 - { 60 - .name = "dreamplug:green:wifi", 61 - .gpio = 48, 62 - .active_low = 1, 63 - }, 64 - { 65 - .name = "dreamplug:green:wifi_ap", 66 - .gpio = 49, 67 - .active_low = 1, 68 - }, 69 - }; 70 - 71 - static struct gpio_led_platform_data dreamplug_led_data = { 72 - .leds = dreamplug_led_pins, 73 - .num_leds = ARRAY_SIZE(dreamplug_led_pins), 74 - }; 75 - 76 - static struct platform_device dreamplug_leds = { 77 - .name = "leds-gpio", 78 - .id = -1, 79 - .dev = { 80 - .platform_data = &dreamplug_led_data, 81 - } 82 85 }; 83 86 84 87 static unsigned int dreamplug_mpp_config[] __initdata = { ··· 64 137 */ 65 138 kirkwood_mpp_conf(dreamplug_mpp_config); 66 139 67 - spi_register_board_info(dreamplug_spi_slave_info, 68 - ARRAY_SIZE(dreamplug_spi_slave_info)); 69 - kirkwood_spi_init(); 70 - 71 140 kirkwood_ehci_init(); 72 141 kirkwood_ge00_init(&dreamplug_ge00_data); 73 142 kirkwood_ge01_init(&dreamplug_ge01_data); 74 - kirkwood_sata_init(&dreamplug_sata_data); 75 143 kirkwood_sdio_init(&dreamplug_mvsdio_data); 76 - 77 - platform_device_register(&dreamplug_leds); 78 144 }
+26 -3
arch/arm/mach-kirkwood/board-dt.c
··· 18 18 #include <asm/mach/arch.h> 19 19 #include <asm/mach/map.h> 20 20 #include <mach/bridge-regs.h> 21 + #include <plat/irq.h> 21 22 #include "common.h" 22 23 23 24 static struct of_device_id kirkwood_dt_match_table[] __initdata = { 24 25 { .compatible = "simple-bus", }, 25 26 { } 27 + }; 28 + 29 + struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { 30 + OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), 31 + OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", 32 + NULL), 33 + OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), 34 + OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), 35 + OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), 36 + {}, 26 37 }; 27 38 28 39 static void __init kirkwood_dt_init(void) ··· 58 47 kirkwood_clk_init(); 59 48 60 49 /* internal devices that every board has */ 61 - kirkwood_wdt_init(); 62 50 kirkwood_xor0_init(); 63 51 kirkwood_xor1_init(); 64 52 kirkwood_crypto_init(); ··· 78 68 if (of_machine_is_compatible("raidsonic,ib-nas62x0")) 79 69 ib62x0_init(); 80 70 81 - of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); 71 + if (of_machine_is_compatible("qnap,ts219")) 72 + qnap_dt_ts219_init(); 73 + 74 + if (of_machine_is_compatible("seagate,goflexnet")) 75 + goflexnet_init(); 76 + 77 + if (of_machine_is_compatible("buffalo,lsxl")) 78 + lsxl_init(); 79 + 80 + of_platform_populate(NULL, kirkwood_dt_match_table, 81 + kirkwood_auxdata_lookup, NULL); 82 82 } 83 83 84 84 static const char *kirkwood_dt_board_compat[] = { ··· 97 77 "dlink,dns-325", 98 78 "iom,iconnect", 99 79 "raidsonic,ib-nas62x0", 80 + "qnap,ts219", 81 + "seagate,goflexnet", 82 + "buffalo,lsxl", 100 83 NULL 101 84 }; 102 85 ··· 107 84 /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ 108 85 .map_io = kirkwood_map_io, 109 86 .init_early = kirkwood_init_early, 110 - .init_irq = kirkwood_init_irq, 87 + .init_irq = orion_dt_init_irq, 111 88 .timer = &kirkwood_timer, 112 89 .init_machine = kirkwood_dt_init, 113 90 .restart = kirkwood_restart,
+71
arch/arm/mach-kirkwood/board-goflexnet.c
··· 1 + /* 2 + * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> 3 + * 4 + * arch/arm/mach-kirkwood/board-goflexnet.c 5 + * 6 + * Seagate GoFlext Net Board Init for drivers not converted to 7 + * flattened device tree yet. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + * 13 + * Copied and modified for Seagate GoFlex Net support by 14 + * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's 15 + * GoFlex kernel patches. 16 + * 17 + */ 18 + 19 + #include <linux/kernel.h> 20 + #include <linux/init.h> 21 + #include <linux/platform_device.h> 22 + #include <linux/ata_platform.h> 23 + #include <linux/mv643xx_eth.h> 24 + #include <linux/of.h> 25 + #include <linux/of_address.h> 26 + #include <linux/of_fdt.h> 27 + #include <linux/of_irq.h> 28 + #include <linux/of_platform.h> 29 + #include <linux/gpio.h> 30 + #include <asm/mach-types.h> 31 + #include <asm/mach/arch.h> 32 + #include <asm/mach/map.h> 33 + #include <mach/kirkwood.h> 34 + #include <mach/bridge-regs.h> 35 + #include <plat/mvsdio.h> 36 + #include "common.h" 37 + #include "mpp.h" 38 + 39 + static struct mv643xx_eth_platform_data goflexnet_ge00_data = { 40 + .phy_addr = MV643XX_ETH_PHY_ADDR(0), 41 + }; 42 + 43 + static unsigned int goflexnet_mpp_config[] __initdata = { 44 + MPP29_GPIO, /* USB Power Enable */ 45 + MPP47_GPIO, /* LED Orange */ 46 + MPP46_GPIO, /* LED Green */ 47 + MPP45_GPIO, /* LED Left Capacity 3 */ 48 + MPP44_GPIO, /* LED Left Capacity 2 */ 49 + MPP43_GPIO, /* LED Left Capacity 1 */ 50 + MPP42_GPIO, /* LED Left Capacity 0 */ 51 + MPP41_GPIO, /* LED Right Capacity 3 */ 52 + MPP40_GPIO, /* LED Right Capacity 2 */ 53 + MPP39_GPIO, /* LED Right Capacity 1 */ 54 + MPP38_GPIO, /* LED Right Capacity 0 */ 55 + 0 56 + }; 57 + 58 + void __init goflexnet_init(void) 59 + { 60 + /* 61 + * Basic setup. Needs to be called early. 62 + */ 63 + kirkwood_mpp_conf(goflexnet_mpp_config); 64 + 65 + if (gpio_request(29, "USB Power Enable") != 0 || 66 + gpio_direction_output(29, 1) != 0) 67 + pr_err("can't setup GPIO 29 (USB Power Enable)\n"); 68 + kirkwood_ehci_init(); 69 + 70 + kirkwood_ge00_init(&goflexnet_ge00_data); 71 + }
-72
arch/arm/mach-kirkwood/board-ib62x0.c
··· 18 18 #include <linux/ata_platform.h> 19 19 #include <linux/mv643xx_eth.h> 20 20 #include <linux/gpio.h> 21 - #include <linux/gpio_keys.h> 22 21 #include <linux/input.h> 23 - #include <linux/leds.h> 24 22 #include <asm/mach-types.h> 25 23 #include <asm/mach/arch.h> 26 24 #include <mach/kirkwood.h> ··· 29 31 30 32 static struct mv643xx_eth_platform_data ib62x0_ge00_data = { 31 33 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 32 - }; 33 - 34 - static struct mv_sata_platform_data ib62x0_sata_data = { 35 - .n_ports = 2, 36 34 }; 37 35 38 36 static unsigned int ib62x0_mpp_config[] __initdata = { ··· 49 55 0 50 56 }; 51 57 52 - static struct gpio_led ib62x0_led_pins[] = { 53 - { 54 - .name = "ib62x0:green:os", 55 - .default_trigger = "default-on", 56 - .gpio = 25, 57 - .active_low = 0, 58 - }, 59 - { 60 - .name = "ib62x0:red:os", 61 - .default_trigger = "none", 62 - .gpio = 22, 63 - .active_low = 0, 64 - }, 65 - { 66 - .name = "ib62x0:red:usb_copy", 67 - .default_trigger = "none", 68 - .gpio = 27, 69 - .active_low = 0, 70 - }, 71 - }; 72 - 73 - static struct gpio_led_platform_data ib62x0_led_data = { 74 - .leds = ib62x0_led_pins, 75 - .num_leds = ARRAY_SIZE(ib62x0_led_pins), 76 - }; 77 - 78 - static struct platform_device ib62x0_led_device = { 79 - .name = "leds-gpio", 80 - .id = -1, 81 - .dev = { 82 - .platform_data = &ib62x0_led_data, 83 - } 84 - }; 85 - 86 - static struct gpio_keys_button ib62x0_button_pins[] = { 87 - { 88 - .code = KEY_COPY, 89 - .gpio = 29, 90 - .desc = "USB Copy", 91 - .active_low = 1, 92 - }, 93 - { 94 - .code = KEY_RESTART, 95 - .gpio = 28, 96 - .desc = "Reset", 97 - .active_low = 1, 98 - }, 99 - }; 100 - 101 - static struct gpio_keys_platform_data ib62x0_button_data = { 102 - .buttons = ib62x0_button_pins, 103 - .nbuttons = ARRAY_SIZE(ib62x0_button_pins), 104 - }; 105 - 106 - static struct platform_device ib62x0_button_device = { 107 - .name = "gpio-keys", 108 - .id = -1, 109 - .num_resources = 0, 110 - .dev = { 111 - .platform_data = &ib62x0_button_data, 112 - } 113 - }; 114 - 115 58 static void ib62x0_power_off(void) 116 59 { 117 60 gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); ··· 63 132 64 133 kirkwood_ehci_init(); 65 134 kirkwood_ge00_init(&ib62x0_ge00_data); 66 - kirkwood_sata_init(&ib62x0_sata_data); 67 - platform_device_register(&ib62x0_led_device); 68 - platform_device_register(&ib62x0_button_device); 69 135 if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 && 70 136 gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0) 71 137 pm_power_off = ib62x0_power_off;
-56
arch/arm/mach-kirkwood/board-iconnect.c
··· 19 19 #include <linux/mtd/partitions.h> 20 20 #include <linux/mv643xx_eth.h> 21 21 #include <linux/gpio.h> 22 - #include <linux/leds.h> 23 - #include <linux/i2c.h> 24 22 #include <linux/input.h> 25 23 #include <linux/gpio_keys.h> 26 24 #include <asm/mach/arch.h> ··· 28 30 29 31 static struct mv643xx_eth_platform_data iconnect_ge00_data = { 30 32 .phy_addr = MV643XX_ETH_PHY_ADDR(11), 31 - }; 32 - 33 - static struct gpio_led iconnect_led_pins[] = { 34 - { 35 - .name = "led_level", 36 - .gpio = 41, 37 - .default_trigger = "default-on", 38 - }, { 39 - .name = "power:blue", 40 - .gpio = 42, 41 - .default_trigger = "timer", 42 - }, { 43 - .name = "power:red", 44 - .gpio = 43, 45 - }, { 46 - .name = "usb1:blue", 47 - .gpio = 44, 48 - }, { 49 - .name = "usb2:blue", 50 - .gpio = 45, 51 - }, { 52 - .name = "usb3:blue", 53 - .gpio = 46, 54 - }, { 55 - .name = "usb4:blue", 56 - .gpio = 47, 57 - }, { 58 - .name = "otb:blue", 59 - .gpio = 48, 60 - }, 61 - }; 62 - 63 - static struct gpio_led_platform_data iconnect_led_data = { 64 - .leds = iconnect_led_pins, 65 - .num_leds = ARRAY_SIZE(iconnect_led_pins), 66 - .gpio_blink_set = orion_gpio_led_blink_set, 67 - }; 68 - 69 - static struct platform_device iconnect_leds = { 70 - .name = "leds-gpio", 71 - .id = -1, 72 - .dev = { 73 - .platform_data = &iconnect_led_data, 74 - } 75 33 }; 76 34 77 35 static unsigned int iconnect_mpp_config[] __initdata = { ··· 42 88 MPP47_GPIO, 43 89 MPP48_GPIO, 44 90 0 45 - }; 46 - 47 - static struct i2c_board_info __initdata iconnect_board_info[] = { 48 - { 49 - I2C_BOARD_INFO("lm63", 0x4c), 50 - }, 51 91 }; 52 92 53 93 static struct mtd_partition iconnect_nand_parts[] = { ··· 90 142 { 91 143 kirkwood_mpp_conf(iconnect_mpp_config); 92 144 kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25); 93 - kirkwood_i2c_init(); 94 - i2c_register_board_info(0, iconnect_board_info, 95 - ARRAY_SIZE(iconnect_board_info)); 96 145 97 146 kirkwood_ehci_init(); 98 147 kirkwood_ge00_init(&iconnect_ge00_data); 99 148 100 149 platform_device_register(&iconnect_button_device); 101 - platform_device_register(&iconnect_leds); 102 150 } 103 151 104 152 static int __init iconnect_pci_init(void)
+135
arch/arm/mach-kirkwood/board-lsxl.c
··· 1 + /* 2 + * Copyright 2012 (C), Michael Walle <michael@walle.cc> 3 + * 4 + * arch/arm/mach-kirkwood/board-lsxl.c 5 + * 6 + * Buffalo Linkstation LS-XHL and LS-CHLv2 init for drivers not 7 + * converted to flattened device tree yet. 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + #include <linux/kernel.h> 15 + #include <linux/init.h> 16 + #include <linux/platform_device.h> 17 + #include <linux/mtd/partitions.h> 18 + #include <linux/ata_platform.h> 19 + #include <linux/spi/flash.h> 20 + #include <linux/spi/spi.h> 21 + #include <linux/mv643xx_eth.h> 22 + #include <linux/gpio.h> 23 + #include <linux/gpio-fan.h> 24 + #include <linux/input.h> 25 + #include <asm/mach-types.h> 26 + #include <asm/mach/arch.h> 27 + #include <mach/kirkwood.h> 28 + #include "common.h" 29 + #include "mpp.h" 30 + 31 + static struct mv643xx_eth_platform_data lsxl_ge00_data = { 32 + .phy_addr = MV643XX_ETH_PHY_ADDR(0), 33 + }; 34 + 35 + static struct mv643xx_eth_platform_data lsxl_ge01_data = { 36 + .phy_addr = MV643XX_ETH_PHY_ADDR(8), 37 + }; 38 + 39 + static unsigned int lsxl_mpp_config[] __initdata = { 40 + MPP10_GPO, /* HDD Power Enable */ 41 + MPP11_GPIO, /* USB Vbus Enable */ 42 + MPP18_GPO, /* FAN High Enable# */ 43 + MPP19_GPO, /* FAN Low Enable# */ 44 + MPP36_GPIO, /* Function Blue LED */ 45 + MPP37_GPIO, /* Alarm LED */ 46 + MPP38_GPIO, /* Info LED */ 47 + MPP39_GPIO, /* Power LED */ 48 + MPP40_GPIO, /* Fan Lock */ 49 + MPP41_GPIO, /* Function Button */ 50 + MPP42_GPIO, /* Power Switch */ 51 + MPP43_GPIO, /* Power Auto Switch */ 52 + MPP48_GPIO, /* Function Red LED */ 53 + 0 54 + }; 55 + 56 + #define LSXL_GPIO_FAN_HIGH 18 57 + #define LSXL_GPIO_FAN_LOW 19 58 + #define LSXL_GPIO_FAN_LOCK 40 59 + 60 + static struct gpio_fan_alarm lsxl_alarm = { 61 + .gpio = LSXL_GPIO_FAN_LOCK, 62 + }; 63 + 64 + static struct gpio_fan_speed lsxl_speeds[] = { 65 + { 66 + .rpm = 0, 67 + .ctrl_val = 3, 68 + }, { 69 + .rpm = 1500, 70 + .ctrl_val = 1, 71 + }, { 72 + .rpm = 3250, 73 + .ctrl_val = 2, 74 + }, { 75 + .rpm = 5000, 76 + .ctrl_val = 0, 77 + } 78 + }; 79 + 80 + static int lsxl_gpio_list[] = { 81 + LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW, 82 + }; 83 + 84 + static struct gpio_fan_platform_data lsxl_fan_data = { 85 + .num_ctrl = ARRAY_SIZE(lsxl_gpio_list), 86 + .ctrl = lsxl_gpio_list, 87 + .alarm = &lsxl_alarm, 88 + .num_speed = ARRAY_SIZE(lsxl_speeds), 89 + .speed = lsxl_speeds, 90 + }; 91 + 92 + static struct platform_device lsxl_fan_device = { 93 + .name = "gpio-fan", 94 + .id = -1, 95 + .num_resources = 0, 96 + .dev = { 97 + .platform_data = &lsxl_fan_data, 98 + }, 99 + }; 100 + 101 + /* 102 + * On the LS-XHL/LS-CHLv2, the shutdown process is following: 103 + * - Userland monitors key events until the power switch goes to off position 104 + * - The board reboots 105 + * - U-boot starts and goes into an idle mode waiting for the user 106 + * to move the switch to ON position 107 + * 108 + */ 109 + static void lsxl_power_off(void) 110 + { 111 + kirkwood_restart('h', NULL); 112 + } 113 + 114 + #define LSXL_GPIO_HDD_POWER 10 115 + #define LSXL_GPIO_USB_POWER 11 116 + 117 + void __init lsxl_init(void) 118 + { 119 + /* 120 + * Basic setup. Needs to be called early. 121 + */ 122 + kirkwood_mpp_conf(lsxl_mpp_config); 123 + 124 + /* usb and sata power on */ 125 + gpio_set_value(LSXL_GPIO_USB_POWER, 1); 126 + gpio_set_value(LSXL_GPIO_HDD_POWER, 1); 127 + 128 + kirkwood_ehci_init(); 129 + kirkwood_ge00_init(&lsxl_ge00_data); 130 + kirkwood_ge01_init(&lsxl_ge01_data); 131 + platform_device_register(&lsxl_fan_device); 132 + 133 + /* register power-off method */ 134 + pm_power_off = lsxl_power_off; 135 + }
+82
arch/arm/mach-kirkwood/board-ts219.c
··· 1 + /* 2 + * 3 + * QNAP TS-11x/TS-21x Turbo NAS Board Setup via DT 4 + * 5 + * Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch> 6 + * 7 + * Based on the board file ts219-setup.c: 8 + * 9 + * Copyright (C) 2009 Martin Michlmayr <tbm@cyrius.com> 10 + * Copyright (C) 2008 Byron Bradley <byron.bbradley@gmail.com> 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 15 + * 2 of the License, or (at your option) any later version. 16 + */ 17 + 18 + #include <linux/kernel.h> 19 + #include <linux/init.h> 20 + #include <linux/platform_device.h> 21 + #include <linux/mv643xx_eth.h> 22 + #include <linux/ata_platform.h> 23 + #include <linux/gpio_keys.h> 24 + #include <linux/input.h> 25 + #include <asm/mach-types.h> 26 + #include <asm/mach/arch.h> 27 + #include <mach/kirkwood.h> 28 + #include "common.h" 29 + #include "mpp.h" 30 + #include "tsx1x-common.h" 31 + 32 + static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { 33 + .phy_addr = MV643XX_ETH_PHY_ADDR(8), 34 + }; 35 + 36 + static unsigned int qnap_ts219_mpp_config[] __initdata = { 37 + MPP0_SPI_SCn, 38 + MPP1_SPI_MOSI, 39 + MPP2_SPI_SCK, 40 + MPP3_SPI_MISO, 41 + MPP4_SATA1_ACTn, 42 + MPP5_SATA0_ACTn, 43 + MPP8_TW0_SDA, 44 + MPP9_TW0_SCK, 45 + MPP10_UART0_TXD, 46 + MPP11_UART0_RXD, 47 + MPP13_UART1_TXD, /* PIC controller */ 48 + MPP14_UART1_RXD, /* PIC controller */ 49 + MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */ 50 + MPP16_GPIO, /* Reset button (on devices with 88F6281) */ 51 + MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */ 52 + MPP37_GPIO, /* Reset button (on devices with 88F6282) */ 53 + MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */ 54 + MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */ 55 + 0 56 + }; 57 + 58 + void __init qnap_dt_ts219_init(void) 59 + { 60 + u32 dev, rev; 61 + 62 + kirkwood_mpp_conf(qnap_ts219_mpp_config); 63 + 64 + kirkwood_pcie_id(&dev, &rev); 65 + if (dev == MV88F6282_DEV_ID) 66 + qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 67 + 68 + kirkwood_ge00_init(&qnap_ts219_ge00_data); 69 + kirkwood_ehci_init(); 70 + 71 + pm_power_off = qnap_tsx1x_power_off; 72 + } 73 + 74 + /* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */ 75 + static int __init ts219_pci_init(void) 76 + { 77 + if (machine_is_ts219()) 78 + kirkwood_pcie_init(KW_PCIE0); 79 + 80 + return 0; 81 + } 82 + subsys_initcall(ts219_pci_init);
+2
arch/arm/mach-kirkwood/common.c
··· 17 17 #include <linux/dma-mapping.h> 18 18 #include <linux/clk-provider.h> 19 19 #include <linux/spinlock.h> 20 + #include <linux/mv643xx_i2c.h> 20 21 #include <net/dsa.h> 21 22 #include <asm/page.h> 22 23 #include <asm/timex.h> ··· 277 276 orion_clkdev_add("0", "pcie", pex0); 278 277 orion_clkdev_add("1", "pcie", pex1); 279 278 orion_clkdev_add(NULL, "kirkwood-i2s", audio); 279 + orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); 280 280 281 281 /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., 282 282 * so should never be gated.
+17
arch/arm/mach-kirkwood/common.h
··· 58 58 #else 59 59 static inline void dreamplug_init(void) {}; 60 60 #endif 61 + #ifdef CONFIG_MACH_TS219_DT 62 + void qnap_dt_ts219_init(void); 63 + #else 64 + static inline void qnap_dt_ts219_init(void) {}; 65 + #endif 61 66 62 67 #ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT 63 68 void dnskw_init(void); ··· 80 75 void ib62x0_init(void); 81 76 #else 82 77 static inline void ib62x0_init(void) {}; 78 + #endif 79 + 80 + #ifdef CONFIG_MACH_GOFLEXNET_DT 81 + void goflexnet_init(void); 82 + #else 83 + static inline void goflexnet_init(void) {}; 84 + #endif 85 + 86 + #ifdef CONFIG_MACH_LSXL_DT 87 + void lsxl_init(void); 88 + #else 89 + static inline void lsxl_init(void) {}; 83 90 #endif 84 91 85 92 /* early init functions not converted to fdt yet */
+16 -22
arch/arm/mach-kirkwood/irq.c
··· 9 9 */ 10 10 #include <linux/gpio.h> 11 11 #include <linux/kernel.h> 12 - #include <linux/init.h> 13 12 #include <linux/irq.h> 14 - #include <linux/io.h> 15 13 #include <mach/bridge-regs.h> 16 14 #include <plat/irq.h> 17 - #include "common.h" 18 15 19 - static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 20 - { 21 - BUG_ON(irq < IRQ_KIRKWOOD_GPIO_LOW_0_7); 22 - BUG_ON(irq > IRQ_KIRKWOOD_GPIO_HIGH_16_23); 16 + static int __initdata gpio0_irqs[4] = { 17 + IRQ_KIRKWOOD_GPIO_LOW_0_7, 18 + IRQ_KIRKWOOD_GPIO_LOW_8_15, 19 + IRQ_KIRKWOOD_GPIO_LOW_16_23, 20 + IRQ_KIRKWOOD_GPIO_LOW_24_31, 21 + }; 23 22 24 - orion_gpio_irq_handler((irq - IRQ_KIRKWOOD_GPIO_LOW_0_7) << 3); 25 - } 23 + static int __initdata gpio1_irqs[4] = { 24 + IRQ_KIRKWOOD_GPIO_HIGH_0_7, 25 + IRQ_KIRKWOOD_GPIO_HIGH_8_15, 26 + IRQ_KIRKWOOD_GPIO_HIGH_16_23, 27 + 0, 28 + }; 26 29 27 30 void __init kirkwood_init_irq(void) 28 31 { ··· 35 32 /* 36 33 * Initialize gpiolib for GPIOs 0-49. 37 34 */ 38 - orion_gpio_init(0, 32, GPIO_LOW_VIRT_BASE, 0, 39 - IRQ_KIRKWOOD_GPIO_START); 40 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_0_7, gpio_irq_handler); 41 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_8_15, gpio_irq_handler); 42 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_16_23, gpio_irq_handler); 43 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_24_31, gpio_irq_handler); 44 - 45 - orion_gpio_init(32, 18, GPIO_HIGH_VIRT_BASE, 0, 46 - IRQ_KIRKWOOD_GPIO_START + 32); 47 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_0_7, gpio_irq_handler); 48 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_8_15, gpio_irq_handler); 49 - irq_set_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_16_23, 50 - gpio_irq_handler); 35 + orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_LOW_VIRT_BASE, 0, 36 + IRQ_KIRKWOOD_GPIO_START, gpio0_irqs); 37 + orion_gpio_init(NULL, 32, 18, (void __iomem *)GPIO_HIGH_VIRT_BASE, 0, 38 + IRQ_KIRKWOOD_GPIO_START + 32, gpio1_irqs); 51 39 }
+8 -14
arch/arm/mach-mv78xx0/irq.c
··· 9 9 */ 10 10 #include <linux/gpio.h> 11 11 #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/pci.h> 14 12 #include <linux/irq.h> 15 13 #include <mach/bridge-regs.h> 16 14 #include <plat/irq.h> 17 15 #include "common.h" 18 16 19 - static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 20 - { 21 - BUG_ON(irq < IRQ_MV78XX0_GPIO_0_7 || irq > IRQ_MV78XX0_GPIO_24_31); 22 - 23 - orion_gpio_irq_handler((irq - IRQ_MV78XX0_GPIO_0_7) << 3); 24 - } 17 + static int __initdata gpio0_irqs[4] = { 18 + IRQ_MV78XX0_GPIO_0_7, 19 + IRQ_MV78XX0_GPIO_8_15, 20 + IRQ_MV78XX0_GPIO_16_23, 21 + IRQ_MV78XX0_GPIO_24_31, 22 + }; 25 23 26 24 void __init mv78xx0_init_irq(void) 27 25 { ··· 32 34 * registers for core #1 are at an offset of 0x18 from those of 33 35 * core #0.) 34 36 */ 35 - orion_gpio_init(0, 32, GPIO_VIRT_BASE, 37 + orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, 36 38 mv78xx0_core_index() ? 0x18 : 0, 37 - IRQ_MV78XX0_GPIO_START); 38 - irq_set_chained_handler(IRQ_MV78XX0_GPIO_0_7, gpio_irq_handler); 39 - irq_set_chained_handler(IRQ_MV78XX0_GPIO_8_15, gpio_irq_handler); 40 - irq_set_chained_handler(IRQ_MV78XX0_GPIO_16_23, gpio_irq_handler); 41 - irq_set_chained_handler(IRQ_MV78XX0_GPIO_24_31, gpio_irq_handler); 39 + IRQ_MV78XX0_GPIO_START, gpio0_irqs); 42 40 }
+8 -14
arch/arm/mach-orion5x/irq.c
··· 11 11 */ 12 12 #include <linux/gpio.h> 13 13 #include <linux/kernel.h> 14 - #include <linux/init.h> 15 14 #include <linux/irq.h> 16 - #include <linux/io.h> 17 15 #include <mach/bridge-regs.h> 18 16 #include <plat/irq.h> 19 - #include "common.h" 20 17 21 - static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 22 - { 23 - BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); 24 - 25 - orion_gpio_irq_handler((irq - IRQ_ORION5X_GPIO_0_7) << 3); 26 - } 18 + static int __initdata gpio0_irqs[4] = { 19 + IRQ_ORION5X_GPIO_0_7, 20 + IRQ_ORION5X_GPIO_8_15, 21 + IRQ_ORION5X_GPIO_16_23, 22 + IRQ_ORION5X_GPIO_24_31, 23 + }; 27 24 28 25 void __init orion5x_init_irq(void) 29 26 { ··· 29 32 /* 30 33 * Initialize gpiolib for GPIOs 0-31. 31 34 */ 32 - orion_gpio_init(0, 32, GPIO_VIRT_BASE, 0, IRQ_ORION5X_GPIO_START); 33 - irq_set_chained_handler(IRQ_ORION5X_GPIO_0_7, gpio_irq_handler); 34 - irq_set_chained_handler(IRQ_ORION5X_GPIO_8_15, gpio_irq_handler); 35 - irq_set_chained_handler(IRQ_ORION5X_GPIO_16_23, gpio_irq_handler); 36 - irq_set_chained_handler(IRQ_ORION5X_GPIO_24_31, gpio_irq_handler); 35 + orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, 0, 36 + IRQ_ORION5X_GPIO_START, gpio0_irqs); 37 37 }
+1
arch/arm/plat-orion/common.c
··· 47 47 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".2", tclk); 48 48 orion_clkdev_add(NULL, MV643XX_ETH_NAME ".3", tclk); 49 49 orion_clkdev_add(NULL, "orion_wdt", tclk); 50 + orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", tclk); 50 51 } 51 52 52 53 /* Fill in the resources structure and link it into the platform
+161 -77
arch/arm/plat-orion/gpio.c
··· 8 8 * warranty of any kind, whether express or implied. 9 9 */ 10 10 11 + #define DEBUG 12 + 11 13 #include <linux/kernel.h> 12 14 #include <linux/init.h> 13 15 #include <linux/irq.h> 16 + #include <linux/irqdomain.h> 14 17 #include <linux/module.h> 15 18 #include <linux/spinlock.h> 16 19 #include <linux/bitops.h> 17 20 #include <linux/io.h> 18 21 #include <linux/gpio.h> 19 22 #include <linux/leds.h> 23 + #include <linux/of.h> 24 + #include <linux/of_irq.h> 25 + #include <linux/of_address.h> 26 + #include <plat/gpio.h> 20 27 21 28 /* 22 29 * GPIO unit register offsets. ··· 45 38 unsigned long valid_output; 46 39 int mask_offset; 47 40 int secondary_irq_base; 41 + struct irq_domain *domain; 48 42 }; 49 43 50 44 static void __iomem *GPIO_OUT(struct orion_gpio_chip *ochip) ··· 230 222 struct orion_gpio_chip *ochip = 231 223 container_of(chip, struct orion_gpio_chip, chip); 232 224 233 - return ochip->secondary_irq_base + pin; 225 + return irq_create_mapping(ochip->domain, 226 + ochip->secondary_irq_base + pin); 234 227 } 235 - 236 228 237 229 /* 238 230 * Orion-specific GPIO API extensions. ··· 361 353 int pin; 362 354 u32 u; 363 355 364 - pin = d->irq - gc->irq_base; 356 + pin = d->hwirq - ochip->secondary_irq_base; 365 357 366 358 u = readl(GPIO_IO_CONF(ochip)) & (1 << pin); 367 359 if (!u) { 368 - printk(KERN_ERR "orion gpio_irq_set_type failed " 369 - "(irq %d, pin %d).\n", d->irq, pin); 370 360 return -EINVAL; 371 361 } 372 362 ··· 403 397 u &= ~(1 << pin); /* rising */ 404 398 writel(u, GPIO_IN_POL(ochip)); 405 399 } 406 - 407 400 return 0; 408 401 } 409 402 410 - void __init orion_gpio_init(int gpio_base, int ngpio, 411 - u32 base, int mask_offset, int secondary_irq_base) 403 + static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) 412 404 { 413 - struct orion_gpio_chip *ochip; 414 - struct irq_chip_generic *gc; 415 - struct irq_chip_type *ct; 416 - char gc_label[16]; 417 - 418 - if (orion_gpio_chip_count == ARRAY_SIZE(orion_gpio_chips)) 419 - return; 420 - 421 - snprintf(gc_label, sizeof(gc_label), "orion_gpio%d", 422 - orion_gpio_chip_count); 423 - 424 - ochip = orion_gpio_chips + orion_gpio_chip_count; 425 - ochip->chip.label = kstrdup(gc_label, GFP_KERNEL); 426 - ochip->chip.request = orion_gpio_request; 427 - ochip->chip.direction_input = orion_gpio_direction_input; 428 - ochip->chip.get = orion_gpio_get; 429 - ochip->chip.direction_output = orion_gpio_direction_output; 430 - ochip->chip.set = orion_gpio_set; 431 - ochip->chip.to_irq = orion_gpio_to_irq; 432 - ochip->chip.base = gpio_base; 433 - ochip->chip.ngpio = ngpio; 434 - ochip->chip.can_sleep = 0; 435 - spin_lock_init(&ochip->lock); 436 - ochip->base = (void __iomem *)base; 437 - ochip->valid_input = 0; 438 - ochip->valid_output = 0; 439 - ochip->mask_offset = mask_offset; 440 - ochip->secondary_irq_base = secondary_irq_base; 441 - 442 - gpiochip_add(&ochip->chip); 443 - 444 - orion_gpio_chip_count++; 445 - 446 - /* 447 - * Mask and clear GPIO interrupts. 448 - */ 449 - writel(0, GPIO_EDGE_CAUSE(ochip)); 450 - writel(0, GPIO_EDGE_MASK(ochip)); 451 - writel(0, GPIO_LEVEL_MASK(ochip)); 452 - 453 - gc = irq_alloc_generic_chip("orion_gpio_irq", 2, secondary_irq_base, 454 - ochip->base, handle_level_irq); 455 - gc->private = ochip; 456 - 457 - ct = gc->chip_types; 458 - ct->regs.mask = ochip->mask_offset + GPIO_LEVEL_MASK_OFF; 459 - ct->type = IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW; 460 - ct->chip.irq_mask = irq_gc_mask_clr_bit; 461 - ct->chip.irq_unmask = irq_gc_mask_set_bit; 462 - ct->chip.irq_set_type = gpio_irq_set_type; 463 - 464 - ct++; 465 - ct->regs.mask = ochip->mask_offset + GPIO_EDGE_MASK_OFF; 466 - ct->regs.ack = GPIO_EDGE_CAUSE_OFF; 467 - ct->type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; 468 - ct->chip.irq_ack = irq_gc_ack_clr_bit; 469 - ct->chip.irq_mask = irq_gc_mask_clr_bit; 470 - ct->chip.irq_unmask = irq_gc_mask_set_bit; 471 - ct->chip.irq_set_type = gpio_irq_set_type; 472 - ct->handler = handle_edge_irq; 473 - 474 - irq_setup_generic_chip(gc, IRQ_MSK(ngpio), IRQ_GC_INIT_MASK_CACHE, 475 - IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 476 - } 477 - 478 - void orion_gpio_irq_handler(int pinoff) 479 - { 480 - struct orion_gpio_chip *ochip; 405 + struct orion_gpio_chip *ochip = irq_get_handler_data(irq); 481 406 u32 cause, type; 482 407 int i; 483 408 484 - ochip = orion_gpio_chip_find(pinoff); 485 409 if (ochip == NULL) 486 410 return; 487 411 ··· 438 502 generic_handle_irq(irq); 439 503 } 440 504 } 505 + 506 + void __init orion_gpio_init(struct device_node *np, 507 + int gpio_base, int ngpio, 508 + void __iomem *base, int mask_offset, 509 + int secondary_irq_base, 510 + int irqs[4]) 511 + { 512 + struct orion_gpio_chip *ochip; 513 + struct irq_chip_generic *gc; 514 + struct irq_chip_type *ct; 515 + char gc_label[16]; 516 + int i; 517 + 518 + if (orion_gpio_chip_count == ARRAY_SIZE(orion_gpio_chips)) 519 + return; 520 + 521 + snprintf(gc_label, sizeof(gc_label), "orion_gpio%d", 522 + orion_gpio_chip_count); 523 + 524 + ochip = orion_gpio_chips + orion_gpio_chip_count; 525 + ochip->chip.label = kstrdup(gc_label, GFP_KERNEL); 526 + ochip->chip.request = orion_gpio_request; 527 + ochip->chip.direction_input = orion_gpio_direction_input; 528 + ochip->chip.get = orion_gpio_get; 529 + ochip->chip.direction_output = orion_gpio_direction_output; 530 + ochip->chip.set = orion_gpio_set; 531 + ochip->chip.to_irq = orion_gpio_to_irq; 532 + ochip->chip.base = gpio_base; 533 + ochip->chip.ngpio = ngpio; 534 + ochip->chip.can_sleep = 0; 535 + #ifdef CONFIG_OF 536 + ochip->chip.of_node = np; 537 + #endif 538 + 539 + spin_lock_init(&ochip->lock); 540 + ochip->base = (void __iomem *)base; 541 + ochip->valid_input = 0; 542 + ochip->valid_output = 0; 543 + ochip->mask_offset = mask_offset; 544 + ochip->secondary_irq_base = secondary_irq_base; 545 + 546 + gpiochip_add(&ochip->chip); 547 + 548 + /* 549 + * Mask and clear GPIO interrupts. 550 + */ 551 + writel(0, GPIO_EDGE_CAUSE(ochip)); 552 + writel(0, GPIO_EDGE_MASK(ochip)); 553 + writel(0, GPIO_LEVEL_MASK(ochip)); 554 + 555 + /* Setup the interrupt handlers. Each chip can have up to 4 556 + * interrupt handlers, with each handler dealing with 8 GPIO 557 + * pins. */ 558 + 559 + for (i = 0; i < 4; i++) { 560 + if (irqs[i]) { 561 + irq_set_handler_data(irqs[i], ochip); 562 + irq_set_chained_handler(irqs[i], gpio_irq_handler); 563 + } 564 + } 565 + 566 + gc = irq_alloc_generic_chip("orion_gpio_irq", 2, 567 + secondary_irq_base, 568 + ochip->base, handle_level_irq); 569 + gc->private = ochip; 570 + ct = gc->chip_types; 571 + ct->regs.mask = ochip->mask_offset + GPIO_LEVEL_MASK_OFF; 572 + ct->type = IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW; 573 + ct->chip.irq_mask = irq_gc_mask_clr_bit; 574 + ct->chip.irq_unmask = irq_gc_mask_set_bit; 575 + ct->chip.irq_set_type = gpio_irq_set_type; 576 + ct->chip.name = ochip->chip.label; 577 + 578 + ct++; 579 + ct->regs.mask = ochip->mask_offset + GPIO_EDGE_MASK_OFF; 580 + ct->regs.ack = GPIO_EDGE_CAUSE_OFF; 581 + ct->type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; 582 + ct->chip.irq_ack = irq_gc_ack_clr_bit; 583 + ct->chip.irq_mask = irq_gc_mask_clr_bit; 584 + ct->chip.irq_unmask = irq_gc_mask_set_bit; 585 + ct->chip.irq_set_type = gpio_irq_set_type; 586 + ct->handler = handle_edge_irq; 587 + ct->chip.name = ochip->chip.label; 588 + 589 + irq_setup_generic_chip(gc, IRQ_MSK(ngpio), IRQ_GC_INIT_MASK_CACHE, 590 + IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 591 + 592 + /* Setup irq domain on top of the generic chip. */ 593 + ochip->domain = irq_domain_add_legacy(np, 594 + ochip->chip.ngpio, 595 + ochip->secondary_irq_base, 596 + ochip->secondary_irq_base, 597 + &irq_domain_simple_ops, 598 + ochip); 599 + if (!ochip->domain) 600 + panic("%s: couldn't allocate irq domain (DT).\n", 601 + ochip->chip.label); 602 + 603 + orion_gpio_chip_count++; 604 + } 605 + 606 + #ifdef CONFIG_OF 607 + static void __init orion_gpio_of_init_one(struct device_node *np, 608 + int irq_gpio_base) 609 + { 610 + int ngpio, gpio_base, mask_offset; 611 + void __iomem *base; 612 + int ret, i; 613 + int irqs[4]; 614 + int secondary_irq_base; 615 + 616 + ret = of_property_read_u32(np, "ngpio", &ngpio); 617 + if (ret) 618 + goto out; 619 + ret = of_property_read_u32(np, "mask-offset", &mask_offset); 620 + if (ret == -EINVAL) 621 + mask_offset = 0; 622 + else 623 + goto out; 624 + base = of_iomap(np, 0); 625 + if (!base) 626 + goto out; 627 + 628 + secondary_irq_base = irq_gpio_base + (32 * orion_gpio_chip_count); 629 + gpio_base = 32 * orion_gpio_chip_count; 630 + 631 + /* Get the interrupt numbers. Each chip can have up to 4 632 + * interrupt handlers, with each handler dealing with 8 GPIO 633 + * pins. */ 634 + 635 + for (i = 0; i < 4; i++) 636 + irqs[i] = irq_of_parse_and_map(np, i); 637 + 638 + orion_gpio_init(np, gpio_base, ngpio, base, mask_offset, 639 + secondary_irq_base, irqs); 640 + return; 641 + out: 642 + pr_err("%s: %s: missing mandatory property\n", __func__, np->name); 643 + } 644 + 645 + void __init orion_gpio_of_init(int irq_gpio_base) 646 + { 647 + struct device_node *np; 648 + 649 + for_each_compatible_node(np, NULL, "marvell,orion-gpio") 650 + orion_gpio_of_init_one(np, irq_gpio_base); 651 + } 652 + #endif
+7 -9
arch/arm/plat-orion/include/plat/gpio.h
··· 13 13 14 14 #include <linux/init.h> 15 15 #include <linux/types.h> 16 - 16 + #include <linux/irqdomain.h> 17 17 /* 18 18 * Orion-specific GPIO API extensions. 19 19 */ ··· 27 27 void orion_gpio_set_valid(unsigned pin, int mode); 28 28 29 29 /* Initialize gpiolib. */ 30 - void __init orion_gpio_init(int gpio_base, int ngpio, 31 - u32 base, int mask_offset, int secondary_irq_base); 30 + void __init orion_gpio_init(struct device_node *np, 31 + int gpio_base, int ngpio, 32 + void __iomem *base, int mask_offset, 33 + int secondary_irq_base, 34 + int irq[4]); 32 35 33 - /* 34 - * GPIO interrupt handling. 35 - */ 36 - void orion_gpio_irq_handler(int irqoff); 37 - 38 - 36 + void __init orion_gpio_of_init(int irq_gpio_base); 39 37 #endif
+1 -2
arch/arm/plat-orion/include/plat/irq.h
··· 12 12 #define __PLAT_IRQ_H 13 13 14 14 void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr); 15 - 16 - 15 + void __init orion_dt_init_irq(void); 17 16 #endif
+40
arch/arm/plat-orion/irq.c
··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 + #include <linux/irqdomain.h> 14 15 #include <linux/io.h> 16 + #include <linux/of_address.h> 17 + #include <linux/of_irq.h> 15 18 #include <plat/irq.h> 19 + #include <plat/gpio.h> 16 20 17 21 void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) 18 22 { ··· 36 32 irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE, 37 33 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 38 34 } 35 + 36 + #ifdef CONFIG_OF 37 + static int __init orion_add_irq_domain(struct device_node *np, 38 + struct device_node *interrupt_parent) 39 + { 40 + int i = 0, irq_gpio; 41 + void __iomem *base; 42 + 43 + do { 44 + base = of_iomap(np, i); 45 + if (base) { 46 + orion_irq_init(i * 32, base); 47 + i++; 48 + } 49 + } while (base); 50 + 51 + irq_domain_add_legacy(np, i * 32, 0, 0, 52 + &irq_domain_simple_ops, NULL); 53 + 54 + irq_gpio = i * 32; 55 + orion_gpio_of_init(irq_gpio); 56 + 57 + return 0; 58 + } 59 + 60 + static const struct of_device_id orion_irq_match[] = { 61 + { .compatible = "marvell,orion-intc", 62 + .data = orion_add_irq_domain, }, 63 + {}, 64 + }; 65 + 66 + void __init orion_dt_init_irq(void) 67 + { 68 + of_irq_init(orion_irq_match); 69 + } 70 + #endif
+29 -13
drivers/ata/sata_mv.c
··· 65 65 #include <linux/mbus.h> 66 66 #include <linux/bitops.h> 67 67 #include <linux/gfp.h> 68 + #include <linux/of.h> 69 + #include <linux/of_irq.h> 68 70 #include <scsi/scsi_host.h> 69 71 #include <scsi/scsi_cmnd.h> 70 72 #include <scsi/scsi_device.h> ··· 4028 4026 struct ata_host *host; 4029 4027 struct mv_host_priv *hpriv; 4030 4028 struct resource *res; 4031 - int n_ports = 0; 4029 + int n_ports = 0, irq = 0; 4032 4030 int rc; 4033 4031 #if defined(CONFIG_HAVE_CLK) 4034 4032 int port; ··· 4052 4050 return -EINVAL; 4053 4051 4054 4052 /* allocate host */ 4055 - mv_platform_data = pdev->dev.platform_data; 4056 - n_ports = mv_platform_data->n_ports; 4053 + if (pdev->dev.of_node) { 4054 + of_property_read_u32(pdev->dev.of_node, "nr-ports", &n_ports); 4055 + irq = irq_of_parse_and_map(pdev->dev.of_node, 0); 4056 + } else { 4057 + mv_platform_data = pdev->dev.platform_data; 4058 + n_ports = mv_platform_data->n_ports; 4059 + irq = platform_get_irq(pdev, 0); 4060 + } 4057 4061 4058 4062 host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports); 4059 4063 hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL); ··· 4117 4109 dev_info(&pdev->dev, "slots %u ports %d\n", 4118 4110 (unsigned)MV_MAX_Q_DEPTH, host->n_ports); 4119 4111 4120 - rc = ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, 4121 - IRQF_SHARED, &mv6_sht); 4112 + rc = ata_host_activate(host, irq, mv_interrupt, IRQF_SHARED, &mv6_sht); 4122 4113 if (!rc) 4123 4114 return 0; 4124 4115 ··· 4212 4205 #define mv_platform_resume NULL 4213 4206 #endif 4214 4207 4208 + #ifdef CONFIG_OF 4209 + static struct of_device_id mv_sata_dt_ids[] __devinitdata = { 4210 + { .compatible = "marvell,orion-sata", }, 4211 + {}, 4212 + }; 4213 + MODULE_DEVICE_TABLE(of, mv_sata_dt_ids); 4214 + #endif 4215 + 4215 4216 static struct platform_driver mv_platform_driver = { 4216 - .probe = mv_platform_probe, 4217 - .remove = __devexit_p(mv_platform_remove), 4218 - .suspend = mv_platform_suspend, 4219 - .resume = mv_platform_resume, 4220 - .driver = { 4221 - .name = DRV_NAME, 4222 - .owner = THIS_MODULE, 4223 - }, 4217 + .probe = mv_platform_probe, 4218 + .remove = __devexit_p(mv_platform_remove), 4219 + .suspend = mv_platform_suspend, 4220 + .resume = mv_platform_resume, 4221 + .driver = { 4222 + .name = DRV_NAME, 4223 + .owner = THIS_MODULE, 4224 + .of_match_table = of_match_ptr(mv_sata_dt_ids), 4225 + }, 4224 4226 }; 4225 4227 4226 4228
+8
drivers/watchdog/orion_wdt.c
··· 24 24 #include <linux/spinlock.h> 25 25 #include <linux/clk.h> 26 26 #include <linux/err.h> 27 + #include <linux/of.h> 27 28 #include <mach/bridge-regs.h> 28 29 29 30 /* ··· 193 192 orion_wdt_stop(&orion_wdt); 194 193 } 195 194 195 + static const struct of_device_id orion_wdt_of_match_table[] __devinitdata = { 196 + { .compatible = "marvell,orion-wdt", }, 197 + {}, 198 + }; 199 + MODULE_DEVICE_TABLE(of, orion_wdt_of_match_table); 200 + 196 201 static struct platform_driver orion_wdt_driver = { 197 202 .probe = orion_wdt_probe, 198 203 .remove = __devexit_p(orion_wdt_remove), ··· 206 199 .driver = { 207 200 .owner = THIS_MODULE, 208 201 .name = "orion_wdt", 202 + .of_match_table = of_match_ptr(orion_wdt_of_match_table), 209 203 }, 210 204 }; 211 205