Skip to content
Snippets Groups Projects
  1. Jul 05, 2021
  2. Jul 02, 2021
  3. Jul 01, 2021
    • Tom Rini's avatar
      Merge branch '2021-07-01-buildtime-gd-sanity-check' into next · 03b61ffe
      Tom Rini authored
      - Merge build-time sanity checks to ensure the size of gd doesn't
        change.  This can happen during cleanups due to not all symbols being
        implemented in Kconfig.
      03b61ffe
    • Rasmus Villemoes's avatar
      global-data.h: add build-time sanity check of sizeof(struct global_data) · ee3a46a4
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      The layout and contents of struct global_data depends on a lot of
      CONFIG_* preprocessor macros, not all of which are entirely converted
      to Kconfig - not to mention weird games played here and there. This
      can result in one translation unit using one definition of struct
      global_data while the actual layout is another.
      
      That can be very hard to debug. But we already have a mechanism that
      can help catch such bugs at build time, namely the asm-offsets
      machinery which is necessary anyway to provide assembly code with the
      necessary constants. So make sure that every C translation unit that
      include global_data.h actually sees the same size of struct
      global_data as that which was seen by the asm-offsets.c TU.
      
      It is likely that this patch will break the build of some boards. For
      example, without the patch from Matt Merhar
      (https://lists.denx.de/pipermail/u-boot/2021-May/450135.html
      
      ) or some
      other fix, this breaks P2041RDB_defconfig:
      
        CC      arch/powerpc/lib/traps.o
        AS      arch/powerpc/cpu/mpc85xx/start.o
      In file included from include/asm-generic/global_data.h:26,
                       from ./arch/powerpc/include/asm/global_data.h:109,
                       from include/init.h:21,
                       from arch/powerpc/lib/traps.c:7:
      include/linux/build_bug.h:99:41: error: static assertion failed: "sizeof(struct global_data) == GD_SIZE"
         99 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
            |                                         ^~~~~~~~~~~~~~
      include/linux/build_bug.h:98:34: note: in expansion of macro ‘__static_assert’
         98 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
            |                                  ^~~~~~~~~~~~~~~
      include/asm-generic/global_data.h:470:1: note: in expansion of macro ‘static_assert’
        470 | static_assert(sizeof(struct global_data) == GD_SIZE);
            | ^~~~~~~~~~~~~
      make[1]: *** [scripts/Makefile.build:266: arch/powerpc/lib/traps.o] Error 1
      make: *** [Makefile:1753: arch/powerpc/lib] Error 2
      make: *** Waiting for unfinished jobs....
      
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ee3a46a4
    • Rasmus Villemoes's avatar
      build_bug.h: add wrapper for _Static_assert · ef0f4e83
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      
      [Linux commit 6bab69c65013bed5fce9f101a64a84d0385b3946]
      
      BUILD_BUG_ON() is a little annoying, since it cannot be used outside
      function scope.  So one cannot put assertions about the sizeof() a
      struct next to the struct definition, but has to hide that in some more
      or less arbitrary function.
      
      Since gcc 4.6 (which is now also the required minimum), there is support
      for the C11 _Static_assert in all C modes, including gnu89.  So add a
      simple wrapper for that.
      
      _Static_assert() requires a message argument, which is usually quite
      redundant (and I believe that bug got fixed at least in newer C++
      standards), but we can easily work around that with a little macro
      magic, making it optional.
      
      For example, adding
      
        static_assert(sizeof(struct printf_spec) == 8);
      
      in vsprintf.c and modifying that struct to violate it, one gets
      
      ./include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct printf_spec) == 8"
       #define __static_assert(expr, msg, ...) _Static_assert(expr, "" msg "")
      
      godbolt.org suggests that _Static_assert() has been support by clang
      since at least 3.0.0.
      
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ef0f4e83
    • Tom Rini's avatar
      Merge tag 'xilinx-for-v2021.10' of... · 6b69f15f
      Tom Rini authored
      Merge tag 'xilinx-for-v2021.10' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next
      
      Xilinx changes for v2021.10
      
      clk:
      - Add driver for Xilinx Clocking Wizard IP
      
      fdt:
      - Also record architecture in /fit-images
      
      net:
      - Fix plat/priv data handling in axi emac
      - Add support for 10G/25G speeds
      
      pca953x:
      - Add missing dependency on i2c
      
      serial:
      - Fix dependencies for DEBUG uart for pl010/pl011
      - Add setconfig option for cadence serial driver
      
      watchdog:
      - Add cadence wdt expire now function
      
      zynq:
      - Update DT bindings to reflect the latest state and descriptions
      
      zynqmp:
      - Update DT bindings to reflect the latest state and descriptions
      - SPL: Add support for ECC DRAM initialization
      - Fix R5 core 1 handling logic
      - Enable firmware driver for mini configurations
      - Enable secure boot, regulators, wdt
      - Add support xck devices and 67dr
      - Add psu init for sm/smk-k26 SOMs
      - Add handling for MMC seq number via mmc_get_env_dev()
      - Handle reserved memory locations
      - Add support for u-boot.itb generation for secure OS
      - Handle BL32 handoffs for secure OS
      - Add support for 64bit addresses for u-boot.its generation
      - Change eeprom handling via nvmem aliases
      6b69f15f
    • T Karthik Reddy's avatar
      xilinx: zynqmp: Add support for 67dr silicon · 45576273
      T Karthik Reddy authored
      
      Add zynqmp 67dr silicon to zynqmp device id table.
      
      Signed-off-by: default avatarT Karthik Reddy <t.karthik.reddy@xilinx.com>
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      45576273
    • Michal Simek's avatar
      watchdog: cadence: Add expire_now method · 76bf8f3e
      Michal Simek authored
      
      It is working in a way that only minimal timeout is setup to reach
      expiration just right after it is setup.
      Please make sure that PMUFW is compiled with ENABLE_EM flag.
      
      On U-Boot prompt you can test it like:
      ZynqMP> wdt dev watchdog@fd4d0000
      ZynqMP> wdt list
      watchdog@fd4d0000 (cdns_wdt)
      ZynqMP> wdt dev
      dev: watchdog@fd4d0000
      ZynqMP> wdt expire
      (And reset should happen here)
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      76bf8f3e
    • Michal Simek's avatar
      arm64: zynqmp: Enable WDT command · 6e257c69
      Michal Simek authored
      
      Enable watchdog command to be able to work with watchdogs.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      6e257c69
  4. Jun 30, 2021
  5. Jun 29, 2021
  6. Jun 28, 2021
Loading