Created
February 6, 2021 05:45
-
-
Save hyphop/0f48ee8e02c0f114ccbfdb18e2d771eb to your computer and use it in GitHub Desktop.
meson-ee-pwrc testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/base/core.c b/drivers/base/core.c | |
index 6eb4c7a90..37c85414b 100644 | |
--- a/drivers/base/core.c | |
+++ b/drivers/base/core.c | |
@@ -4216,17 +4216,17 @@ void device_shutdown(void) | |
pm_runtime_barrier(dev); | |
if (dev->class && dev->class->shutdown_pre) { | |
- if (initcall_debug) | |
dev_info(dev, "shutdown_pre\n"); | |
+ mdelay(50); | |
dev->class->shutdown_pre(dev); | |
} | |
if (dev->bus && dev->bus->shutdown) { | |
- if (initcall_debug) | |
dev_info(dev, "shutdown\n"); | |
+ mdelay(50); | |
dev->bus->shutdown(dev); | |
} else if (dev->driver && dev->driver->shutdown) { | |
- if (initcall_debug) | |
dev_info(dev, "shutdown\n"); | |
+ mdelay(50); | |
dev->driver->shutdown(dev); | |
} | |
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c | |
index 420f25fdf..dfcb6ef96 100644 | |
--- a/drivers/soc/amlogic/meson-ee-pwrc.c | |
+++ b/drivers/soc/amlogic/meson-ee-pwrc.c | |
@@ -339,19 +339,22 @@ static int meson_ee_pwrc_off(struct generic_pm_domain *domain) | |
container_of(domain, struct meson_ee_pwrc_domain, base); | |
int i; | |
+ pr_info("PWRC_OFF %s start", domain->name); | |
+// return 0; // exit from there always without stuck | |
+ | |
if (pwrc_domain->desc.top_pd) | |
regmap_update_bits(pwrc_domain->pwrc->regmap_ao, | |
pwrc_domain->desc.top_pd->sleep_reg, | |
pwrc_domain->desc.top_pd->sleep_mask, | |
pwrc_domain->desc.top_pd->sleep_mask); | |
udelay(20); | |
+// return 0; // exit from there already can stuck | |
for (i = 0 ; i < pwrc_domain->desc.mem_pd_count ; ++i) | |
regmap_update_bits(pwrc_domain->pwrc->regmap_hhi, | |
pwrc_domain->desc.mem_pd[i].reg, | |
pwrc_domain->desc.mem_pd[i].mask, | |
pwrc_domain->desc.mem_pd[i].mask); | |
- | |
udelay(20); | |
if (pwrc_domain->desc.top_pd) | |
@@ -360,11 +363,15 @@ static int meson_ee_pwrc_off(struct generic_pm_domain *domain) | |
pwrc_domain->desc.top_pd->iso_mask, | |
pwrc_domain->desc.top_pd->iso_mask); | |
+ udelay(100); | |
+ | |
if (pwrc_domain->num_clks) { | |
+ pr_info("PWRC_OFF clks %d", pwrc_domain->num_clks); | |
msleep(20); | |
clk_bulk_disable_unprepare(pwrc_domain->num_clks, | |
pwrc_domain->clks); | |
} | |
+ pr_info("PWRC_OFF %s done", domain->name); | |
return 0; | |
} | |
@@ -547,11 +554,14 @@ static void meson_ee_pwrc_shutdown(struct platform_device *pdev) | |
return; | |
} | |
+ dev_info(&pdev->dev, "shutdown begin"); | |
for (i = 0 ; i < pwrc->xlate.num_domains ; ++i) { | |
struct meson_ee_pwrc_domain *dom = &pwrc->domains[i]; | |
- if (dom->desc.get_power && !dom->desc.get_power(dom)) | |
+ if (dom->desc.get_power && !dom->desc.get_power(dom)) { | |
+ dev_info(&pdev->dev, "shutdown domain %d:%s...", i, dom->desc.name); | |
meson_ee_pwrc_off(&dom->base); | |
+ } | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ # [ 4.128332] reboot: kernel restart prepare CMD:(null) | |
[ 4.128531] platform ff64c000.mdio-multiplexer: shutdown | |
[ 4.183073] usb 1-1-port4: shutdown | |
[ 4.233111] usb 1-1-port3: shutdown | |
[ 4.283147] usb 1-1-port2: shutdown | |
[ 4.333183] usb 1-1-port1: shutdown | |
[ 4.383227] adc_keys adc-keys: shutdown | |
[ 4.433269] usb usb2-port1: shutdown | |
[ 4.483312] usb usb1-port2: shutdown | |
[ 4.533348] usb usb1-port1: shutdown | |
[ 4.583389] xhci-hcd xhci-hcd.0.auto: shutdown | |
[ 4.633436] dwc3 ff500000.usb: shutdown | |
[ 4.683478] dwc2 ff400000.usb: shutdown | |
[ 4.733523] dwc3-meson-g12a ffe09000.usb: shutdown | |
[ 4.783570] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown | |
[ 4.835242] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown begin | |
[ 4.837429] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown domain 0:VPU... | |
[ 4.846061] PWRC_OFF VPU start | |
[ 4.846421] PWRC_OFF clks 2 | |
[ 4.874766] PWRC_OFF VPU done | |
[ 4.874794] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown domain 2:USB... | |
[ 4.883525] PWRC_OFF USB start | |
[ 4.883834] PWRC_OFF USB done | |
[ 4.886531] phy-g12a-usb3-pcie ff646000.phy: shutdown | |
[ 4.944481] phy-meson-g12a-usb2 ff63a000.phy: shutdown | |
[ 4.994529] phy-meson-g12a-usb2 ff636000.phy: shutdown | |
[ 5.044574] reg-fixed-voltage regulator-usb_pwr: shutdown | |
[ 5.094621] reg-fixed-voltage regulator-vcc_5v: shutdown | |
[ 5.144670] meson-saradc ff809000.adc: shutdown | |
[ 5.194744] i2c 0-0051: shutdown | |
[ 5.244783] pca953x 0-0020: shutdown | |
[ 5.294821] i2c 0-0018: shutdown | |
[ 5.344859] i2c i2c-0: shutdown | |
[ 5.394904] platform Fixed MDIO bus.0: shutdown | |
[ 5.445026] serial8250 serial8250: shutdown | |
[ 5.495123] pwm-regulator regulator-vddcpu: shutdown | |
[ 5.545170] pwm-clock wifi32k: shutdown | |
[ 5.595403] platform sound: shutdown | |
[ 5.645441] platform hdmi-connector: shutdown | |
[ 5.695484] reg-fixed-voltage regulator-vsys_3v3: shutdown | |
[ 5.745531] reg-fixed-voltage regulator-emmc_1v8: shutdown | |
[ 5.795578] reg-fixed-voltage regulator-vddao_1v8: shutdown | |
[ 5.845625] reg-fixed-voltage regulator-vcc_3v3: shutdown | |
[ 5.895670] reg-fixed-voltage regulator-vcc_1v8: shutdown | |
[ 5.945714] reg-fixed-voltage regulator-dc_in: shutdown | |
[ 5.995758] pwrseq_simple sdio-pwrseq: shutdown | |
[ 6.045800] gpio-keys-polled gpio-keys-polled: shutdown | |
[ 6.095844] pwrseq_emmc emmc-pwrseq: shutdown | |
[ 6.145884] leds-gpio leds: shutdown | |
[ 6.196256] platform audio-controller-0: shutdown | |
[ 6.246299] platform timer: shutdown | |
[ 6.296338] platform ffe40000.gpu: shutdown | |
[ 6.346380] platform ffe07000.mmc: shutdown | |
[ 6.396422] platform ffe05000.sd: shutdown | |
[ 6.446464] platform ffe03000.sd: shutdown | |
[ 6.496503] meson_uart ffd24000.serial: shutdown | |
[ 6.546544] meson_msr ffd18000.clock-measure: shutdown | |
[ 6.596587] meson-pwm ffd19000.pwm: shutdown | |
[ 6.646630] platform ffd14000.spi: shutdown | |
[ 6.696669] platform ffd0f0d0.wdt: shutdown | |
[ 6.746708] meson_reset ffd01004.reset-controller: shutdown | |
[ 6.796766] platform ffd00000.bus: shutdown | |
[ 6.846808] platform ff620000.video-decoder: shutdown | |
[ 6.896854] platform ff808000.ir: shutdown | |
[ 6.946893] meson-i2c ff805000.i2c: shutdown | |
[ 6.996933] meson_uart ff803000.serial: shutdown | |
[ 7.046973] meson-pwm ff802000.pwm: shutdown | |
[ 7.097015] platform ff800280.cec: shutdown | |
[ 7.147054] platform ff800140.ao-secure: shutdown | |
[ 7.197095] platform ff8000a8.rtc: shutdown | |
[ 7.247134] meson-g12a-pinctrl ff800000.sys-ctrl:pinctrl@14: shutdown | |
[ 7.297947] g12a-aoclkc ff800000.sys-ctrl:clock-controller: shutdown | |
[ 7.348672] platform ff800000.sys-ctrl: shutdown | |
[ 7.398716] platform ff800000.bus: shutdown | |
[ 7.448764] platform ff660744.audio-controller: shutdown | |
[ 7.498810] platform ff660500.audio-controller: shutdown | |
[ 7.548856] platform ff660280.reset-controller: shutdown | |
[ 7.598902] platform ff660240.audio-controller: shutdown | |
[ 7.648948] platform ff660200.audio-controller: shutdown | |
[ 7.698994] platform ff6601c0.audio-controller: shutdown | |
[ 7.749039] platform ff660000.clock-controller: shutdown | |
[ 7.799085] platform ff660000.bus: shutdown | |
[ 7.849129] g12a-clkc ff63c000.system-controller:clock-controller: shutdown | |
[ 7.900455] platform ff63c000.system-controller: shutdown | |
[ 7.950500] platform ff63c000.bus: shutdown | |
[ 8.000539] amlogic-canvas ff638048.video-lut: shutdown | |
[ 8.050582] platform ff638000.bus: shutdown | |
[ 8.100622] amlogic_thermal ff634c00.temperature-sensor: shutdown | |
[ 8.151088] amlogic_thermal ff634800.temperature-sensor: shutdown | |
[ 8.201553] meson-g12a-pinctrl ff634400.bus:pinctrl@40: shutdown | |
[ 8.251931] platform ff634400.bus: shutdown | |
[ 8.301970] platform ff630218.rng: shutdown | |
[ 8.352009] platform ff630000.bus: shutdown | |
[ 8.402048] meson-dw-hdmi ff600000.hdmi-tx: shutdown | |
[ 8.452090] platform ff600000.bus: shutdown | |
[ 8.502129] platform soc: shutdown | |
[ 8.552164] meson-sm secure-monitor: shutdown | |
[ 8.602204] platform psci: shutdown | |
[ 8.652241] platform efuse: shutdown | |
[ 8.702281] cpufreq-dt cpufreq-dt: shutdown | |
[ 8.752323] reg-dummy reg-dummy: shutdown | |
[ 8.802410] reboot: Restarting system | |
[ 8.802449] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null) | |
bl31 reboot reason: 0xd | |
bl31 reboot reason: 0x0 | |
system cmd 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ # [ 4.200239] reboot: kernel restart prepare CMD:(null) | |
[ 4.200437] platform ff64c000.mdio-multiplexer: shutdown | |
[ 4.254987] usb 1-1-port4: shutdown | |
[ 4.305024] usb 1-1-port3: shutdown | |
[ 4.355062] usb 1-1-port2: shutdown | |
[ 4.405097] usb 1-1-port1: shutdown | |
[ 4.455144] adc_keys adc-keys: shutdown | |
[ 4.505188] usb usb2-port1: shutdown | |
[ 4.555233] usb usb1-port2: shutdown | |
[ 4.605269] usb usb1-port1: shutdown | |
[ 4.655311] xhci-hcd xhci-hcd.0.auto: shutdown | |
[ 4.705359] dwc3 ff500000.usb: shutdown | |
[ 4.755402] dwc2 ff400000.usb: shutdown | |
[ 4.805448] dwc3-meson-g12a ffe09000.usb: shutdown | |
[ 4.855496] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown | |
[ 4.907168] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown begin | |
[ 4.909354] meson_ee_pwrc ff63c000.system-controller:power-controller: shutdown domain 0:VPU... | |
.. STUCK .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment