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/board-mop500.c5
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c7
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c44
-rw-r--r--arch/arm/mach-ux500/devices-db8500.h5
4 files changed, 55 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 0e928d281759..bf04b783b6d0 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -214,7 +214,7 @@ static struct platform_device snowball_sbnet_dev = {
214 }, 214 },
215}; 215};
216 216
217static struct ab8500_platform_data ab8500_platdata = { 217struct ab8500_platform_data ab8500_platdata = {
218 .irq_base = MOP500_AB8500_IRQ_BASE, 218 .irq_base = MOP500_AB8500_IRQ_BASE,
219 .regulator_reg_init = ab8500_regulator_reg_init, 219 .regulator_reg_init = ab8500_regulator_reg_init,
220 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), 220 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init),
@@ -650,6 +650,7 @@ static void __init mop500_init_machine(void)
650 int i2c0_devs; 650 int i2c0_devs;
651 int i; 651 int i;
652 652
653 platform_device_register(&db8500_prcmu_device);
653 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 654 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
654 655
655 mop500_pinmaps_init(); 656 mop500_pinmaps_init();
@@ -684,6 +685,7 @@ static void __init snowball_init_machine(void)
684 struct device *parent = NULL; 685 struct device *parent = NULL;
685 int i; 686 int i;
686 687
688 platform_device_register(&db8500_prcmu_device);
687 snowball_pinmaps_init(); 689 snowball_pinmaps_init();
688 parent = u8500_init_devices(&ab8500_platdata); 690 parent = u8500_init_devices(&ab8500_platdata);
689 691
@@ -709,6 +711,7 @@ static void __init hrefv60_init_machine(void)
709 int i2c0_devs; 711 int i2c0_devs;
710 int i; 712 int i;
711 713
714 platform_device_register(&db8500_prcmu_device);
712 /* 715 /*
713 * The HREFv60 board removed a GPIO expander and routed 716 * The HREFv60 board removed a GPIO expander and routed
714 * all these GPIO pins to the internal GPIO controller 717 * all these GPIO pins to the internal GPIO controller
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index d614d7150dcb..6f42b6087df5 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -138,14 +138,9 @@ static struct platform_device db8500_pmu_device = {
138 .dev.platform_data = &db8500_pmu_platdata, 138 .dev.platform_data = &db8500_pmu_platdata,
139}; 139};
140 140
141static struct platform_device db8500_prcmu_device = {
142 .name = "db8500-prcmu",
143};
144
145static struct platform_device *platform_devs[] __initdata = { 141static struct platform_device *platform_devs[] __initdata = {
146 &u8500_dma40_device, 142 &u8500_dma40_device,
147 &db8500_pmu_device, 143 &db8500_pmu_device,
148 &db8500_prcmu_device,
149}; 144};
150 145
151static resource_size_t __initdata db8500_gpio_base[] = { 146static resource_size_t __initdata db8500_gpio_base[] = {
@@ -285,6 +280,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), 280 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL),
286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 281 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
287 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 282 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
283 OF_DEV_AUXDATA("stericsson,db8500-prcmu", 0x80157000, "db8500-prcmu",
284 &db8500_prcmu_pdata),
288 /* Requires device name bindings. */ 285 /* Requires device name bindings. */
289 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE, 286 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE,
290 "pinctrl-db8500", NULL), 287 "pinctrl-db8500", NULL),
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
index 318d49020894..f3d9419f75d3 100644
--- a/arch/arm/mach-ux500/devices-db8500.c
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -13,11 +13,13 @@
13#include <linux/amba/bus.h> 13#include <linux/amba/bus.h>
14#include <linux/amba/pl022.h> 14#include <linux/amba/pl022.h>
15#include <linux/platform_data/dma-ste-dma40.h> 15#include <linux/platform_data/dma-ste-dma40.h>
16#include <linux/mfd/dbx500-prcmu.h>
16 17
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <mach/setup.h> 19#include <mach/setup.h>
19#include <mach/irqs.h> 20#include <mach/irqs.h>
20 21
22#include "devices-db8500.h"
21#include "ste-dma40-db8500.h" 23#include "ste-dma40-db8500.h"
22 24
23static struct resource dma40_resources[] = { 25static struct resource dma40_resources[] = {
@@ -194,3 +196,45 @@ struct platform_device u8500_ske_keypad_device = {
194 .num_resources = ARRAY_SIZE(keypad_resources), 196 .num_resources = ARRAY_SIZE(keypad_resources),
195 .resource = keypad_resources, 197 .resource = keypad_resources,
196}; 198};
199
200struct prcmu_pdata db8500_prcmu_pdata = {
201 .ab_platdata = &ab8500_platdata,
202 .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET,
203 .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET,
204};
205
206static struct resource db8500_prcmu_res[] = {
207 {
208 .name = "prcmu",
209 .start = U8500_PRCMU_BASE,
210 .end = U8500_PRCMU_BASE + SZ_8K - 1,
211 .flags = IORESOURCE_MEM,
212 },
213 {
214 .name = "prcmu-tcdm",
215 .start = U8500_PRCMU_TCDM_BASE,
216 .end = U8500_PRCMU_TCDM_BASE + SZ_4K - 1,
217 .flags = IORESOURCE_MEM,
218 },
219 {
220 .name = "irq",
221 .start = IRQ_DB8500_PRCMU1,
222 .end = IRQ_DB8500_PRCMU1,
223 .flags = IORESOURCE_IRQ,
224 },
225 {
226 .name = "prcmu-tcpm",
227 .start = U8500_PRCMU_TCPM_BASE,
228 .end = U8500_PRCMU_TCPM_BASE + SZ_4K - 1,
229 .flags = IORESOURCE_MEM,
230 },
231};
232
233struct platform_device db8500_prcmu_device = {
234 .name = "db8500-prcmu",
235 .resource = db8500_prcmu_res,
236 .num_resources = ARRAY_SIZE(db8500_prcmu_res),
237 .dev = {
238 .platform_data = &db8500_prcmu_pdata,
239 },
240};
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h
index a5e05f6e256f..dbcb35c48f06 100644
--- a/arch/arm/mach-ux500/devices-db8500.h
+++ b/arch/arm/mach-ux500/devices-db8500.h
@@ -14,6 +14,11 @@
14 14
15struct ske_keypad_platform_data; 15struct ske_keypad_platform_data;
16struct pl022_ssp_controller; 16struct pl022_ssp_controller;
17struct platform_device;
18
19extern struct ab8500_platform_data ab8500_platdata;
20extern struct prcmu_pdata db8500_prcmu_pdata;
21extern struct platform_device db8500_prcmu_device;
17 22
18static inline struct platform_device * 23static inline struct platform_device *
19db8500_add_ske_keypad(struct device *parent, 24db8500_add_ske_keypad(struct device *parent,