1. 27 7月, 2020 1 次提交
  2. 24 7月, 2020 1 次提交
  3. 22 7月, 2020 1 次提交
  4. 21 7月, 2020 2 次提交
    • M
      treewide: convert devfdt_get_addr() to dev_read_addr() · 60e7fa8b
      Masahiro Yamada 提交于
      When you enable CONFIG_OF_LIVE, you will end up with a lot of
      conversions.
      
      To generate this commit, I used coccinelle excluding drivers/core/,
      include/dm/, and test/
      
      The semantic patch that makes this change is as follows:
      
        <smpl>
        @@
        expression dev;
        @@
        -devfdt_get_addr(dev)
        +dev_read_addr(dev)
        </smpl>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      60e7fa8b
    • M
      treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() · 3c12c62b
      Masahiro Yamada 提交于
      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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      3c12c62b
  5. 17 7月, 2020 2 次提交
  6. 16 7月, 2020 2 次提交
  7. 10 7月, 2020 4 次提交
    • B
      spi: kirkwood: Drop nondm code · a58c7ffc
      Bhargav Shah 提交于
      Drop the nondm code from kirkwood_spi.c since there
      is no board or any other code using for it.
      Signed-off-by: NBhargav Shah <bhargavshah1988@gmail.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      a58c7ffc
    • W
      dtoc: extend dtoc to use struct driver_info when linking nodes · 51f1263d
      Walter Lozano 提交于
      In the current implementation, when dtoc parses a dtb to generate a struct
      platdata it converts the information related to linked nodes as pointers
      to struct platdata of destination nodes. By doing this, it makes
      difficult to get pointer to udevices created based on these
      information.
      
      This patch extends dtoc to use struct driver_info when populating
      information about linked nodes, which makes it easier to later get
      the devices created. In this context, reimplement functions like
      clk_get_by_index_platdata() which made use of the previous approach.
      Signed-off-by: NWalter Lozano <walter.lozano@collabora.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      51f1263d
    • W
      core: add support for U_BOOT_DRIVER_ALIAS · addf358b
      Walter Lozano 提交于
      Currently when using OF_PLATDATA the binding between devices and drivers
      is done trying to match the compatible string in the node with a driver
      name. However, usually a single driver supports multiple compatible strings
      which causes that only devices which its compatible string matches a
      driver name get bound.
      
      To overcome this issue, this patch adds the U_BOOT_DRIVER_ALIAS macro,
      which generates no code at all, but allows an easy way to declare driver
      name aliases. Thanks to this, dtoc could be improve to look for the driver
      name based on its alias when it populates the U_BOOT_DEVICE entry.
      Signed-off-by: NWalter Lozano <walter.lozano@collabora.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      addf358b
    • W
      drivers: rename drivers to match compatible string · e3e2470f
      Walter Lozano 提交于
      When using OF_PLATDATA, the bind process between devices and drivers
      is performed trying to match compatible string with driver names.
      However driver names are not strictly defined, and also there are different
      names used when declaring a driver with U_BOOT_DRIVER, the name of the
      symbol used in the linker list and the used in the struct driver_info.
      
      In order to make things a bit more clear, rename the drivers names. This
      will also help for further OF_PLATDATA improvements, such as checking
      for valid driver names.
      Signed-off-by: NWalter Lozano <walter.lozano@collabora.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Add a fix for sandbox of-platdata to avoid using an invalid ANSI colour:
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      e3e2470f
  8. 09 7月, 2020 2 次提交
  9. 30 6月, 2020 2 次提交
    • T
      Convert CONFIG_CADENCE_QSPI to Kconfig · 582b4f7f
      Tom Rini 提交于
      This converts the following to Kconfig:
         CONFIG_CADENCE_QSPI
      Signed-off-by: NTom Rini <trini@konsulko.com>
      582b4f7f
    • L
      spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* · 56c40460
      Lukasz Majewski 提交于
      This change allows more fine tuning of driver model based SPI support in
      SPL and TPL. It is now possible to explicitly enable/disable the DM_SPI
      support in SPL and TPL via Kconfig option.
      
      Before this change it was necessary to use:
          /* SPI Flash Configs */
          #if defined(CONFIG_SPL_BUILD)
          #undef CONFIG_DM_SPI
          #undef CONFIG_DM_SPI_FLASH
          #undef CONFIG_SPI_FLASH_MTD
          #endif
      
      in the ./include/configs/<board>.h, which is error prone and shall be
      avoided when we strive to switch to Kconfig.
      
      The goal of this patch:
      
      Provide distinction for DM_SPI support in both U-Boot proper and SPL (TPL).
      Valid use case is when U-Boot proper wants to use DM_SPI, but SPL must
      still support non DM driver.
      
      Another use case is the conversion of non DM/DTS SPI driver to support
      DM/DTS. When such driver needs to work in both SPL and U-Boot proper, the
      distinction is needed in Kconfig (also if SPL version of the driver
      supports OF_PLATDATA).
      
      In the end of the day one would have to support following use cases (in
      single driver file - e.g. mxs_spi.c):
      
      - U-Boot proper driver supporting DT/DTS
      - U-Boot proper driver without DT/DTS support (deprecated)
      - SPL driver without DT/DTS support
      - SPL (and TPL) driver with DT/DTS (when the SoC has enough resources to
        run full blown DT/DTS)
      - SPL driver with DT/DTS and SPL_OF_PLATDATA (when one have constrained
        environment with no fitImage and OF_LIBFDT support).
      
      Some boards do require SPI support (with DM) in SPL (TPL) and some only
      have DM_SPI{_FLASH} defined to allow compiling SPL.
      
      This patch converts #ifdef CONFIG_DM_SPI* to #if CONFIG_IS_ENABLED(DM_SPI)
      and provides corresponding defines in Kconfig.
      Signed-off-by: NLukasz Majewski <lukma@denx.de>
      Tested-by: Adam Ford <aford173@gmail.com> #da850-evm
      Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com>
      [trini: Fixup a few platforms]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      56c40460
  10. 24 6月, 2020 1 次提交
  11. 19 6月, 2020 1 次提交
    • C
      dm: spi: Convert Freescale ESPI driver to driver model · 8d50551d
      Chuanhua Han 提交于
      Modify the Freescale ESPI driver to support the driver model.
      Also resolved the following problems:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_SPI. Please update
      the board before v2019.04 for no dm conversion
      and v2019.07 for partially dm converted drivers.
      Failure to update can lead to driver/board removal
      See doc/driver-model/MIGRATION.txt for more info.
      ====================================================
      ===================== WARNING ======================
      This board does not use CONFIG_DM_SPI_FLASH. Please update
      the board to use CONFIG_SPI_FLASH before the v2019.07 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/MIGRATION.txt for more info.
      ====================================================
      Signed-off-by: NChuanhua Han <chuanhua.han@nxp.com>
      Signed-off-by: NXiaowei Bao <xiaowei.bao@nxp.com>
      Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com>
      Reviewed-by: NJagan Teki <jagan@amarulasolutions.com>
      8d50551d
  12. 11 6月, 2020 8 次提交
  13. 02 6月, 2020 1 次提交
  14. 01 6月, 2020 4 次提交
  15. 19 5月, 2020 7 次提交
  16. 16 5月, 2020 1 次提交