aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/usb.c')
-rw-r--r--arch/arm/mach-ux500/usb.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
index 0a01cbdfe063..a74af389bc63 100644
--- a/arch/arm/mach-ux500/usb.c
+++ b/arch/arm/mach-ux500/usb.c
@@ -7,6 +7,7 @@
7#include <linux/platform_device.h> 7#include <linux/platform_device.h>
8#include <linux/usb/musb.h> 8#include <linux/usb/musb.h>
9#include <linux/dma-mapping.h> 9#include <linux/dma-mapping.h>
10
10#include <plat/ste_dma40.h> 11#include <plat/ste_dma40.h>
11#include <mach/hardware.h> 12#include <mach/hardware.h>
12#include <mach/usb.h> 13#include <mach/usb.h>
@@ -95,13 +96,7 @@ static struct musb_hdrc_config musb_hdrc_config = {
95}; 96};
96 97
97static struct musb_hdrc_platform_data musb_platform_data = { 98static struct musb_hdrc_platform_data musb_platform_data = {
98#if defined(CONFIG_USB_MUSB_OTG)
99 .mode = MUSB_OTG, 99 .mode = MUSB_OTG,
100#elif defined(CONFIG_USB_MUSB_PERIPHERAL)
101 .mode = MUSB_PERIPHERAL,
102#else /* defined(CONFIG_USB_MUSB_HOST) */
103 .mode = MUSB_HOST,
104#endif
105 .config = &musb_hdrc_config, 100 .config = &musb_hdrc_config,
106 .board_data = &musb_board_data, 101 .board_data = &musb_board_data,
107}; 102};
@@ -146,8 +141,8 @@ static inline void ux500_usb_dma_update_tx_ch_config(int *dst_dev_type)
146 musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx]; 141 musb_dma_tx_ch[idx].dst_dev_type = dst_dev_type[idx];
147} 142}
148 143
149void ux500_add_usb(resource_size_t base, int irq, int *dma_rx_cfg, 144void ux500_add_usb(struct device *parent, resource_size_t base, int irq,
150 int *dma_tx_cfg) 145 int *dma_rx_cfg, int *dma_tx_cfg)
151{ 146{
152 ux500_musb_device.resource[0].start = base; 147 ux500_musb_device.resource[0].start = base;
153 ux500_musb_device.resource[0].end = base + SZ_64K - 1; 148 ux500_musb_device.resource[0].end = base + SZ_64K - 1;
@@ -157,5 +152,7 @@ void ux500_add_usb(resource_size_t base, int irq, int *dma_rx_cfg,
157 ux500_usb_dma_update_rx_ch_config(dma_rx_cfg); 152 ux500_usb_dma_update_rx_ch_config(dma_rx_cfg);
158 ux500_usb_dma_update_tx_ch_config(dma_tx_cfg); 153 ux500_usb_dma_update_tx_ch_config(dma_tx_cfg);
159 154
155 ux500_musb_device.dev.parent = parent;
156
160 platform_device_register(&ux500_musb_device); 157 platform_device_register(&ux500_musb_device);
161} 158}