summaryrefslogtreecommitdiff
path: root/doc/develop/driver-model
AgeCommit message (Collapse)Author
2023-02-14dm: doc: Update documentation for new driver model schemaSimon Glass
Now that Linux has accepted these tags, move U-Boot over to use them. Tidy up the comments and formatting, making sure that VPL is mentioned too. Signed-off-by: Simon Glass <[email protected]>
2023-01-23bootstd: Update documentation for new featuresSimon Glass
Document the hunters and the new way that iteration works. Signed-off-by: Simon Glass <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-30Merge tag 'video-20221030' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video - fix [hv]sync active vs back porch in dw_mipi_dsi - simplefb rotation support - support splash as raw image from MMC - enhancements to Truetype console (multiple fonts and sizes) - drop old LCD support
2022-10-30video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEOSimon Glass
Now that all the old code is gone, rename this option. Driver model migration is now complete. Signed-off-by: Simon Glass <[email protected]>
2022-10-29dm: doc: Fix serial howto u-boot,dm-pre-reloc typoMichal Suchanek
In a couple of places the document says u-boot,pre-reloc but all examples show u-boot,dm-pre-reloc, use the latter consistently. Signed-off-by: Michal Suchanek <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-21input: Remove legacy KEYBOARD optionTom Rini
There are no platforms that have not migrated to using DM_KEYBOARD, remove the legacy option. Cc: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-17dm: core: Update docs about oftree_from_fdt()Simon Glass
Update this function's comment and also the livetree documentation, so it is clear when to use the function. Signed-off-by: Simon Glass <[email protected]>
2022-09-29dm: core: Allow copying ofnode property data when writingSimon Glass
At present ofnode_write_prop() is inconsistent between livetree and flattree, in that livetree requires the caller to ensure the property value is stable (e.g. in rodata or allocated) but flattree does not, since it makes a copy. This makes the API call a bit painful to use, since the caller must do different things depending on OF_LIVE. Add a new 'copy' argument which tells the function to make a copy if needed. Add some tests to cover this behaviour. Signed-off-by: Simon Glass <[email protected]>
2022-09-29dm: core: Expand ofnode testsSimon Glass
The current tests do not cover all functions, nor do they cover the new multi-tree functionality. Add and update the tests accordingly and update the 'future work' notes in the documentation. There is a still more testing needed for the failure cases, since at present some ofnode functions return a libfdt error code instead of converting it to an errno. Signed-off-by: Simon Glass <[email protected]>
2022-09-29dm: core: Add the ofnode multi-tree implementationSimon Glass
Add the logic to redirect requests for the device tree through a function which can look up the tree ID. This works by using the top bits of ofnode.of_offset to encode a tree. It is assumed that there will only be a few device trees used at runtime, typically the control FDT (always tree ID 0) and possibly a separate FDT to be passed the OS. The maximum number of device trees supported at runtime is 8, with this implementation. That would use bits 30:28 of the node-offset value, meaning that the positive offset range is limited to bits 27:0, versus 30:1 with this feature disabled. That still allows a device tree of up to 256MB, which should be enough for most FITs. Larger ones can be supported by using external data with the FIT, or by enabling OF_LIVE. Update the documentation a little and fix up the comment for ofnode_valid(). Signed-off-by: Simon Glass <[email protected]>
2022-09-29test: Make a copy of the device tree before running a testSimon Glass
When the flat device tree changes it can mess up the live tree since that uses the flat tree for its strings. This affects only a few sandbox tests which modify the device tree, but the number will grow as ofnode support for writing improves. While the control FDT is not intended to change while U-Boot is running, some tests do so. For example, the ofnode interface only supports modifying properties in the control FDT, so tests must use that. To solve this problem, keep a copy of the FDT and restore it as needed when the test is finished. The copy only happens on sandbox (except SPL builds), to reduce memory usage and because these tests are not useful on other boards. For other boards, a checksum is taken to ensure that nothing changes. It would be possible to always checksum the FDT on sandbox and only restore it if needed, but this is slightly slower than restoring it every time, at least with crc8. Move the code which checks for success to the very end, for clarity. Signed-off-by: Simon Glass <[email protected]>
2022-09-16blk: Rename HAVE_BLOCK_DEVICESimon Glass
This option is fact really related to SPL. For U-Boot proper we always use driver model for block devices, so CONFIG_BLK is enabled if block devices are in use. It is only for SPL that we have two cases: - SPL_BLK is enabled, in which case we use driver model and blk-uclass.c - SPL_BLK is not enabled, in which case (if we need block devices) we must use blk_legacy.c Rename the symbol to SPL_LEGACY_BLOCK to make this clear. This is different enough from BLK and SPL_BLK that there should be no confusion. Signed-off-by: Simon Glass <[email protected]>
2022-08-20doc: dm: clarify activation.Michal Suchanek
Explain when devices should get activated. Signed-off-by: Michal Suchanek <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-08-12dm: core: Prepare for updating the device tree with ofnodeSimon Glass
Add some documentation and a new flag so that we can safely enabled using the ofnode interface to write to the device tree. Signed-off-by: Simon Glass <[email protected]>
2022-08-12dm: core: Introduce support for multiple treesSimon Glass
At present ofnode only works with a single device tree, for the most part. This is the control FDT used by U-Boot. When booting an OS we may obtain a different device tree and want to modify it. Add some initial support for this into the ofnode API. Note that we don't permit aliases in this other device tree, since the of_access implementation maintains a list of aliases collected at start-up. Also, we don't need aliases to do fixups in the other FDT. So make sure that flat tree and live tree processing are consistent in this area. Signed-off-by: Simon Glass <[email protected]>
2022-08-12dm: core: Add a note about how livetree updates workSimon Glass
The unflattening algorithm results in a single block of memory being allocated for the whole tree. When writing new properties, these are allocated new memory outside that block. When the block is freed, the allocated properties remain. Document how this works and the potential memory leak, as well as mentioning that updating the livetree is actually supported now. Signed-off-by: Simon Glass <[email protected]>
2022-07-07arm: Remove PXA architecture supportTom Rini
With the last platform for this architecture removed, remove the rest of the architecture support as well. Cc: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-06Convert CONFIG_SPL_SYS_MALLOC_SIMPLE to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SPL_SYS_MALLOC_SIMPLE The problem here is that a few platforms have been doing: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif instead of defining CONFIG_SPL_SYS_MALLOC_SIMPLE directly. Correct this and update the documentation in a few places to match usage. Signed-off-by: Tom Rini <[email protected]>
2022-04-23dm: tag: add some documentAKASHI Takahiro
Some basic stuff about tag support is explained under doc/devlop/driver-model. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-04-09dm: Add docs to explain how to enable DM_SERIAL for a boardSimon Glass
This is an attempt to cover the common cases found when enabling driver model for serial on a new board. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-02-10nvme: Split out PCI supportMark Kettenis
Apple SoCs have an integrated NVMe controller that isn't connected over a PCIe bus. In preparation for adding support for this NVMe controller, split out the PCI support into its own file. This file is selected through a new CONFIG_NVME_PCI Kconfig option, so do a wholesale replacement of CONFIG_NVME with CONFIG_NVME_PCI. Signed-off-by: Mark Kettenis <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on: Macbook Air M1 Tested-by: Simon Glass <[email protected]>
2022-01-28dm: serial: Add a migration deadline for serialSimon Glass
This probably should have been done a while back since it is a core system. Very few boards remain to be migrated. Addd a migration deadline for a year out. Signed-off-by: Simon Glass <[email protected]>
2022-01-12timer: Add a migration messageSimon Glass
Some boards still use the old timer mechanism. Set a deadline for them to update to driver model. Point to some examples as well. This needs a bit of a strange rule to avoid an error on some boards. Signed-off-by: Simon Glass <[email protected]>
2021-12-05keyboard: Add a migration messageSimon Glass
A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model. Signed-off-by: Simon Glass <[email protected]>
2021-09-25dm: doc: Add a note about of-platdata header filesSimon Glass
This error can be confusing so mention it specifically in the documentation. Signed-off-by: Simon Glass <[email protected]>
2021-09-25treewide: Try to avoid the preprocessor with OF_REALSimon Glass
Convert some of these occurences to C code, where it is easy to do. This should help encourage this approach to be used in new code. Signed-off-by: Simon Glass <[email protected]>
2021-09-25treewide: Use OF_REAL instead of !OF_PLATDATASimon Glass
Now that we have a 'positive' Kconfig option, use this instead of the negative one, which is harder to understand. Signed-off-by: Simon Glass <[email protected]>
2021-09-16dtoc: Further improve documentation about warningsSimon Glass
Split this information into subsections and expand it. Signed-off-by: Simon Glass <[email protected]>
2021-08-06pci: Drop migration methodSimon Glass
Migration is complete. Drop the message. Signed-off-by: Simon Glass <[email protected]>
2021-07-21dtoc: Update documentation to cover warnings in more detailSimon Glass
When things go wrong it can be confusing to figure out what to change. Add a few more details to the documentation. Fix a 'make htmldocs' warning while we are here. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Walter Lozano <[email protected]>
2021-06-23doc: develop: Convert README.nvme to reSTBin Meng
This converts the existing README.nvme to reST, and puts it under the develop/driver-model/ directory. Signed-off-by: Bin Meng <[email protected]>
2021-05-10doc: develop: Convert README.virtio to reSTBin Meng
This converts the existing README.virtio to reST, and puts it under the develop/driver-model/ directory. Signed-off-by: Bin Meng <[email protected]>
2021-04-06dm: core: Document the common error codesSimon Glass
Driver model uses quite strong conventions on error codes, but these are currently not clearly documented. Add a description of the commonly used errors. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2021-03-29Merge tag 'v2021.04-rc5' into nextTom Rini
Prepare v2021.04-rc5
2021-03-26doc: Move driver model docs under develop/Simon Glass
These docs are useful for developers, not users. Move them under that section. Suggested-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Simon Glass <[email protected]>