diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2009-03-23 21:07:49 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-03-23 21:51:20 -0400 |
commit | b0b5aa3f4c17c6a21423b9728d701216ab2e1ff1 (patch) | |
tree | 7af51785fa8be881c8b3f00071a1ae2c8d46c741 /arch/arm/plat-omap | |
parent | 52176e70837d56cd238d6edc04cc403f1ffa86c6 (diff) |
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 <dbrownell@users.sourceforge.net>.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/mach/board.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/usb.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/usb.c | 25 |
3 files changed, 6 insertions, 22 deletions
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h index 4a0afd2366e8..50ea79a0efa2 100644 --- a/arch/arm/plat-omap/include/mach/board.h +++ b/arch/arm/plat-omap/include/mach/board.h | |||
@@ -17,7 +17,6 @@ | |||
17 | /* Different peripheral ids */ | 17 | /* Different peripheral ids */ |
18 | #define OMAP_TAG_CLOCK 0x4f01 | 18 | #define OMAP_TAG_CLOCK 0x4f01 |
19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 | 19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 |
20 | #define OMAP_TAG_USB 0x4f04 | ||
21 | #define OMAP_TAG_LCD 0x4f05 | 20 | #define OMAP_TAG_LCD 0x4f05 |
22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 | 21 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 |
23 | #define OMAP_TAG_UART 0x4f07 | 22 | #define OMAP_TAG_UART 0x4f07 |
diff --git a/arch/arm/plat-omap/include/mach/usb.h b/arch/arm/plat-omap/include/mach/usb.h index a56a610950c2..e033e51d4bad 100644 --- a/arch/arm/plat-omap/include/mach/usb.h +++ b/arch/arm/plat-omap/include/mach/usb.h | |||
@@ -29,6 +29,8 @@ | |||
29 | 29 | ||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void omap_usb_init(struct omap_usb_config *pdata); | ||
33 | |||
32 | /*-------------------------------------------------------------------------*/ | 34 | /*-------------------------------------------------------------------------*/ |
33 | 35 | ||
34 | /* | 36 | /* |
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index e278de6862ae..509f2ed99e21 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -729,30 +729,13 @@ static inline void omap_1510_usb_init(struct omap_usb_config *config) {} | |||
729 | 729 | ||
730 | /*-------------------------------------------------------------------------*/ | 730 | /*-------------------------------------------------------------------------*/ |
731 | 731 | ||
732 | static struct omap_usb_config platform_data; | 732 | void __init omap_usb_init(struct omap_usb_config *pdata) |
733 | |||
734 | static int __init | ||
735 | omap_usb_init(void) | ||
736 | { | 733 | { |
737 | const struct omap_usb_config *config; | ||
738 | |||
739 | config = omap_get_config(OMAP_TAG_USB, struct omap_usb_config); | ||
740 | if (config == NULL) { | ||
741 | printk(KERN_ERR "USB: No board-specific " | ||
742 | "platform config found\n"); | ||
743 | return -ENODEV; | ||
744 | } | ||
745 | platform_data = *config; | ||
746 | |||
747 | if (cpu_is_omap730() || cpu_is_omap16xx() || cpu_is_omap24xx()) | 734 | if (cpu_is_omap730() || cpu_is_omap16xx() || cpu_is_omap24xx()) |
748 | omap_otg_init(&platform_data); | 735 | omap_otg_init(pdata); |
749 | else if (cpu_is_omap15xx()) | 736 | else if (cpu_is_omap15xx()) |
750 | omap_1510_usb_init(&platform_data); | 737 | omap_1510_usb_init(pdata); |
751 | else { | 738 | else |
752 | printk(KERN_ERR "USB: No init for your chip yet\n"); | 739 | printk(KERN_ERR "USB: No init for your chip yet\n"); |
753 | return -ENODEV; | ||
754 | } | ||
755 | return 0; | ||
756 | } | 740 | } |
757 | 741 | ||
758 | subsys_initcall(omap_usb_init); | ||