Now that driver model operations prior to relocation, the remaining area where it does not work is SPL. This series enables this.
Since SPL is quite memory-constrained, code and data size need to be kept as small as possible. This series includes a few changes to help with this: - Small and simple malloc() implementation - Dropping device removal features - Dropping stdio features - Dropping driver model warnings With these the code size impact of driver model is small, around 2-3KB. Data usage is typically 200-300 bytes. In many cases this can squeeze into the available SPL RAM space. This requires a revert of the SPL global_data revert (commit 1ee30ae). I believe that is planned for early in this merge window. We need that revert undone to be able to support the simple malloc in SPL on ARM. Note that the driver model docs will be added/moved to Kconfig in a follow-on patch. This series is available at u-boot-dm branch 'spl-working'. Changes in v3: - Add new patch to avoid using arch-specific memcpy() in SPL - Add #ifdef around serial_stub_puts() to fix error when building SPL - Rebase to master Changes in v2: - Correct the Makefile condition for simple_malloc - Rebase on top of the SPI series - Rebase to master Simon Glass (14): arm: spl: Avoid setting up a duplicate global data structure dm: tegra: Avoid using arch-specific memcpy() in SPL dm: Split the simple malloc() implementation into its own file dm: arm: spl: Allow simple malloc() in SPL dm: spl: Make simple malloc() available when enabled dm: spl: Allow driver model to be used dm: Allow device removal features to be dropped dm: Allow stdio registration to be dropped dm: Disable dm_warn() in SPL dm: tegra: Add platform data for the SPL uart dm: tegra: Add platform data for the GPIO driver dm: arm: spl: Make driver model linker lists available dm: tegra: Enable driver model in SPL and adjust the GPIO driver dm: Update documentation to include CONFIG_DM... options README | 119 ++++++++++++++++++++++++ arch/arm/cpu/u-boot-spl.lds | 7 ++ arch/arm/lib/crt0.S | 2 +- arch/arm/lib/spl.c | 4 - board/nvidia/common/board.c | 8 ++ board/nvidia/seaboard/seaboard.c | 4 +- common/Makefile | 3 + common/board_r.c | 3 +- common/dlmalloc.c | 19 +--- common/malloc_simple.c | 39 ++++++++ common/spl/spl.c | 16 +++- doc/driver-model/README.txt | 44 +++++++-- drivers/core/Makefile | 3 +- drivers/core/device-remove.c | 187 ++++++++++++++++++++++++++++++++++++++ drivers/core/device.c | 168 ---------------------------------- drivers/gpio/Makefile | 4 + drivers/gpio/tegra_gpio.c | 27 +++--- drivers/serial/serial-uclass.c | 10 +- drivers/serial/serial_tegra.c | 16 ++++ include/asm-generic/global_data.h | 1 + include/config_defaults.h | 6 ++ include/configs/tegra-common.h | 14 +-- include/dm/device-internal.h | 10 ++ include/dm/util.h | 6 ++ include/malloc.h | 60 +++++++----- scripts/Makefile.spl | 1 + 26 files changed, 527 insertions(+), 254 deletions(-) create mode 100644 common/malloc_simple.c create mode 100644 drivers/core/device-remove.c -- 2.1.0.rc2.206.gedb03e5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot