diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:38:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:38:51 -0500 |
commit | 5ede3ceb7b2c2843e153a1803edbdc8c56655950 (patch) | |
tree | 4cfa82b619f7d39b671e4a2a213f4d040b09c486 /arch/arm/mach-ux500 | |
parent | 6d889d03ab1417645e76e129834f76204bae37c0 (diff) | |
parent | 3e2762c8f1141ae8dc708034ea41d6827818c328 (diff) |
Merge tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
New feature development
This adds support for new features, and contains stuff from most
platforms. A number of these patches could have fit into other
branches, too, but were small enough not to cause too much
confusion here.
* tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
mfd/db8500-prcmu: remove support for early silicon revisions
ARM: ux500: fix the smp_twd clock calculation
ARM: ux500: remove support for early silicon revisions
ARM: ux500: update register files
ARM: ux500: register DB5500 PMU dynamically
ARM: ux500: update ASIC detection for U5500
ARM: ux500: support DB8520
ARM: picoxcell: implement watchdog restart
ARM: OMAP3+: hwmod data: Add the default clockactivity for I2C
ARM: OMAP3: hwmod data: disable multiblock reads on MMC1/2 on OMAP34xx/35xx <= ES2.1
ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP4
ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP3
ARM: OMAP: hwmod data: Add support for AM35xx UART4/ttyO3
ARM: Orion: Remove address map info from all platform data structures
ARM: Orion: Get address map from plat-orion instead of via platform_data
ARM: Orion: mbus_dram_info consolidation
ARM: Orion: Consolidate the address map setup
ARM: Kirkwood: Add configuration for MPP12 as GPIO
ARM: Kirkwood: Recognize A1 revision of 6282 chip
ARM: ux500: update the MOP500 GPIO assignments
...
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-sdi.c | 88 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.h | 63 | ||||
-rw-r--r-- | arch/arm/mach-ux500/clock.c | 207 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-ux500/devices-db8500.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-ux500/id.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/db5500-regs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/db8500-regs.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/devices.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/hardware.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/id.h | 24 |
13 files changed, 223 insertions, 284 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 6826faeecc68..23be34b3bb6e 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -22,6 +22,12 @@ | |||
22 | #include "ste-dma40-db8500.h" | 22 | #include "ste-dma40-db8500.h" |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * v2 has a new version of this block that need to be forced, the number found | ||
26 | * in hardware is incorrect | ||
27 | */ | ||
28 | #define U8500_SDI_V2_PERIPHID 0x10480180 | ||
29 | |||
30 | /* | ||
25 | * SDI 0 (MicroSD slot) | 31 | * SDI 0 (MicroSD slot) |
26 | */ | 32 | */ |
27 | 33 | ||
@@ -117,10 +123,7 @@ static void sdi0_configure(void) | |||
117 | gpio_direction_output(sdi0_en, 1); | 123 | gpio_direction_output(sdi0_en, 1); |
118 | 124 | ||
119 | /* Add the device, force v2 to subrevision 1 */ | 125 | /* Add the device, force v2 to subrevision 1 */ |
120 | if (cpu_is_u8500v2()) | 126 | db8500_add_sdi0(&mop500_sdi0_data, U8500_SDI_V2_PERIPHID); |
121 | db8500_add_sdi0(&mop500_sdi0_data, 0x10480180); | ||
122 | else | ||
123 | db8500_add_sdi0(&mop500_sdi0_data, 0); | ||
124 | } | 127 | } |
125 | 128 | ||
126 | void mop500_sdi_tc35892_init(void) | 129 | void mop500_sdi_tc35892_init(void) |
@@ -132,6 +135,42 @@ void mop500_sdi_tc35892_init(void) | |||
132 | } | 135 | } |
133 | 136 | ||
134 | /* | 137 | /* |
138 | * SDI1 (SDIO WLAN) | ||
139 | */ | ||
140 | #ifdef CONFIG_STE_DMA40 | ||
141 | static struct stedma40_chan_cfg sdi1_dma_cfg_rx = { | ||
142 | .mode = STEDMA40_MODE_LOGICAL, | ||
143 | .dir = STEDMA40_PERIPH_TO_MEM, | ||
144 | .src_dev_type = DB8500_DMA_DEV32_SD_MM1_RX, | ||
145 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, | ||
146 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
147 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
148 | }; | ||
149 | |||
150 | static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { | ||
151 | .mode = STEDMA40_MODE_LOGICAL, | ||
152 | .dir = STEDMA40_MEM_TO_PERIPH, | ||
153 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, | ||
154 | .dst_dev_type = DB8500_DMA_DEV32_SD_MM1_TX, | ||
155 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
156 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
157 | }; | ||
158 | #endif | ||
159 | |||
160 | static struct mmci_platform_data mop500_sdi1_data = { | ||
161 | .ocr_mask = MMC_VDD_29_30, | ||
162 | .f_max = 50000000, | ||
163 | .capabilities = MMC_CAP_4_BIT_DATA, | ||
164 | .gpio_cd = -1, | ||
165 | .gpio_wp = -1, | ||
166 | #ifdef CONFIG_STE_DMA40 | ||
167 | .dma_filter = stedma40_filter, | ||
168 | .dma_rx_param = &sdi1_dma_cfg_rx, | ||
169 | .dma_tx_param = &sdi1_dma_cfg_tx, | ||
170 | #endif | ||
171 | }; | ||
172 | |||
173 | /* | ||
135 | * SDI 2 (POP eMMC, not on DB8500ed) | 174 | * SDI 2 (POP eMMC, not on DB8500ed) |
136 | */ | 175 | */ |
137 | 176 | ||
@@ -158,7 +197,8 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { | |||
158 | static struct mmci_platform_data mop500_sdi2_data = { | 197 | static struct mmci_platform_data mop500_sdi2_data = { |
159 | .ocr_mask = MMC_VDD_165_195, | 198 | .ocr_mask = MMC_VDD_165_195, |
160 | .f_max = 50000000, | 199 | .f_max = 50000000, |
161 | .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | 200 | .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | |
201 | MMC_CAP_MMC_HIGHSPEED, | ||
162 | .gpio_cd = -1, | 202 | .gpio_cd = -1, |
163 | .gpio_wp = -1, | 203 | .gpio_wp = -1, |
164 | #ifdef CONFIG_STE_DMA40 | 204 | #ifdef CONFIG_STE_DMA40 |
@@ -208,20 +248,10 @@ static struct mmci_platform_data mop500_sdi4_data = { | |||
208 | 248 | ||
209 | void __init mop500_sdi_init(void) | 249 | void __init mop500_sdi_init(void) |
210 | { | 250 | { |
211 | u32 periphid = 0; | 251 | /* PoP:ed eMMC */ |
212 | 252 | db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID); | |
213 | /* v2 has a new version of this block that need to be forced */ | ||
214 | if (cpu_is_u8500v2()) | ||
215 | periphid = 0x10480180; | ||
216 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ | ||
217 | if (!cpu_is_u8500v10()) | ||
218 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | ||
219 | |||
220 | db8500_add_sdi2(&mop500_sdi2_data, periphid); | ||
221 | |||
222 | /* On-board eMMC */ | 253 | /* On-board eMMC */ |
223 | db8500_add_sdi4(&mop500_sdi4_data, periphid); | 254 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
224 | |||
225 | /* | 255 | /* |
226 | * On boards with the TC35892 GPIO expander, sdi0 will finally | 256 | * On boards with the TC35892 GPIO expander, sdi0 will finally |
227 | * be added when the TC35892 initializes and calls | 257 | * be added when the TC35892 initializes and calls |
@@ -231,13 +261,9 @@ void __init mop500_sdi_init(void) | |||
231 | 261 | ||
232 | void __init snowball_sdi_init(void) | 262 | void __init snowball_sdi_init(void) |
233 | { | 263 | { |
234 | u32 periphid = 0x10480180; | ||
235 | |||
236 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | ||
237 | |||
238 | /* On-board eMMC */ | 264 | /* On-board eMMC */ |
239 | db8500_add_sdi4(&mop500_sdi4_data, periphid); | 265 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
240 | 266 | /* External Micro SD slot */ | |
241 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; | 267 | mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO; |
242 | mop500_sdi0_data.cd_invert = true; | 268 | mop500_sdi0_data.cd_invert = true; |
243 | sdi0_en = SNOWBALL_SDMMC_EN_GPIO; | 269 | sdi0_en = SNOWBALL_SDMMC_EN_GPIO; |
@@ -247,17 +273,15 @@ void __init snowball_sdi_init(void) | |||
247 | 273 | ||
248 | void __init hrefv60_sdi_init(void) | 274 | void __init hrefv60_sdi_init(void) |
249 | { | 275 | { |
250 | u32 periphid = 0x10480180; | 276 | /* PoP:ed eMMC */ |
251 | 277 | db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID); | |
252 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | ||
253 | |||
254 | db8500_add_sdi2(&mop500_sdi2_data, periphid); | ||
255 | |||
256 | /* On-board eMMC */ | 278 | /* On-board eMMC */ |
257 | db8500_add_sdi4(&mop500_sdi4_data, periphid); | 279 | db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID); |
258 | 280 | /* External Micro SD slot */ | |
259 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; | 281 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; |
260 | sdi0_en = HREFV60_SDMMC_EN_GPIO; | 282 | sdi0_en = HREFV60_SDMMC_EN_GPIO; |
261 | sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; | 283 | sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; |
262 | sdi0_configure(); | 284 | sdi0_configure(); |
285 | /* WLAN SDIO channel */ | ||
286 | db8500_add_sdi1(&mop500_sdi1_data, U8500_SDI_V2_PERIPHID); | ||
263 | } | 287 | } |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index de1f5f8f7330..9361a5290177 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -673,7 +673,7 @@ static void __init hrefv60_init_machine(void) | |||
673 | ARRAY_SIZE(mop500_platform_devs)); | 673 | ARRAY_SIZE(mop500_platform_devs)); |
674 | 674 | ||
675 | mop500_i2c_init(); | 675 | mop500_i2c_init(); |
676 | mop500_sdi_init(); | 676 | hrefv60_sdi_init(); |
677 | mop500_spi_init(); | 677 | mop500_spi_init(); |
678 | mop500_uart_init(); | 678 | mop500_uart_init(); |
679 | 679 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index de18a2a23e6e..f926d3db6207 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
@@ -7,40 +7,77 @@ | |||
7 | #ifndef __BOARD_MOP500_H | 7 | #ifndef __BOARD_MOP500_H |
8 | #define __BOARD_MOP500_H | 8 | #define __BOARD_MOP500_H |
9 | 9 | ||
10 | /* snowball GPIO for MMC card */ | 10 | /* Snowball specific GPIO assignments, this board has no GPIO expander */ |
11 | #define SNOWBALL_SDMMC_EN_GPIO 217 | 11 | #define SNOWBALL_ACCEL_INT1_GPIO 163 |
12 | #define SNOWBALL_SDMMC_1V8_3V_GPIO 228 | 12 | #define SNOWBALL_ACCEL_INT2_GPIO 164 |
13 | #define SNOWBALL_SDMMC_CD_GPIO 218 | 13 | #define SNOWBALL_MAGNET_DRDY_GPIO 165 |
14 | #define SNOWBALL_SDMMC_EN_GPIO 217 | ||
15 | #define SNOWBALL_SDMMC_1V8_3V_GPIO 228 | ||
16 | #define SNOWBALL_SDMMC_CD_GPIO 218 | ||
14 | 17 | ||
15 | /* HREFv60-specific GPIO assignments, this board has no GPIO expander */ | 18 | /* HREFv60-specific GPIO assignments, this board has no GPIO expander */ |
16 | #define HREFV60_TOUCH_RST_GPIO 143 | ||
17 | #define HREFV60_PROX_SENSE_GPIO 217 | ||
18 | #define HREFV60_HAL_SW_GPIO 145 | ||
19 | #define HREFV60_SDMMC_EN_GPIO 169 | ||
20 | #define HREFV60_SDMMC_1V8_3V_GPIO 5 | 19 | #define HREFV60_SDMMC_1V8_3V_GPIO 5 |
21 | #define HREFV60_SDMMC_CD_GPIO 95 | 20 | #define HREFV60_CAMERA_FLASH_ENABLE 21 |
22 | #define HREFV60_ACCEL_INT1_GPIO 82 | ||
23 | #define HREFV60_ACCEL_INT2_GPIO 83 | ||
24 | #define HREFV60_MAGNET_DRDY_GPIO 32 | 21 | #define HREFV60_MAGNET_DRDY_GPIO 32 |
25 | #define HREFV60_DISP1_RST_GPIO 65 | 22 | #define HREFV60_DISP1_RST_GPIO 65 |
26 | #define HREFV60_DISP2_RST_GPIO 66 | 23 | #define HREFV60_DISP2_RST_GPIO 66 |
24 | #define HREFV60_ACCEL_INT1_GPIO 82 | ||
25 | #define HREFV60_ACCEL_INT2_GPIO 83 | ||
26 | #define HREFV60_SDMMC_CD_GPIO 95 | ||
27 | #define HREFV60_XSHUTDOWN_SECONDARY_SENSOR 140 | ||
28 | #define HREFV60_TOUCH_RST_GPIO 143 | ||
29 | #define HREFV60_HAL_SW_GPIO 145 | ||
30 | #define HREFV60_SDMMC_EN_GPIO 169 | ||
31 | #define HREFV60_MMIO_XENON_CHARGE 170 | ||
32 | #define HREFV60_PROX_SENSE_GPIO 217 | ||
33 | |||
34 | /* MOP500 generic GPIOs */ | ||
35 | #define CAMERA_FLASH_INT_PIN 7 | ||
36 | #define CYPRESS_TOUCH_INT_PIN 84 | ||
37 | #define XSHUTDOWN_PRIMARY_SENSOR 141 | ||
38 | #define XSHUTDOWN_SECONDARY_SENSOR 142 | ||
39 | #define CYPRESS_TOUCH_RST_GPIO 143 | ||
40 | #define MOP500_HDMI_RST_GPIO 196 | ||
41 | #define CYPRESS_SLAVE_SELECT_GPIO 216 | ||
27 | 42 | ||
28 | /* GPIOs on the TC35892 expander */ | 43 | /* GPIOs on the TC35892 expander */ |
29 | #define MOP500_EGPIO(x) (NOMADIK_NR_GPIO + (x)) | 44 | #define MOP500_EGPIO(x) (NOMADIK_NR_GPIO + (x)) |
45 | #define GPIO_MAGNET_DRDY MOP500_EGPIO(1) | ||
30 | #define GPIO_SDMMC_CD MOP500_EGPIO(3) | 46 | #define GPIO_SDMMC_CD MOP500_EGPIO(3) |
47 | #define GPIO_CAMERA_FLASH_ENABLE MOP500_EGPIO(4) | ||
48 | #define GPIO_MMIO_XENON_CHARGE MOP500_EGPIO(5) | ||
31 | #define GPIO_PROX_SENSOR MOP500_EGPIO(7) | 49 | #define GPIO_PROX_SENSOR MOP500_EGPIO(7) |
50 | #define GPIO_HAL_SENSOR MOP500_EGPIO(8) | ||
51 | #define GPIO_ACCEL_INT1 MOP500_EGPIO(10) | ||
52 | #define GPIO_ACCEL_INT2 MOP500_EGPIO(11) | ||
32 | #define GPIO_BU21013_CS MOP500_EGPIO(13) | 53 | #define GPIO_BU21013_CS MOP500_EGPIO(13) |
54 | #define MOP500_DISP2_RST_GPIO MOP500_EGPIO(14) | ||
55 | #define MOP500_DISP1_RST_GPIO MOP500_EGPIO(15) | ||
33 | #define GPIO_SDMMC_EN MOP500_EGPIO(17) | 56 | #define GPIO_SDMMC_EN MOP500_EGPIO(17) |
34 | #define GPIO_SDMMC_1V8_3V_SEL MOP500_EGPIO(18) | 57 | #define GPIO_SDMMC_1V8_3V_SEL MOP500_EGPIO(18) |
35 | #define MOP500_EGPIO_END MOP500_EGPIO(24) | 58 | #define MOP500_EGPIO_END MOP500_EGPIO(24) |
36 | 59 | ||
37 | /* GPIOs on the AB8500 mixed-signals circuit */ | 60 | /* |
38 | #define MOP500_AB8500_GPIO(x) (MOP500_EGPIO_END + (x)) | 61 | * GPIOs on the AB8500 mixed-signals circuit |
62 | * Notice that we subtract 1 from the number passed into the macro, this is | ||
63 | * because the AB8500 GPIO pins are enumbered starting from 1, so the value in | ||
64 | * parens matches the GPIO pin number in the data sheet. | ||
65 | */ | ||
66 | #define MOP500_AB8500_GPIO(x) (MOP500_EGPIO_END + (x) - 1) | ||
67 | /*Snowball AB8500 GPIO */ | ||
68 | #define SNOWBALL_VSMPS2_1V8_GPIO MOP500_AB8500_PIN_GPIO(1) /* SYSCLKREQ2/GPIO1 */ | ||
69 | #define SNOWBALL_PM_GPIO1_GPIO MOP500_AB8500_PIN_GPIO(2) /* SYSCLKREQ3/GPIO2 */ | ||
70 | #define SNOWBALL_WLAN_CLK_REQ_GPIO MOP500_AB8500_PIN_GPIO(3) /* SYSCLKREQ4/GPIO3 */ | ||
71 | #define SNOWBALL_PM_GPIO4_GPIO MOP500_AB8500_PIN_GPIO(4) /* SYSCLKREQ6/GPIO4 */ | ||
72 | #define SNOWBALL_EN_3V6_GPIO MOP500_AB8500_PIN_GPIO(16) /* PWMOUT3/GPIO16 */ | ||
73 | #define SNOWBALL_PME_ETH_GPIO MOP500_AB8500_PIN_GPIO(24) /* SYSCLKREQ7/GPIO24 */ | ||
74 | #define SNOWBALL_EN_3V3_ETH_GPIO MOP500_AB8500_PIN_GPIO(26) /* GPIO26 */ | ||
39 | 75 | ||
40 | struct i2c_board_info; | 76 | struct i2c_board_info; |
41 | 77 | ||
42 | extern void mop500_sdi_init(void); | 78 | extern void mop500_sdi_init(void); |
43 | extern void snowball_sdi_init(void); | 79 | extern void snowball_sdi_init(void); |
80 | extern void hrefv60_sdi_init(void); | ||
44 | extern void mop500_sdi_tc35892_init(void); | 81 | extern void mop500_sdi_tc35892_init(void); |
45 | void __init mop500_u8500uib_init(void); | 82 | void __init mop500_u8500uib_init(void); |
46 | void __init mop500_stuib_init(void); | 83 | void __init mop500_stuib_init(void); |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index e832664d1bd9..737907537004 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -239,23 +239,6 @@ static void clk_prcmu_disable(struct clk *clk) | |||
239 | writel(1 << clk->prcmu_cg_bit, cg_clr_reg); | 239 | writel(1 << clk->prcmu_cg_bit, cg_clr_reg); |
240 | } | 240 | } |
241 | 241 | ||
242 | /* ED doesn't have the combined set/clr registers */ | ||
243 | static void clk_prcmu_ed_enable(struct clk *clk) | ||
244 | { | ||
245 | void __iomem *addr = __io_address(U8500_PRCMU_BASE) | ||
246 | + clk->prcmu_cg_mgt; | ||
247 | |||
248 | writel(readl(addr) | PRCM_MGT_ENABLE, addr); | ||
249 | } | ||
250 | |||
251 | static void clk_prcmu_ed_disable(struct clk *clk) | ||
252 | { | ||
253 | void __iomem *addr = __io_address(U8500_PRCMU_BASE) | ||
254 | + clk->prcmu_cg_mgt; | ||
255 | |||
256 | writel(readl(addr) & ~PRCM_MGT_ENABLE, addr); | ||
257 | } | ||
258 | |||
259 | static struct clkops clk_prcmu_ops = { | 242 | static struct clkops clk_prcmu_ops = { |
260 | .enable = clk_prcmu_enable, | 243 | .enable = clk_prcmu_enable, |
261 | .disable = clk_prcmu_disable, | 244 | .disable = clk_prcmu_disable, |
@@ -267,7 +250,6 @@ static unsigned int clkrst_base[] = { | |||
267 | [3] = U8500_CLKRST3_BASE, | 250 | [3] = U8500_CLKRST3_BASE, |
268 | [5] = U8500_CLKRST5_BASE, | 251 | [5] = U8500_CLKRST5_BASE, |
269 | [6] = U8500_CLKRST6_BASE, | 252 | [6] = U8500_CLKRST6_BASE, |
270 | [7] = U8500_CLKRST7_BASE_ED, | ||
271 | }; | 253 | }; |
272 | 254 | ||
273 | static void clk_prcc_enable(struct clk *clk) | 255 | static void clk_prcc_enable(struct clk *clk) |
@@ -321,7 +303,6 @@ static DEFINE_PRCMU_CLK(per2clk, 0x0, 12, PER2CLK); | |||
321 | static DEFINE_PRCMU_CLK(per3clk, 0x0, 13, PER3CLK); | 303 | static DEFINE_PRCMU_CLK(per3clk, 0x0, 13, PER3CLK); |
322 | static DEFINE_PRCMU_CLK(per5clk, 0x0, 14, PER5CLK); | 304 | static DEFINE_PRCMU_CLK(per5clk, 0x0, 14, PER5CLK); |
323 | static DEFINE_PRCMU_CLK_RATE(per6clk, 0x0, 15, PER6CLK, 133330000); | 305 | static DEFINE_PRCMU_CLK_RATE(per6clk, 0x0, 15, PER6CLK, 133330000); |
324 | static DEFINE_PRCMU_CLK_RATE(per7clk, 0x0, 16, PER7CLK, 100000000); | ||
325 | static DEFINE_PRCMU_CLK(lcdclk, 0x0, 17, LCDCLK); | 306 | static DEFINE_PRCMU_CLK(lcdclk, 0x0, 17, LCDCLK); |
326 | static DEFINE_PRCMU_CLK(bmlclk, 0x0, 18, BMLCLK); | 307 | static DEFINE_PRCMU_CLK(bmlclk, 0x0, 18, BMLCLK); |
327 | static DEFINE_PRCMU_CLK(hsitxclk, 0x0, 19, HSITXCLK); | 308 | static DEFINE_PRCMU_CLK(hsitxclk, 0x0, 19, HSITXCLK); |
@@ -351,44 +332,28 @@ static DEFINE_PRCMU_CLK(uiccclk, 0x4, 1, UICCCLK); /* v1 */ | |||
351 | static DEFINE_PRCC_CLK(1, i2c4, 10, 9, &clk_i2cclk); | 332 | static DEFINE_PRCC_CLK(1, i2c4, 10, 9, &clk_i2cclk); |
352 | static DEFINE_PRCC_CLK(1, gpio0, 9, -1, NULL); | 333 | static DEFINE_PRCC_CLK(1, gpio0, 9, -1, NULL); |
353 | static DEFINE_PRCC_CLK(1, slimbus0, 8, 8, &clk_slimclk); | 334 | static DEFINE_PRCC_CLK(1, slimbus0, 8, 8, &clk_slimclk); |
354 | static DEFINE_PRCC_CLK(1, spi3_ed, 7, 7, NULL); | 335 | static DEFINE_PRCC_CLK(1, spi3, 7, -1, NULL); |
355 | static DEFINE_PRCC_CLK(1, spi3_v1, 7, -1, NULL); | ||
356 | static DEFINE_PRCC_CLK(1, i2c2, 6, 6, &clk_i2cclk); | 336 | static DEFINE_PRCC_CLK(1, i2c2, 6, 6, &clk_i2cclk); |
357 | static DEFINE_PRCC_CLK(1, sdi0, 5, 5, &clk_sdmmcclk); | 337 | static DEFINE_PRCC_CLK(1, sdi0, 5, 5, &clk_sdmmcclk); |
358 | static DEFINE_PRCC_CLK(1, msp1_ed, 4, 4, &clk_msp02clk); | 338 | static DEFINE_PRCC_CLK(1, msp1, 4, 4, &clk_msp1clk); |
359 | static DEFINE_PRCC_CLK(1, msp1_v1, 4, 4, &clk_msp1clk); | ||
360 | static DEFINE_PRCC_CLK(1, msp0, 3, 3, &clk_msp02clk); | 339 | static DEFINE_PRCC_CLK(1, msp0, 3, 3, &clk_msp02clk); |
361 | static DEFINE_PRCC_CLK(1, i2c1, 2, 2, &clk_i2cclk); | 340 | static DEFINE_PRCC_CLK(1, i2c1, 2, 2, &clk_i2cclk); |
362 | static DEFINE_PRCC_CLK(1, uart1, 1, 1, &clk_uartclk); | 341 | static DEFINE_PRCC_CLK(1, uart1, 1, 1, &clk_uartclk); |
363 | static DEFINE_PRCC_CLK(1, uart0, 0, 0, &clk_uartclk); | 342 | static DEFINE_PRCC_CLK(1, uart0, 0, 0, &clk_uartclk); |
364 | 343 | ||
365 | /* Peripheral Cluster #2 */ | 344 | /* Peripheral Cluster #2 */ |
366 | 345 | static DEFINE_PRCC_CLK(2, gpio1, 11, -1, NULL); | |
367 | static DEFINE_PRCC_CLK(2, gpio1_ed, 12, -1, NULL); | 346 | static DEFINE_PRCC_CLK(2, ssitx, 10, 7, NULL); |
368 | static DEFINE_PRCC_CLK(2, ssitx_ed, 11, -1, NULL); | 347 | static DEFINE_PRCC_CLK(2, ssirx, 9, 6, NULL); |
369 | static DEFINE_PRCC_CLK(2, ssirx_ed, 10, -1, NULL); | 348 | static DEFINE_PRCC_CLK(2, spi0, 8, -1, NULL); |
370 | static DEFINE_PRCC_CLK(2, spi0_ed, 9, -1, NULL); | 349 | static DEFINE_PRCC_CLK(2, sdi3, 7, 5, &clk_sdmmcclk); |
371 | static DEFINE_PRCC_CLK(2, sdi3_ed, 8, 6, &clk_sdmmcclk); | 350 | static DEFINE_PRCC_CLK(2, sdi1, 6, 4, &clk_sdmmcclk); |
372 | static DEFINE_PRCC_CLK(2, sdi1_ed, 7, 5, &clk_sdmmcclk); | 351 | static DEFINE_PRCC_CLK(2, msp2, 5, 3, &clk_msp02clk); |
373 | static DEFINE_PRCC_CLK(2, msp2_ed, 6, 4, &clk_msp02clk); | 352 | static DEFINE_PRCC_CLK(2, sdi4, 4, 2, &clk_sdmmcclk); |
374 | static DEFINE_PRCC_CLK(2, sdi4_ed, 4, 2, &clk_sdmmcclk); | 353 | static DEFINE_PRCC_CLK(2, pwl, 3, 1, NULL); |
375 | static DEFINE_PRCC_CLK(2, pwl_ed, 3, 1, NULL); | 354 | static DEFINE_PRCC_CLK(2, spi1, 2, -1, NULL); |
376 | static DEFINE_PRCC_CLK(2, spi1_ed, 2, -1, NULL); | 355 | static DEFINE_PRCC_CLK(2, spi2, 1, -1, NULL); |
377 | static DEFINE_PRCC_CLK(2, spi2_ed, 1, -1, NULL); | 356 | static DEFINE_PRCC_CLK(2, i2c3, 0, 0, &clk_i2cclk); |
378 | static DEFINE_PRCC_CLK(2, i2c3_ed, 0, 0, &clk_i2cclk); | ||
379 | |||
380 | static DEFINE_PRCC_CLK(2, gpio1_v1, 11, -1, NULL); | ||
381 | static DEFINE_PRCC_CLK(2, ssitx_v1, 10, 7, NULL); | ||
382 | static DEFINE_PRCC_CLK(2, ssirx_v1, 9, 6, NULL); | ||
383 | static DEFINE_PRCC_CLK(2, spi0_v1, 8, -1, NULL); | ||
384 | static DEFINE_PRCC_CLK(2, sdi3_v1, 7, 5, &clk_sdmmcclk); | ||
385 | static DEFINE_PRCC_CLK(2, sdi1_v1, 6, 4, &clk_sdmmcclk); | ||
386 | static DEFINE_PRCC_CLK(2, msp2_v1, 5, 3, &clk_msp02clk); | ||
387 | static DEFINE_PRCC_CLK(2, sdi4_v1, 4, 2, &clk_sdmmcclk); | ||
388 | static DEFINE_PRCC_CLK(2, pwl_v1, 3, 1, NULL); | ||
389 | static DEFINE_PRCC_CLK(2, spi1_v1, 2, -1, NULL); | ||
390 | static DEFINE_PRCC_CLK(2, spi2_v1, 1, -1, NULL); | ||
391 | static DEFINE_PRCC_CLK(2, i2c3_v1, 0, 0, &clk_i2cclk); | ||
392 | 357 | ||
393 | /* Peripheral Cluster #3 */ | 358 | /* Peripheral Cluster #3 */ |
394 | static DEFINE_PRCC_CLK(3, gpio2, 8, -1, NULL); | 359 | static DEFINE_PRCC_CLK(3, gpio2, 8, -1, NULL); |
@@ -397,49 +362,34 @@ static DEFINE_PRCC_CLK(3, uart2, 6, 6, &clk_uartclk); | |||
397 | static DEFINE_PRCC_CLK(3, ske, 5, 5, &clk_32khz); | 362 | static DEFINE_PRCC_CLK(3, ske, 5, 5, &clk_32khz); |
398 | static DEFINE_PRCC_CLK(3, sdi2, 4, 4, &clk_sdmmcclk); | 363 | static DEFINE_PRCC_CLK(3, sdi2, 4, 4, &clk_sdmmcclk); |
399 | static DEFINE_PRCC_CLK(3, i2c0, 3, 3, &clk_i2cclk); | 364 | static DEFINE_PRCC_CLK(3, i2c0, 3, 3, &clk_i2cclk); |
400 | static DEFINE_PRCC_CLK(3, ssp1_ed, 2, 2, &clk_i2cclk); | 365 | static DEFINE_PRCC_CLK(3, ssp1, 2, 2, &clk_sspclk); |
401 | static DEFINE_PRCC_CLK(3, ssp0_ed, 1, 1, &clk_i2cclk); | 366 | static DEFINE_PRCC_CLK(3, ssp0, 1, 1, &clk_sspclk); |
402 | static DEFINE_PRCC_CLK(3, ssp1_v1, 2, 2, &clk_sspclk); | ||
403 | static DEFINE_PRCC_CLK(3, ssp0_v1, 1, 1, &clk_sspclk); | ||
404 | static DEFINE_PRCC_CLK(3, fsmc, 0, -1, NULL); | 367 | static DEFINE_PRCC_CLK(3, fsmc, 0, -1, NULL); |
405 | 368 | ||
406 | /* Peripheral Cluster #4 is in the always on domain */ | 369 | /* Peripheral Cluster #4 is in the always on domain */ |
407 | 370 | ||
408 | /* Peripheral Cluster #5 */ | 371 | /* Peripheral Cluster #5 */ |
409 | static DEFINE_PRCC_CLK(5, gpio3, 1, -1, NULL); | 372 | static DEFINE_PRCC_CLK(5, gpio3, 1, -1, NULL); |
410 | static DEFINE_PRCC_CLK(5, usb_ed, 0, 0, &clk_i2cclk); | 373 | static DEFINE_PRCC_CLK(5, usb, 0, 0, NULL); |
411 | static DEFINE_PRCC_CLK(5, usb_v1, 0, 0, NULL); | ||
412 | 374 | ||
413 | /* Peripheral Cluster #6 */ | 375 | /* Peripheral Cluster #6 */ |
414 | 376 | ||
415 | /* MTU ID in data */ | 377 | /* MTU ID in data */ |
416 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu1_v1, 8, -1, NULL, clk_mtu_get_rate, 1); | 378 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu1, 8, -1, NULL, clk_mtu_get_rate, 1); |
417 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu0_v1, 7, -1, NULL, clk_mtu_get_rate, 0); | 379 | static DEFINE_PRCC_CLK_CUSTOM(6, mtu0, 7, -1, NULL, clk_mtu_get_rate, 0); |
418 | static DEFINE_PRCC_CLK(6, cfgreg_v1, 6, 6, NULL); | 380 | static DEFINE_PRCC_CLK(6, cfgreg, 6, 6, NULL); |
419 | static DEFINE_PRCC_CLK(6, dmc_ed, 6, 6, NULL); | ||
420 | static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL); | 381 | static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL); |
421 | static DEFINE_PRCC_CLK(6, unipro_v1, 4, 1, &clk_uniproclk); | 382 | static DEFINE_PRCC_CLK(6, unipro, 4, 1, &clk_uniproclk); |
422 | static DEFINE_PRCC_CLK(6, cryp1_ed, 4, -1, NULL); | ||
423 | static DEFINE_PRCC_CLK(6, pka, 3, -1, NULL); | 383 | static DEFINE_PRCC_CLK(6, pka, 3, -1, NULL); |
424 | static DEFINE_PRCC_CLK(6, hash0, 2, -1, NULL); | 384 | static DEFINE_PRCC_CLK(6, hash0, 2, -1, NULL); |
425 | static DEFINE_PRCC_CLK(6, cryp0, 1, -1, NULL); | 385 | static DEFINE_PRCC_CLK(6, cryp0, 1, -1, NULL); |
426 | static DEFINE_PRCC_CLK(6, rng_ed, 0, 0, &clk_i2cclk); | 386 | static DEFINE_PRCC_CLK(6, rng, 0, 0, &clk_rngclk); |
427 | static DEFINE_PRCC_CLK(6, rng_v1, 0, 0, &clk_rngclk); | ||
428 | |||
429 | /* Peripheral Cluster #7 */ | ||
430 | |||
431 | static DEFINE_PRCC_CLK(7, tzpc0_ed, 4, -1, NULL); | ||
432 | /* MTU ID in data */ | ||
433 | static DEFINE_PRCC_CLK_CUSTOM(7, mtu1_ed, 3, -1, NULL, clk_mtu_get_rate, 1); | ||
434 | static DEFINE_PRCC_CLK_CUSTOM(7, mtu0_ed, 2, -1, NULL, clk_mtu_get_rate, 0); | ||
435 | static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL); | ||
436 | static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL); | ||
437 | 387 | ||
438 | static struct clk clk_dummy_apb_pclk = { | 388 | static struct clk clk_dummy_apb_pclk = { |
439 | .name = "apb_pclk", | 389 | .name = "apb_pclk", |
440 | }; | 390 | }; |
441 | 391 | ||
442 | static struct clk_lookup u8500_common_clks[] = { | 392 | static struct clk_lookup u8500_clks[] = { |
443 | CLK(dummy_apb_pclk, NULL, "apb_pclk"), | 393 | CLK(dummy_apb_pclk, NULL, "apb_pclk"), |
444 | 394 | ||
445 | /* Peripheral Cluster #1 */ | 395 | /* Peripheral Cluster #1 */ |
@@ -494,83 +444,41 @@ static struct clk_lookup u8500_common_clks[] = { | |||
494 | CLK(dmaclk, "dma40.0", NULL), | 444 | CLK(dmaclk, "dma40.0", NULL), |
495 | CLK(b2r2clk, "b2r2", NULL), | 445 | CLK(b2r2clk, "b2r2", NULL), |
496 | CLK(tvclk, "tv", NULL), | 446 | CLK(tvclk, "tv", NULL), |
497 | }; | ||
498 | 447 | ||
499 | static struct clk_lookup u8500_ed_clks[] = { | ||
500 | /* Peripheral Cluster #1 */ | ||
501 | CLK(spi3_ed, "spi3", NULL), | ||
502 | CLK(msp1_ed, "msp1", NULL), | ||
503 | |||
504 | /* Peripheral Cluster #2 */ | ||
505 | CLK(gpio1_ed, "gpio.6", NULL), | ||
506 | CLK(gpio1_ed, "gpio.7", NULL), | ||
507 | CLK(ssitx_ed, "ssitx", NULL), | ||
508 | CLK(ssirx_ed, "ssirx", NULL), | ||
509 | CLK(spi0_ed, "spi0", NULL), | ||
510 | CLK(sdi3_ed, "sdi3", NULL), | ||
511 | CLK(sdi1_ed, "sdi1", NULL), | ||
512 | CLK(msp2_ed, "msp2", NULL), | ||
513 | CLK(sdi4_ed, "sdi4", NULL), | ||
514 | CLK(pwl_ed, "pwl", NULL), | ||
515 | CLK(spi1_ed, "spi1", NULL), | ||
516 | CLK(spi2_ed, "spi2", NULL), | ||
517 | CLK(i2c3_ed, "nmk-i2c.3", NULL), | ||
518 | |||
519 | /* Peripheral Cluster #3 */ | ||
520 | CLK(ssp1_ed, "ssp1", NULL), | ||
521 | CLK(ssp0_ed, "ssp0", NULL), | ||
522 | |||
523 | /* Peripheral Cluster #5 */ | ||
524 | CLK(usb_ed, "musb-ux500.0", "usb"), | ||
525 | |||
526 | /* Peripheral Cluster #6 */ | ||
527 | CLK(dmc_ed, "dmc", NULL), | ||
528 | CLK(cryp1_ed, "cryp1", NULL), | ||
529 | CLK(rng_ed, "rng", NULL), | ||
530 | |||
531 | /* Peripheral Cluster #7 */ | ||
532 | CLK(tzpc0_ed, "tzpc0", NULL), | ||
533 | CLK(mtu1_ed, "mtu1", NULL), | ||
534 | CLK(mtu0_ed, "mtu0", NULL), | ||
535 | CLK(wdg_ed, "wdg", NULL), | ||
536 | CLK(cfgreg_ed, "cfgreg", NULL), | ||
537 | }; | ||
538 | |||
539 | static struct clk_lookup u8500_v1_clks[] = { | ||
540 | /* Peripheral Cluster #1 */ | 448 | /* Peripheral Cluster #1 */ |
541 | CLK(i2c4, "nmk-i2c.4", NULL), | 449 | CLK(i2c4, "nmk-i2c.4", NULL), |
542 | CLK(spi3_v1, "spi3", NULL), | 450 | CLK(spi3, "spi3", NULL), |
543 | CLK(msp1_v1, "msp1", NULL), | 451 | CLK(msp1, "msp1", NULL), |
544 | 452 | ||
545 | /* Peripheral Cluster #2 */ | 453 | /* Peripheral Cluster #2 */ |
546 | CLK(gpio1_v1, "gpio.6", NULL), | 454 | CLK(gpio1, "gpio.6", NULL), |
547 | CLK(gpio1_v1, "gpio.7", NULL), | 455 | CLK(gpio1, "gpio.7", NULL), |
548 | CLK(ssitx_v1, "ssitx", NULL), | 456 | CLK(ssitx, "ssitx", NULL), |
549 | CLK(ssirx_v1, "ssirx", NULL), | 457 | CLK(ssirx, "ssirx", NULL), |
550 | CLK(spi0_v1, "spi0", NULL), | 458 | CLK(spi0, "spi0", NULL), |
551 | CLK(sdi3_v1, "sdi3", NULL), | 459 | CLK(sdi3, "sdi3", NULL), |
552 | CLK(sdi1_v1, "sdi1", NULL), | 460 | CLK(sdi1, "sdi1", NULL), |
553 | CLK(msp2_v1, "msp2", NULL), | 461 | CLK(msp2, "msp2", NULL), |
554 | CLK(sdi4_v1, "sdi4", NULL), | 462 | CLK(sdi4, "sdi4", NULL), |
555 | CLK(pwl_v1, "pwl", NULL), | 463 | CLK(pwl, "pwl", NULL), |
556 | CLK(spi1_v1, "spi1", NULL), | 464 | CLK(spi1, "spi1", NULL), |
557 | CLK(spi2_v1, "spi2", NULL), | 465 | CLK(spi2, "spi2", NULL), |
558 | CLK(i2c3_v1, "nmk-i2c.3", NULL), | 466 | CLK(i2c3, "nmk-i2c.3", NULL), |
559 | 467 | ||
560 | /* Peripheral Cluster #3 */ | 468 | /* Peripheral Cluster #3 */ |
561 | CLK(ssp1_v1, "ssp1", NULL), | 469 | CLK(ssp1, "ssp1", NULL), |
562 | CLK(ssp0_v1, "ssp0", NULL), | 470 | CLK(ssp0, "ssp0", NULL), |
563 | 471 | ||
564 | /* Peripheral Cluster #5 */ | 472 | /* Peripheral Cluster #5 */ |
565 | CLK(usb_v1, "musb-ux500.0", "usb"), | 473 | CLK(usb, "musb-ux500.0", "usb"), |
566 | 474 | ||
567 | /* Peripheral Cluster #6 */ | 475 | /* Peripheral Cluster #6 */ |
568 | CLK(mtu1_v1, "mtu1", NULL), | 476 | CLK(mtu1, "mtu1", NULL), |
569 | CLK(mtu0_v1, "mtu0", NULL), | 477 | CLK(mtu0, "mtu0", NULL), |
570 | CLK(cfgreg_v1, "cfgreg", NULL), | 478 | CLK(cfgreg, "cfgreg", NULL), |
571 | CLK(hash1, "hash1", NULL), | 479 | CLK(hash1, "hash1", NULL), |
572 | CLK(unipro_v1, "unipro", NULL), | 480 | CLK(unipro, "unipro", NULL), |
573 | CLK(rng_v1, "rng", NULL), | 481 | CLK(rng, "rng", NULL), |
574 | 482 | ||
575 | /* PRCMU level clock gating */ | 483 | /* PRCMU level clock gating */ |
576 | 484 | ||
@@ -743,7 +651,7 @@ err_out: | |||
743 | late_initcall(clk_debugfs_init); | 651 | late_initcall(clk_debugfs_init); |
744 | #endif /* defined(CONFIG_DEBUG_FS) */ | 652 | #endif /* defined(CONFIG_DEBUG_FS) */ |
745 | 653 | ||
746 | unsigned long clk_smp_twd_rate = 400000000; | 654 | unsigned long clk_smp_twd_rate = 500000000; |
747 | 655 | ||
748 | unsigned long clk_smp_twd_get_rate(struct clk *clk) | 656 | unsigned long clk_smp_twd_get_rate(struct clk *clk) |
749 | { | 657 | { |
@@ -769,7 +677,7 @@ static int clk_twd_cpufreq_transition(struct notifier_block *nb, | |||
769 | 677 | ||
770 | if (state == CPUFREQ_PRECHANGE) { | 678 | if (state == CPUFREQ_PRECHANGE) { |
771 | /* Save frequency in simple Hz */ | 679 | /* Save frequency in simple Hz */ |
772 | clk_smp_twd_rate = f->new * 1000; | 680 | clk_smp_twd_rate = (f->new * 1000) / 2; |
773 | } | 681 | } |
774 | 682 | ||
775 | return NOTIFY_OK; | 683 | return NOTIFY_OK; |
@@ -790,11 +698,7 @@ late_initcall(clk_init_smp_twd_cpufreq); | |||
790 | 698 | ||
791 | int __init clk_init(void) | 699 | int __init clk_init(void) |
792 | { | 700 | { |
793 | if (cpu_is_u8500ed()) { | 701 | if (cpu_is_u5500()) { |
794 | clk_prcmu_ops.enable = clk_prcmu_ed_enable; | ||
795 | clk_prcmu_ops.disable = clk_prcmu_ed_disable; | ||
796 | clk_per6clk.rate = 100000000; | ||
797 | } else if (cpu_is_u5500()) { | ||
798 | /* Clock tree for U5500 not implemented yet */ | 702 | /* Clock tree for U5500 not implemented yet */ |
799 | clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; | 703 | clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; |
800 | clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; | 704 | clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; |
@@ -802,20 +706,11 @@ int __init clk_init(void) | |||
802 | clk_sdmmcclk.rate = 99900000; | 706 | clk_sdmmcclk.rate = 99900000; |
803 | } | 707 | } |
804 | 708 | ||
805 | clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); | 709 | clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); |
806 | if (cpu_is_u8500ed()) | ||
807 | clkdev_add_table(u8500_ed_clks, ARRAY_SIZE(u8500_ed_clks)); | ||
808 | else | ||
809 | clkdev_add_table(u8500_v1_clks, ARRAY_SIZE(u8500_v1_clks)); | ||
810 | |||
811 | clkdev_add(&clk_smp_twd_lookup); | 710 | clkdev_add(&clk_smp_twd_lookup); |
812 | 711 | ||
813 | #ifdef CONFIG_DEBUG_FS | 712 | #ifdef CONFIG_DEBUG_FS |
814 | clk_debugfs_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); | 713 | clk_debugfs_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); |
815 | if (cpu_is_u8500ed()) | ||
816 | clk_debugfs_add_table(u8500_ed_clks, ARRAY_SIZE(u8500_ed_clks)); | ||
817 | else | ||
818 | clk_debugfs_add_table(u8500_v1_clks, ARRAY_SIZE(u8500_v1_clks)); | ||
819 | #endif | 714 | #endif |
820 | return 0; | 715 | return 0; |
821 | } | 716 | } |
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 5323286b265e..18aa5c05c69e 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -46,26 +46,6 @@ static struct map_desc u5500_io_desc[] __initdata = { | |||
46 | __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K), | 46 | __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K), |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static struct resource db5500_pmu_resources[] = { | ||
50 | [0] = { | ||
51 | .start = IRQ_DB5500_PMU0, | ||
52 | .end = IRQ_DB5500_PMU0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | [1] = { | ||
56 | .start = IRQ_DB5500_PMU1, | ||
57 | .end = IRQ_DB5500_PMU1, | ||
58 | .flags = IORESOURCE_IRQ, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device db5500_pmu_device = { | ||
63 | .name = "arm-pmu", | ||
64 | .id = ARM_PMU_DEVICE_CPU, | ||
65 | .num_resources = ARRAY_SIZE(db5500_pmu_resources), | ||
66 | .resource = db5500_pmu_resources, | ||
67 | }; | ||
68 | |||
69 | static struct resource mbox0_resources[] = { | 49 | static struct resource mbox0_resources[] = { |
70 | { | 50 | { |
71 | .name = "mbox_peer", | 51 | .name = "mbox_peer", |
@@ -151,7 +131,6 @@ static struct platform_device mbox2_device = { | |||
151 | }; | 131 | }; |
152 | 132 | ||
153 | static struct platform_device *db5500_platform_devs[] __initdata = { | 133 | static struct platform_device *db5500_platform_devs[] __initdata = { |
154 | &db5500_pmu_device, | ||
155 | &mbox0_device, | 134 | &mbox0_device, |
156 | &mbox1_device, | 135 | &mbox1_device, |
157 | &mbox2_device, | 136 | &mbox2_device, |
@@ -192,6 +171,25 @@ void __init u5500_map_io(void) | |||
192 | _PRCMU_BASE = __io_address(U5500_PRCMU_BASE); | 171 | _PRCMU_BASE = __io_address(U5500_PRCMU_BASE); |
193 | } | 172 | } |
194 | 173 | ||
174 | static void __init db5500_pmu_init(void) | ||
175 | { | ||
176 | struct resource res[] = { | ||
177 | [0] = { | ||
178 | .start = IRQ_DB5500_PMU0, | ||
179 | .end = IRQ_DB5500_PMU0, | ||
180 | .flags = IORESOURCE_IRQ, | ||
181 | }, | ||
182 | [1] = { | ||
183 | .start = IRQ_DB5500_PMU1, | ||
184 | .end = IRQ_DB5500_PMU1, | ||
185 | .flags = IORESOURCE_IRQ, | ||
186 | }, | ||
187 | }; | ||
188 | |||
189 | platform_device_register_simple("arm-pmu", ARM_PMU_DEVICE_CPU, | ||
190 | res, ARRAY_SIZE(res)); | ||
191 | } | ||
192 | |||
195 | static int usb_db5500_rx_dma_cfg[] = { | 193 | static int usb_db5500_rx_dma_cfg[] = { |
196 | DB5500_DMA_DEV4_USB_OTG_IEP_1_9, | 194 | DB5500_DMA_DEV4_USB_OTG_IEP_1_9, |
197 | DB5500_DMA_DEV5_USB_OTG_IEP_2_10, | 195 | DB5500_DMA_DEV5_USB_OTG_IEP_2_10, |
@@ -217,6 +215,7 @@ static int usb_db5500_tx_dma_cfg[] = { | |||
217 | void __init u5500_init_devices(void) | 215 | void __init u5500_init_devices(void) |
218 | { | 216 | { |
219 | db5500_add_gpios(); | 217 | db5500_add_gpios(); |
218 | db5500_pmu_init(); | ||
220 | db5500_dma_init(); | 219 | db5500_dma_init(); |
221 | db5500_add_rtc(); | 220 | db5500_add_rtc(); |
222 | db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); | 221 | db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 7f2729c05db3..7176ee7491ab 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008-2009 ST-Ericsson | 2 | * Copyright (C) 2008-2009 ST-Ericsson SA |
3 | * | 3 | * |
4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> |
5 | * | 5 | * |
@@ -53,19 +53,6 @@ static struct map_desc u8500_io_desc[] __initdata = { | |||
53 | __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K), | 53 | __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K), |
54 | __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K), | 54 | __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K), |
55 | __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K), | 55 | __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K), |
56 | }; | ||
57 | |||
58 | static struct map_desc u8500_ed_io_desc[] __initdata = { | ||
59 | __IO_DEV_DESC(U8500_MTU0_BASE_ED, SZ_4K), | ||
60 | __IO_DEV_DESC(U8500_CLKRST7_BASE_ED, SZ_8K), | ||
61 | }; | ||
62 | |||
63 | static struct map_desc u8500_v1_io_desc[] __initdata = { | ||
64 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), | ||
65 | __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE_V1, SZ_4K), | ||
66 | }; | ||
67 | |||
68 | static struct map_desc u8500_v2_io_desc[] __initdata = { | ||
69 | __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K), | 56 | __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K), |
70 | }; | 57 | }; |
71 | 58 | ||
@@ -80,13 +67,6 @@ void __init u8500_map_io(void) | |||
80 | 67 | ||
81 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); | 68 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); |
82 | 69 | ||
83 | if (cpu_is_u8500ed()) | ||
84 | iotable_init(u8500_ed_io_desc, ARRAY_SIZE(u8500_ed_io_desc)); | ||
85 | else if (cpu_is_u8500v1()) | ||
86 | iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc)); | ||
87 | else if (cpu_is_u8500v2()) | ||
88 | iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc)); | ||
89 | |||
90 | _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); | 70 | _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); |
91 | } | 71 | } |
92 | 72 | ||
@@ -155,12 +135,9 @@ static resource_size_t __initdata db8500_gpio_base[] = { | |||
155 | static void __init db8500_add_gpios(void) | 135 | static void __init db8500_add_gpios(void) |
156 | { | 136 | { |
157 | struct nmk_gpio_platform_data pdata = { | 137 | struct nmk_gpio_platform_data pdata = { |
158 | /* No custom data yet */ | 138 | .supports_sleepmode = true, |
159 | }; | 139 | }; |
160 | 140 | ||
161 | if (cpu_is_u8500v2()) | ||
162 | pdata.supports_sleepmode = true; | ||
163 | |||
164 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), | 141 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), |
165 | IRQ_DB8500_GPIO0, &pdata); | 142 | IRQ_DB8500_GPIO0, &pdata); |
166 | } | 143 | } |
@@ -192,9 +169,6 @@ static int usb_db8500_tx_dma_cfg[] = { | |||
192 | */ | 169 | */ |
193 | void __init u8500_init_devices(void) | 170 | void __init u8500_init_devices(void) |
194 | { | 171 | { |
195 | if (cpu_is_u8500ed()) | ||
196 | dma40_u8500ed_fixup(); | ||
197 | |||
198 | db8500_add_rtc(); | 172 | db8500_add_rtc(); |
199 | db8500_add_gpios(); | 173 | db8500_add_gpios(); |
200 | db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); | 174 | db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); |
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index 73b17404b194..a7c6cdc9b11e 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c | |||
@@ -166,16 +166,6 @@ struct platform_device u8500_dma40_device = { | |||
166 | .resource = dma40_resources | 166 | .resource = dma40_resources |
167 | }; | 167 | }; |
168 | 168 | ||
169 | void dma40_u8500ed_fixup(void) | ||
170 | { | ||
171 | dma40_plat_data.memcpy = NULL; | ||
172 | dma40_plat_data.memcpy_len = 0; | ||
173 | dma40_resources[0].start = U8500_DMA_BASE_ED; | ||
174 | dma40_resources[0].end = U8500_DMA_BASE_ED + SZ_4K - 1; | ||
175 | dma40_resources[1].start = U8500_DMA_LCPA_BASE_ED; | ||
176 | dma40_resources[1].end = U8500_DMA_LCPA_BASE_ED + 2 * SZ_1K - 1; | ||
177 | } | ||
178 | |||
179 | struct resource keypad_resources[] = { | 169 | struct resource keypad_resources[] = { |
180 | [0] = { | 170 | [0] = { |
181 | .start = U8500_SKE_BASE, | 171 | .start = U8500_SKE_BASE, |
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c index d35122ebc67b..15a0f63b2e2b 100644 --- a/arch/arm/mach-ux500/id.c +++ b/arch/arm/mach-ux500/id.c | |||
@@ -65,6 +65,7 @@ static unsigned int partnumber(unsigned int asicid) | |||
65 | * DB8500v1 0x411fc091 0x9001FFF4 0x008500A0 | 65 | * DB8500v1 0x411fc091 0x9001FFF4 0x008500A0 |
66 | * DB8500v1.1 0x411fc091 0x9001FFF4 0x008500A1 | 66 | * DB8500v1.1 0x411fc091 0x9001FFF4 0x008500A1 |
67 | * DB8500v2 0x412fc091 0x9001DBF4 0x008500B0 | 67 | * DB8500v2 0x412fc091 0x9001DBF4 0x008500B0 |
68 | * DB8520v2.2 0x412fc091 0x9001DBF4 0x008500B2 | ||
68 | * DB5500v1 0x412fc091 0x9001FFF4 0x005500A0 | 69 | * DB5500v1 0x412fc091 0x9001FFF4 0x005500A0 |
69 | */ | 70 | */ |
70 | 71 | ||
@@ -80,9 +81,10 @@ void __init ux500_map_io(void) | |||
80 | addr = 0x9001FFF4; | 81 | addr = 0x9001FFF4; |
81 | break; | 82 | break; |
82 | 83 | ||
83 | case 0x412fc091: /* DB8500v2 / DB5500v1 */ | 84 | case 0x412fc091: /* DB8520 / DB8500v2 / DB5500v1 */ |
84 | asicid = ux500_read_asicid(0x9001DBF4); | 85 | asicid = ux500_read_asicid(0x9001DBF4); |
85 | if (partnumber(asicid) == 0x8500) | 86 | if (partnumber(asicid) == 0x8500 || |
87 | partnumber(asicid) == 0x8520) | ||
86 | /* DB8500v2 */ | 88 | /* DB8500v2 */ |
87 | break; | 89 | break; |
88 | 90 | ||
diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h index 994b5fe6f85a..8e714bcb099f 100644 --- a/arch/arm/mach-ux500/include/mach/db5500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db5500-regs.h | |||
@@ -65,8 +65,11 @@ | |||
65 | #define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450) | 65 | #define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450) |
66 | #define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000) | 66 | #define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000) |
67 | #define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000) | 67 | #define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000) |
68 | #define U5500_MTIMER_BASE (U5500_PER4_BASE + 0xC000) | ||
68 | #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) | 69 | #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) |
69 | #define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000) | 70 | #define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000) |
71 | #define U5500_PRCMU_TCPM_BASE (U5500_PER4_BASE + 0x10000) | ||
72 | #define U5500_TPIU_BASE (U5500_PER4_BASE + 0x50000) | ||
70 | 73 | ||
71 | #define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000) | 74 | #define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000) |
72 | #define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000) | 75 | #define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000) |
@@ -125,6 +128,7 @@ | |||
125 | #define U5500_ACCCON_BASE (0xBFFF1000) | 128 | #define U5500_ACCCON_BASE (0xBFFF1000) |
126 | #define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020) | 129 | #define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020) |
127 | #define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC) | 130 | #define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC) |
131 | #define U5500_INTCON_MBOX1_INT_RESET_ADDR (0xBFFD31A4) | ||
128 | 132 | ||
129 | #define U5500_ESRAM_BASE 0x40000000 | 133 | #define U5500_ESRAM_BASE 0x40000000 |
130 | #define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000 | 134 | #define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000 |
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h index 751b0e6938d4..80e10f50282e 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
@@ -22,7 +22,9 @@ | |||
22 | #define U8500_ESRAM_DMA_LCPA_OFFSET 0x10000 | 22 | #define U8500_ESRAM_DMA_LCPA_OFFSET 0x10000 |
23 | 23 | ||
24 | #define U8500_DMA_LCPA_BASE (U8500_ESRAM_BANK0 + U8500_ESRAM_DMA_LCPA_OFFSET) | 24 | #define U8500_DMA_LCPA_BASE (U8500_ESRAM_BANK0 + U8500_ESRAM_DMA_LCPA_OFFSET) |
25 | #define U8500_DMA_LCPA_BASE_ED (U8500_ESRAM_BANK4 + 0x4000) | 25 | |
26 | /* This address fulfills the 256k alignment requirement of the lcla base */ | ||
27 | #define U8500_DMA_LCLA_BASE U8500_ESRAM_BANK4 | ||
26 | 28 | ||
27 | #define U8500_PER3_BASE 0x80000000 | 29 | #define U8500_PER3_BASE 0x80000000 |
28 | #define U8500_STM_BASE 0x80100000 | 30 | #define U8500_STM_BASE 0x80100000 |
@@ -40,15 +42,14 @@ | |||
40 | #define U8500_ASIC_ID_BASE 0x9001D000 | 42 | #define U8500_ASIC_ID_BASE 0x9001D000 |
41 | 43 | ||
42 | #define U8500_PER6_BASE 0xa03c0000 | 44 | #define U8500_PER6_BASE 0xa03c0000 |
45 | #define U8500_PER7_BASE 0xa03d0000 | ||
43 | #define U8500_PER5_BASE 0xa03e0000 | 46 | #define U8500_PER5_BASE 0xa03e0000 |
44 | #define U8500_PER7_BASE_ED 0xa03d0000 | ||
45 | 47 | ||
46 | #define U8500_SVA_BASE 0xa0100000 | 48 | #define U8500_SVA_BASE 0xa0100000 |
47 | #define U8500_SIA_BASE 0xa0200000 | 49 | #define U8500_SIA_BASE 0xa0200000 |
48 | 50 | ||
49 | #define U8500_SGA_BASE 0xa0300000 | 51 | #define U8500_SGA_BASE 0xa0300000 |
50 | #define U8500_MCDE_BASE 0xa0350000 | 52 | #define U8500_MCDE_BASE 0xa0350000 |
51 | #define U8500_DMA_BASE_ED 0xa0362000 | ||
52 | #define U8500_DMA_BASE 0x801C0000 /* v1 */ | 53 | #define U8500_DMA_BASE 0x801C0000 /* v1 */ |
53 | 54 | ||
54 | #define U8500_SBAG_BASE 0xa0390000 | 55 | #define U8500_SBAG_BASE 0xa0390000 |
@@ -66,13 +67,6 @@ | |||
66 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) | 67 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) |
67 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) | 68 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) |
68 | 69 | ||
69 | /* per7 base addresses */ | ||
70 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) | ||
71 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) | ||
72 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) | ||
73 | #define U8500_TZPC0_BASE_ED (U8500_PER7_BASE_ED + 0xc000) | ||
74 | #define U8500_CLKRST7_BASE_ED (U8500_PER7_BASE_ED + 0xf000) | ||
75 | |||
76 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | 70 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) |
77 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | 71 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) |
78 | 72 | ||
@@ -102,12 +96,10 @@ | |||
102 | #define U8500_SCR_BASE (U8500_PER4_BASE + 0x05000) | 96 | #define U8500_SCR_BASE (U8500_PER4_BASE + 0x05000) |
103 | #define U8500_DMC_BASE (U8500_PER4_BASE + 0x06000) | 97 | #define U8500_DMC_BASE (U8500_PER4_BASE + 0x06000) |
104 | #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) | 98 | #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) |
105 | #define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338) | ||
106 | #define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450) | ||
107 | #define U8500_PRCMU_TCDM_BASE_V1 (U8500_PER4_BASE + 0x0f000) | ||
108 | #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000) | 99 | #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000) |
109 | #define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000) | 100 | #define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000) |
110 | 101 | #define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338) | |
102 | #define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450) | ||
111 | 103 | ||
112 | /* per3 base addresses */ | 104 | /* per3 base addresses */ |
113 | #define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000) | 105 | #define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000) |
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h index 020b6369a30a..5f6cb71fc62d 100644 --- a/arch/arm/mach-ux500/include/mach/devices.h +++ b/arch/arm/mach-ux500/include/mach/devices.h | |||
@@ -18,6 +18,4 @@ extern struct amba_device ux500_pl031_device; | |||
18 | extern struct platform_device u8500_dma40_device; | 18 | extern struct platform_device u8500_dma40_device; |
19 | extern struct platform_device ux500_ske_keypad_device; | 19 | extern struct platform_device ux500_ske_keypad_device; |
20 | 20 | ||
21 | void dma40_u8500ed_fixup(void); | ||
22 | |||
23 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 470ac52663d6..b6ba26a1367d 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -10,20 +10,21 @@ | |||
10 | #ifndef __MACH_HARDWARE_H | 10 | #ifndef __MACH_HARDWARE_H |
11 | #define __MACH_HARDWARE_H | 11 | #define __MACH_HARDWARE_H |
12 | 12 | ||
13 | /* macros to get at IO space when running virtually | 13 | /* |
14 | * Macros to get at IO space when running virtually | ||
14 | * We dont map all the peripherals, let ioremap do | 15 | * We dont map all the peripherals, let ioremap do |
15 | * this for us. We map only very basic peripherals here. | 16 | * this for us. We map only very basic peripherals here. |
16 | */ | 17 | */ |
17 | #define U8500_IO_VIRTUAL 0xf0000000 | 18 | #define U8500_IO_VIRTUAL 0xf0000000 |
18 | #define U8500_IO_PHYSICAL 0xa0000000 | 19 | #define U8500_IO_PHYSICAL 0xa0000000 |
19 | 20 | ||
20 | /* this macro is used in assembly, so no cast */ | 21 | /* This macro is used in assembly, so no cast */ |
21 | #define IO_ADDRESS(x) \ | 22 | #define IO_ADDRESS(x) \ |
22 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) | 23 | (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) |
23 | 24 | ||
24 | /* typesafe io address */ | 25 | /* typesafe io address */ |
25 | #define __io_address(n) __io(IO_ADDRESS(n)) | 26 | #define __io_address(n) __io(IO_ADDRESS(n)) |
26 | /* used by some plat-nomadik code */ | 27 | /* Used by some plat-nomadik code */ |
27 | #define io_p2v(n) __io_address(n) | 28 | #define io_p2v(n) __io_address(n) |
28 | 29 | ||
29 | #include <mach/db8500-regs.h> | 30 | #include <mach/db8500-regs.h> |
@@ -36,6 +37,5 @@ extern void __iomem *_PRCMU_BASE; | |||
36 | 37 | ||
37 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | 38 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) |
38 | 39 | ||
39 | #endif | 40 | #endif /* __ASSEMBLY__ */ |
40 | |||
41 | #endif /* __MACH_HARDWARE_H */ | 41 | #endif /* __MACH_HARDWARE_H */ |
diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index 02b541a37ee5..833d6a6edc9b 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h | |||
@@ -47,6 +47,30 @@ static inline bool __attribute_const__ cpu_is_u5500(void) | |||
47 | } | 47 | } |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * 5500 revisions | ||
51 | */ | ||
52 | |||
53 | static inline bool __attribute_const__ cpu_is_u5500v1(void) | ||
54 | { | ||
55 | return cpu_is_u5500() && (dbx500_revision() & 0xf0) == 0xA0; | ||
56 | } | ||
57 | |||
58 | static inline bool __attribute_const__ cpu_is_u5500v2(void) | ||
59 | { | ||
60 | return (dbx500_id.revision & 0xf0) == 0xB0; | ||
61 | } | ||
62 | |||
63 | static inline bool __attribute_const__ cpu_is_u5500v20(void) | ||
64 | { | ||
65 | return cpu_is_u5500() && ((dbx500_revision() & 0xf0) == 0xB0); | ||
66 | } | ||
67 | |||
68 | static inline bool __attribute_const__ cpu_is_u5500v21(void) | ||
69 | { | ||
70 | return cpu_is_u5500() && (dbx500_revision() == 0xB1); | ||
71 | } | ||
72 | |||
73 | /* | ||
50 | * 8500 revisions | 74 | * 8500 revisions |
51 | */ | 75 | */ |
52 | 76 | ||