Commit
2f3b95dbc78ce96b0f9f471e688db66223988419
Exists in
v2017.01-smarct4x
and in
39 other branches
8qm-imx_v2020.04_5.4.70_2.3.0, emb_lf_v2022.04, emb_lf_v2023.04, emb_lf_v2024.04, imx_v2015.04_4.1.15_1.0.0_ga, pitx_8mp_lf_v2020.04, smarc-8m-android-10.0.0_2.6.0, smarc-8m-android-11.0.0_2.0.0, smarc-8mp-android-11.0.0_2.0.0, smarc-imx6_v2018.03_4.14.98_2.0.0_ga, smarc-imx7_v2017.03_4.9.11_1.0.0_ga, smarc-imx7_v2018.03_4.14.98_2.0.0_ga, smarc-imx_v2015.04_4.1.15_1.0.0_ga, smarc-imx_v2017.03_4.9.11_1.0.0_ga, smarc-imx_v2017.03_4.9.88_2.0.0_ga, smarc-imx_v2017.03_o8.1.0_1.3.0_8m, smarc-imx_v2018.03_4.14.78_1.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_2.0.0_ga, smarc_8m-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8m-imx_v2019.04_4.19.35_1.1.0, smarc_8m_00d0-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2019.04_4.19.35_1.1.0, smarc_8mm-imx_v2020.04_5.4.24_2.1.0, smarc_8mp_lf_v2020.04, smarc_8mq-imx_v2020.04_5.4.24_2.1.0, smarc_8mq_lf_v2020.04, ti-u-boot-2015.07, v2015.07-smarct33, v2015.07-smarct33-emmc, v2015.07-smarct4x, v2016.05-dlt, v2016.05-smarct3x, v2016.05-smarct3x-emmc, v2016.05-smarct4x, v2017.01-smarct3x, v2017.01-smarct3x-emmc
dm: core: Set device tree node for root device
The root device corresponds to the root device tree node, so set this up.
Also add a few notes to the documentation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Showing
2 changed files
with
7 additions
and
0 deletions
Side-by-side Diff
... |
... |
@@ -363,6 +363,10 @@ |
363
|
363 |
in your ofdata_to_platdata (or probe) method to allocate the required memory, |
364
|
364 |
and you should free it in the remove method. |
365
|
365 |
|
|
366 |
+The driver model tree is intended to mirror that of the device tree. The |
|
367 |
+root driver is at device tree offset 0 (the root node, '/'), and its |
|
368 |
+children are the children of the root node. |
|
369 |
+ |
366
|
370 |
|
367
|
371 |
Declaring Uclasses |
368
|
372 |
------------------ |
... |
... |
@@ -49,6 +49,9 @@ |
49
|
49 |
ret = device_bind_by_name(NULL, false, &root_info, &DM_ROOT_NON_CONST); |
50
|
50 |
if (ret) |
51
|
51 |
return ret; |
|
52 |
+#ifdef CONFIG_OF_CONTROL |
|
53 |
+ DM_ROOT_NON_CONST->of_offset = 0; |
|
54 |
+#endif |
52
|
55 |
ret = device_probe(DM_ROOT_NON_CONST); |
53
|
56 |
if (ret) |
54
|
57 |
return ret; |