forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/irqchip/irq-atmel-aic5.c
....@@ -128,7 +128,7 @@
128128 irq_reg_writel(bgc, 1, AT91_AIC5_ISCR);
129129 irq_gc_unlock(bgc);
130130
131
- return 0;
131
+ return 1;
132132 }
133133
134134 static int aic5_set_type(struct irq_data *d, unsigned type)
....@@ -310,9 +310,16 @@
310310 aic_common_rtc_irq_fixup();
311311 }
312312
313
+static void __init sam9x60_aic_irq_fixup(void)
314
+{
315
+ aic_common_rtc_irq_fixup();
316
+ aic_common_rtt_irq_fixup();
317
+}
318
+
313319 static const struct of_device_id aic5_irq_fixups[] __initconst = {
314320 { .compatible = "atmel,sama5d3", .data = sama5d3_aic_irq_fixup },
315321 { .compatible = "atmel,sama5d4", .data = sama5d3_aic_irq_fixup },
322
+ { .compatible = "microchip,sam9x60", .data = sam9x60_aic_irq_fixup },
316323 { /* sentinel */ },
317324 };
318325
....@@ -390,3 +397,12 @@
390397 return aic5_of_init(node, parent, NR_SAMA5D4_IRQS);
391398 }
392399 IRQCHIP_DECLARE(sama5d4_aic5, "atmel,sama5d4-aic", sama5d4_aic5_of_init);
400
+
401
+#define NR_SAM9X60_IRQS 50
402
+
403
+static int __init sam9x60_aic5_of_init(struct device_node *node,
404
+ struct device_node *parent)
405
+{
406
+ return aic5_of_init(node, parent, NR_SAM9X60_IRQS);
407
+}
408
+IRQCHIP_DECLARE(sam9x60_aic5, "microchip,sam9x60-aic", sam9x60_aic5_of_init);