1. 15 Sep, 2020 1 commit
  2. 31 Aug, 2020 1 commit
  3. 25 Jul, 2020 1 commit
    • Masahiro Yamada's avatar
      treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() · 8613c8d8
      Masahiro Yamada authored
      Use the _ptr suffixed variant instead of casting. Also, convert it to
      dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE.
      
      One curious part is an error check like follows in
      drivers/watchdog/omap_wdt.c:
      
          priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
          if (!priv->regs)
                  return -EINVAL;
      
      devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error.
      So, this code does not catch any error in DT parsing.
      
      dev_read_addr_ptr() returns NULL on error, so this error check
      will work.
      
      I generated this commit by the following command:
      
       $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \
         xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/'
      
      I manually fixed drivers/usb/host/ehci-mx6.c
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      8613c8d8
  4. 24 Jul, 2020 1 commit
  5. 20 Jul, 2020 1 commit
    • Masahiro Yamada's avatar
      treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() · 3c12c62b
      Masahiro Yamada authored
      Use the _ptr suffixed variant instead of casting. Also, convert it to
      dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE.
      
      One curious part is an error check like follows in
      drivers/watchdog/omap_wdt.c:
      
          priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
          if (!priv->regs)
                  return -EINVAL;
      
      devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error.
      So, this code does not catch any error in DT parsing.
      
      dev_read_addr_ptr() returns NULL on error, so this error check
      will work.
      
      I generated this commit by the following command:
      
       $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \
         xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/'
      
      I manually fixed drivers/usb/host/ehci-mx6.c
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      3c12c62b
  6. 19 May, 2020 2 commits
  7. 17 Jul, 2019 1 commit
  8. 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
  9. 05 Mar, 2018 1 commit
  10. 04 Oct, 2017 1 commit
    • Masahiro Yamada's avatar
      treewide: replace with error() with pr_err() · 9b643e31
      Masahiro Yamada authored
      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
  11. 01 Jun, 2017 2 commits
    • Simon Glass's avatar
      dm: core: Rename of_device_is_compatible() · 911f3aef
      Simon Glass authored
      The of_ prefix conflicts with the livetree version of this function.
      Rename it to avoid problems when we add livetree support.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      911f3aef
    • 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
  12. 29 Mar, 2017 1 commit
    • Stefan Roese's avatar
      mmc: xenon_sdhci: Add missing host->max_clk to Xenon SDHCI driver · 7a926523
      Stefan Roese authored
      The Xenon SDHCI driver just missed the integration of this patch:
      
      git ID 6d0e34bf
      mmc: sdhci: Distinguish between base clock and maximum peripheral frequency
      
      With this patch applied, the SDHCI subsystem complains now with this warning
      while probing:
      
      sdhci_setup_cfg: Hardware doesn't specify base clock frequency
      
      This patch fixes this issue, by providing the missing host->max_clk
      variable to the SDHCI subsystem.
      Signed-off-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Cc: Hu Ziji <huziji@marvell.com>
      Cc: Victor Gu <xigu@marvell.com>
      Cc: Konstantin Porotchkin <kostap@marvell.com>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      7a926523
  13. 21 Mar, 2017 1 commit
    • Stefan Roese's avatar
      mmc: xenon_sdhci: Add missing host->max_clk to Xenon SDHCI driver · de0359c2
      Stefan Roese authored
      The Xenon SDHCI driver just missed the integration of this patch:
      
      git ID 6d0e34bf
      mmc: sdhci: Distinguish between base clock and maximum peripheral frequency
      
      With this patch applied, the SDHCI subsystem complains now with this warning
      while probing:
      
      sdhci_setup_cfg: Hardware doesn't specify base clock frequency
      
      This patch fixes this issue, by providing the missing host->max_clk
      variable to the SDHCI subsystem.
      Signed-off-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Cc: Hu Ziji <huziji@marvell.com>
      Cc: Victor Gu <xigu@marvell.com>
      Cc: Konstantin Porotchkin <kostap@marvell.com>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      de0359c2
  14. 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
  15. 25 Jan, 2017 1 commit
    • Stefan Roese's avatar
      mmc: Add Marvell Xenon SDHCI controller driver · b6acb5f1
      Stefan Roese authored
      This driver implementes platform specific code for the Xenon SDHCI
      controller which is integrated in the Marvell MVEBU Armada 37xx and
      Armada 7k / 8K SoCs.
      
      History:
      This driver is ported from the Marvell U-Boot version 2015.01 which is
      written by Victor Gu <xigu@marvell.com> with minor changes ported from
      the Linux driver which is written by Ziji Hu <huziji@marvell.com>.
      Signed-off-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      b6acb5f1