Skip to content

Commit 534f486

Browse files
committed
Revert "irqchip/apple-aic: Add support for AICv3"
This reverts commit 45c85ee.
1 parent 5b77b7e commit 534f486

1 file changed

Lines changed: 4 additions & 35 deletions

File tree

drivers/irqchip/irq-apple-aic.c

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#include <linux/irqdomain.h>
5555
#include <linux/jump_label.h>
5656
#include <linux/limits.h>
57-
#include <linux/of.h>
5857
#include <linux/of_address.h>
5958
#include <linux/slab.h>
6059
#include <asm/apple_m1_pmu.h>
@@ -252,9 +251,6 @@ struct aic_info {
252251
u32 mask_set;
253252
u32 mask_clr;
254253

255-
u32 cap0_off;
256-
u32 maxnumirq_off;
257-
258254
u32 die_stride;
259255

260256
/* Features */
@@ -292,14 +288,6 @@ static const struct aic_info aic2_info __initconst = {
292288
.version = 2,
293289

294290
.irq_cfg = AIC2_IRQ_CFG,
295-
.cap0_off = AIC2_INFO1,
296-
.maxnumirq_off = AIC2_INFO3,
297-
298-
.fast_ipi = true,
299-
};
300-
301-
static const struct aic_info aic3_info __initconst = {
302-
.version = 3,
303291

304292
.fast_ipi = true,
305293
.local_fast_ipi = true,
@@ -322,10 +310,6 @@ static const struct of_device_id aic_info_match[] = {
322310
.compatible = "apple,aic2",
323311
.data = &aic2_info,
324312
},
325-
{
326-
.compatible = "apple,aic3",
327-
.data = &aic3_info,
328-
},
329313
{}
330314
};
331315

@@ -640,7 +624,7 @@ static int aic_irq_domain_map(struct irq_domain *id, unsigned int irq,
640624
u32 type = FIELD_GET(AIC_EVENT_TYPE, hw);
641625
struct irq_chip *chip = &aic_chip;
642626

643-
if (ic->info.version == 2 || ic->info.version == 3)
627+
if (ic->info.version == 2)
644628
chip = &aic2_chip;
645629

646630
if (type == AIC_EVENT_TYPE_IRQ) {
@@ -947,7 +931,6 @@ static void build_fiq_affinity(struct aic_irq_chip *ic, struct device_node *aff)
947931

948932
static int __init aic_of_ic_init(struct device_node *node, struct device_node *parent)
949933
{
950-
int ret;
951934
int i, die;
952935
u32 off, start_off;
953936
void __iomem *regs;
@@ -991,24 +974,11 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
991974

992975
break;
993976
}
994-
case 3:
995-
/* read offsets from device tree for aic version 3 */
996-
/* extint-baseaddress? */
997-
ret = of_property_read_u32(node, "config-offset", &irqc->info.irq_cfg);
998-
if (ret < 0)
999-
return ret;
1000-
ret = of_property_read_u32(node, "cap0-offset", &irqc->info.cap0_off);
1001-
if (ret < 0)
1002-
return ret;
1003-
ret = of_property_read_u32(node, "maxnumirq-offset", &irqc->info.maxnumirq_off);
1004-
if (ret < 0)
1005-
return ret;
1006-
fallthrough;
1007977
case 2: {
1008978
u32 info1, info3;
1009979

1010-
info1 = aic_ic_read(irqc, irqc->info.cap0_off);
1011-
info3 = aic_ic_read(irqc, irqc->info.maxnumirq_off);
980+
info1 = aic_ic_read(irqc, AIC2_INFO1);
981+
info3 = aic_ic_read(irqc, AIC2_INFO3);
1012982

1013983
irqc->nr_irq = FIELD_GET(AIC2_INFO1_NR_IRQ, info1);
1014984
irqc->max_irq = FIELD_GET(AIC2_INFO3_MAX_IRQ, info3);
@@ -1078,7 +1048,7 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
10781048
off += irqc->info.die_stride;
10791049
}
10801050

1081-
if (irqc->info.version == 2 || irqc->info.version == 3) {
1051+
if (irqc->info.version == 2) {
10821052
u32 config = aic_ic_read(irqc, AIC2_CONFIG);
10831053

10841054
config |= AIC2_CONFIG_ENABLE;
@@ -1129,4 +1099,3 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
11291099

11301100
IRQCHIP_DECLARE(apple_aic, "apple,aic", aic_of_ic_init);
11311101
IRQCHIP_DECLARE(apple_aic2, "apple,aic2", aic_of_ic_init);
1132-
IRQCHIP_DECLARE(apple_aic3, "apple,aic3", aic_of_ic_init);

0 commit comments

Comments
 (0)