aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rwxr-xr-xarch/arm/mach-ux500/db8500-devices.c12
-rwxr-xr-xarch/arm/mach-ux500/include/mach/gpio.h12
-rw-r--r--arch/arm/mach-ux500/include/mach/irqs-board-u5500.h21
-rw-r--r--arch/arm/mach-ux500/include/mach/irqs-db5500.h22
-rwxr-xr-xarch/arm/mach-ux500/include/mach/irqs.h45
5 files changed, 75 insertions, 37 deletions
diff --git a/arch/arm/mach-ux500/db8500-devices.c b/arch/arm/mach-ux500/db8500-devices.c
index 9cf411ce9d0..b226237260b 100755
--- a/arch/arm/mach-ux500/db8500-devices.c
+++ b/arch/arm/mach-ux500/db8500-devices.c
@@ -61,8 +61,8 @@ static struct resource u8500_i2c0_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = IRQ_I2C0,
- .end = IRQ_I2C0,
+ .start = IRQ_DB8500_I2C0,
+ .end = IRQ_DB8500_I2C0,
.flags = IORESOURCE_IRQ,
}
};
@@ -81,8 +81,8 @@ static struct resource u8500_i2c4_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = IRQ_I2C4,
- .end = IRQ_I2C4,
+ .start = IRQ_DB8500_I2C4,
+ .end = IRQ_DB8500_I2C4,
.flags = IORESOURCE_IRQ,
}
};
@@ -120,7 +120,7 @@ struct amba_device u8500_ssp0_device = {
.flags = IORESOURCE_MEM,
},
.dma_mask = DMA_BIT_MASK(32),
- .irq = {IRQ_SSP0, NO_IRQ},
+ .irq = {IRQ_DB8500_SSP0, NO_IRQ},
.periphid = SSP_PER_ID,
};
@@ -148,6 +148,6 @@ struct amba_device u8500_ssp1_device = {
.flags = IORESOURCE_MEM,
},
.dma_mask = DMA_BIT_MASK(32),
- .irq = {IRQ_SSP1, NO_IRQ},
+ .irq = {IRQ_DB8500_SSP1, NO_IRQ},
.periphid = SSP_PER_ID,
};
diff --git a/arch/arm/mach-ux500/include/mach/gpio.h b/arch/arm/mach-ux500/include/mach/gpio.h
index 9690168fb82..6ee38c5dfad 100755
--- a/arch/arm/mach-ux500/include/mach/gpio.h
+++ b/arch/arm/mach-ux500/include/mach/gpio.h
@@ -141,13 +141,13 @@ extern int stm_gpio_altfuncdisable(gpio_alt_function alt_func);
#define __GPIO_RESOURCE(soc, block) \
{ \
- .start = soc##_GPIOBANK##block##_BASE, \
- .end = soc##_GPIOBANK##block##_BASE + 127, \
+ .start = U##soc##_GPIOBANK##block##_BASE, \
+ .end = U##soc##_GPIOBANK##block##_BASE + 127, \
.flags = IORESOURCE_MEM, \
}, \
{ \
- .start = IRQ_GPIO##block, \
- .end = IRQ_GPIO##block, \
+ .start = IRQ_DB##soc##_GPIO##block, \
+ .end = IRQ_DB##soc##_GPIO##block, \
.flags = IORESOURCE_IRQ, \
}
@@ -171,10 +171,10 @@ extern int stm_gpio_altfuncdisable(gpio_alt_function alt_func);
}
#ifdef CONFIG_UX500_SOC_DB8500
-#define GPIO_RESOURCE(block) __GPIO_RESOURCE(U8500, block)
+#define GPIO_RESOURCE(block) __GPIO_RESOURCE(8500, block)
#define GPIO_DEVICE(block) __GPIO_DEVICE(u8500, block)
#elif defined(CONFIG_UX500_SOC_DB5500)
-#define GPIO_RESOURCE(block) __GPIO_RESOURCE(U5500, block)
+#define GPIO_RESOURCE(block) __GPIO_RESOURCE(5500, block)
#define GPIO_DEVICE(block) __GPIO_DEVICE(u5500, block)
#endif
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h
new file mode 100644
index 00000000000..29d972c7717
--- /dev/null
+++ b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#ifndef __MACH_IRQS_BOARD_U5500_H
+#define __MACH_IRQS_BOARD_U5500_H
+
+#define AB5500_NR_IRQS 5
+#define IRQ_AB5500_BASE IRQ_BOARD_START
+#define IRQ_AB5500_END (IRQ_AB5500_BASE + AB5500_NR_IRQS)
+
+#define U5500_IRQ_END IRQ_AB5500_END
+
+#if IRQ_BOARD_END < U5500_IRQ_END
+#undef IRQ_BOARD_END
+#define IRQ_BOARD_END U5500_IRQ_END
+#endif
+
+#endif
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db5500.h b/arch/arm/mach-ux500/include/mach/irqs-db5500.h
index 6fbfe5e2065..9e5c4b72b6c 100644
--- a/arch/arm/mach-ux500/include/mach/irqs-db5500.h
+++ b/arch/arm/mach-ux500/include/mach/irqs-db5500.h
@@ -82,4 +82,26 @@
#define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125)
#define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126)
+#ifdef CONFIG_UX500_SOC_DB5500
+
+/*
+ * After the GPIO ones we reserve a range of IRQ:s in which virtual
+ * IRQ:s representing modem IRQ:s can be allocated
+ */
+#define IRQ_MODEM_EVENTS_BASE IRQ_GPIO_END
+#define IRQ_MODEM_EVENTS_NBR 72
+#define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
+
+/* List of virtual IRQ:s that are allocated from the range above */
+#define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43)
+#define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45)
+#define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41)
+
+#if IRQ_SOC_END < IRQ_MODEM_EVENTS_END
+#undef IRQ_SOC_END
+#define IRQ_SOC_END IRQ_MODEM_EVENTS_END
+#endif
+
+#endif /* CONFIG_UX500_SOC_DB5500 */
+
#endif
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h
index 208e11c80fa..4fb5256135b 100755
--- a/arch/arm/mach-ux500/include/mach/irqs.h
+++ b/arch/arm/mach-ux500/include/mach/irqs.h
@@ -15,8 +15,8 @@
#define IRQ_LOCALTIMER 29
#define IRQ_LOCALWDOG 30
-
#define IRQ_SPI_START 32
+#define IRQ_SHPI_START IRQ_SPI_START
/* Interrupt numbers generic for shared peripheral */
#define IRQ_MTU0 (IRQ_SPI_START + 4)
@@ -89,37 +89,32 @@
#define IRQ_CA_MSG_PEND_NOTIFICATION_0_V1 (IRQ_SPI_START + 79)
#define IRQ_CA_MSG_PEND_NOTIFICATION_1_V1 (IRQ_SPI_START + 77)
-#define U8500_SOC_NR_IRQS 161
+#define DBX500_NR_INTERNAL_IRQS 161
/* After chip-specific IRQ numbers we have the GPIO ones */
#define U8500_NR_GPIO 268
-#define GPIO_TO_IRQ(gpio) (gpio + U8500_SOC_NR_IRQS)
-#define IRQ_TO_GPIO(irq) (irq - U8500_SOC_NR_IRQS)
+#define GPIO_TO_IRQ(gpio) (gpio + DBX500_NR_INTERNAL_IRQS)
+#define IRQ_TO_GPIO(irq) (irq - DBX500_NR_INTERNAL_IRQS)
#define NOMADIK_GPIO_TO_IRQ GPIO_TO_IRQ
#define NOMADIK_IRQ_TO_GPIO IRQ_TO_GPIO
+#define IRQ_GPIO_END NOMADIK_GPIO_TO_IRQ(U8500_NR_GPIO)
-/* After the GPIO ones we reserve a range of IRQ:s in which virtual
- * IRQ:s representing modem IRQ:s can be allocated
- */
-#define IRQ_MODEM_EVENTS_BASE ( GPIO_TO_IRQ(U8500_NR_GPIO) + 1 )
-#define IRQ_MODEM_EVENTS_NBR 72
-#define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR)
-
-/* List of virtual IRQ:s that are allocated from the range above */
-#define MBOX_PAIR0_VIRT_IRQ IRQ_MODEM_EVENTS_BASE + 43
-#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
+/* This will be overridden by SoC-specific irq headers */
+#define IRQ_SOC_END IRQ_GPIO_END
+
+#include <mach/irqs-db5500.h>
+#include <mach/irqs-db8500.h>
+
+#define IRQ_BOARD_START IRQ_SOC_END
+
+/* This will be overridden by board-specific irq headers */
+#define IRQ_BOARD_END IRQ_BOARD_START
+
+#ifdef CONFIG_MACH_U5500_SIMULATOR
+#include <mach/irqs-board-u5500.h>
#endif
+#define NR_IRQS IRQ_BOARD_END
+
#endif /* ASM_ARCH_IRQS_H */