1. 08 8月, 2015 22 次提交
  2. 07 8月, 2015 8 次提交
  3. 06 8月, 2015 10 次提交
    • S
      exynos: dts: Correct LDO and BUCK naming · fac971b2
      Simon Glass 提交于
      At present lower case is used for the regulator names in the device tree.
      The kernel uses upper case and U-Boot will require this also since it will
      move to a case-sensitive name check.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      fac971b2
    • S
      x86: Enable debug UART for Minnowmax · bbbe55f6
      Simon Glass 提交于
      Enable the debug UART and emit a single 'a' early in the init sequence to
      show that it is working.
      
      Unfortunately the debug UART implementation needs a stack to work. I cannot
      seem to remove this limitation as the absolute 'jmp %eax' instruction goes
      off into the weeds.
      
      So this means that the character output cannot be any earlier than
      car_init_ret, where memory is available for a stack.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
      bbbe55f6
    • S
      dm: core: Fix a typo in the uclass_get_device_by_name() comment · 74356d7f
      Simon Glass 提交于
      This function comment has a typo. Fix it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      74356d7f
    • S
      dm: core: Add a way to set a device name · f5c67ea0
      Simon Glass 提交于
      Some devices are bound entirely by probing and do not have the benefit of
      a device tree to give them a name. This is very common with PCI and USB. In
      most cases this is fine, but we should add an official way to set a device
      name. This should be called in the device's bind() method.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      f5c67ea0
    • S
      sandbox: Enable devres subsystem · c3e6847b
      Simon Glass 提交于
      This should be used for sandbox. We can convert at least one driver to use
      it, but in the meantime, enable the feature so that the code is
      build-tested.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c3e6847b
    • M
      devres: add debug command to dump device resources · 40b6f2d0
      Masahiro Yamada 提交于
      This new command can dump all device resources associated to
      each device.  The fields in every line shows:
        - The address of the resource
        - The size of the resource
        - The name of the release function
        - The stage in which the resource has been acquired (BIND/PROBE)
      
      Currently, there is no driver using devres, but if such drivers are
      implemented, the output of this command should look like this:
      
      => dm devres
      - root_driver
      - soc
      - extbus
      - serial@54006800
          bfb541e8 (8 byte) devm_kmalloc_release  BIND
          bfb54440 (4 byte) devm_kmalloc_release  PROBE
          bfb54460 (4 byte) devm_kmalloc_release  PROBE
      - serial@54006900
          bfb54270 (8 byte) devm_kmalloc_release  BIND
      - gpio@55000000
      - i2c@58780000
          bfb5bce8 (12 byte) devm_kmalloc_release  PROBE
          bfb5bd10 (4 byte) devm_kmalloc_release  PROBE
      - eeprom
          bfb54418 (12 byte) devm_kmalloc_release  BIND
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      40b6f2d0
    • M
      devres: make Devres optional with CONFIG_DEVRES · e2282d70
      Masahiro Yamada 提交于
      Currently, Devres requires additional 16 byte for each allocation,
      which is not so insignificant in some cases.
      
      Add CONFIG_DEVRES to make this framework optional.
      If the option is disabled, devres functions fall back to
      non-managed variants.  For example, devres_alloc() to kzalloc(),
      devm_kmalloc() to kmalloc(), etc.
      
      Because devres_head is also surrounded by an ifdef conditional,
      there is no memory overhead when CONFIG_DEVRES is disabled.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Suggested-by: NSimon Glass <sjg@chromium.org>
      Acked-by: NSimon Glass <sjg@chromium.org>
      e2282d70
    • M
      devres: add devm_kmalloc() and friends (managed memory allocators) · 2b07f685
      Masahiro Yamada 提交于
      devm_kmalloc() is identical to kmalloc() except that the memory
      allocated with it is managed and will be automatically released
      when the device is removed/unbound.
      
      Likewise for the other variants.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      2b07f685
    • M
      devres: introduce Devres (Managed Device Resource) framework · 608f26c5
      Masahiro Yamada 提交于
      In U-Boot's driver model, memory is basically allocated and freed
      in the core framework.  So, low level drivers generally only have
      to specify the size of needed memory with .priv_auto_alloc_size,
      .platdata_auto_alloc_size, etc.  Nevertheless, some drivers still
      need to allocate/free memory on their own in case they cannot
      statically know the necessary memory size.  So, I believe it is
      reasonable enough to port Devres into U-boot.
      
      Devres, which originates in Linux, manages device resources for each
      device and automatically releases them on driver detach.  With devres,
      device resources are guaranteed to be freed whether initialization
      fails half-way or the device gets detached.
      
      The basic idea is totally the same to that of Linux, but I tweaked
      it a bit so that it fits in U-Boot's driver model.
      
      In U-Boot, drivers are activated in two steps: binding and probing.
      Binding puts a driver and a device together.  It is just data
      manipulation on the system memory, so nothing has happened on the
      hardware device at this moment.  When the device is really used, it
      is probed.  Probing initializes the real hardware device to make it
      really ready for use.
      
      So, the resources acquired during the probing process must be freed
      when the device is removed.  Likewise, what has been allocated in
      binding should be released when the device is unbound.  The struct
      devres has a member "probe" to remember when the resource was
      allocated.
      
      CONFIG_DEBUG_DEVRES is also supported for easier debugging.
      If enabled, debug messages are printed each time a resource is
      allocated/freed.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      608f26c5
    • M
      dm: add DM_FLAG_BOUND flag · aed1a4dd
      Masahiro Yamada 提交于
      Currently, we only have DM_FLAG_ACTIVATED to indicate the device
      status, but we still cannot know in which stage is in progress,
      binding or probing.
      
      This commit introduces a new flag, DM_FLAG_BOUND, which is set when
      the device is really bound, and cleared when it is unbound.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      aed1a4dd