aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/mux.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:34:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:34:25 -0800
commit5057bfaff82e12f01a2ffd58f55535cbd7c5c3a2 (patch)
tree0397253173308317480ed82f0b75af46cd3f6cb1 /arch/arm/mach-omap2/mux.c
parent6c0ad5dfd3d5ad6def89b485ee52834547da239b (diff)
parentd702d12167a2c05a346f49aac7a311d597762495 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (214 commits) omap2: Initialize Menelaus and MMC for N8X0 AM3517 EVM: correct typo - tca6416 mispelt as tca6516 AM3517 EVM: Enable I2C support AM35x: Enable OMAP_MUX in defconfig AM35x: Add missing GPIO mux config for EHCI port Zoom3: Defconfig update omap: i2c: Fix muxing for command line enabled bus OMAP4: clock: Remove clock hacks from timer-gp.c OMAP4: clock: Add dummy clock nodes for interface clocks OMAP4: clock: Rename leaf clock nodes to end with a _ick or _fck OMAP2+ clock: revise omap2_clk_{disable,enable}() OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code OMAP clockdomain: if no autodeps exist, don't try to add or remove them OMAP hwmod: add hwmod class support OMAP hwmod: convert header files with static allocations into C files OMAP hwmod: convert hwmod to use hardware clock names rather than clkdev dev+con OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 OMAP4 clock: drop the ALWAYS_ENABLED clock flag OMAP clock: drop RATE_FIXED clock flag ...
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r--arch/arm/mach-omap2/mux.c52
1 files changed, 37 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 5fef73f4743..b4ca84ee0a9 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -75,7 +75,7 @@ void omap_mux_write_array(struct omap_board_mux *board_mux)
}
}
-#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX)
+#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_OMAP_MUX)
static struct omap_mux_cfg arch_mux_cfg;
@@ -369,7 +369,7 @@ int __init omap2_mux_init(void)
/*----------------------------------------------------------------------------*/
-#ifdef CONFIG_ARCH_OMAP34XX
+#ifdef CONFIG_ARCH_OMAP3
static LIST_HEAD(muxmodes);
static DEFINE_MUTEX(muxmode_mutex);
@@ -983,6 +983,38 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
}
}
+#ifdef CONFIG_OMAP_MUX
+
+static void omap_mux_init_package(struct omap_mux *superset,
+ struct omap_mux *package_subset,
+ struct omap_ball *package_balls)
+{
+ if (package_subset)
+ omap_mux_package_fixup(package_subset, superset);
+ if (package_balls)
+ omap_mux_package_init_balls(package_balls, superset);
+}
+
+static void omap_mux_init_signals(struct omap_board_mux *board_mux)
+{
+ omap_mux_set_cmdline_signals();
+ omap_mux_write_array(board_mux);
+}
+
+#else
+
+static void omap_mux_init_package(struct omap_mux *superset,
+ struct omap_mux *package_subset,
+ struct omap_ball *package_balls)
+{
+}
+
+static void omap_mux_init_signals(struct omap_board_mux *board_mux)
+{
+}
+
+#endif
+
int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
struct omap_mux *superset,
struct omap_mux *package_subset,
@@ -999,22 +1031,12 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
return -ENODEV;
}
-#ifdef CONFIG_OMAP_MUX
- if (package_subset)
- omap_mux_package_fixup(package_subset, superset);
- if (package_balls)
- omap_mux_package_init_balls(package_balls, superset);
-#endif
-
+ omap_mux_init_package(superset, package_subset, package_balls);
omap_mux_init_list(superset);
-
-#ifdef CONFIG_OMAP_MUX
- omap_mux_set_cmdline_signals();
- omap_mux_write_array(board_mux);
-#endif
+ omap_mux_init_signals(board_mux);
return 0;
}
-#endif /* CONFIG_ARCH_OMAP34XX */
+#endif /* CONFIG_ARCH_OMAP3 */