Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44f78f43 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap



If boards with different NR_IRQS are compiled together, tons of
compiler warnings are emitted about redefining NR_IRQS.

This patch fixes the problem by adding up NR_IRQS in a common place.

Patch also removes quite a bit of now unnecessary code.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 78673bc8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@

static void fpga_mask_irq(unsigned int irq)
{
	irq -= OMAP1510_IH_FPGA_BASE;
	irq -= OMAP_FPGA_IRQ_BASE;

	if (irq < 8)
		__raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO)
@@ -65,7 +65,7 @@ static void fpga_ack_irq(unsigned int irq)

static void fpga_unmask_irq(unsigned int irq)
{
	irq -= OMAP1510_IH_FPGA_BASE;
	irq -= OMAP_FPGA_IRQ_BASE;

	if (irq < 8)
		__raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO) | (1 << irq)),
@@ -95,8 +95,8 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
	if (!stat)
		return;

	for (fpga_irq = OMAP1510_IH_FPGA_BASE;
	     (fpga_irq < (OMAP1510_IH_FPGA_BASE + NR_FPGA_IRQS)) && stat;
	for (fpga_irq = OMAP_FPGA_IRQ_BASE;
	     (fpga_irq < OMAP_FPGA_IRQ_END) && stat;
	     fpga_irq++, stat >>= 1) {
		if (stat & 1) {
			d = irq_desc + fpga_irq;
@@ -151,7 +151,7 @@ void omap1510_fpga_init_irq(void)
	__raw_writeb(0, OMAP1510_FPGA_IMR_HI);
	__raw_writeb(0, INNOVATOR_FPGA_IMR2);

	for (i = OMAP1510_IH_FPGA_BASE; i < (OMAP1510_IH_FPGA_BASE + NR_FPGA_IRQS); i++) {
	for (i = OMAP_FPGA_IRQ_BASE; i < OMAP_FPGA_IRQ_END; i++) {

		if (i == OMAP1510_INT_FPGA_TS) {
			/*
+0 −5
Original line number Diff line number Diff line
@@ -36,9 +36,4 @@

#define TWL4030_IRQNUM			INT_24XX_SYS_NIRQ

/* TWL4030 Primary Interrupt Handler (PIH) interrupts */
#define IH_TWL4030_BASE			IH_BOARD_BASE
#define IH_TWL4030_END			(IH_TWL4030_BASE+8)
#define NR_IRQS				(IH_TWL4030_END)

#endif /* __ASM_ARCH_OMAP_2430SDP_H */
+0 −6
Original line number Diff line number Diff line
@@ -30,12 +30,6 @@
/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
#define OMAP1710_ETHR_START		0x04000300

#define MAXIRQNUM			(IH_BOARD_BASE)
#define MAXFIQNUM			MAXIRQNUM
#define MAXSWINUM			MAXIRQNUM

#define NR_IRQS				(MAXIRQNUM + 1)

extern void h3_mmc_init(void);
extern void h3_mmc_slot_cover_handler(void *arg, int state);

+0 −3
Original line number Diff line number Diff line
@@ -36,9 +36,6 @@
#define OMAP1510P1_EMIFS_PRI_VALUE		0x00
#define OMAP1510P1_EMIFF_PRI_VALUE		0x00

#define NR_FPGA_IRQS		24
#define NR_IRQS                 (IH_BOARD_BASE + NR_FPGA_IRQS)

#ifndef __ASSEMBLY__
void fpga_write(unsigned char val, int reg);
unsigned char fpga_read(int reg);
+0 −6
Original line number Diff line number Diff line
@@ -36,10 +36,4 @@
#define OMAP_SDRAM_DEVICE		D256M_1X16_4B
#endif

#define MAXIRQNUM		IH_BOARD_BASE
#define MAXFIQNUM		MAXIRQNUM
#define MAXSWINUM		MAXIRQNUM

#define NR_IRQS			(MAXIRQNUM + 1)

#endif
Loading