Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a5f520a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "irqchip: skip suspend/resume if base address is null"

parents cce809b9 d22d4f93
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -409,6 +409,9 @@ static void gic_hibernation_suspend(void)
	void __iomem *base = gic_data.dist_base;
	void __iomem *rdist_base = gic_data_rdist_sgi_base();

	if ((base == NULL) || (rdist_base == NULL))
		return;

	gic_data.enabled_sgis = readl_relaxed(rdist_base + GICD_ISENABLER);
	gic_data.pending_sgis = readl_relaxed(rdist_base + GICD_ISPENDR);
	/* Store edge level for PPIs by reading GICR_ICFGR1 */
@@ -442,6 +445,9 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
	u32 pending[32];
	void __iomem *base = gic_data.dist_base;

	if (base == NULL)
		return;

	if (!msm_show_resume_irq_mask)
		return;

+6 −0
Original line number Diff line number Diff line
@@ -249,6 +249,9 @@ static int gic_suspend_one(struct gic_chip_data *gic)
	unsigned int i;
	void __iomem *base = gic_data_dist_base(gic);

	if (base == NULL)
		return 0;

	for (i = 0; i * 32 < gic->gic_irqs; i++) {
		gic->enabled_irqs[i]
			= readl_relaxed(base + GIC_DIST_ENABLE_SET + i * 4);
@@ -280,6 +283,9 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
	u32 pending[32];
	void __iomem *base = gic_data_dist_base(gic);

	if (base == NULL)
		return;

	raw_spin_lock(&irq_controller_lock);
	for (i = 0; i * 32 < gic->gic_irqs; i++) {
		enabled = readl_relaxed(base + GIC_DIST_ENABLE_CLEAR + i * 4);