Skip to content

Commit

Permalink
ARM: samsung: convert to MULTI_IRQ_HANDLER
Browse files Browse the repository at this point in the history
Now that there is a generic IRQ handler for multiple VIC devices use it
for samsung to help building multi platform kernels.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
  • Loading branch information
Jamie Iles authored and Marc Zyngier committed Nov 15, 2011
1 parent c8be7ac commit bb3a4eb
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 65 deletions.
3 changes: 3 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ config ARCH_S5P64X0
select HAVE_SCHED_CLOCK
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C_RTC if RTC_CLASS
select MULTI_IRQ_HANDLER
help
Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
SMDK6450.
Expand All @@ -818,6 +819,7 @@ config ARCH_S5PC100
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C_RTC if RTC_CLASS
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select MULTI_IRQ_HANDLER
help
Samsung S5PC100 series based systems

Expand All @@ -838,6 +840,7 @@ config ARCH_S5PV210
select HAVE_S3C_RTC if RTC_CLASS
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select NEED_MACH_MEMORY_H
select MULTI_IRQ_HANDLER
help
Samsung S5PV210/S5PC110 series based systems

Expand Down
7 changes: 4 additions & 3 deletions arch/arm/mach-s5p64x0/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* published by the Free Software Foundation.
*/

#include <mach/map.h>
#include <plat/irqs.h>
.macro disable_fiq
.endm

#include <asm/entry-macro-vic2.S>
.macro arch_ret_to_user, tmp1, tmp2
.endm
2 changes: 2 additions & 0 deletions arch/arm/mach-s5p64x0/mach-smdk6440.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <video/platform_lcd.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -242,6 +243,7 @@ MACHINE_START(SMDK6440, "SMDK6440")
.atag_offset = 0x100,

.init_irq = s5p6440_init_irq,
.handle_irq = vic_handle_irq,
.map_io = smdk6440_map_io,
.init_machine = smdk6440_machine_init,
.timer = &s5p_timer,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5p64x0/mach-smdk6450.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <video/platform_lcd.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -262,6 +263,7 @@ MACHINE_START(SMDK6450, "SMDK6450")
.atag_offset = 0x100,

.init_irq = s5p6450_init_irq,
.handle_irq = vic_handle_irq,
.map_io = smdk6450_map_io,
.init_machine = smdk6450_machine_init,
.timer = &s5p_timer,
Expand Down
25 changes: 0 additions & 25 deletions arch/arm/mach-s5pc100/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,14 @@
* warranty of any kind, whether express or implied.
*/

#include <asm/hardware/vic.h>
#include <mach/map.h>
#include <plat/irqs.h>

.macro disable_fiq
.endm

.macro get_irqnr_preamble, base, tmp
ldr \base, =VA_VIC0
.endm

.macro arch_ret_to_user, tmp1, tmp2
.endm

.macro get_irqnr_and_base, irqnr, irqstat, base, tmp

@ check the vic0
mov \irqnr, # S5P_IRQ_OFFSET + 31
ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
teq \irqstat, #0

@ otherwise try vic1
addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

@ otherwise try vic2
addeq \tmp, \base, #(VA_VIC2 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

clzne \irqstat, \irqstat
subne \irqnr, \irqnr, \irqstat
.endm
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pc100/mach-smdkc100.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/input.h>
#include <linux/pwm_backlight.h>

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

Expand Down Expand Up @@ -250,6 +251,7 @@ MACHINE_START(SMDKC100, "SMDKC100")
/* Maintainer: Byungho Min <bhmin@samsung.com> */
.atag_offset = 0x100,
.init_irq = s5pc100_init_irq,
.handle_irq = vic_handle_irq,
.map_io = smdkc100_map_io,
.init_machine = smdkc100_machine_init,
.timer = &s3c24xx_timer,
Expand Down
37 changes: 0 additions & 37 deletions arch/arm/mach-s5pv210/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,8 @@
* published by the Free Software Foundation.
*/

#include <asm/hardware/vic.h>
#include <mach/map.h>
#include <plat/irqs.h>

.macro disable_fiq
.endm

.macro get_irqnr_preamble, base, tmp
ldr \base, =VA_VIC0
.endm

.macro arch_ret_to_user, tmp1, tmp2
.endm

.macro get_irqnr_and_base, irqnr, irqstat, base, tmp

@ check the vic0
mov \irqnr, # S5P_IRQ_OFFSET + 31
ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
teq \irqstat, #0

@ otherwise try vic1
addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

@ otherwise try vic2
addeq \tmp, \base, #(VA_VIC2 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

@ otherwise try vic3
addeq \tmp, \base, #(VA_VIC3 - VA_VIC0)
addeq \irqnr, \irqnr, #32
ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
teqeq \irqstat, #0

clzne \irqstat, \irqstat
subne \irqnr, \irqnr, \irqstat
.endm
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/mach-aquila.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/input.h>
#include <linux/gpio.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -680,6 +681,7 @@ MACHINE_START(AQUILA, "Aquila")
Kyungmin Park <kyungmin.park@samsung.com> */
.atag_offset = 0x100,
.init_irq = s5pv210_init_irq,
.handle_irq = vic_handle_irq,
.map_io = aquila_map_io,
.init_machine = aquila_machine_init,
.timer = &s5p_timer,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/mach-goni.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -956,6 +957,7 @@ MACHINE_START(GONI, "GONI")
/* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
.atag_offset = 0x100,
.init_irq = s5pv210_init_irq,
.handle_irq = vic_handle_irq,
.map_io = goni_map_io,
.init_machine = goni_machine_init,
.timer = &s5p_timer,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/mach-smdkc110.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/i2c.h>
#include <linux/sysdev.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -138,6 +139,7 @@ MACHINE_START(SMDKC110, "SMDKC110")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
.init_irq = s5pv210_init_irq,
.handle_irq = vic_handle_irq,
.map_io = smdkc110_map_io,
.init_machine = smdkc110_machine_init,
.timer = &s5p_timer,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/mach-smdkv210.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/pwm_backlight.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -315,6 +316,7 @@ MACHINE_START(SMDKV210, "SMDKV210")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
.init_irq = s5pv210_init_irq,
.handle_irq = vic_handle_irq,
.map_io = smdkv210_map_io,
.init_machine = smdkv210_machine_init,
.timer = &s5p_timer,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/mach-torbreck.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/serial_core.h>

#include <asm/hardware/vic.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -127,6 +128,7 @@ MACHINE_START(TORBRECK, "TORBRECK")
/* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */
.atag_offset = 0x100,
.init_irq = s5pv210_init_irq,
.handle_irq = vic_handle_irq,
.map_io = torbreck_map_io,
.init_machine = torbreck_machine_init,
.timer = &s5p_timer,
Expand Down

0 comments on commit bb3a4eb

Please sign in to comment.