1. 18 Apr, 2016 1 commit
    • Peng Fan's avatar
      common: env: support sata device · 125d193c
      Peng Fan authored
      Introduce env support for sata device.
      1. Implement write_env/read_env/env_relocate_spec/saveenv/sata_get_env_dev
      2. If want to enable this feature, define CONFIG_ENV_IS_IN_SATA, and
         define CONFIG_SYS_SATA_ENV_DEV or implement your own sata_get_ev_dev.
      Signed-off-by: default avatarPeng Fan <van.freenix@gmail.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Stuart Longland <stuartl@vrt.com.au>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      125d193c
  2. 12 Apr, 2016 3 commits
  3. 11 Apr, 2016 2 commits
  4. 10 Apr, 2016 1 commit
    • Hans de Goede's avatar
      usb: kbd: Do not deregister usbkbd twice when using dm · 9a80e714
      Hans de Goede authored
      The dm usb_kbd_remove function() will deregister the usb keyboard for
      us on a "usb reset" / "usb stop" so there is no need to manually call
      usb_kbd_deregister() in the dm case.
      
      This commit removes usb_kbd_deregister() in the dm case fixing the
      following "usb reset" errors:
      
      usb_kbd_remove: warning, ret=-6
      device_remove: Device 'usb_kbd' failed to remove, but children are gone
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      9a80e714
  5. 04 Apr, 2016 1 commit
  6. 01 Apr, 2016 3 commits
  7. 27 Mar, 2016 3 commits
  8. 23 Mar, 2016 2 commits
  9. 22 Mar, 2016 4 commits
  10. 20 Mar, 2016 4 commits
    • Stefan Roese's avatar
      usb: Change power-on / scanning timeout handling · c998da0d
      Stefan Roese authored
      This patch changes the USB port scanning procedure and timeout
      handling in the following ways:
      
      a)
      The power-on delay in usb_hub_power_on() is now reduced to a value of
      max(100ms, "hub->desc.bPwrOn2PwrGood * 2"). The code does not wait
      using mdelay, instead usb_hub_power_on() will wait before querying
      the device in the scanning loop later. The total timeout for this
      hub, which is 1 second + "hub->desc.bPwrOn2PwrGood * 2" is calculated
      and will be used in the following per-port scanning loop as the timeout
      to detect active USB devices on this hub.
      
      b)
      Don't delay the minimum delay (for power to stabilize) in
      usb_hub_power_on(). Instead skip querying these devices in the scannig
      loop until the delay time is reached.
      
      c)
      The ports are now scanned in a quasi parallel way. The current code did
      wait for each (unconnected) port to reach its timeout and only then
      continue with the next port. This patch now changes this to scan all
      ports of all USB hubs quasi simultaneously. For this, all ports are added
      to a scanning list. This list is scanned until all ports are ready
      by either a) reaching the connection timeout (calculated earlier), or
      by b) detecting a USB device. This results in a faster USB scan time as
      the recursive scanning of USB hubs connected to the hub that's currently
      being scanned will start earlier.
      
      One small functional change to the original code is, that ports with
      overcurrent detection will now get rescanned multiple times
      (PORT_OVERCURRENT_MAX_SCAN_COUNT).
      
      Without this patch:
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 20.163 seconds
      
      With this patch:
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 1.822 seconds
      
      So ~18.3 seconds of USB scanning time reduction.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Tested-by: default avatarStephen Warren <swarren@nvidia.com>
      c998da0d
    • Stefan Roese's avatar
      usb: Don't reset the USB hub a 2nd time · 3ed9eb93
      Stefan Roese authored
      Debugging has shown, that all USB hubs are being reset twice while
      USB scanning. This introduces additional delays and makes USB scanning
      even more slow. Testing has shown that this 2nd USB hub reset doesn't
      seem to be necessary.
      
      This patch now removes this 2nd USB hub reset. Resulting in faster USB
      scan time. Here the current numbers:
      
      Without this patch:
      => time usb start
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 24.003 seconds
      
      With this patch:
      => time usb start
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 20.392 seconds
      
      So ~3.6 seconds of USB scanning time reduction.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Tested-by: default avatarStephen Warren <swarren@nvidia.com>
      Cc: Marek Vasut <marex@denx.de>
      3ed9eb93
    • Stefan Roese's avatar
      usb: Remove 200 ms delay in usb_hub_port_connect_change() · 2ef117fe
      Stefan Roese authored
      This patch removes 2 mdelay(200) calls from usb_hub_port_connect_change().
      These delays don't seem to be necessary. At least not in my tests. Here
      the number for a custom x86 Bay Trail board (not in mainline yet) with
      a quite large and complex USB hub infrastructure.
      
      Without this patch:
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 28.415 seconds
      
      With this patch:
      starting USB...
      USB0:   USB EHCI 1.00
      scanning bus 0 for devices... 9 USB Device(s) found
      
      time: 24.003 seconds
      
      So ~4.5 seconds of USB scanning time reduction.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Tested-by: default avatarStephen Warren <swarren@nvidia.com>
      Cc: Marek Vasut <marex@denx.de>
      2ef117fe
    • Stefan Roese's avatar
      usb: legacy_hub_port_reset(): Speedup hub reset handling · f7f60100
      Stefan Roese authored
      Start with a short USB hub reset delay of 20ms. This can be enough for
      some configurations.
      
      The 2nd delay at the end of the loop is completely removed. Since the
      delay hasn't been long enough, a longer delay time of 200ms is assigned
      and will be used in the next loop round.
      
      This hub reset handling is also used in the v4.4 Linux USB driver,
      hub_port_reset().
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Tested-by: default avatarStephen Warren <swarren@nvidia.com>
      Cc: Marek Vasut <marex@denx.de>
      f7f60100
  11. 18 Mar, 2016 1 commit
  12. 17 Mar, 2016 3 commits
  13. 16 Mar, 2016 3 commits
  14. 15 Mar, 2016 1 commit
    • Alexander Graf's avatar
      efi_loader: Add runtime services · 50149ea3
      Alexander Graf authored
      After booting has finished, EFI allows firmware to still interact with the OS
      using the "runtime services". These callbacks live in a separate address space,
      since they are available long after U-Boot has been overwritten by the OS.
      
      This patch adds enough framework for arbitrary code inside of U-Boot to become
      a runtime service with the right section attributes set. For now, we don't make
      use of it yet though.
      
      We could maybe in the future map U-boot environment variables to EFI variables
      here.
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      50149ea3
  15. 14 Mar, 2016 8 commits