Skip to content
Snippets Groups Projects
  1. Dec 15, 2019
    • Simon Glass's avatar
      i2c: designware: Avoid using static data · 8d72d5bf
      Simon Glass authored
      
      Drivers are not allowed to use static data since they may be used in SPL
      where BSS is not available.
      
      It is possible that driver model may provide support for numbering devices
      in the future. But for now, move this to global_data.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      8d72d5bf
    • Simon Glass's avatar
      i2c: designware: Tidy up PCI support · 457df233
      Simon Glass authored
      
      This is hacked into the driver at present. It seems better to have it as
      a separate driver that uses the base driver. Create a new file and put
      the X86 code into it.
      
      Actually the Baytrail settings should really come from the device tree.
      
      Note that 'has_max_speed' is added as well. This is currently always false
      but since only Baytrail provides the config, it does not affect operation
      for other devices.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarHeiko Schocher <hs@denx.de>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      457df233
    • Simon Glass's avatar
      net: Move the checksum functions to lib/ · d721001f
      Simon Glass authored
      
      These functions are used by code outside the network support, so move them
      to lib/ to be more accessible.
      
      Without this, the functions are only accessible in SPL/TPL only if
      CONFIG_SPL/TPL_NET are defined. Many boards do not enable those option but
      still want to do checksums in this format.
      
      Fix up a few code-style nits while we are here.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      d721001f
    • Simon Glass's avatar
      dm: pci: Move pci_get_devfn() into a common file · 6dd4b014
      Simon Glass authored
      
      Early in boot it is necessary to decode the PCI device/function values for
      particular peripherals in the device tree or of-platdata. This is needed
      in TPL where CONFIG_PCI is not defined.
      
      To handle this, move pci_get_devfn() into a file that is built even when
      CONFIG_PCI is not defined.
      
      Also add a function for use by of-platdata, to convert a reg property to
      a pci_dev_t.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      6dd4b014
    • Simon Glass's avatar
      dm: pci: Allow delaying auto-config until after relocation · 2206ac24
      Simon Glass authored
      
      At present PCI auto-configuration happens in U-Boot both before and after
      relocation. This is a waste of time and may mess up static addresses used
      in board_init_f(). Adjust the code to supporting doing auto-configuration
      once, after relocation, under control of a device-tree property.
      
      This is needed for Apollo Lake for debugging the silicon-init code. Once
      the UART is moved to a different MMIO address the debug UART does not work
      and any debug output in Apollo Lake's arch_fsp_init_r() causes a hang.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      2206ac24
    • Simon Glass's avatar
      dm: core: Fix offset_to_ofnode() with invalid offset · b14c5339
      Simon Glass authored
      
      If the offset is -1 this function correctly sets up a null ofnode. But if
      the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it
      does the wrong thing.
      
      An offset of -1 in ofnode indicates that the ofnode is not valid. Any
      other negative value is not handled by ofnode_valid(). We could of course
      change that function, but it seems much better to always use the same
      value for an invalid node.
      
      Fix it by setting the offset to -1 if it is invalid for any reason.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      b14c5339
    • Simon Glass's avatar
      dm: gpio: Allow control of GPIO uclass in SPL · bcee8d67
      Simon Glass authored
      
      At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass
      is included in SPL/TPL without any control for boards. Some boards may
      want to disable this to reduce code size where GPIOs are not needed in
      SPL or TPL.
      
      Add a new Kconfig option to permit this. Default it to 'y' so that
      existing boards work correctly.
      
      Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to
      preserve the current behaviour. Also update the 74x164 GPIO driver since
      it cannot build with SPL.
      
      This allows us to remove the hacks in config_uncmd_spl.h and
      Makefile.uncmd_spl (eventually those files should be removed).
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      bcee8d67
    • Simon Glass's avatar
      binman: Add a library to access binman entries · 3c10dc95
      Simon Glass authored
      
      SPL and TPL can access information about binman entries using link-time
      symbols but this is not available in U-Boot proper. Of course it could be
      made available, but the intention is to just read the device tree.
      
      Add support for this, so that U-Boot can locate entries.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      3c10dc95
  2. Dec 12, 2019
  3. Dec 11, 2019
  4. Dec 10, 2019
Loading