Commit c715f13b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pmdomain fixes from Ulf Hansson:

 - bcm: increase ASB control timeout for bcm2835

 - mediatek: fix power domain count

* tag 'pmdomain-v7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: bcm: bcm2835-power: Increase ASB control timeout
  pmdomain: mediatek: Fix power domain count
parents d0725273 b826d2c0
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mfd/bcm2835-pm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -153,7 +154,6 @@ struct bcm2835_power {
static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
{
	void __iomem *base = power->asb;
	u64 start;
	u32 val;

	switch (reg) {
@@ -166,8 +166,6 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
		break;
	}

	start = ktime_get_ns();

	/* Enable the module's async AXI bridges. */
	if (enable) {
		val = readl(base + reg) & ~ASB_REQ_STOP;
@@ -176,11 +174,9 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
	}
	writel(PM_PASSWORD | val, base + reg);

	while (!!(readl(base + reg) & ASB_ACK) == enable) {
		cpu_relax();
		if (ktime_get_ns() - start >= 1000)
	if (readl_poll_timeout_atomic(base + reg, val,
				      !!(val & ASB_ACK) != enable, 0, 5))
		return -ETIMEDOUT;
	}

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -1203,7 +1203,7 @@ static int scpsys_probe(struct platform_device *pdev)
	scpsys->soc_data = soc;

	scpsys->pd_data.domains = scpsys->domains;
	scpsys->pd_data.num_domains = soc->num_domains;
	scpsys->pd_data.num_domains = num_domains;

	parent = dev->parent;
	if (!parent) {