aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-04-12 15:17:26 -0400
committerTomasz Figa <tomasz.figa@gmail.com>2013-08-05 19:21:48 -0400
commitb0dd5a39a0e9ad88d0f5e182710e04a27011889e (patch)
treeaca9e7f4bc3ed1bb6f2b557e8e2b28fa6ce9be2b
parentc4fb0567db44d1856795b9fc9ff58d6d2344a80a (diff)
ARM: SAMSUNG: Remove unused PWM timer IRQ chip code
As the need for an IRQ chip handling PWM timer interrupt chaining is gone now, this patch removes all the code made unnecessary. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Mark Brown <broonie@linaro.org> Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/irqs.h8
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/irqs.h2
-rw-r--r--arch/arm/plat-samsung/Kconfig6
-rw-r--r--arch/arm/plat-samsung/Makefile1
-rw-r--r--arch/arm/plat-samsung/devs.c25
-rw-r--r--arch/arm/plat-samsung/include/plat/irq-vic-timer.h13
-rw-r--r--arch/arm/plat-samsung/include/plat/irqs.h9
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c98
11 files changed, 6 insertions, 161 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 341b756508c5..36a0e2a5c829 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -739,7 +739,6 @@ config ARCH_S3C64XX
739 select SAMSUNG_ATAGS 739 select SAMSUNG_ATAGS
740 select SAMSUNG_CLKSRC 740 select SAMSUNG_CLKSRC
741 select SAMSUNG_GPIOLIB_4BIT 741 select SAMSUNG_GPIOLIB_4BIT
742 select SAMSUNG_IRQ_VIC_TIMER
743 select SAMSUNG_WDT_RESET 742 select SAMSUNG_WDT_RESET
744 select USB_ARCH_HAS_OHCI 743 select USB_ARCH_HAS_OHCI
745 help 744 help
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h
index 96d60e0d9372..67bbd1dd04c2 100644
--- a/arch/arm/mach-s3c64xx/include/mach/irqs.h
+++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h
@@ -107,14 +107,6 @@
107#define IRQ_TC IRQ_PENDN 107#define IRQ_TC IRQ_PENDN
108#define IRQ_ADC S3C64XX_IRQ_VIC1(31) 108#define IRQ_ADC S3C64XX_IRQ_VIC1(31)
109 109
110#define S3C64XX_TIMER_IRQ(x) S3C_IRQ(64 + (x))
111
112#define IRQ_TIMER0 S3C64XX_TIMER_IRQ(0)
113#define IRQ_TIMER1 S3C64XX_TIMER_IRQ(1)
114#define IRQ_TIMER2 S3C64XX_TIMER_IRQ(2)
115#define IRQ_TIMER3 S3C64XX_TIMER_IRQ(3)
116#define IRQ_TIMER4 S3C64XX_TIMER_IRQ(4)
117
118/* compatibility for device defines */ 110/* compatibility for device defines */
119 111
120#define IRQ_IIC1 IRQ_S3C6410_IIC1 112#define IRQ_IIC1 IRQ_S3C6410_IIC1
diff --git a/arch/arm/mach-s5p64x0/include/mach/irqs.h b/arch/arm/mach-s5p64x0/include/mach/irqs.h
index 5b845e849b30..53982db9d259 100644
--- a/arch/arm/mach-s5p64x0/include/mach/irqs.h
+++ b/arch/arm/mach-s5p64x0/include/mach/irqs.h
@@ -141,8 +141,6 @@
141 141
142#define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x)) 142#define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x))
143 143
144#define IRQ_TIMER_BASE (11)
145
146/* Set the default NR_IRQS */ 144/* Set the default NR_IRQS */
147 145
148#define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1) 146#define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1)
diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-s5pc100/include/mach/irqs.h
index 2870f12c7926..d2eb4757381f 100644
--- a/arch/arm/mach-s5pc100/include/mach/irqs.h
+++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
@@ -97,8 +97,6 @@
97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31) 97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31)
98#define IRQ_VIC_END S5P_IRQ_VIC2(31) 98#define IRQ_VIC_END S5P_IRQ_VIC2(31)
99 99
100#define IRQ_TIMER_BASE (11)
101
102#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) 100#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0))
103#define S5P_EINT_BASE2 (IRQ_VIC_END + 1) 101#define S5P_EINT_BASE2 (IRQ_VIC_END + 1)
104 102
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
index e777e010ed2e..5e0de3a31f3d 100644
--- a/arch/arm/mach-s5pv210/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
@@ -118,8 +118,6 @@
118#define IRQ_MDNIE3 S5P_IRQ_VIC3(8) 118#define IRQ_MDNIE3 S5P_IRQ_VIC3(8)
119#define IRQ_VIC_END S5P_IRQ_VIC3(31) 119#define IRQ_VIC_END S5P_IRQ_VIC3(31)
120 120
121#define IRQ_TIMER_BASE (11)
122
123#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) 121#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0))
124#define S5P_EINT_BASE2 (IRQ_VIC_END + 1) 122#define S5P_EINT_BASE2 (IRQ_VIC_END + 1)
125 123
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index bf1c1655389f..7dfba937d8fc 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -25,7 +25,6 @@ config PLAT_S5P
25 select S5P_GPIO_DRVSTR 25 select S5P_GPIO_DRVSTR
26 select SAMSUNG_CLKSRC if !COMMON_CLK 26 select SAMSUNG_CLKSRC if !COMMON_CLK
27 select SAMSUNG_GPIOLIB_4BIT 27 select SAMSUNG_GPIOLIB_4BIT
28 select SAMSUNG_IRQ_VIC_TIMER
29 help 28 help
30 Base platform code for Samsung's S5P series SoC. 29 Base platform code for Samsung's S5P series SoC.
31 30
@@ -98,11 +97,6 @@ config S5P_CLOCK
98 97
99# options for IRQ support 98# options for IRQ support
100 99
101config SAMSUNG_IRQ_VIC_TIMER
102 bool
103 help
104 Internal configuration to build the VIC timer interrupt code.
105
106config S5P_IRQ 100config S5P_IRQ
107 def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210) 101 def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210)
108 help 102 help
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index a3160b2e8234..ec4241ce3db3 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -19,7 +19,6 @@ obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o
19obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o 19obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o
20obj-$(CONFIG_S5P_CLOCK) += s5p-clock.o 20obj-$(CONFIG_S5P_CLOCK) += s5p-clock.o
21 21
22obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o
23obj-$(CONFIG_S5P_IRQ) += s5p-irq.o 22obj-$(CONFIG_S5P_IRQ) += s5p-irq.o
24obj-$(CONFIG_S5P_EXT_INT) += s5p-irq-eint.o 23obj-$(CONFIG_S5P_EXT_INT) += s5p-irq-eint.o
25obj-$(CONFIG_S5P_GPIO_INT) += s5p-irq-gpioint.o 24obj-$(CONFIG_S5P_GPIO_INT) += s5p-irq-gpioint.o
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index bba6d78a4c24..290f63a7aa64 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -1099,22 +1099,9 @@ arch_initcall(s5p_pmu_init);
1099 1099
1100#ifdef CONFIG_SAMSUNG_DEV_PWM 1100#ifdef CONFIG_SAMSUNG_DEV_PWM
1101 1101
1102#define TIMER_RESOURCE_SIZE (1) 1102#define DEFINE_S3C_TIMER(_tmr_no) \
1103
1104#define TIMER_RESOURCE(_tmr, _irq) \
1105 (struct resource [TIMER_RESOURCE_SIZE]) { \
1106 [0] = { \
1107 .start = _irq, \
1108 .end = _irq, \
1109 .flags = IORESOURCE_IRQ \
1110 } \
1111 }
1112
1113#define DEFINE_S3C_TIMER(_tmr_no, _irq) \
1114 .name = "s3c24xx-pwm", \ 1103 .name = "s3c24xx-pwm", \
1115 .id = _tmr_no, \ 1104 .id = _tmr_no, \
1116 .num_resources = TIMER_RESOURCE_SIZE, \
1117 .resource = TIMER_RESOURCE(_tmr_no, _irq), \
1118 1105
1119/* 1106/*
1120 * since we already have an static mapping for the timer, 1107 * since we already have an static mapping for the timer,
@@ -1122,11 +1109,11 @@ arch_initcall(s5p_pmu_init);
1122 */ 1109 */
1123 1110
1124struct platform_device s3c_device_timer[] = { 1111struct platform_device s3c_device_timer[] = {
1125 [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) }, 1112 [0] = { DEFINE_S3C_TIMER(0) },
1126 [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) }, 1113 [1] = { DEFINE_S3C_TIMER(1) },
1127 [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) }, 1114 [2] = { DEFINE_S3C_TIMER(2) },
1128 [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) }, 1115 [3] = { DEFINE_S3C_TIMER(3) },
1129 [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) }, 1116 [4] = { DEFINE_S3C_TIMER(4) },
1130}; 1117};
1131 1118
1132static struct resource samsung_pwm_resource[] = { 1119static struct resource samsung_pwm_resource[] = {
diff --git a/arch/arm/plat-samsung/include/plat/irq-vic-timer.h b/arch/arm/plat-samsung/include/plat/irq-vic-timer.h
deleted file mode 100644
index 5b9c42fd32d7..000000000000
--- a/arch/arm/plat-samsung/include/plat/irq-vic-timer.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* arch/arm/plat-samsung/include/plat/irq-vic-timer.h
2 *
3 * Copyright (c) 2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for Samsung SoC IRQ VIC timer
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13extern void s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq);
diff --git a/arch/arm/plat-samsung/include/plat/irqs.h b/arch/arm/plat-samsung/include/plat/irqs.h
index df46b776976a..039001c0ef05 100644
--- a/arch/arm/plat-samsung/include/plat/irqs.h
+++ b/arch/arm/plat-samsung/include/plat/irqs.h
@@ -44,15 +44,6 @@
44#define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) 44#define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x))
45#define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) 45#define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x))
46 46
47#define S5P_TIMER_IRQ(x) (IRQ_TIMER_BASE + (x))
48
49#define IRQ_TIMER0 S5P_TIMER_IRQ(0)
50#define IRQ_TIMER1 S5P_TIMER_IRQ(1)
51#define IRQ_TIMER2 S5P_TIMER_IRQ(2)
52#define IRQ_TIMER3 S5P_TIMER_IRQ(3)
53#define IRQ_TIMER4 S5P_TIMER_IRQ(4)
54#define IRQ_TIMER_COUNT (5)
55
56#define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ 47#define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \
57 : ((x) - 16 + S5P_EINT_BASE2)) 48 : ((x) - 16 + S5P_EINT_BASE2))
58 49
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c
deleted file mode 100644
index 0fceb4273824..000000000000
--- a/arch/arm/plat-samsung/irq-vic-timer.c
+++ /dev/null
@@ -1,98 +0,0 @@
1/* arch/arm/plat-samsung/irq-vic-timer.c
2 * originally part of arch/arm/plat-s3c64xx/irq.c
3 *
4 * Copyright 2008 Openmoko, Inc.
5 * Copyright 2008 Simtec Electronics
6 * Ben Dooks <ben@simtec.co.uk>
7 * http://armlinux.simtec.co.uk/
8 *
9 * S3C64XX - Interrupt handling
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/kernel.h>
17#include <linux/interrupt.h>
18#include <linux/irq.h>
19#include <linux/irqchip/chained_irq.h>
20#include <linux/io.h>
21
22#include <mach/map.h>
23#include <mach/irqs.h>
24#include <plat/cpu.h>
25#include <plat/irq-vic-timer.h>
26#include <plat/regs-timer.h>
27
28static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc)
29{
30 struct irq_chip *chip = irq_get_chip(irq);
31 chained_irq_enter(chip, desc);
32 generic_handle_irq((int)desc->irq_data.handler_data);
33 chained_irq_exit(chip, desc);
34}
35
36/* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */
37static void s3c_irq_timer_ack(struct irq_data *d)
38{
39 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
40 u32 mask = (1 << 5) << (d->irq - gc->irq_base);
41
42 irq_reg_writel(mask | gc->mask_cache, gc->reg_base);
43}
44
45/**
46 * s3c_init_vic_timer_irq() - initialise timer irq chanined off VIC.\
47 * @num: Number of timers to initialize
48 * @timer_irq: Base IRQ number to be used for the timers.
49 *
50 * Register the necessary IRQ chaining and support for the timer IRQs
51 * chained of the VIC.
52 */
53void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq)
54{
55 unsigned int pirq[5] = { IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
56 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC };
57 struct irq_chip_generic *s3c_tgc;
58 struct irq_chip_type *ct;
59 unsigned int i;
60
61#ifdef CONFIG_ARCH_EXYNOS
62 if (soc_is_exynos5250()) {
63 pirq[0] = EXYNOS5_IRQ_TIMER0_VIC;
64 pirq[1] = EXYNOS5_IRQ_TIMER1_VIC;
65 pirq[2] = EXYNOS5_IRQ_TIMER2_VIC;
66 pirq[3] = EXYNOS5_IRQ_TIMER3_VIC;
67 pirq[4] = EXYNOS5_IRQ_TIMER4_VIC;
68 } else {
69 pirq[0] = EXYNOS4_IRQ_TIMER0_VIC;
70 pirq[1] = EXYNOS4_IRQ_TIMER1_VIC;
71 pirq[2] = EXYNOS4_IRQ_TIMER2_VIC;
72 pirq[3] = EXYNOS4_IRQ_TIMER3_VIC;
73 pirq[4] = EXYNOS4_IRQ_TIMER4_VIC;
74 }
75#endif
76 s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq,
77 S3C64XX_TINT_CSTAT, handle_level_irq);
78
79 if (!s3c_tgc) {
80 pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n",
81 __func__, timer_irq);
82 return;
83 }
84
85 ct = s3c_tgc->chip_types;
86 ct->chip.irq_mask = irq_gc_mask_clr_bit;
87 ct->chip.irq_unmask = irq_gc_mask_set_bit;
88 ct->chip.irq_ack = s3c_irq_timer_ack;
89 irq_setup_generic_chip(s3c_tgc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
90 IRQ_NOREQUEST | IRQ_NOPROBE, 0);
91 /* Clear the upper bits of the mask_cache*/
92 s3c_tgc->mask_cache &= 0x1f;
93
94 for (i = 0; i < num; i++, timer_irq++) {
95 irq_set_chained_handler(pirq[i], s3c_irq_demux_vic_timer);
96 irq_set_handler_data(pirq[i], (void *)timer_irq);
97 }
98}