[U-Boot] Please pull u-boot-dm.git

Hi Tom,
This is the first of the driver model changes. I will progressively work through the series that follow (gpio, serial, SPI/SPI flash) but probably need more testing/feedback from maintainers in some cases.
The following changes since commit fbe79a17fddb7f0b11aa15b9c93e9a4a26165ed8:
m68k: define __kernel_size_t as unsinged int again (2014-07-22 09:46:50 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 21fe8ec355ca34ec5a7b5f2f8dd816fa13911687:
buildman: Avoid retrying a build if it definitely failed (2014-07-23 09:52:36 -0600)
---------------------------------------------------------------- Simon Glass (37): Remove form-feeds from dlmalloc.c sandbox: Set up global data before board_init_f() Add a simple malloc() implementation for pre-relocation sandbox: Support pre-relocation malloc() sandbox: config: Enable pre-relocation malloc() sandbox: Always enable malloc debug dm: gpio: Don't use the driver model uclass for SPL dm: Use an explicit expect value in core tests stdio: Remove redundant code around stdio_register() calls stdio: Pass device pointer to stdio methods dm: Make sure that the root device is probed dm: Provide a way to shut down driver model sandbox: Remove all drivers before exit dm: Allow drivers to be marked 'before relocation' dm: Support driver model prior to relocation stdio: Provide functions to add/remove devices using stdio_dev console: Remove vprintf() optimisation for sandbox Add a flag indicating when the serial console is ready dm: Move uclass error checking/probing into a function fdt: Add a function to get the alias sequence of a node dm: Move device display into its own function dm: Avoid activating devices in 'dm uclass' command dm: Introduce device sequence numbering dm: Display the sequence number for each device dm: Allow a device to be found by its FDT offset dm: Avoid accessing uclasses before they are ready fdt: Add a function to get the node offset of an alias dm: Tidy up some header file comments dm: Provide a function to scan child FDT nodes dm: Add functions to access a device's children dm: Introduce per-child data for devices dm: Add child_pre_probe() and child_post_remove() methods dm: Improve errors and warnings in lists_bind_fdt() dm: Add dm_scan_other() to locate board-specific devices dm: Give the demo uclass a name buildman: Add -F flag to retry failed builds buildman: Avoid retrying a build if it definitely failed
README | 16 ++++++ arch/blackfin/cpu/jtag-console.c | 10 ++-- arch/powerpc/cpu/mpc512x/serial.c | 10 ++-- arch/powerpc/cpu/mpc8xx/video.c | 6 +-- arch/sandbox/cpu/cpu.c | 4 ++ arch/sandbox/cpu/start.c | 8 +++ arch/sandbox/include/asm/config.h | 1 - arch/x86/lib/video.c | 8 +-- board/bf527-ezkit/video.c | 10 ---- board/bf548-ezkit/video.c | 10 ---- board/cm-bf548/video.c | 10 ---- board/mpl/common/kbd.c | 6 +-- board/mpl/common/kbd.h | 6 ++- board/mpl/pati/pati.c | 8 +-- board/nokia/rx51/rx51.c | 6 +-- common/board_f.c | 28 ++++++++++ common/board_r.c | 29 +++------- common/cmd_log.c | 11 ++-- common/console.c | 24 ++++----- common/dlmalloc.c | 85 +++++++++++++++++++++-------- common/lcd.c | 14 ++++- common/stdio.c | 66 +++++++++++++++++------ common/usb_kbd.c | 6 +-- doc/driver-model/README.txt | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- drivers/core/device.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- drivers/core/lists.c | 22 +++++--- drivers/core/root.c | 78 ++++++++++++++++++++++----- drivers/core/uclass.c | 135 +++++++++++++++++++++++++++++++++++++++++++++- drivers/demo/demo-uclass.c | 1 + drivers/gpio/Makefile | 2 + drivers/input/cros_ec_keyb.c | 6 +-- drivers/input/i8042.c | 4 +- drivers/input/keyboard.c | 6 +-- drivers/input/tegra-kbc.c | 6 +-- drivers/misc/cbmem_console.c | 6 +-- drivers/net/netconsole.c | 10 ++-- drivers/serial/serial.c | 55 ++++++++++++++++--- drivers/serial/usbtty.c | 8 +-- drivers/video/cfb_console.c | 8 ++- include/asm-generic/global_data.h | 9 +++- include/common.h | 5 ++ include/configs/ELPPC.h | 4 +- include/configs/MHPC.h | 4 +- include/configs/jadecpu.h | 4 +- include/configs/nokia_rx51.h | 5 +- include/configs/sandbox.h | 4 +- include/dm/device-internal.h | 6 ++- include/dm/device.h | 120 ++++++++++++++++++++++++++++++++++++++++- include/dm/lists.h | 2 +- include/dm/platdata.h | 10 +++- include/dm/root.h | 61 +++++++++++++++++++-- include/dm/test.h | 22 ++++++++ include/dm/uclass-id.h | 3 +- include/dm/uclass-internal.h | 23 ++++++++ include/dm/uclass.h | 49 ++++++++++++++++- include/fdtdec.h | 29 ++++++++++ include/i8042.h | 6 ++- include/stdio_dev.h | 17 +++--- include/video.h | 8 +-- lib/asm-offsets.c | 3 ++ lib/fdtdec.c | 61 +++++++++++++++++++++ test/dm/Makefile | 1 + test/dm/bus.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/dm/cmd_dm.c | 35 ++++++++---- test/dm/core.c | 64 ++++++++++++++++++---- test/dm/test-driver.c | 11 ++++ test/dm/test-fdt.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++--------- test/dm/test-main.c | 4 +- test/dm/test.dts | 42 +++++++++++++-- tools/buildman/builder.py | 27 +++++++--- tools/buildman/buildman.py | 3 ++ tools/buildman/control.py | 1 + 72 files changed, 1850 insertions(+), 313 deletions(-) create mode 100644 test/dm/bus.c
Regards, Simon

On Fri, Jul 25, 2014 at 04:02:03PM +0100, Simon Glass wrote:
Hi Tom,
This is the first of the driver model changes. I will progressively work through the series that follow (gpio, serial, SPI/SPI flash) but probably need more testing/feedback from maintainers in some cases.
The following changes since commit fbe79a17fddb7f0b11aa15b9c93e9a4a26165ed8:
m68k: define __kernel_size_t as unsinged int again (2014-07-22 09:46:50 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 21fe8ec355ca34ec5a7b5f2f8dd816fa13911687:
buildman: Avoid retrying a build if it definitely failed (2014-07-23 09:52:36 -0600)
Simon Glass (37): Remove form-feeds from dlmalloc.c sandbox: Set up global data before board_init_f() Add a simple malloc() implementation for pre-relocation sandbox: Support pre-relocation malloc() sandbox: config: Enable pre-relocation malloc() sandbox: Always enable malloc debug dm: gpio: Don't use the driver model uclass for SPL dm: Use an explicit expect value in core tests stdio: Remove redundant code around stdio_register() calls stdio: Pass device pointer to stdio methods dm: Make sure that the root device is probed dm: Provide a way to shut down driver model sandbox: Remove all drivers before exit dm: Allow drivers to be marked 'before relocation' dm: Support driver model prior to relocation stdio: Provide functions to add/remove devices using stdio_dev console: Remove vprintf() optimisation for sandbox Add a flag indicating when the serial console is ready dm: Move uclass error checking/probing into a function fdt: Add a function to get the alias sequence of a node dm: Move device display into its own function dm: Avoid activating devices in 'dm uclass' command dm: Introduce device sequence numbering dm: Display the sequence number for each device dm: Allow a device to be found by its FDT offset dm: Avoid accessing uclasses before they are ready fdt: Add a function to get the node offset of an alias dm: Tidy up some header file comments dm: Provide a function to scan child FDT nodes dm: Add functions to access a device's children dm: Introduce per-child data for devices dm: Add child_pre_probe() and child_post_remove() methods dm: Improve errors and warnings in lists_bind_fdt() dm: Add dm_scan_other() to locate board-specific devices dm: Give the demo uclass a name buildman: Add -F flag to retry failed builds buildman: Avoid retrying a build if it definitely failed
README | 16 ++++++ arch/blackfin/cpu/jtag-console.c | 10 ++-- arch/powerpc/cpu/mpc512x/serial.c | 10 ++-- arch/powerpc/cpu/mpc8xx/video.c | 6 +-- arch/sandbox/cpu/cpu.c | 4 ++ arch/sandbox/cpu/start.c | 8 +++ arch/sandbox/include/asm/config.h | 1 - arch/x86/lib/video.c | 8 +-- board/bf527-ezkit/video.c | 10 ---- board/bf548-ezkit/video.c | 10 ---- board/cm-bf548/video.c | 10 ---- board/mpl/common/kbd.c | 6 +-- board/mpl/common/kbd.h | 6 ++- board/mpl/pati/pati.c | 8 +-- board/nokia/rx51/rx51.c | 6 +-- common/board_f.c | 28 ++++++++++ common/board_r.c | 29 +++------- common/cmd_log.c | 11 ++-- common/console.c | 24 ++++----- common/dlmalloc.c | 85 +++++++++++++++++++++-------- common/lcd.c | 14 ++++- common/stdio.c | 66 +++++++++++++++++------ common/usb_kbd.c | 6 +-- doc/driver-model/README.txt | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- drivers/core/device.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- drivers/core/lists.c | 22 +++++--- drivers/core/root.c | 78 ++++++++++++++++++++++----- drivers/core/uclass.c | 135 +++++++++++++++++++++++++++++++++++++++++++++- drivers/demo/demo-uclass.c | 1 + drivers/gpio/Makefile | 2 + drivers/input/cros_ec_keyb.c | 6 +-- drivers/input/i8042.c | 4 +- drivers/input/keyboard.c | 6 +-- drivers/input/tegra-kbc.c | 6 +-- drivers/misc/cbmem_console.c | 6 +-- drivers/net/netconsole.c | 10 ++-- drivers/serial/serial.c | 55 ++++++++++++++++--- drivers/serial/usbtty.c | 8 +-- drivers/video/cfb_console.c | 8 ++- include/asm-generic/global_data.h | 9 +++- include/common.h | 5 ++ include/configs/ELPPC.h | 4 +- include/configs/MHPC.h | 4 +- include/configs/jadecpu.h | 4 +- include/configs/nokia_rx51.h | 5 +- include/configs/sandbox.h | 4 +- include/dm/device-internal.h | 6 ++- include/dm/device.h | 120 ++++++++++++++++++++++++++++++++++++++++- include/dm/lists.h | 2 +- include/dm/platdata.h | 10 +++- include/dm/root.h | 61 +++++++++++++++++++-- include/dm/test.h | 22 ++++++++ include/dm/uclass-id.h | 3 +- include/dm/uclass-internal.h | 23 ++++++++ include/dm/uclass.h | 49 ++++++++++++++++- include/fdtdec.h | 29 ++++++++++ include/i8042.h | 6 ++- include/stdio_dev.h | 17 +++--- include/video.h | 8 +-- lib/asm-offsets.c | 3 ++ lib/fdtdec.c | 61 +++++++++++++++++++++ test/dm/Makefile | 1 + test/dm/bus.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/dm/cmd_dm.c | 35 ++++++++---- test/dm/core.c | 64 ++++++++++++++++++---- test/dm/test-driver.c | 11 ++++ test/dm/test-fdt.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++--------- test/dm/test-main.c | 4 +- test/dm/test.dts | 42 +++++++++++++-- tools/buildman/builder.py | 27 +++++++--- tools/buildman/buildman.py | 3 ++ tools/buildman/control.py | 1 + 72 files changed, 1850 insertions(+), 313 deletions(-) create mode 100644 test/dm/bus.c
Note that with this applied, blackfin/bf538f-ezkit, blackfin/bf533-stamp and powerpc/taishan (eldk5.2.1 but not eldk5.3) overflow their map and fail to link. I don't think this is critical at this point but something we want to keep an eye on and see what we can do.
Applied to u-boot/master, thanks!

Hi Tom,
On 25 July 2014 19:27, Tom Rini trini@ti.com wrote:
On Fri, Jul 25, 2014 at 04:02:03PM +0100, Simon Glass wrote:
Hi Tom,
This is the first of the driver model changes. I will progressively work through the series that follow (gpio, serial, SPI/SPI flash) but probably need more testing/feedback from maintainers in some cases.
The following changes since commit fbe79a17fddb7f0b11aa15b9c93e9a4a26165ed8:
m68k: define __kernel_size_t as unsinged int again (2014-07-22 09:46:50 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 21fe8ec355ca34ec5a7b5f2f8dd816fa13911687:
buildman: Avoid retrying a build if it definitely failed (2014-07-23 09:52:36 -0600)
Simon Glass (37): Remove form-feeds from dlmalloc.c sandbox: Set up global data before board_init_f() Add a simple malloc() implementation for pre-relocation sandbox: Support pre-relocation malloc() sandbox: config: Enable pre-relocation malloc() sandbox: Always enable malloc debug dm: gpio: Don't use the driver model uclass for SPL dm: Use an explicit expect value in core tests stdio: Remove redundant code around stdio_register() calls stdio: Pass device pointer to stdio methods dm: Make sure that the root device is probed dm: Provide a way to shut down driver model sandbox: Remove all drivers before exit dm: Allow drivers to be marked 'before relocation' dm: Support driver model prior to relocation stdio: Provide functions to add/remove devices using stdio_dev console: Remove vprintf() optimisation for sandbox Add a flag indicating when the serial console is ready dm: Move uclass error checking/probing into a function fdt: Add a function to get the alias sequence of a node dm: Move device display into its own function dm: Avoid activating devices in 'dm uclass' command dm: Introduce device sequence numbering dm: Display the sequence number for each device dm: Allow a device to be found by its FDT offset dm: Avoid accessing uclasses before they are ready fdt: Add a function to get the node offset of an alias dm: Tidy up some header file comments dm: Provide a function to scan child FDT nodes dm: Add functions to access a device's children dm: Introduce per-child data for devices dm: Add child_pre_probe() and child_post_remove() methods dm: Improve errors and warnings in lists_bind_fdt() dm: Add dm_scan_other() to locate board-specific devices dm: Give the demo uclass a name buildman: Add -F flag to retry failed builds buildman: Avoid retrying a build if it definitely failed
README | 16 ++++++ arch/blackfin/cpu/jtag-console.c | 10 ++-- arch/powerpc/cpu/mpc512x/serial.c | 10 ++-- arch/powerpc/cpu/mpc8xx/video.c | 6 +-- arch/sandbox/cpu/cpu.c | 4 ++ arch/sandbox/cpu/start.c | 8 +++ arch/sandbox/include/asm/config.h | 1 - arch/x86/lib/video.c | 8 +-- board/bf527-ezkit/video.c | 10 ---- board/bf548-ezkit/video.c | 10 ---- board/cm-bf548/video.c | 10 ---- board/mpl/common/kbd.c | 6 +-- board/mpl/common/kbd.h | 6 ++- board/mpl/pati/pati.c | 8 +-- board/nokia/rx51/rx51.c | 6 +-- common/board_f.c | 28 ++++++++++ common/board_r.c | 29 +++------- common/cmd_log.c | 11 ++-- common/console.c | 24 ++++----- common/dlmalloc.c | 85 +++++++++++++++++++++-------- common/lcd.c | 14 ++++- common/stdio.c | 66 +++++++++++++++++------ common/usb_kbd.c | 6 +-- doc/driver-model/README.txt | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- drivers/core/device.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- drivers/core/lists.c | 22 +++++--- drivers/core/root.c | 78 ++++++++++++++++++++++----- drivers/core/uclass.c | 135 +++++++++++++++++++++++++++++++++++++++++++++- drivers/demo/demo-uclass.c | 1 + drivers/gpio/Makefile | 2 + drivers/input/cros_ec_keyb.c | 6 +-- drivers/input/i8042.c | 4 +- drivers/input/keyboard.c | 6 +-- drivers/input/tegra-kbc.c | 6 +-- drivers/misc/cbmem_console.c | 6 +-- drivers/net/netconsole.c | 10 ++-- drivers/serial/serial.c | 55 ++++++++++++++++--- drivers/serial/usbtty.c | 8 +-- drivers/video/cfb_console.c | 8 ++- include/asm-generic/global_data.h | 9 +++- include/common.h | 5 ++ include/configs/ELPPC.h | 4 +- include/configs/MHPC.h | 4 +- include/configs/jadecpu.h | 4 +- include/configs/nokia_rx51.h | 5 +- include/configs/sandbox.h | 4 +- include/dm/device-internal.h | 6 ++- include/dm/device.h | 120 ++++++++++++++++++++++++++++++++++++++++- include/dm/lists.h | 2 +- include/dm/platdata.h | 10 +++- include/dm/root.h | 61 +++++++++++++++++++-- include/dm/test.h | 22 ++++++++ include/dm/uclass-id.h | 3 +- include/dm/uclass-internal.h | 23 ++++++++ include/dm/uclass.h | 49 ++++++++++++++++- include/fdtdec.h | 29 ++++++++++ include/i8042.h | 6 ++- include/stdio_dev.h | 17 +++--- include/video.h | 8 +-- lib/asm-offsets.c | 3 ++ lib/fdtdec.c | 61 +++++++++++++++++++++ test/dm/Makefile | 1 + test/dm/bus.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/dm/cmd_dm.c | 35 ++++++++---- test/dm/core.c | 64 ++++++++++++++++++---- test/dm/test-driver.c | 11 ++++ test/dm/test-fdt.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++--------- test/dm/test-main.c | 4 +- test/dm/test.dts | 42 +++++++++++++-- tools/buildman/builder.py | 27 +++++++--- tools/buildman/buildman.py | 3 ++ tools/buildman/control.py | 1 + 72 files changed, 1850 insertions(+), 313 deletions(-) create mode 100644 test/dm/bus.c
Note that with this applied, blackfin/bf538f-ezkit, blackfin/bf533-stamp and powerpc/taishan (eldk5.2.1 but not eldk5.3) overflow their map and fail to link. I don't think this is critical at this point but something we want to keep an eye on and see what we can do.
Yes I'm painfully aware of this - it has been a problem for a while. I think xaeniax is in the same boat although as you say it depends on the tool chain. The problem is the 'stdio: Pass device pointer to stdio methods' commit.
Since it is still very early in the cycle the maintainers may be able to correct this, and perhaps give us more headroom. Failing that I suppose we could turn off a feature? It's unfortunate to be increasing the code size of existing boards, but I think it is worth it for the code clean-up.
Regards, Simon
participants (2)
-
Simon Glass
-
Tom Rini