69d2d0b1fcbec3f15377ec6ed7ff2f6b9b53e638
[openwrt/staging/lynxis.git] /
1 From e21f41093b53b3cc3eb6b43a239d75bf4e05d794 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Fri, 11 Jan 2019 17:29:10 -0800
4 Subject: [PATCH 555/782] soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain
5 support.
6
7 We don't have ASB master/slave regs for this domain, so just skip that
8 step.
9
10 Signed-off-by: Eric Anholt <eric@anholt.net>
11 Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.")
12 ---
13 drivers/soc/bcm/bcm2835-power.c | 14 ++++++++++++--
14 1 file changed, 12 insertions(+), 2 deletions(-)
15
16 --- a/drivers/soc/bcm/bcm2835-power.c
17 +++ b/drivers/soc/bcm/bcm2835-power.c
18 @@ -150,7 +150,12 @@ struct bcm2835_power {
19
20 static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
21 {
22 - u64 start = ktime_get_ns();
23 + u64 start;
24 +
25 + if (!reg)
26 + return 0;
27 +
28 + start = ktime_get_ns();
29
30 /* Enable the module's async AXI bridges. */
31 ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP);
32 @@ -165,7 +170,12 @@ static int bcm2835_asb_enable(struct bcm
33
34 static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
35 {
36 - u64 start = ktime_get_ns();
37 + u64 start;
38 +
39 + if (!reg)
40 + return 0;
41 +
42 + start = ktime_get_ns();
43
44 /* Enable the module's async AXI bridges. */
45 ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP);