aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/Kconfig15
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c43
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c9
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c61
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500.c154
-rw-r--r--arch/arm/mach-ux500/board-mop500.h5
-rw-r--r--arch/arm/mach-ux500/clock.c48
-rw-r--r--arch/arm/mach-ux500/cpu-db5500.c1
-rw-r--r--arch/arm/mach-ux500/include/mach/uncompress.h3
-rw-r--r--arch/arm/mach-ux500/usb.c1
11 files changed, 313 insertions, 29 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index f8b9392ee347..4210cb434dbc 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -20,7 +20,7 @@ config UX500_SOC_DB8500
20 20
21endmenu 21endmenu
22 22
23menu "Ux500 target platform" 23menu "Ux500 target platform (boards)"
24 24
25config MACH_U8500 25config MACH_U8500
26 bool "U8500 Development platform" 26 bool "U8500 Development platform"
@@ -29,6 +29,19 @@ config MACH_U8500
29 help 29 help
30 Include support for the mop500 development platform. 30 Include support for the mop500 development platform.
31 31
32config MACH_HREFV60
33 bool "U85000 Development platform, HREFv60 version"
34 depends on UX500_SOC_DB8500
35 help
36 Include support for the HREFv60 new development platform.
37
38config MACH_SNOWBALL
39 bool "U8500 Snowball platform"
40 depends on UX500_SOC_DB8500
41 select MACH_U8500
42 help
43 Include support for the snowball development platform.
44
32config MACH_U5500 45config MACH_U5500
33 bool "U5500 Development platform" 46 bool "U5500 Development platform"
34 depends on UX500_SOC_DB5500 47 depends on UX500_SOC_DB5500
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 70cdbd60596a..f26fd76f72b4 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -236,6 +236,46 @@ static pin_cfg_t mop500_pins_hrefv60[] = {
236 236
237}; 237};
238 238
239static pin_cfg_t snowball_pins[] = {
240 /* SSP0, to AB8500 */
241 GPIO143_SSP0_CLK,
242 GPIO144_SSP0_FRM,
243 GPIO145_SSP0_RXD | PIN_PULL_DOWN,
244 GPIO146_SSP0_TXD,
245
246 /* MMC0: MicroSD card */
247 GPIO21_MC0_DAT31DIR | PIN_OUTPUT_HIGH,
248
249 /* MMC2: LAN */
250 GPIO86_SM_ADQ0,
251 GPIO87_SM_ADQ1,
252 GPIO88_SM_ADQ2,
253 GPIO89_SM_ADQ3,
254 GPIO90_SM_ADQ4,
255 GPIO91_SM_ADQ5,
256 GPIO92_SM_ADQ6,
257 GPIO93_SM_ADQ7,
258
259 GPIO94_SM_ADVn,
260 GPIO95_SM_CS0n,
261 GPIO96_SM_OEn,
262 GPIO97_SM_WEn,
263
264 GPIO128_SM_CKO,
265 GPIO130_SM_FBCLK,
266 GPIO131_SM_ADQ8,
267 GPIO132_SM_ADQ9,
268 GPIO133_SM_ADQ10,
269 GPIO134_SM_ADQ11,
270 GPIO135_SM_ADQ12,
271 GPIO136_SM_ADQ13,
272 GPIO137_SM_ADQ14,
273 GPIO138_SM_ADQ15,
274
275 /* RSTn_LAN */
276 GPIO141_GPIO | PIN_OUTPUT_HIGH,
277};
278
239void __init mop500_pins_init(void) 279void __init mop500_pins_init(void)
240{ 280{
241 nmk_config_pins(mop500_pins_common, 281 nmk_config_pins(mop500_pins_common,
@@ -243,6 +283,9 @@ void __init mop500_pins_init(void)
243 if (machine_is_hrefv60()) 283 if (machine_is_hrefv60())
244 nmk_config_pins(mop500_pins_hrefv60, 284 nmk_config_pins(mop500_pins_hrefv60,
245 ARRAY_SIZE(mop500_pins_hrefv60)); 285 ARRAY_SIZE(mop500_pins_hrefv60));
286 else if (machine_is_snowball())
287 nmk_config_pins(snowball_pins,
288 ARRAY_SIZE(snowball_pins));
246 else 289 else
247 nmk_config_pins(mop500_pins_default, 290 nmk_config_pins(mop500_pins_default,
248 ARRAY_SIZE(mop500_pins_default)); 291 ARRAY_SIZE(mop500_pins_default));
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 0f2e522f387d..2735d03996cf 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -272,7 +272,14 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
272 .max_uV = 2900000, 272 .max_uV = 2900000,
273 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 273 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
274 REGULATOR_CHANGE_STATUS, 274 REGULATOR_CHANGE_STATUS,
275 .boot_on = 1, /* must be on for display */ 275 .boot_on = 1, /* display is on at boot */
276 /*
277 * This voltage cannot be disabled right now because
278 * it is somehow affecting the external MMC
279 * functionality, though that typically will use
280 * AUX3.
281 */
282 .always_on = 1,
276 }, 283 },
277 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), 284 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
278 .consumer_supplies = ab8500_vaux1_consumers, 285 .consumer_supplies = ab8500_vaux1_consumers,
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 7c6cb4fa47a9..d0cb9e5eb87c 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -32,13 +32,32 @@
32#define MCI_DATA31DIREN (1 << 5) 32#define MCI_DATA31DIREN (1 << 5)
33#define MCI_FBCLKEN (1 << 7) 33#define MCI_FBCLKEN (1 << 7)
34 34
35/* GPIO pins used by the sdi0 level shifter */
36static int sdi0_en = -1;
37static int sdi0_vsel = -1;
38
35static u32 mop500_sdi0_vdd_handler(struct device *dev, unsigned int vdd, 39static u32 mop500_sdi0_vdd_handler(struct device *dev, unsigned int vdd,
36 unsigned char power_mode) 40 unsigned char power_mode)
37{ 41{
38 if (power_mode == MMC_POWER_UP) 42 switch (power_mode) {
39 gpio_set_value_cansleep(GPIO_SDMMC_EN, 1); 43 case MMC_POWER_UP:
40 else if (power_mode == MMC_POWER_OFF) 44 case MMC_POWER_ON:
41 gpio_set_value_cansleep(GPIO_SDMMC_EN, 0); 45 /*
46 * Level shifter voltage should depend on vdd to when deciding
47 * on either 1.8V or 2.9V. Once the decision has been made the
48 * level shifter must be disabled and re-enabled with a changed
49 * select signal in order to switch the voltage. Since there is
50 * no framework support yet for indicating 1.8V in vdd, use the
51 * default 2.9V.
52 */
53 gpio_direction_output(sdi0_vsel, 0);
54 gpio_direction_output(sdi0_en, 1);
55 break;
56 case MMC_POWER_OFF:
57 gpio_direction_output(sdi0_vsel, 0);
58 gpio_direction_output(sdi0_en, 0);
59 break;
60 }
42 61
43 return MCI_FBCLKEN | MCI_CMDDIREN | MCI_DATA0DIREN | 62 return MCI_FBCLKEN | MCI_CMDDIREN | MCI_DATA0DIREN |
44 MCI_DATA2DIREN | MCI_DATA31DIREN; 63 MCI_DATA2DIREN | MCI_DATA31DIREN;
@@ -67,8 +86,10 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
67static struct mmci_platform_data mop500_sdi0_data = { 86static struct mmci_platform_data mop500_sdi0_data = {
68 .vdd_handler = mop500_sdi0_vdd_handler, 87 .vdd_handler = mop500_sdi0_vdd_handler,
69 .ocr_mask = MMC_VDD_29_30, 88 .ocr_mask = MMC_VDD_29_30,
70 .f_max = 100000000, 89 .f_max = 50000000,
71 .capabilities = MMC_CAP_4_BIT_DATA, 90 .capabilities = MMC_CAP_4_BIT_DATA |
91 MMC_CAP_SD_HIGHSPEED |
92 MMC_CAP_MMC_HIGHSPEED,
72 .gpio_wp = -1, 93 .gpio_wp = -1,
73#ifdef CONFIG_STE_DMA40 94#ifdef CONFIG_STE_DMA40
74 .dma_filter = stedma40_filter, 95 .dma_filter = stedma40_filter,
@@ -77,10 +98,6 @@ static struct mmci_platform_data mop500_sdi0_data = {
77#endif 98#endif
78}; 99};
79 100
80/* GPIO pins used by the sdi0 level shifter */
81static int sdi0_en = -1;
82static int sdi0_vsel = -1;
83
84static void sdi0_configure(void) 101static void sdi0_configure(void)
85{ 102{
86 int ret; 103 int ret;
@@ -140,7 +157,7 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
140 157
141static struct mmci_platform_data mop500_sdi2_data = { 158static struct mmci_platform_data mop500_sdi2_data = {
142 .ocr_mask = MMC_VDD_165_195, 159 .ocr_mask = MMC_VDD_165_195,
143 .f_max = 100000000, 160 .f_max = 50000000,
144 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 161 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
145 .gpio_cd = -1, 162 .gpio_cd = -1,
146 .gpio_wp = -1, 163 .gpio_wp = -1,
@@ -177,7 +194,7 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
177 194
178static struct mmci_platform_data mop500_sdi4_data = { 195static struct mmci_platform_data mop500_sdi4_data = {
179 .ocr_mask = MMC_VDD_29_30, 196 .ocr_mask = MMC_VDD_29_30,
180 .f_max = 100000000, 197 .f_max = 50000000,
181 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | 198 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
182 MMC_CAP_MMC_HIGHSPEED, 199 MMC_CAP_MMC_HIGHSPEED,
183 .gpio_cd = -1, 200 .gpio_cd = -1,
@@ -199,17 +216,27 @@ void __init mop500_sdi_init(void)
199 /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ 216 /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */
200 if (!cpu_is_u8500v10()) 217 if (!cpu_is_u8500v10())
201 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; 218 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED;
202 db8500_add_sdi2(&mop500_sdi2_data, periphid); 219 /* sdi2 on snowball is in ATL_B mode for FSMC (LAN) */
220 if (!machine_is_snowball())
221 db8500_add_sdi2(&mop500_sdi2_data, periphid);
203 222
204 /* On-board eMMC */ 223 /* On-board eMMC */
205 db8500_add_sdi4(&mop500_sdi4_data, periphid); 224 db8500_add_sdi4(&mop500_sdi4_data, periphid);
206 225
207 if (machine_is_hrefv60()) { 226 if (machine_is_hrefv60() || machine_is_snowball()) {
208 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; 227 if (machine_is_hrefv60()) {
209 sdi0_en = HREFV60_SDMMC_EN_GPIO; 228 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
210 sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO; 229 sdi0_en = HREFV60_SDMMC_EN_GPIO;
230 sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
231 } else if (machine_is_snowball()) {
232 mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
233 mop500_sdi0_data.cd_invert = true;
234 sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
235 sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO;
236 }
211 sdi0_configure(); 237 sdi0_configure();
212 } 238 }
239
213 /* 240 /*
214 * On boards with the TC35892 GPIO expander, sdi0 will finally 241 * On boards with the TC35892 GPIO expander, sdi0 will finally
215 * be added when the TC35892 initializes and calls 242 * be added when the TC35892 initializes and calls
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index 69cce41f602a..5af36aa56c08 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -25,7 +25,7 @@ struct uib {
25 void (*init)(void); 25 void (*init)(void);
26}; 26};
27 27
28static struct __initdata uib mop500_uibs[] = { 28static struct uib __initdata mop500_uibs[] = {
29 [STUIB] = { 29 [STUIB] = {
30 .name = "ST-UIB", 30 .name = "ST-UIB",
31 .option = "stuib", 31 .option = "stuib",
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 2a08c07dec6d..cd54abaccd96 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -26,9 +26,11 @@
26#include <linux/mfd/ab8500/gpio.h> 26#include <linux/mfd/ab8500/gpio.h>
27#include <linux/leds-lp5521.h> 27#include <linux/leds-lp5521.h>
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/smsc911x.h>
29#include <linux/gpio_keys.h> 30#include <linux/gpio_keys.h>
30#include <linux/delay.h> 31#include <linux/delay.h>
31 32
33#include <linux/leds.h>
32#include <asm/mach-types.h> 34#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
34 36
@@ -47,6 +49,26 @@
47#include "board-mop500.h" 49#include "board-mop500.h"
48#include "board-mop500-regulators.h" 50#include "board-mop500-regulators.h"
49 51
52static struct gpio_led snowball_led_array[] = {
53 {
54 .name = "user_led",
55 .default_trigger = "none",
56 .gpio = 142,
57 },
58};
59
60static struct gpio_led_platform_data snowball_led_data = {
61 .leds = snowball_led_array,
62 .num_leds = ARRAY_SIZE(snowball_led_array),
63};
64
65static struct platform_device snowball_led_dev = {
66 .name = "leds-gpio",
67 .dev = {
68 .platform_data = &snowball_led_data,
69 },
70};
71
50static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { 72static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
51 .gpio_base = MOP500_AB8500_GPIO(0), 73 .gpio_base = MOP500_AB8500_GPIO(0),
52 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, 74 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
@@ -69,6 +91,97 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
69 0x7A, 0x00, 0x00}, 91 0x7A, 0x00, 0x00},
70}; 92};
71 93
94static struct gpio_keys_button snowball_key_array[] = {
95 {
96 .gpio = 32,
97 .type = EV_KEY,
98 .code = KEY_1,
99 .desc = "userpb",
100 .active_low = 1,
101 .debounce_interval = 50,
102 .wakeup = 1,
103 },
104 {
105 .gpio = 151,
106 .type = EV_KEY,
107 .code = KEY_2,
108 .desc = "extkb1",
109 .active_low = 1,
110 .debounce_interval = 50,
111 .wakeup = 1,
112 },
113 {
114 .gpio = 152,
115 .type = EV_KEY,
116 .code = KEY_3,
117 .desc = "extkb2",
118 .active_low = 1,
119 .debounce_interval = 50,
120 .wakeup = 1,
121 },
122 {
123 .gpio = 161,
124 .type = EV_KEY,
125 .code = KEY_4,
126 .desc = "extkb3",
127 .active_low = 1,
128 .debounce_interval = 50,
129 .wakeup = 1,
130 },
131 {
132 .gpio = 162,
133 .type = EV_KEY,
134 .code = KEY_5,
135 .desc = "extkb4",
136 .active_low = 1,
137 .debounce_interval = 50,
138 .wakeup = 1,
139 },
140};
141
142static struct gpio_keys_platform_data snowball_key_data = {
143 .buttons = snowball_key_array,
144 .nbuttons = ARRAY_SIZE(snowball_key_array),
145};
146
147static struct platform_device snowball_key_dev = {
148 .name = "gpio-keys",
149 .id = -1,
150 .dev = {
151 .platform_data = &snowball_key_data,
152 }
153};
154
155static struct smsc911x_platform_config snowball_sbnet_cfg = {
156 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
157 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
158 .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
159 .shift = 1,
160};
161
162static struct resource sbnet_res[] = {
163 {
164 .name = "smsc911x-memory",
165 .start = (0x5000 << 16),
166 .end = (0x5000 << 16) + 0xffff,
167 .flags = IORESOURCE_MEM,
168 },
169 {
170 .start = NOMADIK_GPIO_TO_IRQ(140),
171 .end = NOMADIK_GPIO_TO_IRQ(140),
172 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
173 },
174};
175
176static struct platform_device snowball_sbnet_dev = {
177 .name = "smsc911x",
178 .num_resources = ARRAY_SIZE(sbnet_res),
179 .resource = sbnet_res,
180 .dev = {
181 .platform_data = &snowball_sbnet_cfg,
182 },
183};
184
72static struct ab8500_platform_data ab8500_platdata = { 185static struct ab8500_platform_data ab8500_platdata = {
73 .irq_base = MOP500_AB8500_IRQ_BASE, 186 .irq_base = MOP500_AB8500_IRQ_BASE,
74 .regulator_reg_init = ab8500_regulator_reg_init, 187 .regulator_reg_init = ab8500_regulator_reg_init,
@@ -295,8 +408,9 @@ static void mop500_prox_deactivate(struct device *dev)
295} 408}
296 409
297/* add any platform devices here - TODO */ 410/* add any platform devices here - TODO */
298static struct platform_device *platform_devs[] __initdata = { 411static struct platform_device *mop500_platform_devs[] __initdata = {
299 &mop500_gpio_keys_device, 412 &mop500_gpio_keys_device,
413 &ab8500_device,
300}; 414};
301 415
302#ifdef CONFIG_STE_DMA40 416#ifdef CONFIG_STE_DMA40
@@ -478,6 +592,13 @@ static void __init mop500_uart_init(void)
478 db8500_add_uart2(&uart2_plat); 592 db8500_add_uart2(&uart2_plat);
479} 593}
480 594
595static struct platform_device *snowball_platform_devs[] __initdata = {
596 &snowball_led_dev,
597 &snowball_key_dev,
598 &snowball_sbnet_dev,
599 &ab8500_device,
600};
601
481static void __init mop500_init_machine(void) 602static void __init mop500_init_machine(void)
482{ 603{
483 int i2c0_devs; 604 int i2c0_devs;
@@ -487,24 +608,29 @@ static void __init mop500_init_machine(void)
487 * all these GPIO pins to the internal GPIO controller 608 * all these GPIO pins to the internal GPIO controller
488 * instead. 609 * instead.
489 */ 610 */
490 if (machine_is_hrefv60()) 611 if (!machine_is_snowball()) {
491 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; 612 if (machine_is_hrefv60())
492 else 613 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
493 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 614 else
615 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
616 }
494 617
495 u8500_init_devices(); 618 u8500_init_devices();
496 619
497 mop500_pins_init(); 620 mop500_pins_init();
498 621
499 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 622 if (machine_is_snowball())
623 platform_add_devices(snowball_platform_devs,
624 ARRAY_SIZE(snowball_platform_devs));
625 else
626 platform_add_devices(mop500_platform_devs,
627 ARRAY_SIZE(mop500_platform_devs));
500 628
501 mop500_i2c_init(); 629 mop500_i2c_init();
502 mop500_sdi_init(); 630 mop500_sdi_init();
503 mop500_spi_init(); 631 mop500_spi_init();
504 mop500_uart_init(); 632 mop500_uart_init();
505 633
506 platform_device_register(&ab8500_device);
507
508 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 634 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
509 if (machine_is_hrefv60()) 635 if (machine_is_hrefv60())
510 i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; 636 i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
@@ -512,6 +638,9 @@ static void __init mop500_init_machine(void)
512 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 638 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
513 i2c_register_board_info(2, mop500_i2c2_devices, 639 i2c_register_board_info(2, mop500_i2c2_devices,
514 ARRAY_SIZE(mop500_i2c2_devices)); 640 ARRAY_SIZE(mop500_i2c2_devices));
641
642 /* This board has full regulator constraints */
643 regulator_has_full_constraints();
515} 644}
516 645
517MACHINE_START(U8500, "ST-Ericsson MOP500 platform") 646MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
@@ -531,3 +660,12 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
531 .timer = &ux500_timer, 660 .timer = &ux500_timer,
532 .init_machine = mop500_init_machine, 661 .init_machine = mop500_init_machine,
533MACHINE_END 662MACHINE_END
663
664MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
665 .boot_params = 0x100,
666 .map_io = u8500_map_io,
667 .init_irq = ux500_init_irq,
668 /* we re-use nomadik timer here */
669 .timer = &ux500_timer,
670 .init_machine = mop500_init_machine,
671MACHINE_END
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 03a31cc9b084..ee77a8970c33 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -7,6 +7,11 @@
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 */
11#define SNOWBALL_SDMMC_EN_GPIO 217
12#define SNOWBALL_SDMMC_1V8_3V_GPIO 228
13#define SNOWBALL_SDMMC_CD_GPIO 218
14
10/* HREFv60-specific GPIO assignments, this board has no GPIO expander */ 15/* HREFv60-specific GPIO assignments, this board has no GPIO expander */
11#define HREFV60_TOUCH_RST_GPIO 143 16#define HREFV60_TOUCH_RST_GPIO 143
12#define HREFV60_PROX_SENSE_GPIO 217 17#define HREFV60_PROX_SENSE_GPIO 217
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 7d107be63eb4..e832664d1bd9 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -14,6 +14,7 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/clkdev.h> 16#include <linux/clkdev.h>
17#include <linux/cpufreq.h>
17 18
18#include <plat/mtu.h> 19#include <plat/mtu.h>
19#include <mach/hardware.h> 20#include <mach/hardware.h>
@@ -742,6 +743,51 @@ err_out:
742late_initcall(clk_debugfs_init); 743late_initcall(clk_debugfs_init);
743#endif /* defined(CONFIG_DEBUG_FS) */ 744#endif /* defined(CONFIG_DEBUG_FS) */
744 745
746unsigned long clk_smp_twd_rate = 400000000;
747
748unsigned long clk_smp_twd_get_rate(struct clk *clk)
749{
750 return clk_smp_twd_rate;
751}
752
753static struct clk clk_smp_twd = {
754 .get_rate = clk_smp_twd_get_rate,
755 .name = "smp_twd",
756};
757
758static struct clk_lookup clk_smp_twd_lookup = {
759 .dev_id = "smp_twd",
760 .clk = &clk_smp_twd,
761};
762
763#ifdef CONFIG_CPU_FREQ
764
765static int clk_twd_cpufreq_transition(struct notifier_block *nb,
766 unsigned long state, void *data)
767{
768 struct cpufreq_freqs *f = data;
769
770 if (state == CPUFREQ_PRECHANGE) {
771 /* Save frequency in simple Hz */
772 clk_smp_twd_rate = f->new * 1000;
773 }
774
775 return NOTIFY_OK;
776}
777
778static struct notifier_block clk_twd_cpufreq_nb = {
779 .notifier_call = clk_twd_cpufreq_transition,
780};
781
782static int clk_init_smp_twd_cpufreq(void)
783{
784 return cpufreq_register_notifier(&clk_twd_cpufreq_nb,
785 CPUFREQ_TRANSITION_NOTIFIER);
786}
787late_initcall(clk_init_smp_twd_cpufreq);
788
789#endif
790
745int __init clk_init(void) 791int __init clk_init(void)
746{ 792{
747 if (cpu_is_u8500ed()) { 793 if (cpu_is_u8500ed()) {
@@ -762,6 +808,8 @@ int __init clk_init(void)
762 else 808 else
763 clkdev_add_table(u8500_v1_clks, ARRAY_SIZE(u8500_v1_clks)); 809 clkdev_add_table(u8500_v1_clks, ARRAY_SIZE(u8500_v1_clks));
764 810
811 clkdev_add(&clk_smp_twd_lookup);
812
765#ifdef CONFIG_DEBUG_FS 813#ifdef CONFIG_DEBUG_FS
766 clk_debugfs_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); 814 clk_debugfs_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks));
767 if (cpu_is_u8500ed()) 815 if (cpu_is_u8500ed())
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c
index c01bc19e3c5e..22705d246fc7 100644
--- a/arch/arm/mach-ux500/cpu-db5500.c
+++ b/arch/arm/mach-ux500/cpu-db5500.c
@@ -44,6 +44,7 @@ static struct map_desc u5500_io_desc[] __initdata = {
44 __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K), 44 __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K),
45 __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K), 45 __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K),
46 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K), 46 __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
47 __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K),
47}; 48};
48 49
49static struct resource db5500_pmu_resources[] = { 50static struct resource db5500_pmu_resources[] = {
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h
index 088b550c40df..7dd08074c37b 100644
--- a/arch/arm/mach-ux500/include/mach/uncompress.h
+++ b/arch/arm/mach-ux500/include/mach/uncompress.h
@@ -54,7 +54,8 @@ static inline void arch_decomp_setup(void)
54 if (machine_is_u8500() || 54 if (machine_is_u8500() ||
55 machine_is_svp8500v1() || 55 machine_is_svp8500v1() ||
56 machine_is_svp8500v2() || 56 machine_is_svp8500v2() ||
57 machine_is_hrefv60()) 57 machine_is_hrefv60() ||
58 machine_is_snowball())
58 ux500_uart_base = U8500_UART2_BASE; 59 ux500_uart_base = U8500_UART2_BASE;
59 else if (machine_is_u5500()) 60 else if (machine_is_u5500())
60 ux500_uart_base = U5500_UART0_BASE; 61 ux500_uart_base = U5500_UART0_BASE;
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c
index 82e535953fd9..0a01cbdfe063 100644
--- a/arch/arm/mach-ux500/usb.c
+++ b/arch/arm/mach-ux500/usb.c
@@ -6,6 +6,7 @@
6 */ 6 */
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 <plat/ste_dma40.h> 10#include <plat/ste_dma40.h>
10#include <mach/hardware.h> 11#include <mach/hardware.h>
11#include <mach/usb.h> 12#include <mach/usb.h>