Skip to main content.
Navigation:
DENX
>
U-Boot
>
DriverModel
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
U-Boot
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
U-Boot Home
Documentation
Source Code
The Custodians
Custodian Repositories
Development Process
Release Cycle
Coding Style
Patches
Tasks
Contacts
Changes
Index
List of pages in U-Boot
Search
---+ Driver Model Conversion This page includes a few notes on the status of the conversion of U-Boot to driver model. ---++ Purpose U-Boot originally had a pretty ad-hoc device driver system. While some subsystems have their own framework (e.g. mmc, block devices, stdio), others are implemented as bare function calls to be provided by whichever driver shows up. This limits us to one driver of a particular type (e.g. you cannot have USB2 and USB3 ports at the same time as they use different drivers). Driver model aims to provide a consistent model for drivers and the platform data / device tree information needed by drivers to instantiate devices. In particular: * Hierarchical, allowing a device to have children and parents * Replaces #define CONFIGs with board-supplied platform data or device tree * Devices organized by class, e.g. I2C, SPI, LCD * Efficient implementation, suitable in principle for pre-relocation and SPL * Devices are known very early but are only activated ('probed') when used * More scalable as the U-Boot code base grows ---++ Background Driver model started as a university project in 2012. After some simplifications and adjustments, patches were developed from mid 2013 and it was committed to mainline U-Boot in early 2014. [[http://u-boot.10912.n7.nabble.com/U-Boot-RFC-Driver-model-td34007.html][Marek Vasut's original email in 2010]] [[http://schedule2012.rmll.info/IMG/pdf/LSM2012_UbootDriverModel_Vasut.pdf][Marek Vasut's Presentation in 2012]] [[http://ksvi.mff.cuni.cz/~holan/SWP/zadani/udm.txt][Project Overview of original work 2012]] [[http://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2013/dm-kconfig-patman.pdf][Simon Glass's Presentation in 2013]] [[http://git.denx.de/?p=u-boot.git;a=blob;f=doc/driver-model/README.txt][README describing how it works from early 2014 mainline implementation]] [[http://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2014/dm-u-boot.pdf][U-Boot Mini Summit talk on driver model at ELCE 2014]] [[http://www.elinux.org/ELC_Europe_2015_Presentations][Embedded Linux Conference 2015 talk on driver model (PDF and video)]]. Also see [[https://goo.gl/F75qIQ][link to paper]] ---++ Status Early April 2019 Migration plan: * 2019.04: mmc * 2019.07: blk, sata, spi, spi flash, pci, usb, video * Full plan at [[http://git.denx.de/?p=u-boot.git;a=blob;f=doc/driver-model/MIGRATION.txt][MIGRATION.txt]] Mainline status: * About 90 uclasses available, covering most subsystems and many new ones * Support is provided for driver model in both U-Boot proper (before and after relocation), SPL and TPL * Sandbox, Tegra, Exynos, Sunxi/Allwinner, i.MX, Freescale, all ARMv8, OMAP3, Zynq, Raspberry Pi, Rockchip, x86, Atmel and many others are using driver model Patches posted (in brackets is the branch at [[http://git.denx.de/?p=u-boot-dm.git][u-boot-dm.git]]): * None Other things in the works * None Suggestions for uclasses that people could do: * Ethernet PHY See [[http://git.denx.de/?p=u-boot-dm.git;a=commit;h=f9aa6a1086f6b7da1814a2c95feefa91c9c4b593][here]] for the original documentation discussing each subsystem. -- Main.SimonGlass - 9th March 2020