1. 11 Jan, 2021 12 commits
  2. 08 Jan, 2021 4 commits
    • Lukasz Majewski's avatar
      xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28) · c8f2a060
      Lukasz Majewski authored
      On the XEA board (imx28) one needs in the SPL support for GPIO, MMC and
      SPI. Two last ones are necessary for booting the device. The GPIO support
      allows deciding which medium will be used. For example the GPIO DTS node
      (gpio@0 at imx28.dtsi) has pinctrl parent (pinctrl@80018000) for which we
      don't need driver asigned for correct operation.
      In the spl/dts/dt-platdata.c the gpio@0 has index 4 and its parent -
      pinctrl@80018000 has index 5.
      
      In the bind_drivers_pass() function (at drivers/core/lists.c) call to
      device_bind_by_name() for `fsl_imx23_pinctrl` returns -2, which is
      expected.
      
      With current setup - when the SPL_OF_PLATDATA_PARENT=y
      The gpio@0 node with index 4 is skipped as its parent with 5 is not yet
      bound. It cannot be as we don't need and provide the driver for it.
      As a result the gpio@0 is never bound and we end up with bricked board in
      the SPL stage.
      
      When CONFIG_SPL_OF_PLATDATA_PARENT is NOT set, all entries from
      spl/dts/dt-platdata.c are scanned in ascending index order, so gpio@0 is
      properly initialized. For `fsl_imx_pinctrl` we simply check 10 times if
      the driver for is available (which is not) and exit.
      
      As a result the GPIOs are initialized and can be used in early SPL stage.
      This commit fixes XEA regression introduced with e41651ff.
      Signed-off-by: Lukasz Majewski's avatarLukasz Majewski <lukma@denx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c8f2a060
    • Lukasz Majewski's avatar
      xea: config: Use CONFIG_PREBOOT from Kconfig · ee66df14
      Lukasz Majewski authored
      The usage of the preboot feature is now controlled via a separate Kconfig
      option - namely CONFIG_USE_PREBOOT.
      It must be enabled for preboot code executing commands now defined in
      CONFIG_PREBOOT (also moved to the Kconfig).
      
      After defining both CONFIG_USE_PREBOOT and CONFIG_PREBOOT in
      imx28_xea_defconfig the define of CONFIG_PREBOOT shall be removed from
      xea.h as it is redundant.
      Signed-off-by: Lukasz Majewski's avatarLukasz Majewski <lukma@denx.de>
      ee66df14
    • Lukasz Majewski's avatar
      xea: spl: Disable pull UP for GPIO0_2{35} · a062d8e6
      Lukasz Majewski authored
      On the imx287 pin GPMI_WRN (GPIO0_25) no PullUP is available that can be
      enabled.
      
      To get the same behavior for both boot select pins (i.e. GPIO0_2{35})
      disable pull UPs on both.
      Signed-off-by: Lukasz Majewski's avatarLukasz Majewski <lukma@denx.de>
      a062d8e6
    • Hugh Cole-Baker's avatar
      rockchip: pinebook-pro: default to SPI bus 1 for SPI-flash · 92cb207a
      Hugh Cole-Baker authored
      SPI flash on this machine is located on bus 1, default to using bus 1
      for SPI flash and stop aliasing it to bus 0.
      Signed-off-by: default avatarHugh Cole-Baker <sigmaris@gmail.com>
      Suggested-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob")
      92cb207a
  3. 06 Jan, 2021 5 commits
  4. 05 Jan, 2021 19 commits
    • Tom Rini's avatar
      Merge tag 'v2021.01-rc5' into next · 720620e6
      Tom Rini authored
      Prepare v2021.01-rc5
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      720620e6
    • Tom Rini's avatar
      Merge tag 'ti-v2021.01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti · c2d80bbd
      Tom Rini authored
      - Fix I2C speed for Nokia RX51
      c2d80bbd
    • Simon Glass's avatar
      dtoc: Tidy up src_scan tests · 970349a9
      Simon Glass authored
      Some of these tests don't actually check anything. Add a few more checks
      to complete the tests.
      
      Also add a simple scan test that does the basics.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      970349a9
    • Simon Glass's avatar
      dtoc: Move src_scan tests to a separate file · 10ea9c0b
      Simon Glass authored
      Move the tests related to scanning into their own class, updating them
      to avoid using dtb_platdata as a pass-through.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      10ea9c0b
    • Simon Glass's avatar
      dtoc: Split source-code scanning to a separate file · a542a70c
      Simon Glass authored
      Before expanding the scanning features any more, move this into a separate
      file. This will make it easier to maintain in the future. In particular,
      it reduces the size of dtb_platdata.py and allows us to add tests
      specifically for scanning, without going through that file.
      
      The pieces moved are the Driver class, the scanning code and the various
      naming functions, since they mostly depend on the scanning results.
      
      So far there is are no separate tests for src_scan. These will be added
      as new functionality appears.
      
      This introduces no functional change.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a542a70c
    • Simon Glass's avatar
      dtoc: Drop dm_populate_phandle_data() · d960f0db
      Simon Glass authored
      This has not been needed since parent information was added and we started
      using indicies for references to other drivers instead of pointers. It was
      kept around in the expectation that it might be needed later.
      
      However with the latest updates, it doesn't seem likely that we'll need
      this in the foreseeable future.
      
      Drop dm_populate_phandle_data() from dtoc and driver model.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d960f0db
    • Simon Glass's avatar
      dtoc: Output nodes in order · 9eca08dc
      Simon Glass authored
      Previously we had to worry about nodes being output before those that they
      depended on, thus causing build errors.  So the current algorithm is
      careful to output nodes in the right order.
      
      We now use a different method for outputting phandles that does not
      involve pointers. Also we plan to add a 'declarations' header file to
      declare all drivers as 'extern'.
      
      Update the code to drop the dependency checking and output in a simple
      loop. This makes the output easier to follow since drivers are in order of
      thier indices (0, 1, ...), which is also the order it appears in in the
      linker list.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      9eca08dc
    • Simon Glass's avatar
      dtoc: Allow specifying the base directory for tests · 1e0f3f46
      Simon Glass authored
      The base directory of U-Boot, where the source is, it currently calculated
      from the directory of the dtb_platdata.py script. If this is installed
      elsewhere that will not work. Also it is inconvenient for tests.
      
      Add a parameter to allow specifying this base directory.
      
      To test this, pass a temporary directory with some files in it and check
      that they are passed to scan_driver().
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1e0f3f46
    • Simon Glass's avatar
      dtoc: Add the method for each command to OutputFile · a7d5f96e
      Simon Glass authored
      Rather than the if/else construct, update OutputFile with the method to
      call to process each command. This is easier to maintain as the number of
      commands increases.
      
      Rename generate_tables to generate_plat since it better describes what is
      being generated ('plat' is the U-Boot name for platform data).
      
      With this, each output method needs to have the same signature. Store the
      output structures in a member variable instead of using parameters, to
      accomplish this.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a7d5f96e
    • Simon Glass's avatar
      dtoc: Rename dt-platdata.c to dt-plat.c · f31fa99a
      Simon Glass authored
      Use this new name to be consistent with the rest of U-Boot, which talks
      about 'plat' for the platform data, which is what this file holds.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      f31fa99a
    • Simon Glass's avatar
      dtoc: Add a header comment to each generated file · d1055d68
      Simon Glass authored
      It is currently fairly obvious what the two generated files are for, but
      this will change as more are added. It is helpful for readers to describe
      the purpose of each file.
      
      Add a header commment field to OutputFile and use it to generate a comment
      at the top of each file.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d1055d68
    • Simon Glass's avatar
      dtoc: Run tests using test_util · 5d9a3aa9
      Simon Glass authored
      Use the standard function for running tests and reported results. This
      allows the tests to run in parallel, which is a significant speed-up on
      most machines (e.g. 4.5 seconds -> 1.5s on mine).
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5d9a3aa9
    • Simon Glass's avatar
      concurrencytest: Fix Python3 warning · fe240089
      Simon Glass authored
      This gives a warning in some situations:
      
        File "tools/dtoc/../concurrencytest/concurrencytest.py", line 95,
             in do_fork
          stream = os.fdopen(c2pread, 'rb', 1)
        File "/usr/lib/python3.8/os.py", line 1023, in fdopen
          return io.open(fd, *args, **kwargs)
      RuntimeWarning: line buffering (buffering=1) isn't supported in binary
          mode, the default buffer size will be used
      
      Fix this by dropping the line-buffer parameter.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      fe240089
    • Simon Glass's avatar
      dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS · bdf8fd76
      Simon Glass authored
      We use the U_BOOT_ prefix (i.e. U_BOOT_DRIVER) to declare a driver but
      in every other case we just use DM_. Update the alias macros to use the
      DM_ prefix.
      
      We could perhaps rename U_BOOT_DRIVER() to DM_DRIVER(), but this macro
      is widely used and there is at least some benefit to indicating it us a
      U-Boot driver, particularly for code ported from Linux. So for now, let's
      keep that name.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      bdf8fd76
    • Simon Glass's avatar
      dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET() · 65e25bea
      Simon Glass authored
      In the spirit of using the same base name for all of these related macros,
      rename this to have the operation at the end. This is not widely used so
      the impact is fairly small.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      65e25bea
    • Simon Glass's avatar
      dm: Rename DM_GET_DEVICE() to DM_DRVINFO_GET() · 8629d30a
      Simon Glass authored
      This does not get a device (struct udevice *) but a struct driver_info *
      so the name is confusing.
      
      Rename it accordingly. Since we plan to have several various of these
      macros, put GET at the end instead of the middle, so it is easier to spot
      the related macros.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      8629d30a
    • Simon Glass's avatar
      dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() · 20e442ab
      Simon Glass authored
      The current macro is a misnomer since it does not declare a device
      directly. Instead, it declares driver_info record which U-Boot uses at
      runtime to create a device.
      
      The distinction seems somewhat minor most of the time, but is becomes
      quite confusing when we actually want to declare a device, with
      of-platdata. We are left trying to distinguish between a device which
      isn't actually device, and a device that is (perhaps an 'instance'?)
      
      It seems better to rename this macro to describe what it actually is. The
      macros is not widely used, since boards should use devicetree to declare
      devices.
      
      Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is
      declaring a new driver_info record, not a device.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      20e442ab
    • Simon Glass's avatar
      Makefile: Invoke dtoc only once · be3bd3bb
      Simon Glass authored
      Update the Makefile to run dtoc only once, generating all required files.
      This saves time since there is a lot of processing in each invocation of
      dtoc.
      
      We already have a variable for the object files to build, so use that
      instead of repeating the same filenames. Add a C version of this also,
      for the same reason.
      
      This makes it easier to add new C files (generated by dtoc) to the build
      later, as needed.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      be3bd3bb
    • Simon Glass's avatar
      dtoc: Add an 'all' command · 10cbd3b7
      Simon Glass authored
      With upcoming changes, dtoc will output several files for different
      of-platdata components.
      
      Add a way to output all ava!ilable files at once ('all'), to the
      appropriate directories, without needing to specify each one invidually.
      
      This puts the commands in alphabetical order, so update the tests
      accordingly.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      10cbd3b7