11 Sep, 2014

1 commit


23 Jul, 2014

6 commits

  • Some boards will have devices which are not in the device tree and do not
    have platform data. They may be programnatically created, for example.
    Add a hook which boards can use to bind those devices early in boot.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present only root nodes in the device tree are scanned for devices.
    But some devices can have children. For example a SPI bus may have
    several children for each of its chip selects.

    Add a function which scans subnodes and binds devices for each one. This
    can be used for the root node scan also, so change it.

    A device can call this function in its bind() or probe() methods to bind
    its children.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Initialise devices marked 'pre-reloc' and make them available prior to
    relocation. Note that this requires pre-reloc malloc() to be available.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Driver model currently only operates after relocation is complete. In this
    state U-Boot typically has a small amount of memory available. In adding
    support for driver model prior to relocation we must try to use as little
    memory as possible.

    In addition, on some machines the memory has not be inited and/or the CPU
    is not running at full speed or the data cache is off. These can reduce
    execution performance, so the less initialisation that is done before
    relocation the better.

    An immediately-obvious improvement is to only initialise drivers which are
    actually going to be used before relocation. On many boards the only such
    driver is a serial UART, so this provides a very large potential benefit.

    Allow drivers to mark themselves as 'pre-reloc' which means that they will
    be initialised prior to relocation. This can be done either with a driver
    flag or with a 'dm,pre-reloc' device tree property.

    To support this, the various dm scanning function now take a 'pre_reloc_only'
    parameter which indicates that only drivers marked pre-reloc should be
    bound.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a new method which removes and unbinds all drivers.

    Signed-off-by: Simon Glass
    Acked-by: Marek Vasut

    Simon Glass
     
  • The root device should be probed just like any other device. The effect of
    this is to mark the device as activated, so that it can be removed (along
    with its children) if required.

    Signed-off-by: Simon Glass
    Acked-by: Marek Vasut

    Simon Glass
     

19 Jul, 2014

1 commit

  • lists.c / root.c do not include their own header and they
    could potentially implement a different function. Therefore
    actually include the headers.

    cc: sjg@chromium.org
    Signed-off-by: Jeroen Hofstee
    Acked-by: Simon Glass

    Jeroen Hofstee
     

21 Jun, 2014

2 commits


27 May, 2014

1 commit

  • using UBI and DM together leads in compiler error, as
    both define a "struct device", so rename "struct device"
    in include/dm/device.h to "struct udevice", as we use
    linux code (MTD/UBI/UBIFS some USB code,...) and cannot
    change the linux "struct device"

    Signed-off-by: Heiko Schocher
    Cc: Simon Glass
    Cc: Marek Vasut

    Heiko Schocher
     

05 Mar, 2014

1 commit

  • Add driver model functionality for generic board.

    This includes data structures and base code for registering devices and
    uclasses (groups of devices with the same purpose, e.g. all I2C ports will
    be in the same uclass).

    The feature is enabled with CONFIG_DM.

    Signed-off-by: Simon Glass
    Signed-off-by: Marek Vasut
    Signed-off-by: Pavel Herrmann
    Signed-off-by: Viktor Křivák
    Signed-off-by: Tomas Hlavacek

    Simon Glass