aboutsummaryrefslogtreecommitdiff
path: root/doc/driver-model/of-plat.rst
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26doc: Move driver model docs under develop/Simon Glass1-913/+0
These docs are useful for developers, not users. Move them under that section. Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26dm: doc: Add documentation for of-platdata-instSimon Glass1-0/+587
Add a description of the new features, along with internal technical documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26dm: doc: Tidy up of-platdata docsSimon Glass1-86/+52
This doc has a few pieces that are out-of-date. Fix these. Also we have started to use 'devicetree' instead of 'device tree' or 'device-tree' since it is easier to see as a single term, so replace all ocurrences accordingly. Also move the caveats to the end, since this is a fairly solid part of U-Boot now. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22dtoc: Process driver aliases along with driversSimon Glass1-1/+2
Instead of using a separate step for this processing, handle it while scanning its associated driver. This allows us to drop the code coverage exception in this case. Note that only files containing drivers are scanned by dtoc, so aliases declared in a file that doesn't hold a driver will not be noticed. It would be confusing to put them anywhere other than in the driver that they relate to, but update the documentation to say this explicitly, just in case. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Drop dm_populate_phandle_data()Simon Glass1-10/+6
This has not been needed since parent information was added and we started using indicies for references to other drivers instead of pointers. It was kept around in the expectation that it might be needed later. However with the latest updates, it doesn't seem likely that we'll need this in the foreseeable future. Drop dm_populate_phandle_data() from dtoc and driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIASSimon Glass1-3/+3
We use the U_BOOT_ prefix (i.e. U_BOOT_DRIVER) to declare a driver but in every other case we just use DM_. Update the alias macros to use the DM_ prefix. We could perhaps rename U_BOOT_DRIVER() to DM_DRIVER(), but this macro is widely used and there is at least some benefit to indicating it us a U-Boot driver, particularly for code ported from Linux. So for now, let's keep that name. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename DM_GET_DEVICE() to DM_DRVINFO_GET()Simon Glass1-1/+1
This does not get a device (struct udevice *) but a struct driver_info * so the name is confusing. Rename it accordingly. Since we plan to have several various of these macros, put GET at the end instead of the middle, so it is easier to spot the related macros. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass1-6/+6
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-5/+5
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass1-6/+6
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename dev_get_platdata() to dev_get_plat()Simon Glass1-3/+3
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: Rename 'platdata_size' to 'plat_size'Simon Glass1-1/+1
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-7/+7
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-3/+3
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-29dm: doc: Update the of-platadata documentationSimon Glass1-23/+19
Update this to incorporate the parent feature as well as other recent developments. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09dm: doc: update of-plat with new phandle supportWalter Lozano1-8/+16
Update documentation to reflect the new phandle support when OF_PLATDATA is used. Now phandles are implemented as pointers to U_BOOT_DEVICE, which makes it possible to get a pointer to the actual device. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-09dm: doc: update of-plat with the support for driver aliasesWalter Lozano1-1/+13
Update the documentation with the support for driver aliases using U_BOOT_DRIVER_ALIAS. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-15dm: doc: Add a note about of-platdata and header filesSimon Glass1-0/+6
We don't want to include dt-structs.h in header files, so add a note about that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-03dm: doc: Correct of-platdata driver nameSimon Glass1-1/+1
Add a note about the driver name in the of-platdata documentation since the naming must follow the compatible string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-09-19doc: fix: Replace SPL_OF_PLATDATA with OF_PLATDATA in examplesLukasz Majewski1-4/+4
The of-plat.rst file till this change has been using This is at best misleading as SPL_OF_PLATDATA is always defined when we want to use this SPL tinification feature (also in U-Boot proper). As a result the OF_PLATDATA SPL specific code is also compiled in when U-Boot proper is build. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-24doc: driver-model: Convert of-plat.txt to reSTBin Meng1-0/+341
Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>