aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-05-03 03:03:52 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-04 12:50:03 -0400
commit9e4e7fe1a97191e373257ab59e3d6bbcce9a9f1e (patch)
treed29bb31d26432225887d2ee00c77b0f5f07f5acf /arch/arm/mach-ux500
parentd48fd006e6d9394e9abd14f4747034f73bb6a386 (diff)
ARM: 6083/1: ux500: put DB8500-specific devices in devices-db8500.c
Add devices-db8500.c for DB8500-specific devices, starting with SSP0. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/Makefile2
-rw-r--r--arch/arm/mach-ux500/board-mop500.c21
-rw-r--r--arch/arm/mach-ux500/devices-db8500.c30
-rw-r--r--arch/arm/mach-ux500/include/mach/devices.h1
4 files changed, 36 insertions, 18 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index e5b9f742a0c9..55651e04ab43 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -3,6 +3,6 @@
3# 3#
4 4
5obj-y := clock.o cpu.o devices.o 5obj-y := clock.o cpu.o devices.o
6obj-$(CONFIG_ARCH_U8500) += cpu-u8500.o 6obj-$(CONFIG_ARCH_U8500) += cpu-u8500.o devices-db8500.o
7obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o 7obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o
8obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o 8obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index cc52d53d7727..6bb9a3d3f51e 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -24,6 +24,7 @@
24 24
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26#include <mach/setup.h> 26#include <mach/setup.h>
27#include <mach/devices.h>
27 28
28#define __MEM_4K_RESOURCE(x) \ 29#define __MEM_4K_RESOURCE(x) \
29 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} 30 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
@@ -91,22 +92,6 @@ static struct pl022_ssp_controller ssp0_platform_data = {
91 .num_chipselect = 5, 92 .num_chipselect = 5,
92}; 93};
93 94
94static struct amba_device pl022_device = {
95 .dev = {
96 .coherent_dma_mask = ~0,
97 .init_name = "ssp0",
98 .platform_data = &ssp0_platform_data,
99 },
100 .res = {
101 .start = U8500_SSP0_BASE,
102 .end = U8500_SSP0_BASE + SZ_4K - 1,
103 .flags = IORESOURCE_MEM,
104 },
105 .irq = {IRQ_SSP0, NO_IRQ },
106 /* ST-Ericsson modified id */
107 .periphid = SSP_PER_ID,
108};
109
110#define U8500_I2C_RESOURCES(id, size) \ 95#define U8500_I2C_RESOURCES(id, size) \
111static struct resource u8500_i2c_resources_##id[] = { \ 96static struct resource u8500_i2c_resources_##id[] = { \
112 [0] = { \ 97 [0] = { \
@@ -175,7 +160,7 @@ static struct amba_device *amba_devs[] __initdata = {
175 &uart0_device, 160 &uart0_device,
176 &uart1_device, 161 &uart1_device,
177 &uart2_device, 162 &uart2_device,
178 &pl022_device, 163 &u8500_ssp0_device,
179}; 164};
180 165
181/* add any platform devices here - TODO */ 166/* add any platform devices here - TODO */
@@ -190,6 +175,8 @@ static void __init u8500_init_machine(void)
190{ 175{
191 int i; 176 int i;
192 177
178 u8500_ssp0_device.dev.platform_data = &ssp0_platform_data;
179
193 /* Register the active AMBA devices on this board */ 180 /* Register the active AMBA devices on this board */
194 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) 181 for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
195 amba_device_register(amba_devs[i], &iomem_resource); 182 amba_device_register(amba_devs[i], &iomem_resource);
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c
new file mode 100644
index 000000000000..f4a2dda4d0ac
--- /dev/null
+++ b/arch/arm/mach-ux500/devices-db8500.c
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/kernel.h>
9#include <linux/platform_device.h>
10#include <linux/interrupt.h>
11#include <linux/io.h>
12#include <linux/amba/bus.h>
13
14#include <mach/hardware.h>
15#include <mach/setup.h>
16
17struct amba_device u8500_ssp0_device = {
18 .dev = {
19 .coherent_dma_mask = ~0,
20 .init_name = "ssp0",
21 },
22 .res = {
23 .start = U8500_SSP0_BASE,
24 .end = U8500_SSP0_BASE + SZ_4K - 1,
25 .flags = IORESOURCE_MEM,
26 },
27 .irq = {IRQ_SSP0, NO_IRQ },
28 /* ST-Ericsson modified id */
29 .periphid = SSP_PER_ID,
30};
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h
index 5bca7c605cd6..90229b168959 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/include/mach/devices.h
@@ -11,5 +11,6 @@ struct platform_device;
11struct amba_device; 11struct amba_device;
12 12
13extern struct amba_device ux500_pl031_device; 13extern struct amba_device ux500_pl031_device;
14extern struct amba_device u8500_ssp0_device;
14 15
15#endif 16#endif