1. 30 1月, 2015 6 次提交
  2. 12 12月, 2014 1 次提交
  3. 22 11月, 2014 2 次提交
  4. 21 11月, 2014 1 次提交
  5. 23 10月, 2014 2 次提交
  6. 24 9月, 2014 2 次提交
  7. 23 7月, 2014 5 次提交
    • S
      dm: Add child_pre_probe() and child_post_remove() methods · a327dee0
      Simon Glass 提交于
      Some devices (particularly bus devices) must track their children, knowing
      when a new child is added so that it can be set up for communication on the
      bus.
      
      Add a child_pre_probe() method to provide this feature, and a corresponding
      child_post_remove() method.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a327dee0
    • S
      dm: Introduce per-child data for devices · e59f458d
      Simon Glass 提交于
      Some device types can have child devices and want to store information
      about them. For example a USB flash stick attached to a USB host
      controller would likely use this space. The controller can hold
      information about the USB state of each of its children.
      
      The data is stored attached to the child device in the 'parent_priv'
      member. It can be auto-allocated by dm when the child is probed. To
      do this, add a per_child_auto_alloc_size value to the parent driver.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      e59f458d
    • S
      dm: Add functions to access a device's children · 997c87bb
      Simon Glass 提交于
      Devices can have childen that can be addressed by a simple index, the
      sequence number or a device tree offset. Add functions to access a child
      in each of these ways.
      
      The index is typically used as a fallback when the sequence number is not
      available. For example we may use a serial UART with sequence number 0 as
      the console, but if no UART has sequence number 0, then we can fall back
      to just using the first UART (index 0).
      
      The device tree offset function is useful for buses, where they want to
      locate one of their children. The device tree can be scanned to find the
      offset of each child, and that offset can then find the device.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      997c87bb
    • S
      dm: Introduce device sequence numbering · 5a66a8ff
      Simon Glass 提交于
      In U-Boot it is pretty common to number devices from 0 and access them
      on the command line using this numbering. While it may come to pass that
      we will move away from this numbering, the possibility seems remote at
      present.
      
      Given that devices within a uclass will have an implied numbering, it
      makes sense to build this into driver model as a core feature. The cost
      is fairly small in terms of code and data space.
      
      With each uclass having numbered devices we can ask for SPI port 0 or
      serial port 1 and receive a single device.
      
      Devices typically request a sequence number using aliases in the device
      tree. These are resolved when the device is probed, to deal with conflicts.
      Sequence numbers need not be sequential and holes are permitted.
      
      At present there is no support for sequence numbers using static platform
      data. It could easily be added to 'struct driver_info' if needed, but it
      seems better to add features as we find a use for them, and the use of -1
      to mean 'no sequence' makes the default value somewhat painful.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5a66a8ff
    • S
      dm: Allow drivers to be marked 'before relocation' · 00606d7e
      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: NSimon Glass <sjg@chromium.org>
      00606d7e
  8. 27 5月, 2014 1 次提交
    • H
      dm: rename device struct to udevice · 54c5d08a
      Heiko Schocher 提交于
      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: NHeiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Marek Vasut <marex@denx.de>
      54c5d08a
  9. 05 3月, 2014 1 次提交