From: Tom Rini Date: Tue, 10 Mar 2020 16:36:13 -0400 Subject: [PATCH v2] power-domain: fix hang in endless loop on i.MX8 In-Reply-To: <20200217084211.17967-1-agust@denx.de> References: <20200217084211.17967-1-agust@denx.de> Message-ID: <20200310203613.GJ12423@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Feb 17, 2020 at 09:42:11AM +0100, Anatolij Gustschin wrote: > Currently when booting the kernel on i.MX8 U-Boot hangs in an > endless loop when switching off dma, connectivity or lsio power > domains during device removal. It hapens first when removing > gpio0 (gpio at 5d080000) device, here its power domain device > 'lsio_gpio0' is obtained for switching off power. Since the > obtained 'lsio_gpio0' device is removed afterwards, its power > domain is also switched off and here the parent power domain > device 'lsio_power_domain' is optained for switching off the > power. Thereafter, when the obtained 'lsio_power_domain' is > removed, device_remove() removes its first child 'lsio_gpio0'. > During this child removal the 'lsio_power_domain' device is > obtained again for switching and when removing it later, > the same child removal is repeated, so we are stuck in an > endless loop. Below is a snippet from dm tree on i.MX8QXP > for better illustration of the DM devices relationship: > > Class Index Probed Driver Name Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: