diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-12-16 17:12:32 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-19 21:03:11 -0500 |
commit | a58116f331fd30462b4a7372725e090e1a7d0eb7 (patch) | |
tree | f095c9fba0e480bc4449a4ee4893cb52525017b0 /arch/arm/mach-tegra/board-dt.c | |
parent | 54862bf00968427cf8f7ffcb6dacf03161eae862 (diff) |
arm/tegra: Use bus notifiers to trigger pinmux setup
Currently, the Tegra pinmux is initialized at different times when booting
with and without device tree:
Without device tree:
1) Pinmux and GPIO drivers are registered.
2) Pinmux is configured.
3) All other drivers are registered.
With device tree:
1) All drivers are registered and probed, including pinmux and GPIO.
2) Pinmux is configured.
This change modifies board-pinmux.c to detect pinmux and GPIO driver
registration using bus notifiers. This allows pinmux configuration to
happen immediately after the pinmux driver is probed, irrespective of
whether the pinmux driver is manually registered by board-pinmux.c, or
if it's instantiated during device tree parsing.
To support this with device tree, the pinmux init functions must be
called prior to instantiating devices from device tree, so that the
notifiers are set up before-hand.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-dt.c')
-rw-r--r-- | arch/arm/mach-tegra/board-dt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c index 96f4df598238..909065f62e38 100644 --- a/arch/arm/mach-tegra/board-dt.c +++ b/arch/arm/mach-tegra/board-dt.c | |||
@@ -103,13 +103,6 @@ static void __init tegra_dt_init(void) | |||
103 | 103 | ||
104 | tegra_clk_init_from_table(tegra_dt_clk_init_table); | 104 | tegra_clk_init_from_table(tegra_dt_clk_init_table); |
105 | 105 | ||
106 | /* | ||
107 | * Finished with the static registrations now; fill in the missing | ||
108 | * devices | ||
109 | */ | ||
110 | of_platform_populate(NULL, tegra_dt_match_table, | ||
111 | tegra20_auxdata_lookup, NULL); | ||
112 | |||
113 | for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) { | 106 | for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) { |
114 | if (of_machine_is_compatible(pinmux_configs[i].machine)) { | 107 | if (of_machine_is_compatible(pinmux_configs[i].machine)) { |
115 | pinmux_configs[i].init(); | 108 | pinmux_configs[i].init(); |
@@ -119,6 +112,13 @@ static void __init tegra_dt_init(void) | |||
119 | 112 | ||
120 | WARN(i == ARRAY_SIZE(pinmux_configs), | 113 | WARN(i == ARRAY_SIZE(pinmux_configs), |
121 | "Unknown platform! Pinmuxing not initialized\n"); | 114 | "Unknown platform! Pinmuxing not initialized\n"); |
115 | |||
116 | /* | ||
117 | * Finished with the static registrations now; fill in the missing | ||
118 | * devices | ||
119 | */ | ||
120 | of_platform_populate(NULL, tegra_dt_match_table, | ||
121 | tegra20_auxdata_lookup, NULL); | ||
122 | } | 122 | } |
123 | 123 | ||
124 | static const char * tegra_dt_board_compat[] = { | 124 | static const char * tegra_dt_board_compat[] = { |