diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-05-03 02:46:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-04 12:50:02 -0400 |
commit | d48fd006e6d9394e9abd14f4747034f73bb6a386 (patch) | |
tree | fab3577a596c9f81268f37cf71bf07a67da39e78 /arch/arm/mach-ux500/devices.c | |
parent | d67d1127a625cc5ebc3802180b19cc74f35b5578 (diff) |
ARM: 6082/1: ux500: put common devices into devices.c
Introduce devices.c, for placing devices common among Ux500 SoCs. Start
with the PL031 device.
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/devices.c')
-rw-r--r-- | arch/arm/mach-ux500/devices.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c new file mode 100644 index 000000000000..eef686a4802f --- /dev/null +++ b/arch/arm/mach-ux500/devices.c | |||
@@ -0,0 +1,37 @@ | |||
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 | |||
17 | struct amba_device ux500_pl031_device = { | ||
18 | .dev = { | ||
19 | .init_name = "pl031", | ||
20 | }, | ||
21 | .res = { | ||
22 | .start = UX500_RTC_BASE, | ||
23 | .end = UX500_RTC_BASE + SZ_4K - 1, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | }, | ||
26 | .irq = {IRQ_RTC_RTT, NO_IRQ}, | ||
27 | }; | ||
28 | |||
29 | void __init amba_add_devices(struct amba_device *devs[], int num) | ||
30 | { | ||
31 | int i; | ||
32 | |||
33 | for (i = 0; i < num; i++) { | ||
34 | struct amba_device *d = devs[i]; | ||
35 | amba_device_register(d, &iomem_resource); | ||
36 | } | ||
37 | } | ||