diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-11-18 04:48:22 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:22 -0500 |
commit | 3f37569044cb3d9ba4722710b84d018f573d4b0e (patch) | |
tree | 55bfdcc6bd8fafc235006e2e788a79eb40da2ea2 /arch/blackfin/mach-bf527 | |
parent | 5ff294fa00fd01ce905dbe0808dbdb10b80bb372 (diff) |
Blackfin arch: Enable ISP1760 USB Host Driver in platform device initialization code.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf527')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/cm_bf527.c | 59 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 59 |
2 files changed, 52 insertions, 66 deletions
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index 9ea440bbb13d..5797ac40fe2c 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -61,51 +61,40 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527"; | |||
61 | * Driver needs to know address, irq and flag pin. | 61 | * Driver needs to know address, irq and flag pin. |
62 | */ | 62 | */ |
63 | 63 | ||
64 | #define ISP1761_BASE 0x203C0000 | ||
65 | #define ISP1761_IRQ IRQ_PF7 | ||
66 | |||
67 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 64 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
68 | static struct resource bfin_isp1761_resources[] = { | 65 | #include <linux/usb/isp1760.h> |
66 | static struct resource bfin_isp1760_resources[] = { | ||
69 | [0] = { | 67 | [0] = { |
70 | .name = "isp1761-regs", | 68 | .start = 0x203C0000, |
71 | .start = ISP1761_BASE + 0x00000000, | 69 | .end = 0x203C0000 + 0x000fffff, |
72 | .end = ISP1761_BASE + 0x000fffff, | ||
73 | .flags = IORESOURCE_MEM, | 70 | .flags = IORESOURCE_MEM, |
74 | }, | 71 | }, |
75 | [1] = { | 72 | [1] = { |
76 | .start = ISP1761_IRQ, | 73 | .start = IRQ_PF7, |
77 | .end = ISP1761_IRQ, | 74 | .end = IRQ_PF7, |
78 | .flags = IORESOURCE_IRQ, | 75 | .flags = IORESOURCE_IRQ, |
79 | }, | 76 | }, |
80 | }; | 77 | }; |
81 | 78 | ||
82 | static struct platform_device bfin_isp1761_device = { | 79 | static struct isp1760_platform_data isp1760_priv = { |
83 | .name = "isp1761", | 80 | .is_isp1761 = 0, |
84 | .id = 0, | 81 | .port1_disable = 0, |
85 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 82 | .bus_width_16 = 1, |
86 | .resource = bfin_isp1761_resources, | 83 | .port1_otg = 0, |
84 | .analog_oc = 0, | ||
85 | .dack_polarity_high = 0, | ||
86 | .dreq_polarity_high = 0, | ||
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct platform_device *bfin_isp1761_devices[] = { | 89 | static struct platform_device bfin_isp1760_device = { |
90 | &bfin_isp1761_device, | 90 | .name = "isp1760-hcd", |
91 | .id = 0, | ||
92 | .dev = { | ||
93 | .platform_data = &isp1760_priv, | ||
94 | }, | ||
95 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
96 | .resource = bfin_isp1760_resources, | ||
91 | }; | 97 | }; |
92 | |||
93 | int __init bfin_isp1761_init(void) | ||
94 | { | ||
95 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
96 | |||
97 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
98 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
99 | |||
100 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
101 | } | ||
102 | |||
103 | void __exit bfin_isp1761_exit(void) | ||
104 | { | ||
105 | platform_device_unregister(&bfin_isp1761_device); | ||
106 | } | ||
107 | |||
108 | arch_initcall(bfin_isp1761_init); | ||
109 | #endif | 98 | #endif |
110 | 99 | ||
111 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 100 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
@@ -885,6 +874,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
885 | &isp1362_hcd_device, | 874 | &isp1362_hcd_device, |
886 | #endif | 875 | #endif |
887 | 876 | ||
877 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
878 | &bfin_isp1760_device, | ||
879 | #endif | ||
880 | |||
888 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 881 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
889 | &musb_device, | 882 | &musb_device, |
890 | #endif | 883 | #endif |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 8ee2b744e234..a2e7e4c13bba 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -60,51 +60,40 @@ const char bfin_board_name[] = "ADDS-BF527-EZKIT"; | |||
60 | * Driver needs to know address, irq and flag pin. | 60 | * Driver needs to know address, irq and flag pin. |
61 | */ | 61 | */ |
62 | 62 | ||
63 | #define ISP1761_BASE 0x203C0000 | ||
64 | #define ISP1761_IRQ IRQ_PF7 | ||
65 | |||
66 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | 63 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) |
67 | static struct resource bfin_isp1761_resources[] = { | 64 | #include <linux/usb/isp1760.h> |
65 | static struct resource bfin_isp1760_resources[] = { | ||
68 | [0] = { | 66 | [0] = { |
69 | .name = "isp1761-regs", | 67 | .start = 0x203C0000, |
70 | .start = ISP1761_BASE + 0x00000000, | 68 | .end = 0x203C0000 + 0x000fffff, |
71 | .end = ISP1761_BASE + 0x000fffff, | ||
72 | .flags = IORESOURCE_MEM, | 69 | .flags = IORESOURCE_MEM, |
73 | }, | 70 | }, |
74 | [1] = { | 71 | [1] = { |
75 | .start = ISP1761_IRQ, | 72 | .start = IRQ_PF7, |
76 | .end = ISP1761_IRQ, | 73 | .end = IRQ_PF7, |
77 | .flags = IORESOURCE_IRQ, | 74 | .flags = IORESOURCE_IRQ, |
78 | }, | 75 | }, |
79 | }; | 76 | }; |
80 | 77 | ||
81 | static struct platform_device bfin_isp1761_device = { | 78 | static struct isp1760_platform_data isp1760_priv = { |
82 | .name = "isp1761", | 79 | .is_isp1761 = 0, |
83 | .id = 0, | 80 | .port1_disable = 0, |
84 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | 81 | .bus_width_16 = 1, |
85 | .resource = bfin_isp1761_resources, | 82 | .port1_otg = 0, |
83 | .analog_oc = 0, | ||
84 | .dack_polarity_high = 0, | ||
85 | .dreq_polarity_high = 0, | ||
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct platform_device *bfin_isp1761_devices[] = { | 88 | static struct platform_device bfin_isp1760_device = { |
89 | &bfin_isp1761_device, | 89 | .name = "isp1760-hcd", |
90 | .id = 0, | ||
91 | .dev = { | ||
92 | .platform_data = &isp1760_priv, | ||
93 | }, | ||
94 | .num_resources = ARRAY_SIZE(bfin_isp1760_resources), | ||
95 | .resource = bfin_isp1760_resources, | ||
90 | }; | 96 | }; |
91 | |||
92 | int __init bfin_isp1761_init(void) | ||
93 | { | ||
94 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
95 | |||
96 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
97 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
98 | |||
99 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
100 | } | ||
101 | |||
102 | void __exit bfin_isp1761_exit(void) | ||
103 | { | ||
104 | platform_device_unregister(&bfin_isp1761_device); | ||
105 | } | ||
106 | |||
107 | arch_initcall(bfin_isp1761_init); | ||
108 | #endif | 97 | #endif |
109 | 98 | ||
110 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 99 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
@@ -944,6 +933,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
944 | &isp1362_hcd_device, | 933 | &isp1362_hcd_device, |
945 | #endif | 934 | #endif |
946 | 935 | ||
936 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
937 | &bfin_isp1760_device, | ||
938 | #endif | ||
939 | |||
947 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 940 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
948 | &musb_device, | 941 | &musb_device, |
949 | #endif | 942 | #endif |