@@ -55,6 +55,8 @@ struct liointc_priv {
55
55
struct liointc_handler_data handler [LIOINTC_NUM_PARENT ];
56
56
void __iomem * core_isr [LIOINTC_NUM_CORES ];
57
57
u8 map_cache [LIOINTC_CHIP_IRQ ];
58
+ u32 int_pol ;
59
+ u32 int_edge ;
58
60
bool has_lpc_irq_errata ;
59
61
};
60
62
@@ -138,6 +140,14 @@ static int liointc_set_type(struct irq_data *data, unsigned int type)
138
140
return 0 ;
139
141
}
140
142
143
+ static void liointc_suspend (struct irq_chip_generic * gc )
144
+ {
145
+ struct liointc_priv * priv = gc -> private ;
146
+
147
+ priv -> int_pol = readl (gc -> reg_base + LIOINTC_REG_INTC_POL );
148
+ priv -> int_edge = readl (gc -> reg_base + LIOINTC_REG_INTC_EDGE );
149
+ }
150
+
141
151
static void liointc_resume (struct irq_chip_generic * gc )
142
152
{
143
153
struct liointc_priv * priv = gc -> private ;
@@ -150,6 +160,8 @@ static void liointc_resume(struct irq_chip_generic *gc)
150
160
/* Restore map cache */
151
161
for (i = 0 ; i < LIOINTC_CHIP_IRQ ; i ++ )
152
162
writeb (priv -> map_cache [i ], gc -> reg_base + i );
163
+ writel (priv -> int_pol , gc -> reg_base + LIOINTC_REG_INTC_POL );
164
+ writel (priv -> int_edge , gc -> reg_base + LIOINTC_REG_INTC_EDGE );
153
165
/* Restore mask cache */
154
166
writel (gc -> mask_cache , gc -> reg_base + LIOINTC_REG_INTC_ENABLE );
155
167
irq_gc_unlock_irqrestore (gc , flags );
@@ -269,6 +281,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
269
281
gc -> private = priv ;
270
282
gc -> reg_base = base ;
271
283
gc -> domain = domain ;
284
+ gc -> suspend = liointc_suspend ;
272
285
gc -> resume = liointc_resume ;
273
286
274
287
ct = gc -> chip_types ;
0 commit comments