diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-08-16 04:55:35 -0400 |
---|---|---|
committer | Benoit Cousson <b-cousson@ti.com> | 2010-11-17 06:01:49 -0500 |
commit | 112485e9c543b17fc08daea56c7a558b415d06af (patch) | |
tree | 3bffd99e96d4c54a177ec251026a1cd5e1122af4 /arch/arm/mach-omap2/board-rx51-peripherals.c | |
parent | 1cbb3a9a132969ed1ffeaecff2f910619d4470ae (diff) |
OMAP: mux: Add support for control module split in several partitions
Starting on OMAP4, the pin mux configuration is located in two
different partitions of the control module (CODE_PAD and WKUP_PAD).
The first one is inside the core power domain whereas the second
one is inside the wakeup.
- Add the capability to add any number of partition during board init
time depending of Soc partitioning.
- Add some init flags as well in order to avoid explicit Soc version
check inside the mux core code.
- Add a comment with mux0 mode on top of omap_mux/board/<partition>
if the current mux mode is not the default one.
Thanks to Tony Lindgren <tony@atomide.com> for the following improvements:
- Add omap_mux_get for getting the partition data so platform level
device code can use it.
- Fix the rx51 board code to use the new API.
- Do not store the partition for each mux entry. Look up the partition
for debugfs instead.
Thanks to Dan Murphy <dmurphy@ti.com> for testing on OMAP4 and reporting
a couple of bugs.
Thanks to Anand Gadiyar <gadiyar@ti.com> for testing on OMAP3 zoom and
bug report.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Murphy Dan <dmurphy@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Anand Gadiyar <gadiyar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 3fec4d62a91a..3fda20d73233 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -293,6 +293,8 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = { | |||
293 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 293 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
294 | }; | 294 | }; |
295 | 295 | ||
296 | static struct omap_mux_partition *partition; | ||
297 | |||
296 | /* | 298 | /* |
297 | * Current flows to eMMC when eMMC is off and the data lines are pulled up, | 299 | * Current flows to eMMC when eMMC is off and the data lines are pulled up, |
298 | * so pull them down. N.B. we pull 8 lines because we are using 8 lines. | 300 | * so pull them down. N.B. we pull 8 lines because we are using 8 lines. |
@@ -300,9 +302,9 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = { | |||
300 | static void rx51_mmc2_remux(struct device *dev, int slot, int power_on) | 302 | static void rx51_mmc2_remux(struct device *dev, int slot, int power_on) |
301 | { | 303 | { |
302 | if (power_on) | 304 | if (power_on) |
303 | omap_mux_write_array(rx51_mmc2_on_mux); | 305 | omap_mux_write_array(partition, rx51_mmc2_on_mux); |
304 | else | 306 | else |
305 | omap_mux_write_array(rx51_mmc2_off_mux); | 307 | omap_mux_write_array(partition, rx51_mmc2_off_mux); |
306 | } | 308 | } |
307 | 309 | ||
308 | static struct omap2_hsmmc_info mmc[] __initdata = { | 310 | static struct omap2_hsmmc_info mmc[] __initdata = { |
@@ -922,7 +924,11 @@ void __init rx51_peripherals_init(void) | |||
922 | rx51_init_wl1251(); | 924 | rx51_init_wl1251(); |
923 | spi_register_board_info(rx51_peripherals_spi_board_info, | 925 | spi_register_board_info(rx51_peripherals_spi_board_info, |
924 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); | 926 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); |
925 | omap2_hsmmc_init(mmc); | 927 | |
928 | partition = omap_mux_get("core"); | ||
929 | if (partition) | ||
930 | omap2_hsmmc_init(mmc); | ||
931 | |||
926 | platform_device_register(&rx51_charger_device); | 932 | platform_device_register(&rx51_charger_device); |
927 | } | 933 | } |
928 | 934 | ||