soc: imx: gpcv2: Assert reset before ungating clock
authorMarek Vasut <marex@denx.de>
Fri, 12 Aug 2022 17:08:02 +0000 (19:08 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sun, 21 Aug 2022 13:34:48 +0000 (21:34 +0800)
commitdf88005bd81b80c944d185554e264a4b0f993c37
tree981b590adea784e70c0e7fcf03431848aa4cdfc8
parente7406f864e765c564c5cf384464faff66114f97d
soc: imx: gpcv2: Assert reset before ungating clock

In case the power domain clock are ungated before the reset is asserted,
the system might freeze completely. This is likely due to a device is an
undefined state being attached to bus, which sporadically leads to a bus
hang. Assert the reset before the clock are enabled to assure the device
is in defined state before being attached to bus.

Fixes: fe58c887fb8ca ("soc: imx: gpcv2: add support for optional resets")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/imx/gpcv2.c