From b5e8905bcd7a794b667f6d5eabcb036f25358fdb Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 5 Jul 2010 16:31:29 +0300 Subject: omap: Move omap2 FS USB platform init code into mach-omap2/usb-fs.c Move omap2 FS USB platform init code into mach-omap2/usb-fs.c. This will allow further work later on to use omap hwmod for initializing the device. Cc: David Brownell Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 0665f2c..54a231c 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -362,7 +362,7 @@ static void __init omap_h4_init(void) ARRAY_SIZE(h4_i2c_board_info)); platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); - omap_usb_init(&h4_usb_config); + omap2_usbfs_init(&h4_usb_config); omap_serial_init(); } -- cgit v1.1 From 23275d459e1b0afcc6bd6b5fe8aaca8a573d6d5a Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 5 Jul 2010 16:31:37 +0300 Subject: omap: mux: Select SIP package for H4 Select SIP package for H4 Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 54a231c..8c58f51 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -42,6 +42,8 @@ #include #include +#include "mux.h" + #define H4_FLASH_CS 0 #define H4_SMC91X_CS 1 @@ -338,8 +340,18 @@ static struct i2c_board_info __initdata h4_i2c_board_info[] = { }, }; +#ifdef CONFIG_OMAP_MUX +static struct omap_board_mux board_mux[] __initdata = { + { .reg_offset = OMAP_MUX_TERMINATOR }, +}; +#else +#define board_mux NULL +#endif + static void __init omap_h4_init(void) { + omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); + /* * Make sure the serial ports are muxed on at this point. * You have to mux them off in device drivers later on -- cgit v1.1 From 93c43f2561f18b50e3376be968d0688315afc44c Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 5 Jul 2010 16:31:39 +0300 Subject: omap: mux: Do keypad muxing in board-*.c files This way we get pin muxing out of plat-omap and can convert H4 to use the new mux functions. Note that it should be safe to assume we can mux all the keypad pins except on H4 which may have Menelaus connected. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 8c58f51..cdcd4fb 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -363,11 +363,28 @@ static void __init omap_h4_init(void) #endif #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) + omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP); + omap_mux_init_gpio(89, OMAP_PULL_ENA | OMAP_PULL_UP); + omap_mux_init_gpio(124, OMAP_PULL_ENA | OMAP_PULL_UP); + omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); if (omap_has_menelaus()) { + omap_mux_init_signal("sdrc_a14.gpio0", + OMAP_PULL_ENA | OMAP_PULL_UP); + omap_mux_init_signal("vlynq_rx0.gpio_15", 0); + omap_mux_init_signal("gpio_98", 0); row_gpios[5] = 0; col_gpios[2] = 15; col_gpios[6] = 18; + } else { + omap_mux_init_signal("gpio_96", OMAP_PULL_ENA | OMAP_PULL_UP); + omap_mux_init_signal("gpio_100", 0); + omap_mux_init_signal("gpio_98", 0); } + omap_mux_init_signal("gpio_90", 0); + omap_mux_init_signal("gpio_91", 0); + omap_mux_init_signal("gpio_36", 0); + omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0); + omap_mux_init_signal("gpio_97", 0); #endif i2c_register_board_info(1, h4_i2c_board_info, -- cgit v1.1 From f99bf16d70d8a33e5274e429f2b1d71457d06a06 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 5 Jul 2010 16:31:40 +0300 Subject: omap: mux: Convert 2420 platform init code to use new mux code Convert 2420 platform init code to use new mux code Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index cdcd4fb..2d9ff0f 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -33,7 +33,6 @@ #include #include -#include #include #include #include @@ -248,7 +247,7 @@ static inline void __init h4_init_debug(void) udelay(100); - omap_cfg_reg(M15_24XX_GPIO92); + omap_mux_init_gpio(92, 0); if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0) gpmc_cs_free(eth_cs); @@ -358,8 +357,8 @@ static void __init omap_h4_init(void) * if not needed. */ #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) - omap_cfg_reg(K15_24XX_UART3_TX); - omap_cfg_reg(K14_24XX_UART3_RX); + omap_mux_init_signal("uart3_tx_irtx.uart3_tx_irtx", 0); + omap_mux_init_signal("uart3_rx_irrx.uart3_rx_irrx", 0); #endif #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) -- cgit v1.1 From 4705c1ca8b7c7cca23d7e534c830e5d6ac914535 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Mon, 5 Jul 2010 16:31:53 +0300 Subject: Removing dead OMAP_IR OMAP_IR doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger [tony@atomide.com: updated for new mux code] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 2d9ff0f..9044dcf 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -356,10 +356,6 @@ static void __init omap_h4_init(void) * You have to mux them off in device drivers later on * if not needed. */ -#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) - omap_mux_init_signal("uart3_tx_irtx.uart3_tx_irtx", 0); - omap_mux_init_signal("uart3_rx_irrx.uart3_rx_irrx", 0); -#endif #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP); -- cgit v1.1 From 267ecec95f7d215d2da38252640b06198515acc3 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Mon, 5 Jul 2010 16:31:55 +0300 Subject: Removing dead MACH_OMAP_H4_OTG MACH_OMAP_H4_OTG doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 9044dcf..980ae03 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -278,22 +278,6 @@ static struct omap_usb_config h4_usb_config __initdata = { .pins[1] = 4, #endif -#ifdef CONFIG_MACH_OMAP_H4_OTG - /* S1.10 ON -- USB OTG port - * usb0 switched to Mini-AB port and isp1301 transceiver; - * S2.POS3 = OFF, S2.POS4 = ON ... to allow battery charging - */ - .otg = 1, - .pins[0] = 4, -#ifdef CONFIG_USB_GADGET_OMAP - /* use OTG cable, or standard A-to-MiniB */ - .hmc_mode = 0x14, /* 0:dev/otg 1:host 2:disable */ -#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) - /* use OTG cable, or NONSTANDARD (B-to-MiniB) */ - .hmc_mode = 0x11, /* 0:host 1:host 2:disable */ -#endif /* XX */ - -#else /* S1.10 OFF -- usb "download port" * usb0 switched to Mini-B port and isp1105 transceiver; * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging @@ -302,7 +286,6 @@ static struct omap_usb_config h4_usb_config __initdata = { .pins[0] = 3, /* .hmc_mode = 0x14,*/ /* 0:dev 1:host 2:disable */ .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ -#endif }; static struct omap_board_config_kernel h4_config[] = { -- cgit v1.1 From 847e951b99fc42056685c87d742851d2e6fbdead Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Mon, 5 Jul 2010 16:31:55 +0300 Subject: Removing dead MACH_OMAP2_H4_USB1 MACH_OMAP2_H4_USB1 doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/mach-omap2/board-h4.c') diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 980ae03..3240c6a 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -273,11 +273,6 @@ static struct omap_lcd_config h4_lcd_config __initdata = { }; static struct omap_usb_config h4_usb_config __initdata = { -#ifdef CONFIG_MACH_OMAP2_H4_USB1 - /* NOTE: usb1 could also be used with 3 wire signaling */ - .pins[1] = 4, -#endif - /* S1.10 OFF -- usb "download port" * usb0 switched to Mini-B port and isp1105 transceiver; * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging -- cgit v1.1