diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-common.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-db5500.h | 28 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-db8500.h | 32 |
4 files changed, 53 insertions, 33 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index bf0b02414e5b..7c6cb4fa47a9 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -99,8 +99,11 @@ static void sdi0_configure(void) | |||
99 | gpio_direction_output(sdi0_vsel, 0); | 99 | gpio_direction_output(sdi0_vsel, 0); |
100 | gpio_direction_output(sdi0_en, 1); | 100 | gpio_direction_output(sdi0_en, 1); |
101 | 101 | ||
102 | /* Add the device */ | 102 | /* Add the device, force v2 to subrevision 1 */ |
103 | db8500_add_sdi0(&mop500_sdi0_data); | 103 | if (cpu_is_u8500v2()) |
104 | db8500_add_sdi0(&mop500_sdi0_data, 0x10480180); | ||
105 | else | ||
106 | db8500_add_sdi0(&mop500_sdi0_data, 0); | ||
104 | } | 107 | } |
105 | 108 | ||
106 | void mop500_sdi_tc35892_init(void) | 109 | void mop500_sdi_tc35892_init(void) |
@@ -188,13 +191,18 @@ static struct mmci_platform_data mop500_sdi4_data = { | |||
188 | 191 | ||
189 | void __init mop500_sdi_init(void) | 192 | void __init mop500_sdi_init(void) |
190 | { | 193 | { |
194 | u32 periphid = 0; | ||
195 | |||
196 | /* v2 has a new version of this block that need to be forced */ | ||
197 | if (cpu_is_u8500v2()) | ||
198 | periphid = 0x10480180; | ||
191 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ | 199 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ |
192 | if (!cpu_is_u8500v10()) | 200 | if (!cpu_is_u8500v10()) |
193 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | 201 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; |
194 | db8500_add_sdi2(&mop500_sdi2_data); | 202 | db8500_add_sdi2(&mop500_sdi2_data, periphid); |
195 | 203 | ||
196 | /* On-board eMMC */ | 204 | /* On-board eMMC */ |
197 | db8500_add_sdi4(&mop500_sdi4_data); | 205 | db8500_add_sdi4(&mop500_sdi4_data, periphid); |
198 | 206 | ||
199 | if (machine_is_hrefv60()) { | 207 | if (machine_is_hrefv60()) { |
200 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; | 208 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; |
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index c719b5a1d913..7825705033bf 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -28,18 +28,20 @@ dbx500_add_msp_spi(const char *name, resource_size_t base, int irq, | |||
28 | 28 | ||
29 | static inline struct amba_device * | 29 | static inline struct amba_device * |
30 | dbx500_add_spi(const char *name, resource_size_t base, int irq, | 30 | dbx500_add_spi(const char *name, resource_size_t base, int irq, |
31 | struct spi_master_cntlr *pdata) | 31 | struct spi_master_cntlr *pdata, |
32 | u32 periphid) | ||
32 | { | 33 | { |
33 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 34 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); |
34 | } | 35 | } |
35 | 36 | ||
36 | struct mmci_platform_data; | 37 | struct mmci_platform_data; |
37 | 38 | ||
38 | static inline struct amba_device * | 39 | static inline struct amba_device * |
39 | dbx500_add_sdi(const char *name, resource_size_t base, int irq, | 40 | dbx500_add_sdi(const char *name, resource_size_t base, int irq, |
40 | struct mmci_platform_data *pdata) | 41 | struct mmci_platform_data *pdata, |
42 | u32 periphid) | ||
41 | { | 43 | { |
42 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 44 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); |
43 | } | 45 | } |
44 | 46 | ||
45 | struct amba_pl011_data; | 47 | struct amba_pl011_data; |
diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h index 94627f7783b0..0c4bccd02b90 100644 --- a/arch/arm/mach-ux500/devices-db5500.h +++ b/arch/arm/mach-ux500/devices-db5500.h | |||
@@ -38,24 +38,34 @@ | |||
38 | ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) | 38 | ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) |
39 | 39 | ||
40 | #define db5500_add_sdi0(pdata) \ | 40 | #define db5500_add_sdi0(pdata) \ |
41 | dbx500_add_sdi("sdi0", U5500_SDI0_BASE, IRQ_DB5500_SDMMC0, pdata) | 41 | dbx500_add_sdi("sdi0", U5500_SDI0_BASE, IRQ_DB5500_SDMMC0, pdata, \ |
42 | 0x10480180) | ||
42 | #define db5500_add_sdi1(pdata) \ | 43 | #define db5500_add_sdi1(pdata) \ |
43 | dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata) | 44 | dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata, \ |
45 | 0x10480180) | ||
44 | #define db5500_add_sdi2(pdata) \ | 46 | #define db5500_add_sdi2(pdata) \ |
45 | dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata) | 47 | dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata \ |
48 | 0x10480180) | ||
46 | #define db5500_add_sdi3(pdata) \ | 49 | #define db5500_add_sdi3(pdata) \ |
47 | dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata) | 50 | dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata \ |
51 | 0x10480180) | ||
48 | #define db5500_add_sdi4(pdata) \ | 52 | #define db5500_add_sdi4(pdata) \ |
49 | dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata) | 53 | dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata \ |
54 | 0x10480180) | ||
50 | 55 | ||
56 | /* This one has a bad peripheral ID in the U5500 silicon */ | ||
51 | #define db5500_add_spi0(pdata) \ | 57 | #define db5500_add_spi0(pdata) \ |
52 | dbx500_add_spi("spi0", U5500_SPI0_BASE, IRQ_DB5500_SPI0, pdata) | 58 | dbx500_add_spi("spi0", U5500_SPI0_BASE, IRQ_DB5500_SPI0, pdata, \ |
59 | 0x10080023) | ||
53 | #define db5500_add_spi1(pdata) \ | 60 | #define db5500_add_spi1(pdata) \ |
54 | dbx500_add_spi("spi1", U5500_SPI1_BASE, IRQ_DB5500_SPI1, pdata) | 61 | dbx500_add_spi("spi1", U5500_SPI1_BASE, IRQ_DB5500_SPI1, pdata, \ |
62 | 0x10080023) | ||
55 | #define db5500_add_spi2(pdata) \ | 63 | #define db5500_add_spi2(pdata) \ |
56 | dbx500_add_spi("spi2", U5500_SPI2_BASE, IRQ_DB5500_SPI2, pdata) | 64 | dbx500_add_spi("spi2", U5500_SPI2_BASE, IRQ_DB5500_SPI2, pdata \ |
65 | 0x10080023) | ||
57 | #define db5500_add_spi3(pdata) \ | 66 | #define db5500_add_spi3(pdata) \ |
58 | dbx500_add_spi("spi3", U5500_SPI3_BASE, IRQ_DB5500_SPI3, pdata) | 67 | dbx500_add_spi("spi3", U5500_SPI3_BASE, IRQ_DB5500_SPI3, pdata \ |
68 | 0x10080023) | ||
59 | 69 | ||
60 | #define db5500_add_uart0(plat) \ | 70 | #define db5500_add_uart0(plat) \ |
61 | dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat) | 71 | dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat) |
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index e341ad083365..cbd4a9ae8109 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
@@ -64,18 +64,18 @@ db8500_add_ssp(const char *name, resource_size_t base, int irq, | |||
64 | #define db8500_add_usb(rx_cfg, tx_cfg) \ | 64 | #define db8500_add_usb(rx_cfg, tx_cfg) \ |
65 | ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) | 65 | ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) |
66 | 66 | ||
67 | #define db8500_add_sdi0(pdata) \ | 67 | #define db8500_add_sdi0(pdata, pid) \ |
68 | dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata) | 68 | dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata, pid) |
69 | #define db8500_add_sdi1(pdata) \ | 69 | #define db8500_add_sdi1(pdata, pid) \ |
70 | dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata) | 70 | dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata, pid) |
71 | #define db8500_add_sdi2(pdata) \ | 71 | #define db8500_add_sdi2(pdata, pid) \ |
72 | dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata) | 72 | dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata, pid) |
73 | #define db8500_add_sdi3(pdata) \ | 73 | #define db8500_add_sdi3(pdata, pid) \ |
74 | dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata) | 74 | dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata, pid) |
75 | #define db8500_add_sdi4(pdata) \ | 75 | #define db8500_add_sdi4(pdata, pid) \ |
76 | dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata) | 76 | dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata, pid) |
77 | #define db8500_add_sdi5(pdata) \ | 77 | #define db8500_add_sdi5(pdata, pid) \ |
78 | dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata) | 78 | dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata, pid) |
79 | 79 | ||
80 | #define db8500_add_ssp0(pdata) \ | 80 | #define db8500_add_ssp0(pdata) \ |
81 | db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) | 81 | db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) |
@@ -83,13 +83,13 @@ db8500_add_ssp(const char *name, resource_size_t base, int irq, | |||
83 | db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) | 83 | db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) |
84 | 84 | ||
85 | #define db8500_add_spi0(pdata) \ | 85 | #define db8500_add_spi0(pdata) \ |
86 | dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata) | 86 | dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata, 0) |
87 | #define db8500_add_spi1(pdata) \ | 87 | #define db8500_add_spi1(pdata) \ |
88 | dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata) | 88 | dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata, 0) |
89 | #define db8500_add_spi2(pdata) \ | 89 | #define db8500_add_spi2(pdata) \ |
90 | dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata) | 90 | dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata, 0) |
91 | #define db8500_add_spi3(pdata) \ | 91 | #define db8500_add_spi3(pdata) \ |
92 | dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata) | 92 | dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata, 0) |
93 | 93 | ||
94 | #define db8500_add_uart0(pdata) \ | 94 | #define db8500_add_uart0(pdata) \ |
95 | dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata) | 95 | dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata) |