[U-Boot] [PATCH v3 00/54] dm: Introduce new driver model uclasses
Simon Glass
sjg at chromium.org
Tue Jun 23 23:38:22 CEST 2015
This series adds several new uclasses. Some of these have been discussed
for a while. All are fairly simple and just provide enough functionality for
existing use cases. The following are included in this series:
- Clocks - setting and getting PLL and peripheral clocks
- Pinctrl - adjusting pin multiplexing settings
- Reset - reseting the board or SoC
- RAM - setting up RAM controllers and detecting the available RAM
- MMC - MMC controllers (using the existing block device framework)
- LEDs - turning LEDs on and off, with only a GPIO driver so far
Trivial support is also added for regmap and syscon controllers, modelled
on how the kernel does this.
This builds on the SPL device tree support which was recently added.
One problem with device tree is that U-Boot has no way of dropping features
it does not need or use. For SPL this problem needs to be solved and this
series uses a new 'fdtgrep' tool for this. The 45KB Firefly device tree
reduces to a 6KB bytes when unused material is removed. SDRAM timings are
also in the device tree.
This series includes some changes aimed at reduce code size in SPL,
including:
- dropping alias sequence support (the aliases node) since many boards just
use a single UART in SPL
- adding a smaller panic() function that does not support printf()-format
strings
- removing device unbind code which will never be used in SPL
Changes in v3:
- Use case-insensitve compare for image params (fixes build break with m53evk)
- Fix indentation in function comment
- Convert hex number to upper case to keep bc happy
- Split this series apart from the Rockchip series
Changes in v2:
- Add new patch to remove unused strings from a device tree
- Add new patch with fdt_first/next_region() functions
- Tidy up commit message a little
- Add new patch with fdtgrep tool
- Add new patch to reduce SPL device tree size with fdtgrep
Simon Glass (54):
Add a dhrystone benchmark command
sandbox: Enable dhry command
mkimage: Display a better list of available image types
fdt: Add a function to remove unused strings from a device tree
fdt: Add fdt_first/next_region() functions
fdt: Add fdtgrep tool
dm: Reduce SPL device tree size
dm: arm: Put driver model I2C drivers before legacy ones
Add a way of checking the position of a structure member
debug_uart: Remove use of asmlinkage
dm: Allow debug UART to support an early console
sandbox: Drop special-case sandbox console code
dm: Move the tree/uclass dump code into its own file
dm: core: Use debug() instead of printf() for failures
dm: core: Add a function to find any device from device tree
dm: core: Correct device_get_child_by_of_offset() parameter
dm: gpio: Allow GPIO uclass to be used in SPL
dm: gpio: Add dm_gpio_lookup_name() to look up a GPIO name
dm: gpio: Add dm_gpio_request() to manually request a GPIO
dm: Add support for register maps (regmap)
dm: Add support for generic system controllers (syscon)
dm: Correct the missing method check in cpu_get_info()
dm: Add support for LEDs
dm: led: Add a driver for GPIO-controlled LEDs
spl: Add debugging info for spl_mmc boot
dm: mmc: Add an MMC uclass
mmc: Avoid using printf() for errors
mmc: Add debug() output on read errors
dm: mmc: Allow driver model to be used for MMC in SPL
mmc: Add structure comments for dwmmc
mmc: Support bypass mode with the get_mmc_clk() method
mmc: Calculate dwmmc FIFO threshold size if not provided
dm: Add basic support for pin multiplexing (pinctrl)
dm: power: Avoid case-insensitve match for child names
dm: power: Add regulator flags to centralise auto-set logic
dm: pmic: Split output from function
dm: power: Add a function to set up all regulators
dm: power: Use debug() for errors in regulator uclass
dm: pmic: Add functions to adjust PMIC registers
dm: power: Allow use of regulators in SPL
Drop CONFIG_ERRNO_STR from SPL
dm: Add support for RAM drivers
dm: spi: Make local functions static
ns16550: Improve debug UART so it can work with 32-bit access
Add rivest cipher 4 (rc4) implementation
lib: Add function to extract a number from the end of a string
fdt: Provide debug info when a device tree cannot be found
dm: spl: Allow device tree/driver model in board_init_f()
spl: Add a debug string before the jump to U-Boot
mkimage: Set up a file size parameter and keep it updated
dm: Add a system reset uclass
zynq: Rename struct clk_ops to zynq_clk_ops
dm: Add a clock uclass
power: pmic: Use trailing_strtol() instead of a local function
Makefile | 2 +-
arch/arm/cpu/u-boot-spl.lds | 12 +-
arch/arm/mach-zynq/clk.c | 6 +-
common/console.c | 25 +-
common/image.c | 58 +-
common/spl/spl.c | 36 +-
common/spl/spl_mmc.c | 26 +-
configs/sandbox_defconfig | 1 +
doc/device-tree-bindings/leds/common.txt | 23 +
doc/device-tree-bindings/leds/leds-gpio.txt | 52 ++
drivers/Kconfig | 8 +
drivers/Makefile | 4 +
drivers/clk/Kconfig | 19 +
drivers/clk/Makefile | 8 +
drivers/clk/clk-uclass.c | 58 ++
drivers/core/Makefile | 3 +
drivers/core/device.c | 29 +-
drivers/core/dump.c | 96 +++
drivers/core/lists.c | 6 +-
drivers/core/regmap.c | 86 ++
drivers/core/syscon-uclass.c | 73 ++
drivers/cpu/cpu-uclass.c | 2 +-
drivers/gpio/Makefile | 4 -
drivers/gpio/gpio-uclass.c | 36 +-
drivers/led/Kconfig | 26 +
drivers/led/Makefile | 9 +
drivers/led/led-uclass.c | 48 ++
drivers/led/led_gpio.c | 101 +++
drivers/misc/Kconfig | 9 +
drivers/misc/Makefile | 1 +
drivers/misc/reset-uclass.c | 62 ++
drivers/mmc/Kconfig | 10 +
drivers/mmc/Makefile | 2 +
drivers/mmc/dw_mmc.c | 33 +-
drivers/mmc/exynos_dw_mmc.c | 2 +-
drivers/mmc/mmc-uclass.c | 34 +
drivers/mmc/mmc.c | 10 +-
drivers/pinctrl/Kconfig | 19 +
drivers/pinctrl/Makefile | 8 +
drivers/pinctrl/pinctrl-uclass.c | 51 ++
drivers/power/pmic/pmic-uclass.c | 57 +-
drivers/power/regulator/regulator-uclass.c | 134 +--
drivers/ram/Kconfig | 18 +
drivers/ram/Makefile | 7 +
drivers/ram/ram-uclass.c | 28 +
drivers/serial/ns16550.c | 36 +-
drivers/spi/spi-uclass.c | 8 +-
dts/Kconfig | 12 +
include/asm-generic/global_data.h | 1 +
include/asm-generic/gpio.h | 25 +
include/clk.h | 80 ++
include/common.h | 11 +
include/debug_uart.h | 22 +-
include/dm/device.h | 16 +-
include/dm/uclass-id.h | 7 +
include/dm/util.h | 6 +
include/dwmmc.h | 34 +-
include/image.h | 11 +
include/led.h | 51 ++
include/libfdt.h | 256 +++++-
include/mmc.h | 22 +
include/pinctrl.h | 74 ++
include/power/pmic.h | 34 +
include/power/regulator.h | 53 +-
include/power/sandbox_pmic.h | 4 +-
include/ram.h | 38 +
include/rc4.h | 21 +
include/regmap.h | 72 ++
include/reset.h | 62 ++
include/spl.h | 12 +
include/syscon.h | 56 ++
include/vsprintf.h | 26 +
lib/Kconfig | 2 +
lib/Makefile | 5 +-
lib/dhry/Kconfig | 7 +
lib/dhry/Makefile | 7 +
lib/dhry/cmd_dhry.c | 34 +
lib/dhry/dhry.h | 442 ++++++++++
lib/dhry/dhry_1.c | 421 +++++++++
lib/dhry/dhry_2.c | 217 +++++
lib/fdtdec.c | 21 +-
lib/libfdt/Makefile | 2 +-
lib/libfdt/fdt_region.c | 492 +++++++++++
lib/libfdt/fdt_rw.c | 32 +
lib/rc4.c | 49 ++
lib/vsprintf.c | 19 +
scripts/Makefile.spl | 33 +
test/dm/cmd_dm.c | 82 +-
test/dm/regulator.c | 2 +-
tools/Makefile | 6 +-
tools/fdtgrep.c | 1234 +++++++++++++++++++++++++++
tools/imagetool.h | 1 +
tools/mkimage.c | 77 +-
93 files changed, 5259 insertions(+), 318 deletions(-)
create mode 100644 doc/device-tree-bindings/leds/common.txt
create mode 100644 doc/device-tree-bindings/leds/leds-gpio.txt
create mode 100644 drivers/clk/Kconfig
create mode 100644 drivers/clk/Makefile
create mode 100644 drivers/clk/clk-uclass.c
create mode 100644 drivers/core/dump.c
create mode 100644 drivers/core/regmap.c
create mode 100644 drivers/core/syscon-uclass.c
create mode 100644 drivers/led/Kconfig
create mode 100644 drivers/led/Makefile
create mode 100644 drivers/led/led-uclass.c
create mode 100644 drivers/led/led_gpio.c
create mode 100644 drivers/misc/reset-uclass.c
create mode 100644 drivers/mmc/mmc-uclass.c
create mode 100644 drivers/pinctrl/Kconfig
create mode 100644 drivers/pinctrl/Makefile
create mode 100644 drivers/pinctrl/pinctrl-uclass.c
create mode 100644 drivers/ram/Kconfig
create mode 100644 drivers/ram/Makefile
create mode 100644 drivers/ram/ram-uclass.c
create mode 100644 include/led.h
create mode 100644 include/pinctrl.h
create mode 100644 include/ram.h
create mode 100644 include/rc4.h
create mode 100644 include/regmap.h
create mode 100644 include/reset.h
create mode 100644 include/syscon.h
create mode 100644 lib/dhry/Kconfig
create mode 100644 lib/dhry/Makefile
create mode 100644 lib/dhry/cmd_dhry.c
create mode 100644 lib/dhry/dhry.h
create mode 100644 lib/dhry/dhry_1.c
create mode 100644 lib/dhry/dhry_2.c
create mode 100644 lib/libfdt/fdt_region.c
create mode 100644 lib/rc4.c
create mode 100644 tools/fdtgrep.c
--
2.4.3.573.g4eafbef
More information about the U-Boot
mailing list