Commit d5425be6 authored by Tony Lindgren's avatar Tony Lindgren

omap: mux: Fix omap_mux_init_gpio for omap24xx

Looks like 24xx uses mode3 instead of mode4 for muxable GPIO pins.
This will be needed when 24xx mux code is converted to use the new
mux functions.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent dd0cdd88
......@@ -43,6 +43,7 @@
#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
#define OMAP_MUX_BASE_SZ 0x5ca
#define MUXABLE_GPIO_MODE3 BIT(0)
struct omap_mux_entry {
struct omap_mux mux;
......@@ -51,6 +52,7 @@ struct omap_mux_entry {
static unsigned long mux_phys;
static void __iomem *mux_base;
static u8 omap_mux_flags;
u16 omap_mux_read(u16 reg)
{
......@@ -394,6 +396,9 @@ int __init omap_mux_init_gpio(int gpio, int val)
old_mode = omap_mux_read(m->reg_offset);
mux_mode = val & ~(OMAP_MUX_NR_MODES - 1);
if (omap_mux_flags & MUXABLE_GPIO_MODE3)
mux_mode |= OMAP_MUX_MODE3;
else
mux_mode |= OMAP_MUX_MODE4;
printk(KERN_DEBUG "mux: Setting signal "
"%s.gpio%i 0x%04x -> 0x%04x\n",
......@@ -1032,6 +1037,9 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
return -ENODEV;
}
if (cpu_is_omap24xx())
omap_mux_flags = MUXABLE_GPIO_MODE3;
omap_mux_init_package(superset, package_subset, package_balls);
omap_mux_init_list(superset);
omap_mux_init_signals(board_mux);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment