diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-22 16:24:09 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-22 16:24:09 -0400 |
commit | d6a93ceb3f523be3a00b5ee8c6380653c764927b (patch) | |
tree | 9699d60dc3b21e9fc7782af93aefdd334cfc46b7 /arch/arm/mach-kirkwood | |
parent | fb6f3d69af95006c0518be7fbcd73bff555c837d (diff) | |
parent | 1b90e06b14291ce3c252bd10e4ce981a08152e2e (diff) |
Merge branch 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
From Jason Cooper:
New bindings:
- iconnect nand and keys
- mv_cesa
- gpio-fan
* 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux:
ARM: kirkwood: Use devicetree to define DNS-32[05] fan
hwmon: Add devicetree bindings to gpio-fan
Crypto: CESA: Add support for DT based instantiation.
ARM: Kirkwood: Describe iconnect nand in DT.
ARM: Kirkwood: Describe iconnect keys in DT.
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/board-dnskw.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-iconnect.c | 48 |
3 files changed, 1 insertions, 75 deletions
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 4ab35065a144..6ac7a8dc7b78 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/gpio-fan.h> | ||
23 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
24 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
@@ -67,29 +66,6 @@ static unsigned int dnskw_mpp_config[] __initdata = { | |||
67 | 0 | 66 | 0 |
68 | }; | 67 | }; |
69 | 68 | ||
70 | /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ | ||
71 | static struct gpio_fan_speed dnskw_fan_speed[] = { | ||
72 | { 0, 0 }, | ||
73 | { 3000, 1 }, | ||
74 | { 6000, 2 }, | ||
75 | }; | ||
76 | static unsigned dnskw_fan_pins[] = {46, 45}; | ||
77 | |||
78 | static struct gpio_fan_platform_data dnskw_fan_data = { | ||
79 | .num_ctrl = ARRAY_SIZE(dnskw_fan_pins), | ||
80 | .ctrl = dnskw_fan_pins, | ||
81 | .num_speed = ARRAY_SIZE(dnskw_fan_speed), | ||
82 | .speed = dnskw_fan_speed, | ||
83 | }; | ||
84 | |||
85 | static struct platform_device dnskw_fan_device = { | ||
86 | .name = "gpio-fan", | ||
87 | .id = -1, | ||
88 | .dev = { | ||
89 | .platform_data = &dnskw_fan_data, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static void dnskw_power_off(void) | 69 | static void dnskw_power_off(void) |
94 | { | 70 | { |
95 | gpio_set_value(36, 1); | 71 | gpio_set_value(36, 1); |
@@ -114,8 +90,6 @@ void __init dnskw_init(void) | |||
114 | kirkwood_ehci_init(); | 90 | kirkwood_ehci_init(); |
115 | kirkwood_ge00_init(&dnskw_ge00_data); | 91 | kirkwood_ge00_init(&dnskw_ge00_data); |
116 | 92 | ||
117 | platform_device_register(&dnskw_fan_device); | ||
118 | |||
119 | /* Register power-off GPIO. */ | 93 | /* Register power-off GPIO. */ |
120 | if (gpio_request(36, "dnskw:power:off") == 0 | 94 | if (gpio_request(36, "dnskw:power:off") == 0 |
121 | && gpio_direction_output(36, 0) == 0) | 95 | && gpio_direction_output(36, 0) == 0) |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 496554664e08..70c5a2882409 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -33,6 +33,7 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { | |||
33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | 33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), |
34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), | 34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), |
35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), | 35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), |
36 | OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1030000, "mv_crypto", NULL), | ||
36 | {}, | 37 | {}, |
37 | }; | 38 | }; |
38 | 39 | ||
@@ -60,7 +61,6 @@ static void __init kirkwood_dt_init(void) | |||
60 | /* internal devices that every board has */ | 61 | /* internal devices that every board has */ |
61 | kirkwood_xor0_init(); | 62 | kirkwood_xor0_init(); |
62 | kirkwood_xor1_init(); | 63 | kirkwood_xor1_init(); |
63 | kirkwood_crypto_init(); | ||
64 | 64 | ||
65 | #ifdef CONFIG_KEXEC | 65 | #ifdef CONFIG_KEXEC |
66 | kexec_reinit = kirkwood_enable_pcie; | 66 | kexec_reinit = kirkwood_enable_pcie; |
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index d7a9198ed300..d084b1e2943a 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c | |||
@@ -16,11 +16,8 @@ | |||
16 | #include <linux/of_fdt.h> | 16 | #include <linux/of_fdt.h> |
17 | #include <linux/of_irq.h> | 17 | #include <linux/of_irq.h> |
18 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
19 | #include <linux/mtd/partitions.h> | ||
20 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
21 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
22 | #include <linux/input.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
25 | #include <mach/kirkwood.h> | 22 | #include <mach/kirkwood.h> |
26 | #include "common.h" | 23 | #include "common.h" |
@@ -44,57 +41,12 @@ static unsigned int iconnect_mpp_config[] __initdata = { | |||
44 | 0 | 41 | 0 |
45 | }; | 42 | }; |
46 | 43 | ||
47 | static struct mtd_partition iconnect_nand_parts[] = { | ||
48 | { | ||
49 | .name = "flash", | ||
50 | .offset = 0, | ||
51 | .size = MTDPART_SIZ_FULL, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | /* yikes... theses are the original input buttons */ | ||
56 | /* but I'm not convinced by the sw event choices */ | ||
57 | static struct gpio_keys_button iconnect_buttons[] = { | ||
58 | { | ||
59 | .type = EV_SW, | ||
60 | .code = SW_LID, | ||
61 | .gpio = 12, | ||
62 | .desc = "Reset Button", | ||
63 | .active_low = 1, | ||
64 | .debounce_interval = 100, | ||
65 | }, { | ||
66 | .type = EV_SW, | ||
67 | .code = SW_TABLET_MODE, | ||
68 | .gpio = 35, | ||
69 | .desc = "OTB Button", | ||
70 | .active_low = 1, | ||
71 | .debounce_interval = 100, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | static struct gpio_keys_platform_data iconnect_button_data = { | ||
76 | .buttons = iconnect_buttons, | ||
77 | .nbuttons = ARRAY_SIZE(iconnect_buttons), | ||
78 | }; | ||
79 | |||
80 | static struct platform_device iconnect_button_device = { | ||
81 | .name = "gpio-keys", | ||
82 | .id = -1, | ||
83 | .num_resources = 0, | ||
84 | .dev = { | ||
85 | .platform_data = &iconnect_button_data, | ||
86 | }, | ||
87 | }; | ||
88 | |||
89 | void __init iconnect_init(void) | 44 | void __init iconnect_init(void) |
90 | { | 45 | { |
91 | kirkwood_mpp_conf(iconnect_mpp_config); | 46 | kirkwood_mpp_conf(iconnect_mpp_config); |
92 | kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25); | ||
93 | 47 | ||
94 | kirkwood_ehci_init(); | 48 | kirkwood_ehci_init(); |
95 | kirkwood_ge00_init(&iconnect_ge00_data); | 49 | kirkwood_ge00_init(&iconnect_ge00_data); |
96 | |||
97 | platform_device_register(&iconnect_button_device); | ||
98 | } | 50 | } |
99 | 51 | ||
100 | static int __init iconnect_pci_init(void) | 52 | static int __init iconnect_pci_init(void) |