diff options
author | Andrew Lunn <andrew@lunn.ch> | 2013-01-06 05:10:38 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-01-06 12:53:10 -0500 |
commit | 8758c885c43859266e45db588b1a5992c049c595 (patch) | |
tree | 125215c6ffeda5ac06b3e0dc2330753c77917891 /arch | |
parent | d2268be3dc0ef59f9d572f082c08e698e4617bc4 (diff) |
ARM: Kirkwood: Use fixed-regulator instead of board gpio call
With the change to a DT based pinctrl/gpio driver, using gpio API
calls in board-*.c files no longer works, a dereferenced NULL pointer
exception occurs instead. By converting the GPIO code into a
fixed-regulator which gets probed later once pinctrl/gpio is
available, we avoid the exception.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Stefan Peter <s.peter@mplch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/kirkwood-topkick.dts | 17 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-usi_topkick.c | 4 |
2 files changed, 17 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index c0de5a7f660d..cd15452a52a6 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts | |||
@@ -82,4 +82,21 @@ | |||
82 | gpios = <&gpio1 16 1>; | 82 | gpios = <&gpio1 16 1>; |
83 | }; | 83 | }; |
84 | }; | 84 | }; |
85 | regulators { | ||
86 | compatible = "simple-bus"; | ||
87 | #address-cells = <1>; | ||
88 | #size-cells = <0>; | ||
89 | |||
90 | sata0_power: regulator@1 { | ||
91 | compatible = "regulator-fixed"; | ||
92 | reg = <1>; | ||
93 | regulator-name = "SATA0 Power"; | ||
94 | regulator-min-microvolt = <5000000>; | ||
95 | regulator-max-microvolt = <5000000>; | ||
96 | enable-active-high; | ||
97 | regulator-always-on; | ||
98 | regulator-boot-on; | ||
99 | gpio = <&gpio1 4 0>; | ||
100 | }; | ||
101 | }; | ||
85 | }; | 102 | }; |
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 15e69fcde9f4..23d2dd1b1b1e 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c | |||
@@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = { | |||
64 | 0 | 64 | 0 |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #define TOPKICK_SATA0_PWR_ENABLE 36 | ||
68 | |||
69 | void __init usi_topkick_init(void) | 67 | void __init usi_topkick_init(void) |
70 | { | 68 | { |
71 | /* | 69 | /* |
@@ -73,8 +71,6 @@ void __init usi_topkick_init(void) | |||
73 | */ | 71 | */ |
74 | kirkwood_mpp_conf(topkick_mpp_config); | 72 | kirkwood_mpp_conf(topkick_mpp_config); |
75 | 73 | ||
76 | /* SATA0 power enable */ | ||
77 | gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); | ||
78 | 74 | ||
79 | kirkwood_ge00_init(&topkick_ge00_data); | 75 | kirkwood_ge00_init(&topkick_ge00_data); |
80 | kirkwood_sdio_init(&topkick_mvsdio_data); | 76 | kirkwood_sdio_init(&topkick_mvsdio_data); |