1. 09 Jun, 2021 1 commit
    • João Loureiro's avatar
      usb: dwc2: Avoid delay when initializing USB peripheral by dwc2 · dcd2bbe0
      João Loureiro authored and Marek Vasut's avatar Marek Vasut committed
      
      
      When `usb start` is called on the terminal, the dwc2 driver will try
      to start every USB device as host first, even if it is explicitly
      configured as peripheral in the device tree (dr_mode = "peripheral").
      
      So to avoid an unwanted 15 seconds delay when initializing the usb
      (one second per channel = 1s x 15), this patch adds a check to the
      initialization, and will skip host initialization of the device is
      explicitly set as peripheral. The checking is already done similarly
      in the `drivers/usb/gadget/dwc2_udc_otg.c` driver.
      Signed-off-by: default avatarJoão Loureiro <joaofl@gmail.com>
      dcd2bbe0
  2. 13 Dec, 2020 2 commits
  3. 30 Sep, 2020 1 commit
  4. 19 May, 2020 2 commits
  5. 18 May, 2020 1 commit
    • Simon Glass's avatar
      common: Drop net.h from common header · 90526e9f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      
      Move this header out of the common header. Network support is used in
      quite a few places but it still does not warrant blanket inclusion.
      
      Note that this net.h header itself has quite a lot in it. It could be
      split into the driver-mode support, functions, structures, checksumming,
      etc.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      90526e9f
  6. 28 Apr, 2020 4 commits
  7. 06 Feb, 2020 1 commit
    • Simon Glass's avatar
      dm: core: Create a new header file for 'compat' features · 336d4615
      Simon Glass authored
      
      
      At present dm/device.h includes the linux-compatible features. This
      requires including linux/compat.h which in turn includes a lot of headers.
      One of these is malloc.h which we thus end up including in every file in
      U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
      which needs to use the system malloc() in some files.
      
      Move the compatibility features into a separate header file.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      336d4615
  8. 02 Dec, 2019 1 commit
  9. 11 Sep, 2019 2 commits
  10. 26 Nov, 2018 1 commit
  11. 29 Aug, 2018 1 commit
  12. 05 Jul, 2018 1 commit
  13. 07 May, 2018 1 commit
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      83d290c5
  14. 27 Apr, 2018 1 commit
  15. 17 Mar, 2018 4 commits
  16. 15 Feb, 2018 1 commit
    • Alexey Brodkin's avatar
      usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH · 163f8858
      Alexey Brodkin authored and Marek Vasut's avatar Marek Vasut committed
      
      
      For some reason from day one we used to have both CONFIG_DWC2_UTMI_WIDTH
      mentioned in dwc2.h and in scripts/config_whitelist.txt but never really used
      and CONFIG_DWC2_UTMI_PHY_WIDTH used in real code in dwc2.c (but never
      defined).
      
      Moreover even though CONFIG_DWC2_UTMI_WIDTH might be either 8 or 16
      depending on hardware (and the same is said in a comment for it in
      dwc2.h) but then 8 is hardcoded in the header leaving no ability to
      override this value in board's configuration.
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Marek Vasut <marex@denx.de>
      163f8858
  17. 24 Jan, 2018 1 commit
  18. 04 Oct, 2017 1 commit
    • Masahiro Yamada's avatar
      treewide: replace with error() with pr_err() · 9b643e31
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      
      U-Boot widely uses error() as a bit noisier variant of printf().
      
      This macro causes name conflict with the following line in
      include/linux/compiler-gcc.h:
      
        # define __compiletime_error(message) __attribute__((error(message)))
      
      This prevents us from using __compiletime_error(), and makes it
      difficult to fully sync BUILD_BUG macros with Linux.  (Notice
      Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
      
      Let's convert error() into now treewide-available pr_err().
      
      Done with the help of Coccinelle, excluing tools/ directory.
      
      The semantic patch I used is as follows:
      
      // <smpl>
      @@@@
      -error
      +pr_err
       (...)
      // </smpl>
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      [trini: Re-run Coccinelle]
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      9b643e31
  19. 27 Sep, 2017 1 commit
  20. 11 Jul, 2017 1 commit
  21. 17 Jun, 2017 1 commit
  22. 01 Jun, 2017 1 commit
    • Simon Glass's avatar
      dm: Rename dev_addr..() functions · a821c4af
      Simon Glass authored
      
      
      These support the flat device tree. We want to use the dev_read_..()
      prefix for functions that support both flat tree and live tree. So rename
      the existing functions to avoid confusion.
      
      In the end we will have:
      
         1. dev_read_addr...()    - works on devices, supports flat/live tree
         2. devfdt_get_addr...()  - current functions, flat tree only
         3. of_get_address() etc. - new functions, live tree only
      
      All drivers will be written to use 1. That function will in turn call
      either 2 or 3 depending on whether the flat or live tree is in use.
      
      Note this involves changing some dead code - the imx_lpi2c.c file.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a821c4af
  23. 14 Apr, 2017 2 commits
  24. 08 Feb, 2017 1 commit
    • Simon Glass's avatar
      dm: core: Replace of_offset with accessor · e160f7d4
      Simon Glass authored
      
      
      At present devices use a simple integer offset to record the device tree
      node associated with the device. In preparation for supporting a live
      device tree, which uses a node pointer instead, refactor existing code to
      access this field through an inline function.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e160f7d4
  25. 06 May, 2016 1 commit
    • Stefan Roese's avatar
      usb: dwc2: Add delay to fix the USB detection problem on SoCFPGA · 2bf352f0
      Stefan Roese authored and Marek Vasut's avatar Marek Vasut committed
      With patch c998da0d
      
       (usb: Change power-on / scanning timeout handling),
      the USB scanning is started earlier and with a smaller timeout. This
      resulted on SoCFPGA (using the DWC2 driver) in some USB sticks not
      getting detected any more. This patch now adds a 1 second delay (in
      the host mode only) to the DWC2 driver before the scanning is started.
      With this delay, now all problematic USB keys are detected successfully
      again. And there is no need any more to change the delay / timeout
      in the common USB code (usb_hub.c).
      Signed-off-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Cc: Chin Liang See <clsee@altera.com>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Marek Vasut <marex@denx.de>
      2bf352f0
  26. 03 May, 2016 4 commits
    • Marek Vasut's avatar
      usb: dwc2: Init desc_before_addr · e96e064f
      Marek Vasut authored
      
      
      Initialize desc_before_addr, otherwise the USB core won't send the
      first 64B Get Device Descriptor request in common/usb.c function
      usb_setup_descriptor() . There are some USB devices which expect
      this sequence and otherwise can misbehave.
      Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Tom Rini <trini@konsulko.com>
      e96e064f
    • Marek Vasut's avatar
      usb: dwc2: Make OC protection configurable · b4fbd089
      Marek Vasut authored
      
      
      Introduce a new flag in the controller private data, which allows selectively
      disabling the OC protection. Use the standard 'disable-over-current' OF prop
      to set this flag. This OC protection must be disabled on EBV SoCrates rev 1.
      Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      b4fbd089
    • Marek Vasut's avatar
      usb: dwc2: Pull Ext VBUS macro from dwc_otg_core_init() · 618da563
      Marek Vasut authored
      
      
      Introduce a boolean flag in the dwc2 controller private data and set
      it according to the macro (for now) instead of having this macro
      directly in the dwc_otg_core_init(). This will let us configure the
      flag from DT or such later on, if needed.
      Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      618da563
    • Marek Vasut's avatar
      usb: dwc2: Pass private data into dwc_otg_core_init() · 55901989
      Marek Vasut authored
      
      
      Pass the whole bulk of private data instead of just the regs,
      since the private data will soon contain important configuration
      flags.
      Signed-off-by: Marek Vasut's avatarMarek Vasut <marex@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      55901989
  27. 05 Mar, 2016 1 commit