omap2 fullspeed usb 2/2 (apollon)
Subsystems (3)
PATCH 1/1 omap2 fullspeed usb 2/2 (apollon)
[PATCH] USB device support on Apollon
Signed-off-by Kyungmin Park <[email protected]>
-----
Needs re-testing ... at this point only Apollon support is expected to behave.
arch/arm/mach-omap2/board-apollon.c +18 -3
@@ -234,6 +234,13 @@ static struct omap_mmc_config apollon_mm }, }; +static struct omap_usb_config apollon_usb_config__initdata = { + .register_dev =1 , + .hmc_mode =0x14 ,/* 0:dev 1:host1 2: disable */ + + .pins[0 ] =6 , +}; +static struct omap_lcd_config apollon_lcd_config__initdata = { .ctrl_name ="internal" , };
@@ -241,6 +248,7 @@ static struct omap_lcd_config apollon_lcstatic struct omap_board_config_kernel apollon_config[] = { {OMAP_TAG_UART , &apollon_uart_config }, {OMAP_TAG_MMC , &apollon_mmc_config }, + {OMAP_TAG_USB , &apollon_usb_config }, {OMAP_TAG_LCD , &apollon_lcd_config }, };
@@ -292,28 +300,35 @@ static void __init apollon_sw_init(void)omap_request_gpio (SW_DOWN_GPIO58 );omap_set_gpio_direction (SW_DOWN_GPIO58 ,1 ); -set_irq_type (OMAP_GPIO_IRQ (SW_ENTER_GPIO16 ),IRQT_RISING );if (request_irq (OMAP_GPIO_IRQ (SW_ENTER_GPIO16 ), &apollon_sw_interrupt,IRQF_SHARED ,"enter sw" , &apollon_sw_interrupt))return ; -set_irq_type (OMAP_GPIO_IRQ (SW_UP_GPIO17 ),IRQT_RISING );if (request_irq (OMAP_GPIO_IRQ (SW_UP_GPIO17 ), &apollon_sw_interrupt,IRQF_SHARED ,"up sw" , &apollon_sw_interrupt))return ; -set_irq_type (OMAP_GPIO_IRQ (SW_DOWN_GPIO58 ),IRQT_RISING );if (request_irq (OMAP_GPIO_IRQ (SW_DOWN_GPIO58 ), &apollon_sw_interrupt,IRQF_SHARED ,"down sw" , &apollon_sw_interrupt))return ; } +static void __init apollon_usb_init (void ) +{ +/* USB device */ +/* DEVICE_SUSPEND */ +omap_cfg_reg (P21_242X_GPIO12 ); +omap_set_gpio_direction (12 ,0 ); +omap_set_gpio_dataout (12 ,0 ); +} +static void __init omap_apollon_init (void ) {apollon_led_init ();apollon_sw_init ();apollon_flash_init (); +apollon_usb_init ();/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ );
[PATCH] USB device support on Apollon
Signed-off-by Kyungmin Park <[email protected]>
----
arch/arm/mach- renamed from arch/arm/mach-omap2/board-apollon.c +0 -0
omap2/board-apollon.c
index 99651b2..e1e2246 100644
arch/arm/mach-omap2/board-apollon.c +19 -0
@@ -235,6 +235,13 @@ static struct omap_mmc_config apollon_mm }, }; +static struct omap_usb_config apollon_usb_config__initdata = { + .register_dev =1 , + .hmc_mode =0x14 ,/* 0:dev 1:host1 2:disable */ + + .pins[0 ] =6 , +}; +static struct omap_lcd_config apollon_lcd_config__initdata = { .ctrl_name ="internal" , };
@@ -242,6 +249,7 @@ static struct omap_lcd_config apollon_lcstatic struct omap_board_config_kernel apollon_config[] = { {OMAP_TAG_UART , &apollon_uart_config }, {OMAP_TAG_MMC , &apollon_mmc_config }, + {OMAP_TAG_USB , &apollon_usb_config }, {OMAP_TAG_LCD , &apollon_lcd_config }, };
@@ -310,11 +318,22 @@ static void __init apollon_sw_init(void)return ; } +static void __init apollon_usb_init (void ) +{ +/* USB device */ +/* DEVICE_SUSPEND */ +omap_cfg_reg (P21_242X_GPIO12 ); +omap_request_gpio (12 ); +omap_set_gpio_direction (12 ,0 );/* OUT */ +omap_set_gpio_dataout (12 ,0 ); +} +static void __init omap_apollon_init (void ) {apollon_led_init ();apollon_sw_init ();apollon_flash_init (); +apollon_usb_init ();/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ );
Quoted 3 lines · Kyungmin Park
[PATCH] USB device support on Apollon
Signed-off-by Kyungmin Park <[email protected]>
So this is what I sent but without the set_irq_type() stuff that somehow got in, right?
Have you verified that it's stil behaving on your board?
- Dave
Quoted 53 lines
----
arch/arm/mach- renamed from arch/arm/mach-omap2/board-apollon.c +0
-0
omap2/board-apollon.c
index 99651b2..e1e2246 100644arch/arm/mach-omap2/board-apollon.c +19
-0@@ -235,6 +235,13 @@ static struct omap_mmc_config apollon_mm }, }; +static struct omap_usb_config apollon_usb_config__initdata = { + .register_dev =1 , + .hmc_mode =0x14 ,/* 0:dev 1:host1 2:disable */ + + .pins[0 ] =6 , +}; +static struct omap_lcd_config apollon_lcd_config__initdata = { .ctrl_name ="internal" , };@@ -242,6 +249,7 @@ static struct omap_lcd_config apollon_lcstatic struct omap_board_config_kernel apollon_config[] = { {OMAP_TAG_UART , &apollon_uart_config }, {OMAP_TAG_MMC , &apollon_mmc_config }, + {OMAP_TAG_USB , &apollon_usb_config }, {OMAP_TAG_LCD , &apollon_lcd_config }, };@@ -310,11 +318,22 @@ static void __init apollon_sw_init(void)return ; } +static void __init apollon_usb_init (void ) +{ +/* USB device */ +/* DEVICE_SUSPEND */ +omap_cfg_reg (P21_242X_GPIO12 ); +omap_request_gpio (12 ); +omap_set_gpio_direction (12 ,0 );/* OUT */ +omap_set_gpio_dataout (12 ,0 ); +} +static void __init omap_apollon_init (void ) {apollon_led_init ();apollon_sw_init ();apollon_flash_init (); +apollon_usb_init ();/* REVISIT: where's the correct place */ omap_cfg_reg (W19_24XX_SYS_NIRQ );
Tony Lindgren
maintainerQuoted 10 lines · David Brownell
Quoted 3 lines · Kyungmin Park
[PATCH] USB device support on Apollon
Signed-off-by Kyungmin Park <[email protected]>So this is what I sent but without the
set_irq_type()stuff that somehow got in, right?Have you verified that it's stil behaving on your board?
I've pushed it.
Tony