diff options
author | Simon Glass <sjg@chromium.org> | 2019-12-29 21:19:15 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-01-07 16:02:38 -0700 |
commit | b2b1100a3bef7881ffeb1250a087e40d9672db26 (patch) | |
tree | e1ede96c5d2d52963c65b62f4f1904bfd77d1bc5 /board/freescale/t102xrdb/law.c | |
parent | 4886287ee4f942aeee2ae0d50281ce21e8c43cf5 (diff) |
aspeed: ast2500: Read clock ofdata in the correct method
At present the clock driver reads its ofdata in the probe() method. This
is not correct although it is often harmless.
However in this case it causes a problem, something like this:
- ast_get_scu() is called (from somewhere) to get the SCI address
- this probes the clock
- first sets up ofdata (which does nothing at present)
- DM marks clock device as active
- DM calls pinctrl
- pinctrl probes and calls ast_get_scu() in ast2500_pinctrl_probe()
- ast_get_scu() probes the clock, but sees it already marked as
probed
- ast_get_scu() accesses the clock's private data, with scu as NULL
- DM calls clock probe function ast2500_clk_probe() which reads scu
By putting the read of scu into the correct method, scu is read as part of
ofdata setup, and everything is OK.
Note: This problem did not matter until now since DM always probed all
parents before reading a child's ofdata. The fact that pinctrl is a child
of clock seems to trigger this strange bug.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'board/freescale/t102xrdb/law.c')
0 files changed, 0 insertions, 0 deletions