aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-09-19 13:46:56 -0400
committerTony Lindgren <tony@atomide.com>2012-09-20 17:54:57 -0400
commit70c494c3122fb3d53518aea53c8cf5d61cad909a (patch)
tree5f3c174d13ad2e459a73902f0d7162d3473e612c
parenta619ca9c4a132472adce3b8d11d0fdafa91ae9dd (diff)
ARM: OMAP1: Make plat/mux.h omap1 only
We are moving omap2+ to use the device tree based pinctrl-single.c and will be removing the old mux framework. This will remove the omap1 specific parts from plat-omap. Acked-by: Felipe Balbi <balbi@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-usb@vger.kernel.org Cc: linux-pcmcia@lists.infradead.org Cc: spi-devel-general@lists.sourceforge.net Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c2
-rw-r--r--arch/arm/mach-omap1/board-fsample.c2
-rw-r--r--arch/arm/mach-omap1/board-generic.c2
-rw-r--r--arch/arm/mach-omap1/board-h2.c2
-rw-r--r--arch/arm/mach-omap1/board-h3.c2
-rw-r--r--arch/arm/mach-omap1/board-innovator.c2
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c2
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/board-palmte.c2
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c2
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c2
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c2
-rw-r--r--arch/arm/mach-omap1/board-sx1.c2
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c2
-rw-r--r--arch/arm/mach-omap1/devices.c2
-rw-r--r--arch/arm/mach-omap1/i2c.c2
-rw-r--r--arch/arm/mach-omap1/include/mach/mux.h (renamed from arch/arm/plat-omap/include/plat/mux.h)0
-rw-r--r--arch/arm/mach-omap1/io.c2
-rw-r--r--arch/arm/mach-omap1/leds.c2
-rw-r--r--arch/arm/mach-omap1/mcbsp.c2
-rw-r--r--arch/arm/mach-omap1/mux.c58
-rw-r--r--arch/arm/mach-omap1/pm.c2
-rw-r--r--arch/arm/mach-omap1/serial.c2
-rw-r--r--arch/arm/mach-omap1/usb.c2
-rw-r--r--arch/arm/mach-omap2/common.c1
-rw-r--r--arch/arm/mach-omap2/hsmmc.c1
-rw-r--r--arch/arm/plat-omap/Makefile2
-rw-r--r--arch/arm/plat-omap/i2c.c1
-rw-r--r--arch/arm/plat-omap/include/plat/omap-serial.h2
-rw-r--r--arch/arm/plat-omap/mux.c90
-rw-r--r--drivers/mmc/host/omap.c1
-rw-r--r--drivers/pcmcia/omap_cf.c2
-rw-r--r--drivers/spi/spi-omap-uwire.c2
-rw-r--r--drivers/usb/host/ohci-omap.c2
-rw-r--r--drivers/usb/musb/tusb6010_omap.c1
-rw-r--r--drivers/usb/otg/isp1301_omap.c2
-rw-r--r--drivers/video/backlight/omap1_bl.c2
-rw-r--r--drivers/video/omap/lcd_osk.c2
38 files changed, 85 insertions, 128 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 56446d2b2844..275d7e50ae10 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -37,7 +37,7 @@
37 37
38#include <plat/board-ams-delta.h> 38#include <plat/board-ams-delta.h>
39#include <linux/platform_data/keypad-omap.h> 39#include <linux/platform_data/keypad-omap.h>
40#include <plat/mux.h> 40#include <mach/mux.h>
41 41
42#include <mach/hardware.h> 42#include <mach/hardware.h>
43#include <mach/ams-delta-fiq.h> 43#include <mach/ams-delta-fiq.h>
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index ad5ba9f00efe..63aa634ce29f 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -28,7 +28,7 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29 29
30#include <plat/tc.h> 30#include <plat/tc.h>
31#include <plat/mux.h> 31#include <mach/mux.h>
32#include <plat/flash.h> 32#include <plat/flash.h>
33#include <plat/fpga.h> 33#include <plat/fpga.h>
34#include <linux/platform_data/keypad-omap.h> 34#include <linux/platform_data/keypad-omap.h>
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 04b5fdaff831..4ec579fdd366 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -22,7 +22,7 @@
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <plat/mux.h> 25#include <mach/mux.h>
26 26
27#include <mach/usb.h> 27#include <mach/usb.h>
28 28
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 519d827570bb..093297e50ec7 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -37,7 +37,7 @@
37#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <plat/mux.h> 40#include <mach/mux.h>
41#include <plat/dma.h> 41#include <plat/dma.h>
42#include <plat/tc.h> 42#include <plat/tc.h>
43#include <plat/irda.h> 43#include <plat/irda.h>
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 4733eb510bad..adc0373299ec 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -39,7 +39,7 @@
39#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 40#include <asm/mach/map.h>
41 41
42#include <plat/mux.h> 42#include <mach/mux.h>
43#include <plat/tc.h> 43#include <plat/tc.h>
44#include <linux/platform_data/keypad-omap.h> 44#include <linux/platform_data/keypad-omap.h>
45#include <plat/dma.h> 45#include <plat/dma.h>
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 083afa79dfb1..04a67230cc94 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -31,7 +31,7 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <plat/mux.h> 34#include <mach/mux.h>
35#include <plat/flash.h> 35#include <plat/flash.h>
36#include <plat/fpga.h> 36#include <plat/fpga.h>
37#include <plat/tc.h> 37#include <plat/tc.h>
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 7b9fc99e705e..7d5c06d6a52a 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -28,7 +28,7 @@
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30 30
31#include <plat/mux.h> 31#include <mach/mux.h>
32#include <plat/mmc.h> 32#include <plat/mmc.h>
33#include <plat/clock.h> 33#include <plat/clock.h>
34 34
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index c780a1b80c2a..3ef0bba65b61 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -47,7 +47,7 @@
47#include <asm/mach/map.h> 47#include <asm/mach/map.h>
48 48
49#include <plat/flash.h> 49#include <plat/flash.h>
50#include <plat/mux.h> 50#include <mach/mux.h>
51#include <plat/tc.h> 51#include <plat/tc.h>
52 52
53#include <mach/hardware.h> 53#include <mach/hardware.h>
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index e46f5c2ea63f..b633b386240e 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -35,7 +35,7 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <plat/flash.h> 37#include <plat/flash.h>
38#include <plat/mux.h> 38#include <mach/mux.h>
39#include <plat/tc.h> 39#include <plat/tc.h>
40#include <plat/dma.h> 40#include <plat/dma.h>
41#include <plat/irda.h> 41#include <plat/irda.h>
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index e1c842be749e..518b94dbeae1 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -35,7 +35,7 @@
35 35
36#include <plat/led.h> 36#include <plat/led.h>
37#include <plat/flash.h> 37#include <plat/flash.h>
38#include <plat/mux.h> 38#include <mach/mux.h>
39#include <plat/dma.h> 39#include <plat/dma.h>
40#include <plat/tc.h> 40#include <plat/tc.h>
41#include <plat/irda.h> 41#include <plat/irda.h>
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index a71b7f59b7c3..f4a615d61f69 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -37,7 +37,7 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38 38
39#include <plat/flash.h> 39#include <plat/flash.h>
40#include <plat/mux.h> 40#include <mach/mux.h>
41#include <plat/dma.h> 41#include <plat/dma.h>
42#include <plat/tc.h> 42#include <plat/tc.h>
43#include <plat/irda.h> 43#include <plat/irda.h>
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 87797025d6bb..cc38e36b3764 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -29,7 +29,7 @@
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30 30
31#include <plat/tc.h> 31#include <plat/tc.h>
32#include <plat/mux.h> 32#include <mach/mux.h>
33#include <plat/fpga.h> 33#include <plat/fpga.h>
34#include <plat/flash.h> 34#include <plat/flash.h>
35 35
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index a6a1ab638292..2fddf6f0b39a 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -35,7 +35,7 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <plat/flash.h> 37#include <plat/flash.h>
38#include <plat/mux.h> 38#include <mach/mux.h>
39#include <plat/dma.h> 39#include <plat/dma.h>
40#include <plat/irda.h> 40#include <plat/irda.h>
41#include <plat/tc.h> 41#include <plat/tc.h>
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 1668af3017de..bd7b3fc18a49 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -33,7 +33,7 @@
33 33
34#include <plat/board-voiceblue.h> 34#include <plat/board-voiceblue.h>
35#include <plat/flash.h> 35#include <plat/flash.h>
36#include <plat/mux.h> 36#include <mach/mux.h>
37#include <plat/tc.h> 37#include <plat/tc.h>
38 38
39#include <mach/hardware.h> 39#include <mach/hardware.h>
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 05fdbd992c77..0cc54dd553e3 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -20,7 +20,7 @@
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <plat/tc.h> 22#include <plat/tc.h>
23#include <plat/mux.h> 23#include <mach/mux.h>
24#include <plat/dma.h> 24#include <plat/dma.h>
25#include <plat/mmc.h> 25#include <plat/mmc.h>
26 26
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c
index 5446c9912641..a0551a6d7451 100644
--- a/arch/arm/mach-omap1/i2c.c
+++ b/arch/arm/mach-omap1/i2c.c
@@ -20,7 +20,7 @@
20 */ 20 */
21 21
22#include <plat/i2c.h> 22#include <plat/i2c.h>
23#include <plat/mux.h> 23#include <mach/mux.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25 25
26void __init omap1_i2c_mux_pins(int bus_id) 26void __init omap1_i2c_mux_pins(int bus_id)
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/mach-omap1/include/mach/mux.h
index 323948959200..323948959200 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/mach-omap1/include/mach/mux.h
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 6c95a59f0f16..6a5baab1f4cb 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -16,7 +16,7 @@
16#include <asm/tlb.h> 16#include <asm/tlb.h>
17#include <asm/mach/map.h> 17#include <asm/mach/map.h>
18 18
19#include <plat/mux.h> 19#include <mach/mux.h>
20#include <plat/tc.h> 20#include <plat/tc.h>
21#include <plat/dma.h> 21#include <plat/dma.h>
22 22
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index 7b1a3833165d..4071479f7106 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -11,7 +11,7 @@
11#include <asm/leds.h> 11#include <asm/leds.h>
12#include <asm/mach-types.h> 12#include <asm/mach-types.h>
13 13
14#include <plat/mux.h> 14#include <mach/mux.h>
15 15
16#include "leds.h" 16#include "leds.h"
17 17
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index cf2ed9ef1351..bdc2e7541adb 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -20,7 +20,7 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21 21
22#include <plat/dma.h> 22#include <plat/dma.h>
23#include <plat/mux.h> 23#include <mach/mux.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25#include <linux/platform_data/asoc-ti-mcbsp.h> 25#include <linux/platform_data/asoc-ti-mcbsp.h>
26 26
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index e9cc52d4cb28..667ce5027f63 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -29,7 +29,7 @@
29 29
30#include <mach/hardware.h> 30#include <mach/hardware.h>
31 31
32#include <plat/mux.h> 32#include <mach/mux.h>
33 33
34#ifdef CONFIG_OMAP_MUX 34#ifdef CONFIG_OMAP_MUX
35 35
@@ -451,6 +451,56 @@ static int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
451#endif 451#endif
452} 452}
453 453
454static struct omap_mux_cfg *mux_cfg;
455
456int __init omap_mux_register(struct omap_mux_cfg *arch_mux_cfg)
457{
458 if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0
459 || !arch_mux_cfg->cfg_reg) {
460 printk(KERN_ERR "Invalid pin table\n");
461 return -EINVAL;
462 }
463
464 mux_cfg = arch_mux_cfg;
465
466 return 0;
467}
468
469/*
470 * Sets the Omap MUX and PULL_DWN registers based on the table
471 */
472int __init_or_module omap_cfg_reg(const unsigned long index)
473{
474 struct pin_config *reg;
475
476 if (!cpu_class_is_omap1()) {
477 printk(KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n",
478 index);
479 WARN_ON(1);
480 return -EINVAL;
481 }
482
483 if (mux_cfg == NULL) {
484 printk(KERN_ERR "Pin mux table not initialized\n");
485 return -ENODEV;
486 }
487
488 if (index >= mux_cfg->size) {
489 printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n",
490 index, mux_cfg->size);
491 dump_stack();
492 return -ENODEV;
493 }
494
495 reg = &mux_cfg->pins[index];
496
497 if (!mux_cfg->cfg_reg)
498 return -ENODEV;
499
500 return mux_cfg->cfg_reg(reg);
501}
502EXPORT_SYMBOL(omap_cfg_reg);
503
454int __init omap1_mux_init(void) 504int __init omap1_mux_init(void)
455{ 505{
456 if (cpu_is_omap7xx()) { 506 if (cpu_is_omap7xx()) {
@@ -468,4 +518,8 @@ int __init omap1_mux_init(void)
468 return omap_mux_register(&arch_mux_cfg); 518 return omap_mux_register(&arch_mux_cfg);
469} 519}
470 520
471#endif 521#else
522#define omap_mux_init() do {} while(0)
523#define omap_cfg_reg(x) do {} while(0)
524#endif /* CONFIG_OMAP_MUX */
525
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index b2560d32b3a0..47ec16155483 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -53,7 +53,7 @@
53#include <plat/clock.h> 53#include <plat/clock.h>
54#include <plat/sram.h> 54#include <plat/sram.h>
55#include <plat/tc.h> 55#include <plat/tc.h>
56#include <plat/mux.h> 56#include <mach/mux.h>
57#include <plat/dma.h> 57#include <plat/dma.h>
58#include <plat/dmtimer.h> 58#include <plat/dmtimer.h>
59 59
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 0d1709b1a6fe..b9d6834af835 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -22,7 +22,7 @@
22 22
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24 24
25#include <plat/mux.h> 25#include <mach/mux.h>
26#include <plat/fpga.h> 26#include <plat/fpga.h>
27 27
28#include "pm.h" 28#include "pm.h"
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 65f88176fba8..84267edd9421 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -26,7 +26,7 @@
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28 28
29#include <plat/mux.h> 29#include <mach/mux.h>
30 30
31#include <mach/usb.h> 31#include <mach/usb.h>
32 32
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 8e43c4d885d5..17950c6e130b 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,7 +17,6 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/mux.h>
21#include <plat/clock.h> 20#include <plat/clock.h>
22 21
23#include "soc.h" 22#include "soc.h"
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 80399d740952..03ebf47cfa9a 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -19,7 +19,6 @@
19 19
20#include <plat/mmc.h> 20#include <plat/mmc.h>
21#include <plat/omap-pm.h> 21#include <plat/omap-pm.h>
22#include <plat/mux.h>
23#include <plat/omap_device.h> 22#include <plat/omap_device.h>
24 23
25#include "mux.h" 24#include "mux.h"
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index a017e994e006..dacaee009a4e 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := common.o sram.o clock.o dma.o mux.o fb.o counter_32k.o 6obj-y := common.o sram.o clock.o dma.o fb.o counter_32k.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 40bc06a7ac43..6013831a043e 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -32,7 +32,6 @@
32#include <linux/clk.h> 32#include <linux/clk.h>
33 33
34#include <mach/irqs.h> 34#include <mach/irqs.h>
35#include <plat/mux.h>
36#include <plat/i2c.h> 35#include <plat/i2c.h>
37#include <plat/omap-pm.h> 36#include <plat/omap-pm.h>
38#include <plat/omap_device.h> 37#include <plat/omap_device.h>
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index a531149823bb..b2eac60b6904 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -21,8 +21,6 @@
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/pm_qos.h> 22#include <linux/pm_qos.h>
23 23
24#include <plat/mux.h>
25
26#define DRIVER_NAME "omap_uart" 24#define DRIVER_NAME "omap_uart"
27 25
28/* 26/*
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
deleted file mode 100644
index fd0d3aad00ef..000000000000
--- a/arch/arm/plat-omap/mux.c
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * linux/arch/arm/plat-omap/mux.c
3 *
4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h
5 *
6 * Copyright (C) 2003 - 2008 Nokia Corporation
7 *
8 * Written by Tony Lindgren
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25#include <linux/module.h>
26#include <linux/init.h>
27#include <linux/kernel.h>
28#include <linux/io.h>
29#include <linux/spinlock.h>
30
31#include <asm/system.h>
32
33#include <plat/cpu.h>
34#include <plat/mux.h>
35
36#ifdef CONFIG_OMAP_MUX
37
38static struct omap_mux_cfg *mux_cfg;
39
40int __init omap_mux_register(struct omap_mux_cfg *arch_mux_cfg)
41{
42 if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0
43 || !arch_mux_cfg->cfg_reg) {
44 printk(KERN_ERR "Invalid pin table\n");
45 return -EINVAL;
46 }
47
48 mux_cfg = arch_mux_cfg;
49
50 return 0;
51}
52
53/*
54 * Sets the Omap MUX and PULL_DWN registers based on the table
55 */
56int __init_or_module omap_cfg_reg(const unsigned long index)
57{
58 struct pin_config *reg;
59
60 if (!cpu_class_is_omap1()) {
61 printk(KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n",
62 index);
63 WARN_ON(1);
64 return -EINVAL;
65 }
66
67 if (mux_cfg == NULL) {
68 printk(KERN_ERR "Pin mux table not initialized\n");
69 return -ENODEV;
70 }
71
72 if (index >= mux_cfg->size) {
73 printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n",
74 index, mux_cfg->size);
75 dump_stack();
76 return -ENODEV;
77 }
78
79 reg = &mux_cfg->pins[index];
80
81 if (!mux_cfg->cfg_reg)
82 return -ENODEV;
83
84 return mux_cfg->cfg_reg(reg);
85}
86EXPORT_SYMBOL(omap_cfg_reg);
87#else
88#define omap_mux_init() do {} while(0)
89#define omap_cfg_reg(x) do {} while(0)
90#endif /* CONFIG_OMAP_MUX */
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 87c0293a1eef..c6259a829544 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -36,7 +36,6 @@
36#include <plat/mmc.h> 36#include <plat/mmc.h>
37#include <asm/gpio.h> 37#include <asm/gpio.h>
38#include <plat/dma.h> 38#include <plat/dma.h>
39#include <plat/mux.h>
40#include <plat/fpga.h> 39#include <plat/fpga.h>
41 40
42#define OMAP_MMC_REG_CMD 0x00 41#define OMAP_MMC_REG_CMD 0x00
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 0ad06a3bd562..fa74efe82206 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -24,7 +24,7 @@
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/sizes.h> 25#include <asm/sizes.h>
26 26
27#include <plat/mux.h> 27#include <mach/mux.h>
28#include <plat/tc.h> 28#include <plat/tc.h>
29 29
30 30
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c
index a3996a1c6345..0a94d9dc9c31 100644
--- a/drivers/spi/spi-omap-uwire.c
+++ b/drivers/spi/spi-omap-uwire.c
@@ -52,7 +52,7 @@
52#include <asm/io.h> 52#include <asm/io.h>
53#include <asm/mach-types.h> 53#include <asm/mach-types.h>
54 54
55#include <plat/mux.h> 55#include <mach/mux.h>
56 56
57#include <mach/omap7xx.h> /* OMAP7XX_IO_CONF registers */ 57#include <mach/omap7xx.h> /* OMAP7XX_IO_CONF registers */
58 58
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index f8b2d91851f7..4531d03503c3 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -24,7 +24,7 @@
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26 26
27#include <plat/mux.h> 27#include <mach/mux.h>
28#include <plat/fpga.h> 28#include <plat/fpga.h>
29 29
30#include <mach/hardware.h> 30#include <mach/hardware.h>
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index b67b4bc596c1..89f0709f8935 100644
--- a/drivers/usb/musb/tusb6010_omap.c
+++ b/drivers/usb/musb/tusb6010_omap.c
@@ -17,7 +17,6 @@
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <plat/dma.h> 19#include <plat/dma.h>
20#include <plat/mux.h>
21 20
22#include "musb_core.h" 21#include "musb_core.h"
23#include "tusb6010.h" 22#include "tusb6010.h"
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index 7a88667742b6..81f1f9a0be8f 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -36,7 +36,7 @@
36#include <asm/irq.h> 36#include <asm/irq.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38 38
39#include <plat/mux.h> 39#include <mach/mux.h>
40 40
41#include <mach/usb.h> 41#include <mach/usb.h>
42 42
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c
index 92257ef19403..9a046a4c98f5 100644
--- a/drivers/video/backlight/omap1_bl.c
+++ b/drivers/video/backlight/omap1_bl.c
@@ -30,7 +30,7 @@
30#include <linux/platform_data/omap1_bl.h> 30#include <linux/platform_data/omap1_bl.h>
31 31
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <plat/mux.h> 33#include <mach/mux.h>
34 34
35#define OMAPBL_MAX_INTENSITY 0xff 35#define OMAPBL_MAX_INTENSITY 0xff
36 36
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index 5914220dfa9c..3aa62da89195 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -24,7 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25 25
26#include <asm/gpio.h> 26#include <asm/gpio.h>
27#include <plat/mux.h> 27#include <mach/mux.h>
28#include "omapfb.h" 28#include "omapfb.h"
29 29
30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)