diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 16:46:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 16:46:56 -0400 |
commit | 7b6181e06841f5ad15c4ff708b967b4db65a64de (patch) | |
tree | bdfcf5b74b692f76581156e452d268b64c795200 /arch/arm/mach-omap2/mux.c | |
parent | 72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (diff) | |
parent | bc487fb341af05120bccb9f59ce76302391dcc77 (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: (163 commits)
omap: complete removal of machine_desc.io_pg_offst and .phys_io
omap: UART: fix wakeup registers for OMAP24xx UART2
omap: Fix spotty MMC voltages
ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h
serial: omap-serial: fix signess error
OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish
omap: dma: Fix buffering disable bit setting for omap24xx
omap: serial: Fix the boot-up crash/reboot without CONFIG_PM
OMAP3: PM: fix scratchpad memory accesses for off-mode
omap4: pandaboard: enable the ehci port on pandaboard
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
omap4: pandaboard: remove unused hsmmc definition
OMAP: McBSP: Remove null omap44xx ops comment
OMAP: McBSP: Swap CLKS source definition
OMAP: McBSP: Fix CLKR and FSR signal muxing
OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks
OMAP: control: move plat-omap/control.h to mach-omap2/control.h
OMAP: split plat-omap/common.c
OMAP: McBSP: implement functional clock switching via clock framework
OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c
...
Fixed up trivial conflicts in arch/arm/mach-omap2/
{board-zoom-peripherals.c,devices.c} as per Tony
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index ab403b2ed26b..074536ae401f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -23,12 +23,11 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | #include <linux/module.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/spinlock.h> | ||
31 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/slab.h> | ||
32 | #include <linux/ctype.h> | 31 | #include <linux/ctype.h> |
33 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
34 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
@@ -36,8 +35,7 @@ | |||
36 | 35 | ||
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
38 | 37 | ||
39 | #include <plat/control.h> | 38 | #include "control.h" |
40 | |||
41 | #include "mux.h" | 39 | #include "mux.h" |
42 | 40 | ||
43 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ | 41 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ |
@@ -87,7 +85,7 @@ static char *omap_mux_options; | |||
87 | int __init omap_mux_init_gpio(int gpio, int val) | 85 | int __init omap_mux_init_gpio(int gpio, int val) |
88 | { | 86 | { |
89 | struct omap_mux_entry *e; | 87 | struct omap_mux_entry *e; |
90 | struct omap_mux *gpio_mux; | 88 | struct omap_mux *gpio_mux = NULL; |
91 | u16 old_mode; | 89 | u16 old_mode; |
92 | u16 mux_mode; | 90 | u16 mux_mode; |
93 | int found = 0; | 91 | int found = 0; |
@@ -127,17 +125,16 @@ int __init omap_mux_init_gpio(int gpio, int val) | |||
127 | return 0; | 125 | return 0; |
128 | } | 126 | } |
129 | 127 | ||
130 | int __init omap_mux_init_signal(char *muxname, int val) | 128 | int __init omap_mux_init_signal(const char *muxname, int val) |
131 | { | 129 | { |
132 | struct omap_mux_entry *e; | 130 | struct omap_mux_entry *e; |
133 | char *m0_name = NULL, *mode_name = NULL; | 131 | const char *mode_name; |
134 | int found = 0; | 132 | int found = 0, mode0_len = 0; |
135 | 133 | ||
136 | mode_name = strchr(muxname, '.'); | 134 | mode_name = strchr(muxname, '.'); |
137 | if (mode_name) { | 135 | if (mode_name) { |
138 | *mode_name = '\0'; | 136 | mode0_len = strlen(muxname) - strlen(mode_name); |
139 | mode_name++; | 137 | mode_name++; |
140 | m0_name = muxname; | ||
141 | } else { | 138 | } else { |
142 | mode_name = muxname; | 139 | mode_name = muxname; |
143 | } | 140 | } |
@@ -147,9 +144,11 @@ int __init omap_mux_init_signal(char *muxname, int val) | |||
147 | char *m0_entry = m->muxnames[0]; | 144 | char *m0_entry = m->muxnames[0]; |
148 | int i; | 145 | int i; |
149 | 146 | ||
150 | if (m0_name && strcmp(m0_name, m0_entry)) | 147 | /* First check for full name in mode0.muxmode format */ |
148 | if (mode0_len && strncmp(muxname, m0_entry, mode0_len)) | ||
151 | continue; | 149 | continue; |
152 | 150 | ||
151 | /* Then check for muxmode only */ | ||
153 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { | 152 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { |
154 | char *mode_cur = m->muxnames[i]; | 153 | char *mode_cur = m->muxnames[i]; |
155 | 154 | ||