aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p/irq-gpioint.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s5p/irq-gpioint.c')
-rw-r--r--arch/arm/plat-s5p/irq-gpioint.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c
index 0e5dc8cbf5e3..3b6bf89d1739 100644
--- a/arch/arm/plat-s5p/irq-gpioint.c
+++ b/arch/arm/plat-s5p/irq-gpioint.c
@@ -30,9 +30,9 @@
30 30
31static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; 31static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR];
32 32
33static int s5p_gpioint_get_group(unsigned int irq) 33static int s5p_gpioint_get_group(struct irq_data *data)
34{ 34{
35 struct gpio_chip *chip = get_irq_data(irq); 35 struct gpio_chip *chip = irq_data_get_irq_data(data);
36 struct s3c_gpio_chip *s3c_chip = container_of(chip, 36 struct s3c_gpio_chip *s3c_chip = container_of(chip,
37 struct s3c_gpio_chip, chip); 37 struct s3c_gpio_chip, chip);
38 int group; 38 int group;
@@ -44,22 +44,22 @@ static int s5p_gpioint_get_group(unsigned int irq)
44 return group; 44 return group;
45} 45}
46 46
47static int s5p_gpioint_get_offset(unsigned int irq) 47static int s5p_gpioint_get_offset(struct irq_data *data)
48{ 48{
49 struct gpio_chip *chip = get_irq_data(irq); 49 struct gpio_chip *chip = irq_data_get_irq_data(data);
50 struct s3c_gpio_chip *s3c_chip = container_of(chip, 50 struct s3c_gpio_chip *s3c_chip = container_of(chip,
51 struct s3c_gpio_chip, chip); 51 struct s3c_gpio_chip, chip);
52 52
53 return irq - s3c_chip->irq_base; 53 return data->irq - s3c_chip->irq_base;
54} 54}
55 55
56static void s5p_gpioint_ack(unsigned int irq) 56static void s5p_gpioint_ack(struct irq_data *data)
57{ 57{
58 int group, offset, pend_offset; 58 int group, offset, pend_offset;
59 unsigned int value; 59 unsigned int value;
60 60
61 group = s5p_gpioint_get_group(irq); 61 group = s5p_gpioint_get_group(data);
62 offset = s5p_gpioint_get_offset(irq); 62 offset = s5p_gpioint_get_offset(data);
63 pend_offset = group << 2; 63 pend_offset = group << 2;
64 64
65 value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); 65 value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset);
@@ -67,13 +67,13 @@ static void s5p_gpioint_ack(unsigned int irq)
67 __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); 67 __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset);
68} 68}
69 69
70static void s5p_gpioint_mask(unsigned int irq) 70static void s5p_gpioint_mask(struct irq_data *data)
71{ 71{
72 int group, offset, mask_offset; 72 int group, offset, mask_offset;
73 unsigned int value; 73 unsigned int value;
74 74
75 group = s5p_gpioint_get_group(irq); 75 group = s5p_gpioint_get_group(data);
76 offset = s5p_gpioint_get_offset(irq); 76 offset = s5p_gpioint_get_offset(data);
77 mask_offset = group << 2; 77 mask_offset = group << 2;
78 78
79 value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); 79 value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset);
@@ -81,13 +81,13 @@ static void s5p_gpioint_mask(unsigned int irq)
81 __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); 81 __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset);
82} 82}
83 83
84static void s5p_gpioint_unmask(unsigned int irq) 84static void s5p_gpioint_unmask(struct irq_data *data)
85{ 85{
86 int group, offset, mask_offset; 86 int group, offset, mask_offset;
87 unsigned int value; 87 unsigned int value;
88 88
89 group = s5p_gpioint_get_group(irq); 89 group = s5p_gpioint_get_group(data);
90 offset = s5p_gpioint_get_offset(irq); 90 offset = s5p_gpioint_get_offset(data);
91 mask_offset = group << 2; 91 mask_offset = group << 2;
92 92
93 value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); 93 value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset);
@@ -95,19 +95,19 @@ static void s5p_gpioint_unmask(unsigned int irq)
95 __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); 95 __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset);
96} 96}
97 97
98static void s5p_gpioint_mask_ack(unsigned int irq) 98static void s5p_gpioint_mask_ack(struct irq_data *data)
99{ 99{
100 s5p_gpioint_mask(irq); 100 s5p_gpioint_mask(data);
101 s5p_gpioint_ack(irq); 101 s5p_gpioint_ack(data);
102} 102}
103 103
104static int s5p_gpioint_set_type(unsigned int irq, unsigned int type) 104static int s5p_gpioint_set_type(struct irq_data *data, unsigned int type)
105{ 105{
106 int group, offset, con_offset; 106 int group, offset, con_offset;
107 unsigned int value; 107 unsigned int value;
108 108
109 group = s5p_gpioint_get_group(irq); 109 group = s5p_gpioint_get_group(data);
110 offset = s5p_gpioint_get_offset(irq); 110 offset = s5p_gpioint_get_offset(data);
111 con_offset = group << 2; 111 con_offset = group << 2;
112 112
113 switch (type) { 113 switch (type) {
@@ -142,11 +142,11 @@ static int s5p_gpioint_set_type(unsigned int irq, unsigned int type)
142 142
143struct irq_chip s5p_gpioint = { 143struct irq_chip s5p_gpioint = {
144 .name = "s5p_gpioint", 144 .name = "s5p_gpioint",
145 .ack = s5p_gpioint_ack, 145 .irq_ack = s5p_gpioint_ack,
146 .mask = s5p_gpioint_mask, 146 .irq_mask = s5p_gpioint_mask,
147 .mask_ack = s5p_gpioint_mask_ack, 147 .irq_mask_ack = s5p_gpioint_mask_ack,
148 .unmask = s5p_gpioint_unmask, 148 .irq_unmask = s5p_gpioint_unmask,
149 .set_type = s5p_gpioint_set_type, 149 .irq_set_type = s5p_gpioint_set_type,
150}; 150};
151 151
152static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) 152static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc)