[U-Boot] [PATCH v9 0/14] Driver model implementation, tests, demo and GPIO

2014-02-26 Thread Simon Glass

This series adds a driver model implementation. It is taken from
the driver model code developed by:

   Marek Vasut ma...@denx.de
   Pavel Herrmann morpheus.i...@gmail.com
   Viktor Křivák viktor.kri...@gmail.com
   Tomas Hlavacek tmshl...@gmail.com

Please see doc/driver-model/README.txt for details of how to run this and
what to look for. The old driver model documentation is removed.

Note: If you are reviewing this code, but don't have a lot of time, please
consider starting with the 'demo' driver (patch 'dm: Add a
demonstration/example driver') since it clearly shows how devices and
uclasses work. Much of this series consists of test code and plumbing, so
is of less interest to driver authors.

There is also a presentation on driver model at this page:

http://www.denx.de/wiki/U-Boot/MiniSummitELCE2013

You can find a test version of the code used here in branch dm9 at:

   http://git.denx.de/u-boot-x86.git

(Branch dm contains the original implementation)

Changes in v9:
- Move sandbox device tree file into arch/sandbox/dts
- Rebase to master
- Update comment about GPIO command conversion from numbers to uclass

Changes in v8:
- Add new patch to fix yaffs compile error on two boards
- Adjust simple driver text slightly
- Rename simple_ops to shape_ops and fix a typo

Changes in v7:
- Fix typo in README
- Rebase to master
- Update Makefile libraries to specify only the directory
- Update cover letter to point to ELCE 2013 presentation, etc.

Changes in v6:
- Add a test script for driver model
- Add dev_get_platdata to access devices's platdata
- Add dev_get_priv() to access device's private data
- Add ofdata_to_pdata method to convert device tree data to platdata
- Convert Makefiles to new Kconfig format
- Rename platform_data to platdata
- Revise and update README
- Use ofdata_to_platdata feature
- Use ofdata_to_platdata method to convert device tree data to platdata

Changes in v5:
- Adjust patch to completely remove old driver model documentation
- Change to new SPDX license headers
- Correct 80col line missed last time
- Fix style nit on for() loop

Changes in v4:
- Change 'dm dump' command to 'dm tree'
- Correct 'out.dtb' typo
- Move common/dm to drivers/core
- Remove duplicated .op line
- device_chld_unbind() continues on error

Changes in v3:
- Add a flag for tracking whether DM allocates/frees platform_data
- Add function/struct comments to tests
- Add new patch to build a device tree file for sandbox
- Add new patch to move driver model documentation
- Fix up demo command help
- Rename per_device_priv_size to per_device_auto_alloc_size, etc.
- Tidy up commenting of functions and structures
- Tidy up comments/documentation in GPIO module
- Update GPIO support to use new struct member names
- Update demo driver to use device tree
- Update sandbox GPIO header file comments
- Updated README.txt to cover changes since version 2

Changes in v2:
- Add GPIO uclass and tests
- Add U_BOOT_DEVICE to declare platform_data
- Add a single include/dm.h to bring in driver model code
- Add auto-probing feature for platform_data to avoid driver_bind() calls
- Add automatic allocation of device-specific priv data for uclasses
- Add automatic allocation of platform_data for FDT
- Add automatic allocation of priv data for devices
- Add device tree support in driver model
- Add dm_warn() to warn about impending doom
- Add integration tests for driver model
- Add new header file for lists
- Add new util file to hold utility functions
- Add sandbox GPIO driver
- Add script to run tests
- Add simple unit test functions
- Add test infrastructure for driver model
- Add tests for core code
- Allow a driver to bind to only one uclass
- Allow driver_bind() to support a NULL parent
- Put platform_data definitions in their own header file
- Remove relocation functions
- Remove unneeded arguments to uclass_bind(), uclass_unbind()
- Removed pointer return values in favour of integer
- Rename data structures to hopefully be clearer
- Rename struct device's 'bus' to 'parent'
- Standardise variable names (e.g. uclass instead of class)
- Update gpio command to use driver model
- Use driver_bind() in dm_init() instead of writing new code

Simon Glass (14):
  sandbox: Build a device tree file for sandbox
  Add cmd_process_error() to report and process errors
  yaffs: Remove private list implementation
  dm: Add README for driver model
  dm: Add base driver model support
  sandbox: config: Enable driver model
  dm: Set up driver model after relocation
  dm: Add basic tests
  dm: Add a 'dm' command for testing
  dm: Add a demonstration/example driver
  dm: Add GPIO support and tests
  sandbox: Convert GPIOs to use driver model
  dm: Enable gpio command to support driver model
  dm: Remove old driver model documentation

 Makefile  |   4 +
 arch/sandbox/config.mk|   2 +
 arch/sandbox/dts/Makefile |  11 +
 arch/sandbox/dts/sandbox.dts  |  20 ++
 arch/sandbox/include/asm/gpio.h   |  14 

Re: [U-Boot] [PATCH v9 0/14] Driver model implementation, tests, demo and GPIO

2014-02-26 Thread Simon Glass
Hi Tom,


On 26 February 2014 15:59, Simon Glass s...@chromium.org wrote:


 This series adds a driver model implementation. It is taken from
 the driver model code developed by:

Marek Vasut ma...@denx.de
Pavel Herrmann morpheus.i...@gmail.com
Viktor Křivák viktor.kri...@gmail.com
Tomas Hlavacek tmshl...@gmail.com

 Please see doc/driver-model/README.txt for details of how to run this and
 what to look for. The old driver model documentation is removed.


FYI, buildman results:

./tools/buildman/buildman -b dm10 -s
Summary of 15 commits for 1202 boards (32 threads, 1 job per thread)
01: Revert ext4fs: Add ext4 extent cache for read operations
  blackfin: +   bf609-ezkit
  m68k: +   M54455EVB_a66 M5329AFEE M5249EVB idmr M5208EVBE eb_cpu5282
M54451EVB astro_mcf5373l M54418TWR_serial_rmii M54455EVB_intel M5475FFE
M5282EVB M54455EVB_i66 M5475GFE M5253DEMO M54455EVB_stm33 M5485BFE M5485DFE
TASREG M5329BFEE M52277EVB M5475EFE M5475CFE cobra5272 M5485AFE M53017EVB
M5485HFE M5235EVB M5253EVBE M54418TWR_nand_mii M54418TWR_nand_rmii_lowfreq
M5475BFE M54418TWR_nand_rmii M5475DFE M5275EVB M52277EVB_stmicro
eb_cpu5282_internal M54451EVB_stmicro M5271EVB M5485GFE M5373EVB M5485EFE
M5485FFE M54418TWR M5235EVB_Flash32 M54418TWR_serial_mii M5485CFE M54455EVB
M5475AFE M5272C3
   powerpc: +   MVBLM7 MVSMR
 sparc: +   grsim grsim_leon2 gr_cpci_ax2000 gr_xc3s_1500 gr_ep2s60
sh: +   rsk7269 rsk7264 rsk7203
 nios2: +   nios2-generic PK1C20
microblaze: +   microblaze-generic
  openrisc: +   openrisc-generic
02: sandbox: Build a device tree file for sandbox
03: Add cmd_process_error() to report and process errors
04: yaffs: Remove private list implementation
05: dm: Add README for driver model
06: dm: Add base driver model support
07: sandbox: config: Enable driver model
08: dm: Set up driver model after relocation
09: dm: Add basic tests
10: dm: Add a 'dm' command for testing
11: dm: Add a demonstration/example driver
12: dm: Add GPIO support and tests
13: sandbox: Convert GPIOs to use driver model
14: dm: Enable gpio command to support driver model
15: dm: Remove old driver model documentation


Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot