aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Wallin <mattias.wallin@stericsson.com>2010-05-26 16:42:51 +0200
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:47 -0600
commitf91262279263c4ae77ef798030e7ccee3a854aa6 (patch)
tree8a0d0d994a3d52819f5c887943d428c63dee6d4e
parentaf73cf9fd71c116dc78c0d0792ff75e9fd05631c (diff)
downloadlinux-2.6.34-ux500-f91262279263c4ae77ef798030e7ccee3a854aa6.tar.gz
ARM: AB5500 core platform configuration
This patch adds the platform configration part of the mixed-signal chip AB5500. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/500 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: Id6eb307fa52a5749b93be35e2dba8413d939731d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2635 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rwxr-xr-xarch/arm/configs/sim5500_defconfig2
-rwxr-xr-xarch/arm/mach-ux500/board-u5500.c38
-rwxr-xr-xarch/arm/mach-ux500/include/mach/irqs.h9
3 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/configs/sim5500_defconfig b/arch/arm/configs/sim5500_defconfig
index 7ff8a7afeaf..186e725f714 100755
--- a/arch/arm/configs/sim5500_defconfig
+++ b/arch/arm/configs/sim5500_defconfig
@@ -546,6 +546,8 @@ CONFIG_MISC_DEVICES=y
# CONFIG_DS1682 is not set
# CONFIG_TI_DAC7512 is not set
CONFIG_AB8500=y
+CONFIG_ABX500_CORE=y
+CONFIG_AB5500_CORE=y
# CONFIG_AB8500_ACCESS_CONFIG1 is not set
# CONFIG_AB8500_ACCESS_CONFIG2 is not set
CONFIG_AB8500_ACCESS_CONFIG3=y
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index c8811b4e79e..f9cce0928d1 100755
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -10,6 +10,7 @@
#include <linux/platform_device.h>
#include <linux/amba/bus.h>
#include <linux/gpio.h>
+#include <linux/mfd/abx500.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -109,10 +110,47 @@ static struct amba_device *amba_board_devs[] __initdata = {
&ux500_uart2_device,
};
+#ifdef CONFIG_AB5500_CORE
+static struct resource ab5500_resources[] = {
+ [0] = {
+ /*TODO Change this when prcmu driver arrives */
+ .start = IRQ_AB5500_BASE + 1,
+ .end = IRQ_AB5500_BASE + 1,
+ .flags = IORESOURCE_IRQ
+ }
+};
+
+static struct ab5500_platform_data ab5500_plf_data = {
+ .irq = {
+ .base = IRQ_AB5500_BASE,
+ .count = AB5500_NR_IRQS,
+ },
+ .dev_data = {
+ },
+ .dev_data_sz = {
+ },
+ .init_settings = NULL,
+ .init_settings_sz = 0,
+};
+
+struct platform_device u5500_ab5500_device = {
+ .name = "ab5500-core",
+ .id = 0,
+ .dev = {
+ .platform_data = &ab5500_plf_data,
+ },
+ .num_resources = 1,
+ .resource = ab5500_resources,
+};
+#endif
+
static struct platform_device *u5500_platform_devices[] __initdata = {
#ifdef CONFIG_U5500_MLOADER_HELPER
&mloader_helper_device,
#endif
+#ifdef CONFIG_AB5500_CORE
+ &u5500_ab5500_device,
+#endif
};
static void __init u5500_init_machine(void)
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h
index 88e51d1c4da..208e11c80fa 100755
--- a/arch/arm/mach-ux500/include/mach/irqs.h
+++ b/arch/arm/mach-ux500/include/mach/irqs.h
@@ -111,6 +111,15 @@
#define MBOX_PAIR1_VIRT_IRQ IRQ_MODEM_EVENTS_BASE + 45
#define MBOX_PAIR2_VIRT_IRQ IRQ_MODEM_EVENTS_BASE + 41
+/* This should be fixed properly when the U5500 interrupts are added */
+#ifdef CONFIG_AB5500_CORE
+#define AB5500_NR_IRQS 5
+#define IRQ_AB5500_BASE (IRQ_MODEM_EVENTS_END + 1)
+#define IRQ_AB5500_END (IRQ_AB5500_BASE + AB5500_NR_IRQS)
+#define NR_IRQS (IRQ_AB5500_END)
+#else
+
#define NR_IRQS IRQ_MODEM_EVENTS_END
+#endif
#endif /* ASM_ARCH_IRQS_H */