From 40662d77311d8de3a26c33f2fd5a2d4d810a4c8a Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 23 Mar 2009 18:07:36 -0700 Subject: ARM: OMAP: No need to include board-h4.h from hardware.h Move the defines to the associated board file and remove the now unnecessary header file. Also rename OMAP24XX_ETHR_GPIO_IRQ to H4_ETHR_GPIO_IRQ. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 4 +++- 1 file changed, 3 insertions(+), 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 5e9b146..7122697 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -47,6 +47,8 @@ #define H4_FLASH_CS 0 #define H4_SMC91X_CS 1 +#define H4_ETHR_GPIO_IRQ 92 + static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 }; static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 }; @@ -341,7 +343,7 @@ static inline void __init h4_init_debug(void) udelay(100); omap_cfg_reg(M15_24XX_GPIO92); - if (debug_card_init(cs_mem_base, OMAP24XX_ETHR_GPIO_IRQ) < 0) + if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0) gpmc_cs_free(eth_cs); out: -- cgit v1.1 From b0b5aa3f4c17c6a21423b9728d701216ab2e1ff1 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Mon, 23 Mar 2009 18:07:49 -0700 Subject: ARM: OMAP: get rid of OMAP_TAG_USB, v2 OMAP_TAGS should vanish soon since they're not generic arm tags. Most of them can be converted to a platform_data or parsed from a command line like e.g. serial tag. For OMAP_TAG_USB we just let boards call omap_usb_init() passing a pointer to omap_usb_config. Patch updated by Tony for mainline, basically make n770 and h4 compile. Also folded in a fix for OSK by David Brownell . Signed-off-by: Felipe Balbi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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 7122697..1343ceb 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -379,6 +379,39 @@ static struct omap_lcd_config h4_lcd_config __initdata = { .ctrl_name = "internal", }; +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 + +#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 + */ + .register_dev = 1, + .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[] = { { OMAP_TAG_UART, &h4_uart_config }, { OMAP_TAG_LCD, &h4_lcd_config }, @@ -430,6 +463,7 @@ static void __init omap_h4_init(void) platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); omap_board_config = h4_config; omap_board_config_size = ARRAY_SIZE(h4_config); + omap_usb_init(&h4_usb_config); omap_serial_init(); } -- cgit v1.1