public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/14] dm: Implement driver model support in SPL
@ 2014-11-11  0:16 Simon Glass
  2014-11-11  0:16 ` [U-Boot] [PATCH v3 01/14] arm: spl: Avoid setting up a duplicate global data structure Simon Glass
                   ` (13 more replies)
  0 siblings, 14 replies; 28+ messages in thread
From: Simon Glass @ 2014-11-11  0:16 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2014-11-23 12:59 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11  0:16 [U-Boot] [PATCH v3 0/14] dm: Implement driver model support in SPL Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 01/14] arm: spl: Avoid setting up a duplicate global data structure Simon Glass
2014-11-13 11:31   ` Albert ARIBAUD
2014-11-11  0:16 ` [U-Boot] [PATCH v3 02/14] dm: tegra: Avoid using arch-specific memcpy() in SPL Simon Glass
2014-11-23 12:55   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 03/14] dm: Split the simple malloc() implementation into its own file Simon Glass
2014-11-23 12:56   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 04/14] dm: arm: spl: Allow simple malloc() in SPL Simon Glass
2014-11-23 12:56   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 05/14] dm: spl: Make simple malloc() available when enabled Simon Glass
2014-11-23 12:58   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 06/14] dm: spl: Allow driver model to be used Simon Glass
2014-11-23 12:58   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 07/14] dm: Allow device removal features to be dropped Simon Glass
2014-11-17  1:45   ` Tom Rini
2014-11-11  0:16 ` [U-Boot] [PATCH v3 08/14] dm: Allow stdio registration " Simon Glass
2014-11-23 12:58   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 09/14] dm: Disable dm_warn() in SPL Simon Glass
2014-11-23 12:59   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 10/14] dm: tegra: Add platform data for the SPL uart Simon Glass
2014-11-23 12:59   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 11/14] dm: tegra: Add platform data for the GPIO driver Simon Glass
2014-11-23 12:59   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 12/14] dm: arm: spl: Make driver model linker lists available Simon Glass
2014-11-23 12:59   ` Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 13/14] dm: tegra: Enable driver model in SPL and adjust the GPIO driver Simon Glass
2014-11-11  0:16 ` [U-Boot] [PATCH v3 14/14] dm: Update documentation to include CONFIG_DM... options Simon Glass
2014-11-23 12:59   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox