Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/aspeed-scu-ic: Correctly initialise status and enable registers

The status and enable registers are never initialised with sensible
default values. Fix those.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
[maz: commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230130085430.635583-1-ryan_chen@aspeedtech.com

authored by

Ryan Chen and committed by
Marc Zyngier
e7406042 5dc4c995

+4 -1
+4 -1
drivers/irqchip/irq-aspeed-scu-ic.c
··· 17 17 18 18 #define ASPEED_SCU_IC_REG 0x018 19 19 #define ASPEED_SCU_IC_SHIFT 0 20 - #define ASPEED_SCU_IC_ENABLE GENMASK(6, ASPEED_SCU_IC_SHIFT) 20 + #define ASPEED_SCU_IC_ENABLE GENMASK(15, ASPEED_SCU_IC_SHIFT) 21 21 #define ASPEED_SCU_IC_NUM_IRQS 7 22 + #define ASPEED_SCU_IC_STATUS GENMASK(28, 16) 22 23 #define ASPEED_SCU_IC_STATUS_SHIFT 16 23 24 24 25 #define ASPEED_AST2600_SCU_IC0_REG 0x560 ··· 156 155 rc = PTR_ERR(scu_ic->scu); 157 156 goto err; 158 157 } 158 + regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_STATUS, ASPEED_SCU_IC_STATUS); 159 + regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_ENABLE, 0); 159 160 160 161 irq = irq_of_parse_and_map(node, 0); 161 162 if (!irq) {