Skip to content
Snippets Groups Projects
  1. Jul 16, 2021
  2. Jul 15, 2021
    • Max Yang's avatar
      rtc: m41t62: fix wrong register use for set/reset ST bit · 92cf458f
      Max Yang authored and Tom Rini's avatar Tom Rini committed
      
      Fix wrong register use when set/reset ST bit.
      ST bit is in register M41T62_REG_SEC not in M41T62_REG_ALARM_HOUR.
      
      I have not actually tested this. But this seemed buggy from inspection.
      
      Fixes: 9bbe2105 ("rtc: m41t62: add oscillator fail bit reset support")
      Signed-off-by: default avatarMax Yang <max.yang@deltaww.com>
      92cf458f
    • Stephan Gerhold's avatar
      image: android: Automatically detect more compression types · bc599042
      Stephan Gerhold authored and Tom Rini's avatar Tom Rini committed
      
      At the moment android_image_get_kcomp() can automatically detect
      LZ4 compressed kernels and the compression specified in uImages.
      However, especially on ARM64 Linux is often compressed with GZIP.
      Attempting to boot an Android image with a GZIP compressed kernel
      image currently results in a very strange crash, e.g.
      
        Starting kernel ...
        "Synchronous Abort" handler, esr 0x02000000
         ...
        Code: 5555d555 55555d55 555f5555 5d555d55 (00088b1f)
      
      Note the 1f8b, which are the "magic" bytes for GZIP images.
      
      U-Boot already has the image_decomp_type() function that checks for
      the magic bytes of bzip2, gzip, lzma and lzo. It's easy to make use
      of it here to increase the chance that we do the right thing and the
      user does not become confused with strange crashes.
      
      This allows booting Android boot images that contain GZIP-compressed
      kernel images.
      
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      bc599042
    • Marek Vasut's avatar
      fit: Load DTO into temporary buffer and ignore load address · 4c531d9f
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      The current fitImage DTO implementation expects each fitImage image
      subnode containing DTO to have 'load' property, pointing somewhere
      into memory where the DTO will be loaded. The address in the 'load'
      property must be different then the base DT load address and there
      must be sufficient amount of space between those two addresses.
      Selecting and using such hard-coded addresses is fragile, error
      prone and difficult to port even across devices with the same SoC
      and different DRAM sizes.
      
      The DTO cannot be applied in-place because fdt_overlay_apply_verbose()
      modifies the DTO when applying it onto the base DT, so if the DTO was
      used in place within the fitImage, call to fdt_overlay_apply_verbose()
      would corrupt the fitImage.
      
      Instead of copying the DTO to a specific hard-coded load address,
      allocate a buffer, copy the DTO into that buffer, apply the DTO onto
      the base DT, and free the buffer.
      
      The upside of this approach is that it is no longer necessary to
      select and hard-code specific DTO load address into the DTO. The
      slight downside is the new malloc()/free() overhead for each DTO,
      but that is negligible (*).
      
      (*) on iMX8MM/MN and STM32MP1
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      [trini: Add <linux/sizes.h>]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      4c531d9f
    • Rasmus Villemoes's avatar
      lib/vsprintf.c: remove unused ip6_addr_string() · 23b542aa
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      
      There's currently no user of %p[iI]6, so including ip6_addr_string()
      in the image is a waste of bytes. It's easy enough to have the
      compiler elide it without removing the code completely.
      
      The closest I can find to anybody "handling" ipv6 in U-Boot currently
      is in efi_net.c which does
      
              if (ipv6) {
                      ret = EFI_UNSUPPORTED;
      
      As indicated in the comment, it can easily be put back, but preferably
      under a config knob.
      
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      23b542aa
Loading