aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-apollon.c13
-rw-r--r--arch/arm/mach-omap2/board-h4.c7
-rw-r--r--arch/arm/mach-omap2/devices.c25
-rw-r--r--arch/arm/mach-omap2/i2c.c27
-rw-r--r--arch/arm/mach-omap2/mcbsp.c13
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c14
6 files changed, 42 insertions, 57 deletions
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index bc67026088f6..8cea6235b4be 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -35,7 +35,6 @@
35 35
36#include <mach/gpio.h> 36#include <mach/gpio.h>
37#include <plat/led.h> 37#include <plat/led.h>
38#include <plat/mux.h>
39#include <plat/usb.h> 38#include <plat/usb.h>
40#include <plat/board.h> 39#include <plat/board.h>
41#include <plat/common.h> 40#include <plat/common.h>
@@ -246,7 +245,7 @@ static inline void __init apollon_init_smc91x(void)
246 apollon_smc91x_resources[0].end = base + 0x30f; 245 apollon_smc91x_resources[0].end = base + 0x30f;
247 udelay(100); 246 udelay(100);
248 247
249 omap_cfg_reg(W4__24XX_GPIO74); 248 omap_mux_init_gpio(74, 0);
250 if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { 249 if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) {
251 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 250 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
252 APOLLON_ETHR_GPIO_IRQ); 251 APOLLON_ETHR_GPIO_IRQ);
@@ -288,15 +287,15 @@ static void __init omap_apollon_init_irq(void)
288static void __init apollon_led_init(void) 287static void __init apollon_led_init(void)
289{ 288{
290 /* LED0 - AA10 */ 289 /* LED0 - AA10 */
291 omap_cfg_reg(AA10_242X_GPIO13); 290 omap_mux_init_signal("vlynq_clk.gpio_13", 0);
292 gpio_request(LED0_GPIO13, "LED0"); 291 gpio_request(LED0_GPIO13, "LED0");
293 gpio_direction_output(LED0_GPIO13, 0); 292 gpio_direction_output(LED0_GPIO13, 0);
294 /* LED1 - AA6 */ 293 /* LED1 - AA6 */
295 omap_cfg_reg(AA6_242X_GPIO14); 294 omap_mux_init_signal("vlynq_rx1.gpio_14", 0);
296 gpio_request(LED1_GPIO14, "LED1"); 295 gpio_request(LED1_GPIO14, "LED1");
297 gpio_direction_output(LED1_GPIO14, 0); 296 gpio_direction_output(LED1_GPIO14, 0);
298 /* LED2 - AA4 */ 297 /* LED2 - AA4 */
299 omap_cfg_reg(AA4_242X_GPIO15); 298 omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
300 gpio_request(LED2_GPIO15, "LED2"); 299 gpio_request(LED2_GPIO15, "LED2");
301 gpio_direction_output(LED2_GPIO15, 0); 300 gpio_direction_output(LED2_GPIO15, 0);
302} 301}
@@ -305,7 +304,7 @@ static void __init apollon_usb_init(void)
305{ 304{
306 /* USB device */ 305 /* USB device */
307 /* DEVICE_SUSPEND */ 306 /* DEVICE_SUSPEND */
308 omap_cfg_reg(P21_242X_GPIO12); 307 omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
309 gpio_request(12, "USB suspend"); 308 gpio_request(12, "USB suspend");
310 gpio_direction_output(12, 0); 309 gpio_direction_output(12, 0);
311 omap2_usbfs_init(&apollon_usb_config); 310 omap2_usbfs_init(&apollon_usb_config);
@@ -330,7 +329,7 @@ static void __init omap_apollon_init(void)
330 apollon_usb_init(); 329 apollon_usb_init();
331 330
332 /* REVISIT: where's the correct place */ 331 /* REVISIT: where's the correct place */
333 omap_cfg_reg(W19_24XX_SYS_NIRQ); 332 omap_mux_init_signal("sys_nirq", OMAP_PULL_ENA | OMAP_PULL_UP);
334 333
335 /* LCD PWR_EN */ 334 /* LCD PWR_EN */
336 omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); 335 omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP);
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index cdcd4fbad153..2d9ff0fa2828 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -33,7 +33,6 @@
33 33
34#include <plat/control.h> 34#include <plat/control.h>
35#include <mach/gpio.h> 35#include <mach/gpio.h>
36#include <plat/mux.h>
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <plat/board.h> 37#include <plat/board.h>
39#include <plat/common.h> 38#include <plat/common.h>
@@ -248,7 +247,7 @@ static inline void __init h4_init_debug(void)
248 247
249 udelay(100); 248 udelay(100);
250 249
251 omap_cfg_reg(M15_24XX_GPIO92); 250 omap_mux_init_gpio(92, 0);
252 if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0) 251 if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0)
253 gpmc_cs_free(eth_cs); 252 gpmc_cs_free(eth_cs);
254 253
@@ -358,8 +357,8 @@ static void __init omap_h4_init(void)
358 * if not needed. 357 * if not needed.
359 */ 358 */
360#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) 359#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
361 omap_cfg_reg(K15_24XX_UART3_TX); 360 omap_mux_init_signal("uart3_tx_irtx.uart3_tx_irtx", 0);
362 omap_cfg_reg(K14_24XX_UART3_RX); 361 omap_mux_init_signal("uart3_rx_irrx.uart3_rx_irrx", 0);
363#endif 362#endif
364 363
365#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) 364#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 03e6c9ed82a4..3ae9d0a477b6 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -25,7 +25,6 @@
25#include <plat/control.h> 25#include <plat/control.h>
26#include <plat/tc.h> 26#include <plat/tc.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/mux.h>
29#include <mach/gpio.h> 28#include <mach/gpio.h>
30#include <plat/mmc.h> 29#include <plat/mmc.h>
31#include <plat/dma.h> 30#include <plat/dma.h>
@@ -672,19 +671,19 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
672 OMAP_PIN_INPUT_PULLUP); 671 OMAP_PIN_INPUT_PULLUP);
673 672
674 if (cpu_is_omap2420() && controller_nr == 0) { 673 if (cpu_is_omap2420() && controller_nr == 0) {
675 omap_cfg_reg(H18_24XX_MMC_CMD); 674 omap_mux_init_signal("sdmmc_cmd", 0);
676 omap_cfg_reg(H15_24XX_MMC_CLKI); 675 omap_mux_init_signal("sdmmc_clki", 0);
677 omap_cfg_reg(G19_24XX_MMC_CLKO); 676 omap_mux_init_signal("sdmmc_clko", 0);
678 omap_cfg_reg(F20_24XX_MMC_DAT0); 677 omap_mux_init_signal("sdmmc_dat0", 0);
679 omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); 678 omap_mux_init_signal("sdmmc_dat_dir0", 0);
680 omap_cfg_reg(G18_24XX_MMC_CMD_DIR); 679 omap_mux_init_signal("sdmmc_cmd_dir", 0);
681 if (mmc_controller->slots[0].wires == 4) { 680 if (mmc_controller->slots[0].wires == 4) {
682 omap_cfg_reg(H14_24XX_MMC_DAT1); 681 omap_mux_init_signal("sdmmc_dat1", 0);
683 omap_cfg_reg(E19_24XX_MMC_DAT2); 682 omap_mux_init_signal("sdmmc_dat2", 0);
684 omap_cfg_reg(D19_24XX_MMC_DAT3); 683 omap_mux_init_signal("sdmmc_dat3", 0);
685 omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); 684 omap_mux_init_signal("sdmmc_dat_dir1", 0);
686 omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); 685 omap_mux_init_signal("sdmmc_dat_dir2", 0);
687 omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); 686 omap_mux_init_signal("sdmmc_dat_dir3", 0);
688 } 687 }
689 688
690 /* 689 /*
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index 7951ae1447ee..79c478c4cb1c 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -21,32 +21,19 @@
21 21
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23#include <plat/i2c.h> 23#include <plat/i2c.h>
24#include <plat/mux.h>
25 24
26#include "mux.h" 25#include "mux.h"
27 26
28void __init omap2_i2c_mux_pins(int bus_id) 27void __init omap2_i2c_mux_pins(int bus_id)
29{ 28{
30 if (cpu_is_omap24xx()) { 29 char mux_name[sizeof("i2c2_scl.i2c2_scl")];
31 const int omap24xx_pins[][2] = {
32 { M19_24XX_I2C1_SCL, L15_24XX_I2C1_SDA },
33 { J15_24XX_I2C2_SCL, H19_24XX_I2C2_SDA },
34 };
35 int scl, sda;
36
37 scl = omap24xx_pins[bus_id - 1][0];
38 sda = omap24xx_pins[bus_id - 1][1];
39 omap_cfg_reg(sda);
40 omap_cfg_reg(scl);
41 }
42 30
43 /* First I2C bus is not muxable */ 31 /* First I2C bus is not muxable */
44 if (cpu_is_omap34xx() && bus_id > 1) { 32 if (bus_id == 1)
45 char mux_name[sizeof("i2c2_scl.i2c2_scl")]; 33 return;
46 34
47 sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id); 35 sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id);
48 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); 36 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
49 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id); 37 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
50 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); 38 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
51 }
52} 39}
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index c29337074ad3..87aa4c9597cc 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -20,17 +20,18 @@
20 20
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <plat/dma.h> 22#include <plat/dma.h>
23#include <plat/mux.h>
24#include <plat/cpu.h> 23#include <plat/cpu.h>
25#include <plat/mcbsp.h> 24#include <plat/mcbsp.h>
26 25
26#include "mux.h"
27
27static void omap2_mcbsp2_mux_setup(void) 28static void omap2_mcbsp2_mux_setup(void)
28{ 29{
29 omap_cfg_reg(Y15_24XX_MCBSP2_CLKX); 30 omap_mux_init_signal("eac_ac_sclk.mcbsp2_clkx", OMAP_PULL_ENA);
30 omap_cfg_reg(R14_24XX_MCBSP2_FSX); 31 omap_mux_init_signal("eac_ac_fs.mcbsp2_fsx", OMAP_PULL_ENA);
31 omap_cfg_reg(W15_24XX_MCBSP2_DR); 32 omap_mux_init_signal("eac_ac_din.mcbsp2_dr", OMAP_PULL_ENA);
32 omap_cfg_reg(V15_24XX_MCBSP2_DX); 33 omap_mux_init_signal("eac_ac_dout.mcbsp2_dx", OMAP_PULL_ENA);
33 omap_cfg_reg(V14_24XX_GPIO117); 34 omap_mux_init_gpio(117, OMAP_PULL_ENA);
34 /* 35 /*
35 * TODO: Need to add MUX settings for OMAP 2430 SDP 36 * TODO: Need to add MUX settings for OMAP 2430 SDP
36 */ 37 */
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 10a2013c1104..64a0112b70a5 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -17,8 +17,8 @@
17#include <linux/usb/musb.h> 17#include <linux/usb/musb.h>
18 18
19#include <plat/gpmc.h> 19#include <plat/gpmc.h>
20#include <plat/mux.h>
21 20
21#include "mux.h"
22 22
23static u8 async_cs, sync_cs; 23static u8 async_cs, sync_cs;
24static unsigned refclk_psec; 24static unsigned refclk_psec;
@@ -325,17 +325,17 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
325 else { 325 else {
326 /* assume OMAP 2420 ES2.0 and later */ 326 /* assume OMAP 2420 ES2.0 and later */
327 if (dmachan & (1 << 0)) 327 if (dmachan & (1 << 0))
328 omap_cfg_reg(AA10_242X_DMAREQ0); 328 omap_mux_init_signal("sys_ndmareq0", 0);
329 if (dmachan & (1 << 1)) 329 if (dmachan & (1 << 1))
330 omap_cfg_reg(AA6_242X_DMAREQ1); 330 omap_mux_init_signal("sys_ndmareq1", 0);
331 if (dmachan & (1 << 2)) 331 if (dmachan & (1 << 2))
332 omap_cfg_reg(E4_242X_DMAREQ2); 332 omap_mux_init_signal("sys_ndmareq2", 0);
333 if (dmachan & (1 << 3)) 333 if (dmachan & (1 << 3))
334 omap_cfg_reg(G4_242X_DMAREQ3); 334 omap_mux_init_signal("sys_ndmareq3", 0);
335 if (dmachan & (1 << 4)) 335 if (dmachan & (1 << 4))
336 omap_cfg_reg(D3_242X_DMAREQ4); 336 omap_mux_init_signal("sys_ndmareq4", 0);
337 if (dmachan & (1 << 5)) 337 if (dmachan & (1 << 5))
338 omap_cfg_reg(E3_242X_DMAREQ5); 338 omap_mux_init_signal("sys_ndmareq5", 0);
339 } 339 }
340 340
341 /* so far so good ... register the device */ 341 /* so far so good ... register the device */