diff options
author | Andrew Lunn <andrew@lunn.ch> | 2012-12-28 09:14:10 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-02-28 12:57:13 -0500 |
commit | 102c9543ff368709980c6d68b7a75f840edda6b5 (patch) | |
tree | e013e69901ef1ad9cc72ed6063b868694cf61682 /arch/arm/mach-kirkwood | |
parent | b4d2a24fa522afd3891c9718443686cab71df24f (diff) |
ARM: Kirkwood: Convert NS2 to gpio-poweroff.
Remove C code and add a Device Tree node in its place.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/board-ns2.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index f4632a809f68..f2ea3b7ad726 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/gpio.h> | ||
19 | #include <linux/of.h> | 18 | #include <linux/of.h> |
20 | #include "common.h" | 19 | #include "common.h" |
21 | 20 | ||
@@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = { | |||
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
24 | }; | 23 | }; |
25 | 24 | ||
26 | #define NS2_GPIO_POWER_OFF 31 | ||
27 | |||
28 | static void ns2_power_off(void) | ||
29 | { | ||
30 | gpio_set_value(NS2_GPIO_POWER_OFF, 1); | ||
31 | } | ||
32 | |||
33 | void __init ns2_init(void) | 25 | void __init ns2_init(void) |
34 | { | 26 | { |
35 | /* | 27 | /* |
@@ -39,10 +31,4 @@ void __init ns2_init(void) | |||
39 | of_machine_is_compatible("lacie,netspace_mini_v2")) | 31 | of_machine_is_compatible("lacie,netspace_mini_v2")) |
40 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 32 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
41 | kirkwood_ge00_init(&ns2_ge00_data); | 33 | kirkwood_ge00_init(&ns2_ge00_data); |
42 | |||
43 | if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && | ||
44 | gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) | ||
45 | pm_power_off = ns2_power_off; | ||
46 | else | ||
47 | pr_err("ns2: failed to configure power-off GPIO\n"); | ||
48 | } | 34 | } |