ARM: OMAP2+: Prepare for irqs.h removal

As the interrupts should only be defined in the platform_data, and
eventually coming from device tree, there's no need to define them
in header files.

Let's remove the hardcoded references to irqs.h and fix up the includes
so we don't rely on headers included in irqs.h. Note that we're
defining OMAP_INTC_START as 0 to the interrupts. This will be needed
when we enable SPARSE_IRQ. For some drivers we need to add
#include <plat/cpu.h> for now until these drivers are fixed to
remove cpu_is_omapxxxx() usage.

While at it, sort som of the includes the standard way, and add
the trailing commas where they are missing in the related data
structures.

Note that for drivers/staging/tidspbridge we just define things
locally.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Tony Lindgren
2012-08-27 17:43:01 -07:00
parent aefaf7be49
commit 7d7e1eba7e
54 changed files with 263 additions and 238 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ static int __init omap2430_i2c_init(void)
sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
ARRAY_SIZE(sdp2430_i2c1_boardinfo));
omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ,
omap_pmic_init(2, 100, "twl4030", 7 + OMAP_INTC_START,
&sdp2430_twldata);
return 0;
}
+1 -1
View File
@@ -579,7 +579,7 @@ static int __init omap4_i2c_init(void)
TWL_COMMON_REGULATOR_V1V8 |
TWL_COMMON_REGULATOR_V2V1);
omap4_pmic_init("twl6030", &sdp4430_twldata,
&twl6040_data, OMAP44XX_IRQ_SYS_2N);
&twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
+1 -2
View File
@@ -296,8 +296,7 @@ static struct resource am3517_hecc_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_35XX_HECC0_IRQ,
.end = INT_35XX_HECC0_IRQ,
.start = 24 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
},
};
+2 -2
View File
@@ -42,6 +42,7 @@
#include <plat/usb.h>
#include <plat/nand.h>
#include <plat/gpmc.h>
#include <plat/serial.h>
#include <mach/am35xx.h>
@@ -89,8 +90,7 @@ static struct resource cm_t3517_hecc_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_35XX_HECC0_IRQ,
.end = INT_35XX_HECC0_IRQ,
.start = 24 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
},
};
+1 -1
View File
@@ -16,8 +16,8 @@
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/io.h>
#include <plat/irqs.h>
#include <plat/cpu.h>
#include <plat/gpmc.h>
#include <plat/nand.h>
#include <plat/onenand.h>
+2
View File
@@ -32,6 +32,8 @@
#include "common.h"
#include <plat/gpmc.h>
#include <plat/usb.h>
#include <plat/serial.h>
#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <plat/onenand.h>
+1 -2
View File
@@ -27,7 +27,6 @@
#include "common.h"
#include <plat/menelaus.h>
#include <mach/irqs.h>
#include <plat/mcspi.h>
#include <plat/onenand.h>
#include <plat/mmc.h>
@@ -599,7 +598,7 @@ static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
{
I2C_BOARD_INFO("menelaus", 0x72),
.irq = INT_24XX_SYS_NIRQ,
.irq = 7 + OMAP_INTC_START,
.platform_data = &n8x0_menelaus_platform_data,
},
};
+1 -1
View File
@@ -292,7 +292,7 @@ static int __init omap4_panda_i2c_init(void)
TWL_COMMON_REGULATOR_V1V8 |
TWL_COMMON_REGULATOR_V2V1);
omap4_pmic_init("twl6030", &omap4_panda_twldata,
&twl6040_data, OMAP44XX_IRQ_SYS_2N);
&twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
omap_register_i2c_bus(2, 400, NULL, 0);
/*
* Bus 3 is attached to the DVI port where devices like the pico DLP
+2 -1
View File
@@ -27,6 +27,7 @@
#include <plat/gpmc.h>
#include "common.h"
#include <plat/onenand.h>
#include <plat/serial.h>
#include "mux.h"
#include "hsmmc.h"
@@ -84,7 +85,7 @@ static struct twl4030_platform_data rm680_twl_data = {
static void __init rm680_i2c_init(void)
{
omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
omap_pmic_init(1, 2900, "twl5031", 7 + OMAP_INTC_START, &rm680_twl_data);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0);
}
+1 -1
View File
@@ -1047,7 +1047,7 @@ static int __init rx51_i2c_init(void)
rx51_twldata.vdac->constraints.apply_uV = true;
rx51_twldata.vdac->constraints.name = "VDAC";
omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
omap_pmic_init(1, 2200, "twl5030", 7 + OMAP_INTC_START, &rx51_twldata);
omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
-1
View File
@@ -20,7 +20,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/irqs.h>
#include "common.h"
#include <plat/usb.h>
@@ -19,6 +19,7 @@
#include <plat/gpmc.h>
#include <plat/gpmc-smsc911x.h>
#include <plat/serial.h>
#include <mach/board-zoom.h>
+2 -1
View File
@@ -27,6 +27,7 @@
#include "common.h"
#include <plat/usb.h>
#include <plat/serial.h>
#include <mach/board-zoom.h>
@@ -279,7 +280,7 @@ static int __init omap_i2c_init(void)
codec_data->hs_extmute = 1;
codec_data->set_hs_extmute = zoom2_set_hs_extmute;
}
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0);
return 0;
@@ -27,6 +27,7 @@
#include <plat/mcspi.h>
#include <plat/nand.h>
#include "common.h"
#include "common-board-devices.h"
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+2
View File
@@ -31,6 +31,8 @@
#include <plat/common.h>
#include <asm/proc-fns.h>
#define OMAP_INTC_START 0
#ifdef CONFIG_SOC_OMAP2420
extern void omap242x_map_common_io(void);
#else
-1
View File
@@ -28,7 +28,6 @@
#include <linux/cpu_pm.h>
#include <plat/prcm.h>
#include <plat/irqs.h>
#include "powerdomain.h"
#include "clockdomain.h"
+8 -9
View File
@@ -20,7 +20,6 @@
#include <linux/platform_data/omap4-keypad.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
#include <asm/pmu.h>
@@ -31,6 +30,8 @@
#include <plat/omap_device.h>
#include <plat/omap4-keypad.h>
#include "soc.h"
#include "common.h"
#include "mux.h"
#include "control.h"
#include "devices.h"
@@ -111,7 +112,7 @@ static struct resource omap2cam_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_24XX_CAM_IRQ,
.start = 24 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
}
};
@@ -200,7 +201,7 @@ static struct resource omap3isp_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_34XX_CAM_IRQ,
.start = 24 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
}
};
@@ -434,14 +435,12 @@ static inline void omap_init_mcspi(void) {}
#endif
static struct resource omap2_pmu_resource = {
.start = 3,
.end = 3,
.start = 3 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
};
static struct resource omap3_pmu_resource = {
.start = INT_34XX_BENCH_MPU_EMUL,
.end = INT_34XX_BENCH_MPU_EMUL,
.start = 3 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
};
@@ -474,7 +473,7 @@ static struct resource omap2_sham_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_24XX_SHA1MD5,
.start = 51 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
}
};
@@ -492,7 +491,7 @@ static struct resource omap3_sham_resources[] = {
.flags = IORESOURCE_MEM,
},
{
.start = INT_34XX_SHA1MD52_IRQ,
.start = 49 + OMAP_INTC_START,
.flags = IORESOURCE_IRQ,
},
{
+1
View File
@@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/smc91x.h>
#include <plat/cpu.h>
#include <plat/gpmc.h>
#include <plat/gpmc-smc91x.h>
+8 -3
View File
@@ -28,8 +28,13 @@
#include <asm/mach-types.h>
#include <plat/gpmc.h>
#include <plat/cpu.h>
#include <plat/sdrc.h>
#include <mach/hardware.h>
#include "common.h"
/* GPMC register offsets */
#define GPMC_REVISION 0x00
#define GPMC_SYSCONFIG 0x10
@@ -846,16 +851,16 @@ static int __init gpmc_init(void)
l = OMAP2420_GPMC_BASE;
else
l = OMAP34XX_GPMC_BASE;
gpmc_irq = INT_34XX_GPMC_IRQ;
gpmc_irq = 20 + OMAP_INTC_START;
} else if (cpu_is_omap34xx()) {
ck = "gpmc_fck";
l = OMAP34XX_GPMC_BASE;
gpmc_irq = INT_34XX_GPMC_IRQ;
gpmc_irq = 20 + OMAP_INTC_START;
} else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
/* Base address and irq number are same for OMAP4/5 */
ck = "gpmc_ck";
l = OMAP44XX_GPMC_BASE;
gpmc_irq = OMAP44XX_IRQ_GPMC;
gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START;
}
if (WARN_ON(!ck))
+2
View File
@@ -33,6 +33,8 @@
#include <plat/multi.h>
#include <plat/dma.h>
#include <mach/hardware.h>
#include "iomap.h"
#include "voltage.h"
#include "powerdomain.h"

Some files were not shown because too many files have changed in this diff Show More