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

Commit 9a6879bd authored by Jamie Iles's avatar Jamie Iles Committed by Marc Zyngier
Browse files

ARM: ep93xx: convert to MULTI_IRQ_HANDLER



Now that there is a generic IRQ handler for multiple VIC devices use it
for ep93xx to help building multi platform kernels.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: default avatarJamie Iles <jamie@jamieiles.com>
parent 1558368e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -409,6 +409,7 @@ config ARCH_EP93XX
	select ARCH_HAS_HOLES_MEMORYMODEL
	select ARCH_HAS_HOLES_MEMORYMODEL
	select ARCH_USES_GETTIMEOFFSET
	select ARCH_USES_GETTIMEOFFSET
	select NEED_MACH_MEMORY_H
	select NEED_MACH_MEMORY_H
	select MULTI_IRQ_HANDLER
	help
	help
	  This enables support for the Cirrus EP93xx series of CPUs.
	  This enables support for the Cirrus EP93xx series of CPUs.


+2 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


#include <mach/hardware.h>
#include <mach/hardware.h>


#include <asm/hardware/vic.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>


@@ -36,6 +37,7 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= adssphere_init_machine,
	.init_machine	= adssphere_init_machine,
MACHINE_END
MACHINE_END
+9 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@
#include <mach/ep93xx_spi.h>
#include <mach/ep93xx_spi.h>
#include <mach/gpio-ep93xx.h>
#include <mach/gpio-ep93xx.h>


#include <asm/hardware/vic.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>


@@ -250,6 +251,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -261,6 +263,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -272,6 +275,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -283,6 +287,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -294,6 +299,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -305,6 +311,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -316,6 +323,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
@@ -327,6 +335,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= edb93xx_init_machine,
	.init_machine	= edb93xx_init_machine,
MACHINE_END
MACHINE_END
+2 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


#include <mach/hardware.h>
#include <mach/hardware.h>


#include <asm/hardware/vic.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>


@@ -36,6 +37,7 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
	.atag_offset	= 0x100,
	.atag_offset	= 0x100,
	.map_io		= ep93xx_map_io,
	.map_io		= ep93xx_map_io,
	.init_irq	= ep93xx_init_irq,
	.init_irq	= ep93xx_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &ep93xx_timer,
	.timer		= &ep93xx_timer,
	.init_machine	= gesbc9312_init_machine,
	.init_machine	= gesbc9312_init_machine,
MACHINE_END
MACHINE_END
+0 −42
Original line number Original line Diff line number Diff line
@@ -9,51 +9,9 @@
 * the Free Software Foundation; either version 2 of the License, or (at
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 * your option) any later version.
 */
 */
#include <mach/ep93xx-regs.h>


		.macro	disable_fiq
		.macro	disable_fiq
		.endm
		.endm


		.macro  get_irqnr_preamble, base, tmp
		.endm

		.macro  arch_ret_to_user, tmp1, tmp2
		.macro  arch_ret_to_user, tmp1, tmp2
		.endm
		.endm

		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
		ldr	\base, =(EP93XX_AHB_VIRT_BASE)
		orr	\base, \base, #0x000b0000
		mov	\irqnr, #0
		ldr	\irqstat, [\base]		@ lower 32 interrupts
		cmp	\irqstat, #0
		bne	1001f

		eor	\base, \base, #0x00070000
		ldr	\irqstat, [\base]		@ upper 32 interrupts
		cmp	\irqstat, #0
		beq	1002f
		mov	\irqnr, #0x20

1001:
		movs	\tmp, \irqstat, lsl #16
		movne	\irqstat, \tmp
		addeq	\irqnr, \irqnr, #16

		movs	\tmp, \irqstat, lsl #8
		movne	\irqstat, \tmp
		addeq	\irqnr, \irqnr, #8

		movs	\tmp, \irqstat, lsl #4
		movne	\irqstat, \tmp
		addeq	\irqnr, \irqnr, #4

		movs	\tmp, \irqstat, lsl #2
		movne	\irqstat, \tmp
		addeq	\irqnr, \irqnr, #2

		movs	\tmp, \irqstat, lsl #1
		addeq	\irqnr, \irqnr, #1
		orrs	\base, \base, #1

1002:
		.endm
Loading