aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mux.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 13:03:35 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 13:03:35 -0500
commit321cfc851dbb866e4d5efd555eca5919895324ca (patch)
tree0c4e035f5adddfcb674e840aac699a9429485956 /arch/arm/mach-omap2/mux.c
parentb702b1060ab1c29ac08b904a0c188c61cda880eb (diff)
omap3: Clean-up for omap_mux_init
Get rid of the ifdeffery in omap_mux_init by creating omap_mux_init_package and omap_mux_init_signals functions. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r--arch/arm/mach-omap2/mux.c46
1 files changed, 34 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 5ee2372f3b42..986077f3da15 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -985,6 +985,38 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
985 } 985 }
986} 986}
987 987
988#ifdef CONFIG_OMAP_MUX
989
990static void omap_mux_init_package(struct omap_mux *superset,
991 struct omap_mux *package_subset,
992 struct omap_ball *package_balls)
993{
994 if (package_subset)
995 omap_mux_package_fixup(package_subset, superset);
996 if (package_balls)
997 omap_mux_package_init_balls(package_balls, superset);
998}
999
1000static void omap_mux_init_signals(struct omap_board_mux *board_mux)
1001{
1002 omap_mux_set_cmdline_signals();
1003 omap_mux_write_array(board_mux);
1004}
1005
1006#else
1007
1008static void omap_mux_init_package(struct omap_mux *superset,
1009 struct omap_mux *package_subset,
1010 struct omap_ball *package_balls)
1011{
1012}
1013
1014static void omap_mux_init_signals(struct omap_board_mux *board_mux)
1015{
1016}
1017
1018#endif
1019
988int __init omap_mux_init(u32 mux_pbase, u32 mux_size, 1020int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
989 struct omap_mux *superset, 1021 struct omap_mux *superset,
990 struct omap_mux *package_subset, 1022 struct omap_mux *package_subset,
@@ -1001,19 +1033,9 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
1001 return -ENODEV; 1033 return -ENODEV;
1002 } 1034 }
1003 1035
1004#ifdef CONFIG_OMAP_MUX 1036 omap_mux_init_package(superset, package_subset, package_balls);
1005 if (package_subset)
1006 omap_mux_package_fixup(package_subset, superset);
1007 if (package_balls)
1008 omap_mux_package_init_balls(package_balls, superset);
1009#endif
1010
1011 omap_mux_init_list(superset); 1037 omap_mux_init_list(superset);
1012 1038 omap_mux_init_signals(board_mux);
1013#ifdef CONFIG_OMAP_MUX
1014 omap_mux_set_cmdline_signals();
1015 omap_mux_write_array(board_mux);
1016#endif
1017 1039
1018 return 0; 1040 return 0;
1019} 1041}