diff options
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 8b3d26935a39..76b5bf761d1d 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ | 44 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ |
45 | #define OMAP_MUX_BASE_SZ 0x5ca | 45 | #define OMAP_MUX_BASE_SZ 0x5ca |
46 | #define MUXABLE_GPIO_MODE3 BIT(0) | ||
46 | 47 | ||
47 | struct omap_mux_entry { | 48 | struct omap_mux_entry { |
48 | struct omap_mux mux; | 49 | struct omap_mux mux; |
@@ -51,6 +52,7 @@ struct omap_mux_entry { | |||
51 | 52 | ||
52 | static unsigned long mux_phys; | 53 | static unsigned long mux_phys; |
53 | static void __iomem *mux_base; | 54 | static void __iomem *mux_base; |
55 | static u8 omap_mux_flags; | ||
54 | 56 | ||
55 | u16 omap_mux_read(u16 reg) | 57 | u16 omap_mux_read(u16 reg) |
56 | { | 58 | { |
@@ -394,7 +396,10 @@ int __init omap_mux_init_gpio(int gpio, int val) | |||
394 | 396 | ||
395 | old_mode = omap_mux_read(m->reg_offset); | 397 | old_mode = omap_mux_read(m->reg_offset); |
396 | mux_mode = val & ~(OMAP_MUX_NR_MODES - 1); | 398 | mux_mode = val & ~(OMAP_MUX_NR_MODES - 1); |
397 | mux_mode |= OMAP_MUX_MODE4; | 399 | if (omap_mux_flags & MUXABLE_GPIO_MODE3) |
400 | mux_mode |= OMAP_MUX_MODE3; | ||
401 | else | ||
402 | mux_mode |= OMAP_MUX_MODE4; | ||
398 | printk(KERN_DEBUG "mux: Setting signal " | 403 | printk(KERN_DEBUG "mux: Setting signal " |
399 | "%s.gpio%i 0x%04x -> 0x%04x\n", | 404 | "%s.gpio%i 0x%04x -> 0x%04x\n", |
400 | m->muxnames[0], gpio, old_mode, mux_mode); | 405 | m->muxnames[0], gpio, old_mode, mux_mode); |
@@ -1032,6 +1037,9 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
1032 | return -ENODEV; | 1037 | return -ENODEV; |
1033 | } | 1038 | } |
1034 | 1039 | ||
1040 | if (cpu_is_omap24xx()) | ||
1041 | omap_mux_flags = MUXABLE_GPIO_MODE3; | ||
1042 | |||
1035 | omap_mux_init_package(superset, package_subset, package_balls); | 1043 | omap_mux_init_package(superset, package_subset, package_balls); |
1036 | omap_mux_init_list(superset); | 1044 | omap_mux_init_list(superset); |
1037 | omap_mux_init_signals(board_mux); | 1045 | omap_mux_init_signals(board_mux); |