aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian-yousaf.kaukab@linaro.org>2011-01-21 12:21:50 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-14 09:05:12 -0400
commit6f3f3c3f0b5c7b84a99f0aa99658d6c6cee8e700 (patch)
treeb824d4bf0726929b2646a2e4b97d0f4840ef40c7 /arch/arm/mach-ux500
parent7f0709efe65a1a46f9b0affb6b5d27d31bae450a (diff)
mach-ux500: add MUSB to db8500 devices
- DMA tx and rx maps for usb channels are set to be configured at runtime - GPIO configurations for usb are added - MUSB is enabled with soc specific base address, irq and dma configurations Signed-off-by: Mian Yousaf Kaukab <mian-yousaf.kaukab@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c14
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c25
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c24
-rw-r--r--arch/arm/mach-ux500/devices-db8500.h3
4 files changed, 64 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index ffe3cf1451a8..5babce497415 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -83,6 +83,20 @@ static pin_cfg_t mop500_pins[] = {
83 83
84 /* touch screen */ 84 /* touch screen */
85 GPIO84_GPIO | PIN_INPUT_PULLUP, 85 GPIO84_GPIO | PIN_INPUT_PULLUP,
86
87 /* USB OTG */
88 GPIO256_USB_NXT | PIN_PULL_DOWN,
89 GPIO257_USB_STP | PIN_PULL_UP,
90 GPIO258_USB_XCLK | PIN_PULL_DOWN,
91 GPIO259_USB_DIR | PIN_PULL_DOWN,
92 GPIO260_USB_DAT7 | PIN_PULL_DOWN,
93 GPIO261_USB_DAT6 | PIN_PULL_DOWN,
94 GPIO262_USB_DAT5 | PIN_PULL_DOWN,
95 GPIO263_USB_DAT4 | PIN_PULL_DOWN,
96 GPIO264_USB_DAT3 | PIN_PULL_DOWN,
97 GPIO265_USB_DAT2 | PIN_PULL_DOWN,
98 GPIO266_USB_DAT1 | PIN_PULL_DOWN,
99 GPIO267_USB_DAT0 | PIN_PULL_DOWN,
86}; 100};
87 101
88static struct ab8500_platform_data ab8500_platdata = { 102static struct ab8500_platform_data ab8500_platdata = {
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 5c0fabf5fa01..516126cb357d 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -23,8 +23,10 @@
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/setup.h> 24#include <mach/setup.h>
25#include <mach/devices.h> 25#include <mach/devices.h>
26#include <mach/usb.h>
26 27
27#include "devices-db8500.h" 28#include "devices-db8500.h"
29#include "ste-dma40-db8500.h"
28 30
29/* minimum static i/o mapping required to boot U8500 platforms */ 31/* minimum static i/o mapping required to boot U8500 platforms */
30static struct map_desc u8500_uart_io_desc[] __initdata = { 32static struct map_desc u8500_uart_io_desc[] __initdata = {
@@ -154,6 +156,28 @@ static void __init db8500_add_gpios(void)
154 IRQ_DB8500_GPIO0, &pdata); 156 IRQ_DB8500_GPIO0, &pdata);
155} 157}
156 158
159static int usb_db8500_rx_dma_cfg[] = {
160 DB8500_DMA_DEV38_USB_OTG_IEP_1_9,
161 DB8500_DMA_DEV37_USB_OTG_IEP_2_10,
162 DB8500_DMA_DEV36_USB_OTG_IEP_3_11,
163 DB8500_DMA_DEV19_USB_OTG_IEP_4_12,
164 DB8500_DMA_DEV18_USB_OTG_IEP_5_13,
165 DB8500_DMA_DEV17_USB_OTG_IEP_6_14,
166 DB8500_DMA_DEV16_USB_OTG_IEP_7_15,
167 DB8500_DMA_DEV39_USB_OTG_IEP_8
168};
169
170static int usb_db8500_tx_dma_cfg[] = {
171 DB8500_DMA_DEV38_USB_OTG_OEP_1_9,
172 DB8500_DMA_DEV37_USB_OTG_OEP_2_10,
173 DB8500_DMA_DEV36_USB_OTG_OEP_3_11,
174 DB8500_DMA_DEV19_USB_OTG_OEP_4_12,
175 DB8500_DMA_DEV18_USB_OTG_OEP_5_13,
176 DB8500_DMA_DEV17_USB_OTG_OEP_6_14,
177 DB8500_DMA_DEV16_USB_OTG_OEP_7_15,
178 DB8500_DMA_DEV39_USB_OTG_OEP_8
179};
180
157/* 181/*
158 * This function is called from the board init 182 * This function is called from the board init
159 */ 183 */
@@ -164,6 +188,7 @@ void __init u8500_init_devices(void)
164 188
165 db8500_add_rtc(); 189 db8500_add_rtc();
166 db8500_add_gpios(); 190 db8500_add_gpios();
191 db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
167 192
168 platform_device_register_simple("cpufreq-u8500", -1, NULL, 0); 193 platform_device_register_simple("cpufreq-u8500", -1, NULL, 0);
169 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 194 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index 23c695d54977..f122d4ee3b2d 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -69,10 +69,30 @@ struct stedma40_chan_cfg dma40_memcpy_conf_log = {
69 * Mapping between destination event lines and physical device address. 69 * Mapping between destination event lines and physical device address.
70 * The event line is tied to a device and therefor the address is constant. 70 * The event line is tied to a device and therefor the address is constant.
71 */ 71 */
72static const dma_addr_t dma40_tx_map[DB8500_DMA_NR_DEV]; 72static const dma_addr_t dma40_tx_map[DB8500_DMA_NR_DEV] = {
73 /* MUSB - these will be runtime-reconfigured */
74 [DB8500_DMA_DEV39_USB_OTG_OEP_8] = -1,
75 [DB8500_DMA_DEV16_USB_OTG_OEP_7_15] = -1,
76 [DB8500_DMA_DEV17_USB_OTG_OEP_6_14] = -1,
77 [DB8500_DMA_DEV18_USB_OTG_OEP_5_13] = -1,
78 [DB8500_DMA_DEV19_USB_OTG_OEP_4_12] = -1,
79 [DB8500_DMA_DEV36_USB_OTG_OEP_3_11] = -1,
80 [DB8500_DMA_DEV37_USB_OTG_OEP_2_10] = -1,
81 [DB8500_DMA_DEV38_USB_OTG_OEP_1_9] = -1,
82};
73 83
74/* Mapping between source event lines and physical device address */ 84/* Mapping between source event lines and physical device address */
75static const dma_addr_t dma40_rx_map[DB8500_DMA_NR_DEV]; 85static const dma_addr_t dma40_rx_map[DB8500_DMA_NR_DEV] = {
86 /* MUSB - these will be runtime-reconfigured */
87 [DB8500_DMA_DEV39_USB_OTG_IEP_8] = -1,
88 [DB8500_DMA_DEV16_USB_OTG_IEP_7_15] = -1,
89 [DB8500_DMA_DEV17_USB_OTG_IEP_6_14] = -1,
90 [DB8500_DMA_DEV18_USB_OTG_IEP_5_13] = -1,
91 [DB8500_DMA_DEV19_USB_OTG_IEP_4_12] = -1,
92 [DB8500_DMA_DEV36_USB_OTG_IEP_3_11] = -1,
93 [DB8500_DMA_DEV37_USB_OTG_IEP_2_10] = -1,
94 [DB8500_DMA_DEV38_USB_OTG_IEP_1_9] = -1,
95};
76 96
77/* Reserved event lines for memcpy only */ 97/* Reserved event lines for memcpy only */
78static int dma40_memcpy_event[] = { 98static int dma40_memcpy_event[] = {
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index 3a770c756979..d1ea4bd03291 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -61,6 +61,9 @@ db8500_add_ssp(const char *name, resource_size_t base, int irq,
61#define db8500_add_rtc() \ 61#define db8500_add_rtc() \
62 dbx500_add_rtc(U8500_RTC_BASE, IRQ_DB8500_RTC); 62 dbx500_add_rtc(U8500_RTC_BASE, IRQ_DB8500_RTC);
63 63
64#define db8500_add_usb(rx_cfg, tx_cfg) \
65 ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg)
66
64#define db8500_add_sdi0(pdata) \ 67#define db8500_add_sdi0(pdata) \
65 dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata) 68 dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata)
66#define db8500_add_sdi1(pdata) \ 69#define db8500_add_sdi1(pdata) \