Commit df2d85d0 authored by Marc Zyngier's avatar Marc Zyngier

Merge branch irq/misc-6.3 into irq/irqchip-next

* irq/misc-6.3:
  : .
  : - Cleanup Kconfig dependencies for LS_SCFG_MSI
  :
  : - Improve save/restore for the loongson-liointc irqchip
  :
  : - Correctly initialise status and enable registers for one
  :   of the ASpeed controllers
  : .
  irqchip/ls-scfg-msi: Simplify Kconfig dependencies
  irqchip/loongson-liointc: Save/restore int_edge/int_pol registers during S3/S4
  irqchip/aspeed-scu-ic: Correctly initialise status and enable registers
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parents 5f61c693 9c1a7bfc
...@@ -389,7 +389,7 @@ config LS_EXTIRQ ...@@ -389,7 +389,7 @@ config LS_EXTIRQ
config LS_SCFG_MSI config LS_SCFG_MSI
def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE
depends on PCI && PCI_MSI depends on PCI_MSI
config PARTITION_PERCPU config PARTITION_PERCPU
bool bool
......
...@@ -17,8 +17,9 @@ ...@@ -17,8 +17,9 @@
#define ASPEED_SCU_IC_REG 0x018 #define ASPEED_SCU_IC_REG 0x018
#define ASPEED_SCU_IC_SHIFT 0 #define ASPEED_SCU_IC_SHIFT 0
#define ASPEED_SCU_IC_ENABLE GENMASK(6, ASPEED_SCU_IC_SHIFT) #define ASPEED_SCU_IC_ENABLE GENMASK(15, ASPEED_SCU_IC_SHIFT)
#define ASPEED_SCU_IC_NUM_IRQS 7 #define ASPEED_SCU_IC_NUM_IRQS 7
#define ASPEED_SCU_IC_STATUS GENMASK(28, 16)
#define ASPEED_SCU_IC_STATUS_SHIFT 16 #define ASPEED_SCU_IC_STATUS_SHIFT 16
#define ASPEED_AST2600_SCU_IC0_REG 0x560 #define ASPEED_AST2600_SCU_IC0_REG 0x560
...@@ -155,6 +156,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic, ...@@ -155,6 +156,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
rc = PTR_ERR(scu_ic->scu); rc = PTR_ERR(scu_ic->scu);
goto err; goto err;
} }
regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_STATUS, ASPEED_SCU_IC_STATUS);
regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_ENABLE, 0);
irq = irq_of_parse_and_map(node, 0); irq = irq_of_parse_and_map(node, 0);
if (!irq) { if (!irq) {
......
...@@ -55,6 +55,8 @@ struct liointc_priv { ...@@ -55,6 +55,8 @@ struct liointc_priv {
struct liointc_handler_data handler[LIOINTC_NUM_PARENT]; struct liointc_handler_data handler[LIOINTC_NUM_PARENT];
void __iomem *core_isr[LIOINTC_NUM_CORES]; void __iomem *core_isr[LIOINTC_NUM_CORES];
u8 map_cache[LIOINTC_CHIP_IRQ]; u8 map_cache[LIOINTC_CHIP_IRQ];
u32 int_pol;
u32 int_edge;
bool has_lpc_irq_errata; bool has_lpc_irq_errata;
}; };
...@@ -138,6 +140,14 @@ static int liointc_set_type(struct irq_data *data, unsigned int type) ...@@ -138,6 +140,14 @@ static int liointc_set_type(struct irq_data *data, unsigned int type)
return 0; return 0;
} }
static void liointc_suspend(struct irq_chip_generic *gc)
{
struct liointc_priv *priv = gc->private;
priv->int_pol = readl(gc->reg_base + LIOINTC_REG_INTC_POL);
priv->int_edge = readl(gc->reg_base + LIOINTC_REG_INTC_EDGE);
}
static void liointc_resume(struct irq_chip_generic *gc) static void liointc_resume(struct irq_chip_generic *gc)
{ {
struct liointc_priv *priv = gc->private; struct liointc_priv *priv = gc->private;
...@@ -150,6 +160,8 @@ static void liointc_resume(struct irq_chip_generic *gc) ...@@ -150,6 +160,8 @@ static void liointc_resume(struct irq_chip_generic *gc)
/* Restore map cache */ /* Restore map cache */
for (i = 0; i < LIOINTC_CHIP_IRQ; i++) for (i = 0; i < LIOINTC_CHIP_IRQ; i++)
writeb(priv->map_cache[i], gc->reg_base + i); writeb(priv->map_cache[i], gc->reg_base + i);
writel(priv->int_pol, gc->reg_base + LIOINTC_REG_INTC_POL);
writel(priv->int_edge, gc->reg_base + LIOINTC_REG_INTC_EDGE);
/* Restore mask cache */ /* Restore mask cache */
writel(gc->mask_cache, gc->reg_base + LIOINTC_REG_INTC_ENABLE); writel(gc->mask_cache, gc->reg_base + LIOINTC_REG_INTC_ENABLE);
irq_gc_unlock_irqrestore(gc, flags); irq_gc_unlock_irqrestore(gc, flags);
...@@ -269,6 +281,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision, ...@@ -269,6 +281,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
gc->private = priv; gc->private = priv;
gc->reg_base = base; gc->reg_base = base;
gc->domain = domain; gc->domain = domain;
gc->suspend = liointc_suspend;
gc->resume = liointc_resume; gc->resume = liointc_resume;
ct = gc->chip_types; ct = gc->chip_types;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment