Re: [PATCH v2 1/2] pmdomain: imx8mp-blk-ctrl: keep gpc power domain on if blk-ctrl pd is on during system pm
Frieder Schrempf <[email protected]>
| Newsgroups | dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <[email protected]> |
On 23.07.26 14:49, Frieder Schrempf wrote: > Hi, > > On 04.02.26 12:11, Xu Yang wrote: >> Current design will power off all dependent GPC power domains in >> imx8mp_blk_ctrl_suspend(), even though the user device has enabled >> wakeup capability. The result is that wakeup function never works >> for such device. >> >> An example will be USB wakeup on i.MX8MP. PHY device '382f0040.usb-phy' >> is attached to power domain 'hsioblk-usb-phy2' which is spawned by hsio >> block control. A virtual power domain device 'genpd:3:32f10000.blk-ctrl' >> is created to build connection with 'hsioblk-usb-phy2' and it depends on >> GPC power domain 'usb-otg2'. If device '382f0040.usb-phy' enable wakeup, >> only power domain 'hsioblk-usb-phy2' keeps on during system suspend, >> power domain 'usb-otg2' is off all the time. So the wakeup event can't >> happen. >> >> In order to further establish a connection between the power domains >> related to GPC and block control during system pm, register a notifier >> to power_dev, so that GPC power domain will know that block control power >> domain is on and will not power off itself. >> >> Suggested-by: Ulf Hansson <[email protected]> >> Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") >> Cc: [email protected] >> Signed-off-by: Xu Yang <[email protected]> > This patch got backported to v6.1.y and for me it breaks the boot on > i.MX8MP with the log below (tested with 6.1.175). > > Reverting the two patches of this series fixes the issue. What is the > correct way to fix this for the 6.1 stable branch? Should the patches be > reverted? > Ah, this is probably related to the fact, that I also carry backported HDMI support in our 6.1 tree. This likely triggers the exception and I'm probably the only one seeing this as this is specific to our tree. > Thanks > Frieder > > [ 1.164011] imx8mp-blk-ctrl 32fc0000.blk-ctrl: error -ENODEV: failed > to add power notifier > [ 1.171108] Unable to handle kernel NULL pointer dereference at > virtual address 0000000000000210 > [ 1.179932] Mem abort info: > [ 1.182731] ESR = 0x0000000096000004 > [ 1.186492] EC = 0x25: DABT (current EL), IL = 32 bits > [ 1.191833] SET = 0, FnV = 0 > [ 1.194891] EA = 0, S1PTW = 0 > [ 1.198041] FSC = 0x04: level 0 translation fault > [ 1.202960] Data abort info: > [ 1.205836] ISV = 0, ISS = 0x00000004 > [ 1.209676] CM = 0, WnR = 0 > [ 1.212662] [0000000000000210] user address but active_mm is swapper > [ 1.219044] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP > [ 1.225340] Modules linked in: > [ 1.228403] CPU: 2 PID: 1 Comm: swapper/0 Not tainted > 6.1.175-ktn-ked-0.0.0 #1 > [ 1.235663] Hardware name: Kontron BL i.MX8MP OSM-S (DT) > [ 1.241001] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS > BTYPE=--) > [ 1.247999] pc : dev_pm_domain_detach+0x0/0x40 > [ 1.252461] lr : imx8mp_blk_ctrl_probe+0x494/0x580 > [ 1.257276] sp : ffff80000997ba00 > [ 1.260601] x29: ffff80000997bb70 x28: ffff0000c0aaa9a0 x27: > 00000000ffffffed > [ 1.267774] x26: ffff800008e37c78 x25: ffff800008e37ab8 x24: > ffff800008e37af0 > [ 1.274949] x23: 0000000000000007 x22: ffff0000c0945010 x21: > 0000000000000038 > [ 1.282124] x20: 0000000000000188 x19: ffff0000c0fa6580 x18: > ffffffffffffffff > [ 1.289299] x17: 20646461206f7420 x16: 64656c696166203a x15: > 5645444f4e452d20 > [ 1.296474] x14: 726f727265203a6c x13: 7265696669746f6e x12: > ffff80000962c280 > [ 1.303649] x11: 00000000000000dd x10: ffff80000962c280 x9 : > 00000000ffffdfff > [ 1.310824] x8 : ffff8000096dc280 x7 : 000000000002ffe8 x6 : > 0000000000000000 > [ 1.318001] x5 : 80000000ffffe000 x4 : 0000000000000000 x3 : > 0000000000000000 > [ 1.325174] x2 : 0000000000000000 x1 : 0000000000000001 x0 : > 0000000000000000 > [ 1.332351] Call trace: > [ 1.334801] dev_pm_domain_detach+0x0/0x40 > [ 1.338913] platform_probe+0x68/0xe0 > [ 1.342586] really_probe+0xc0/0x3e0 > [ 1.346174] __driver_probe_device+0x84/0x190 > [ 1.350549] driver_probe_device+0x3c/0x110 > [ 1.354751] __driver_attach+0xf4/0x200 > [ 1.358599] bus_for_each_dev+0x74/0xe0 > [ 1.362451] driver_attach+0x24/0x30 > [ 1.366038] bus_add_driver+0x17c/0x240 > [ 1.369886] driver_register+0x78/0x130 > [ 1.373736] __platform_driver_register+0x24/0x30 > [ 1.378463] imx8mp_blk_ctrl_driver_init+0x1c/0x28 > [ 1.383274] do_one_initcall+0x48/0x2b0 > [ 1.387126] kernel_init_freeable+0x22c/0x29c > [ 1.391499] kernel_init+0x24/0x134 > [ 1.395001] ret_from_fork+0x10/0x20 > [ 1.398592] Code: d65f03c0 d65f03c0 00000000 00000000 (f9410802) > [ 1.404715] ---[ end trace 0000000000000000 ]--- > >