All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder.schrempf@kontron.de>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
	Jaehoon Chung <jh80.chung@samsung.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	u-boot@lists.denx.de, Samuel Holland <samuel.holland@sifive.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	Wadim Egorov <w.egorov@phytec.de>, Heiko Schocher <hs@denx.de>,
	Fabio Estevam <festevam@denx.de>
Subject: Re: [PATCH 2/2] imx: power-domain: Enable refcounting on imx8mp
Date: Tue, 22 Jul 2025 10:32:55 +0200	[thread overview]
Message-ID: <952009a5-9483-4729-bf33-ba83c48b8835@kontron.de> (raw)
In-Reply-To: <ef633109-6f01-4d45-8d72-1f04a9051629@kontron.de>

Am 22.07.25 um 09:26 schrieb Frieder Schrempf:
> Am 21.07.25 um 18:01 schrieb Frieder Schrempf:
>> Hi Miquel,
>>
>> Am 25.04.25 um 08:49 schrieb Miquel Raynal:
>>> Prevent enabling/disabling multiple times the same power domain to avoid
>>> breakages due to the same power domains being referenced several times
>>> by different device nodes.
>>>
>>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
>>
>> I've stumbled upon some issue that seems to be related to this patch. I
>> saw you already had to bother with other breakages of existing
>> boards/platforms in the previous implementation. Unfortunately it looks
>> like this still causes some kind of regression in my case.
>>
>> I'm working with an i.MX8MM board (kontron-sl-mx8mm_defconfig) and I see
>> a crash as soon as I do "usb start" and then "usb stop" (log for the
>> latter see below).
>>
>> As soon as I revert this patch everything starts to work fine again. Do
>> you have any suggestions? The power-domains involved here are pgc_otg1
>> and pgc_hsiomix defined in imx8mm.dtsi.
>>
>> Thanks
>> Frieder
>>
>>
>> => usb stop
>> stopping USB..
>> Sending event 6/(unknown) to spy 'efi_disk del'
>> Sending event 6/(unknown) to spy 'efi_disk del'
>> Looking for power-domain@0
>> Looking for power-domain@0
>>       - checking gpc@303a0000
>>       - checking power-domain@0
>>    - result for power-domain@0: power-domain@0 (ret=0)
>>    - result for power-domain@0: power-domain@0 (ret=0)
>> "Synchronous Abort" handler, esr 0x96000005, far 0x4ebacdc50
>> elr: 0000000040249c94 lr : 0000000040249c6c (reloc)
>> elr: 00000000fff4ec94 lr : 00000000fff4ec6c
>> x0 : 0000000000000001 x1 : 00000000fbf22750
>> x2 : 00000003efbab500 x3 : 00000000fffcdfb0
>> x4 : 0000000000000020 x5 : 0000000000000020
>> x6 : 00000000fbeea10f x7 : 00000000fbeea3d7
>> x8 : 00000000fffffffe x9 : 00000000fbeea1ec
>> x10: 00000000fbeea280 x11: 00000000ffffffd8
>> x12: 00000000fbeeb1b0 x13: 00000000fbeeb1b0
>> x14: 0000000000000002 x15: 0000000000000000
>> x16: 00000000fff4edc4 x17: 0000000000000000
>> x18: 00000000fbef4db0 x19: 00000004ebacdc50
>> x20: 00000000fbeeace8 x21: 00000000fbf21ad0
>> x22: 0000000000000000 x23: 0000000000000001
>> x24: 0000000000000000 x25: 00000000fbf28f10
>> x26: 0000000000000000 x27: 00000000fbf2ad40
>> x28: 00000000fbf2ada0 x29: 00000000fbeeac70
>>
>> Code: f9400693 d37ef662 ab130833 54000140 (b8626820)
>> Resetting CPU ...
>>
>>
> 
> FWIW, here is another log with only the debug output from
> power-domain-uclass.c:
> 
> => usb start
> starting USB...
> power_domain_get_by_index(dev=00000000fbefacd0,
> power_domain=00000000fbeead28)
> power_domain_get_by_index(dev=00000000fbef7450,
> power_domain=00000000fbef74f0)
> power_domain_get_by_index: dev_read_phandle_with_args failed: -2
> power_domain_get_by_index(dev=00000000fbef7560,
> power_domain=00000000fbef7600)
> power_domain_get_by_index: dev_read_phandle_with_args failed: -2
> Enable power domain power-domain@0.0: 0 -> 1 (todo)
> power_domain_get_by_index(dev=00000000fbef58b0,
> power_domain=00000000fbeeabf8)
> power_domain_get_by_index(dev=00000000fbef7780,
> power_domain=00000000fbef7820)
> power_domain_get_by_index: dev_read_phandle_with_args failed: -2
> Enable power domain power-domain@2.0: 0 -> 1 (todo)
> power_domain_get_by_index(dev=00000000fbf239d0,
> power_domain=00000000fbeea288)
> Enable power domain power-domain@0.0: 1 -> 2 (EALREADY)
> Bus usb@32e40000: 1 USB Device(s) found
> => <INTERRUPT>
> => usb stop
> stopping USB..
> power_domain_get_by_index(dev=00000000fbf239d0,
> power_domain=00000000fbeeac88)
> "Synchronous Abort" handler, esr 0x96000005, far 0x4ebaceb90

This should do the trick:
https://patchwork.ozlabs.org/project/uboot/patch/20250722083119.64084-1-frieder@fris.de/

  reply	other threads:[~2025-07-22  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  6:49 [PATCH 0/2] power-domain: Enable uclass refcounting Miquel Raynal
2025-04-25  6:49 ` [PATCH 1/2] power-domain: Add support for refcounting (again) Miquel Raynal
2025-04-25  8:57   ` Wadim Egorov
2025-04-25  9:49   ` Neha Malcom Francis
2025-04-25 11:12   ` Heiko Schocher
2025-04-25  6:49 ` [PATCH 2/2] imx: power-domain: Enable refcounting on imx8mp Miquel Raynal
2025-04-25 11:13   ` Heiko Schocher
2025-07-21 16:01   ` Frieder Schrempf
2025-07-22  4:43     ` Neha Malcom Francis
2025-07-22  7:26     ` Frieder Schrempf
2025-07-22  8:32       ` Frieder Schrempf [this message]
2025-04-25  8:56 ` [PATCH 0/2] power-domain: Enable uclass refcounting Wadim Egorov
2025-04-28 16:11 ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=952009a5-9483-4729-bf33-ba83c48b8835@kontron.de \
    --to=frieder.schrempf@kontron.de \
    --cc=festevam@denx.de \
    --cc=hs@denx.de \
    --cc=jh80.chung@samsung.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=n-francis@ti.com \
    --cc=samuel.holland@sifive.com \
    --cc=sjg@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=w.egorov@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.