Skip to content
Snippets Groups Projects
  1. Feb 10, 2020
    • Sean Anderson's avatar
      riscv: Fix breakage caused by linker relaxation · d9f1cee2
      Sean Anderson authored
      Due to the two-instruction sequence needed to access arbitrary memory
      locations, the RISC-V linker aggressively optimises memory accesses and
      jumps at link-time. This is called "linker relaxation," and is discussed
      in this SiFive article
      <https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain
      
      >.
      One of the optimizations in place is to assume that the __global_pointer
      symbol is placed in the gp register. To quote the article:
      
      "...The magic __global_pointer$ symbol is defined to point 0x800 bytes
      past the start of the .sdata section. The 0x800 magic number allows
      signed 12-bit offsets from __global_pointer$ to address symbols at the
      start of the .sdata section. The linker assumes that if this symbol is
      defined, then the gp register contains that value, which it can then use
      to relax accesses to global symbols within that 12-bit range. The
      compiler treats the gp register as a constant so it doesn't need to be
      saved or restored, which means it is generally only written by _start,
      the ELF entry point."
      
      However, U-Boot instead keeps the global data pointer in gp. This causes
      memory accesses and jumps optimized to use the gp pointer to fail. To
      fix this problem, we undefine the __global_pointer symbol.
      
      Signed-off-by: default avatarSean Anderson <seanga2@gmail.com>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarRick Chen <rick@andestech.com>
      d9f1cee2
  2. Feb 08, 2020
    • Tom Rini's avatar
      Merge branch '2020-02-07-master-imports' · e1dff2d6
      Tom Rini authored
      - 2 FAT fixes.
      - MediaTek ethernet support improvement.
      - Initial Cortina Access CAxxxx family support.
      - Correct return value of do_gpio() and so gpio shell command.
      e1dff2d6
  3. Feb 07, 2020
    • Alex Nemirovsky's avatar
      board: presidio-asic: Add basic G3 engr. development board support · 7d706a88
      Alex Nemirovsky authored
      
      Add basic Presidio G3 engineering board support
      
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      7d706a88
    • Jason Li's avatar
      serial: serial_cortina: add UART DM driver for CAxxxx SoCs · 0de653d8
      Jason Li authored
      
      Add serial UART driver support for all Cortina Access
      CAxxxx family of SoCs.
      
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Signed-off-by: default avatarJason Li <jason.li@cortina-access.com>
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      0de653d8
    • Jason Li's avatar
      watchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs · 7f54b838
      Jason Li authored
      
      Add support for hardware watchdog timer on all Cortina Access
      CAxxxx family of SoCs.
      
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Reviewed-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarJason Li <jason.li@cortina-access.com>
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      7f54b838
    • Jason Li's avatar
      gpio: cortina_gpio: add DM_GPIO driver for CAxxxx SoCs · 2ccacf3c
      Jason Li authored
      
      DM_GPIO based GPIO controller driver for CAxxxx SoCs.
      This driver support multiple CPU architectures and
      Cortina Access SoC platforms.
      
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Signed-off-by: default avatarJason Li <jason.li@cortina-access.com>
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      2ccacf3c
    • Jason Li's avatar
      gpio: do not include <asm/arch/gpio.h> for Cortina CAxxxx SoCs · f267f84b
      Jason Li authored
      
      The Cortina CAxxxx GPIO driver maintains DM_GPIO support
      across different CPU ISA in the CAxxxx Soc Family; Not just ARM.
      Therefore, it is not desirable to split out and maintain separete
      gpio header file for each CPU architecture.
      
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Signed-off-by: default avatarJason Li <jason.li@cortina-access.com>
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      f267f84b
    • Alex Nemirovsky's avatar
      MAINTAINERS, git-mailrc: cortina: add Custodian for Cortina Access Inc. · 800775eb
      Alex Nemirovsky authored
      
      Assign Alex Nemirovsky as custodian for all
      Cortina Access (CA) for ARM and MIPS based SoCs.
      
      Currently Cortina Access CAxxxx family of SoCs support both
      ARM and MIPS ISA.  Drivers have cross platform support for
      both architectures.
      
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Signed-off-by: default avatarAlex Nemirovsky <alex.nemirovsky@cortina-access.com>
      800775eb
    • Tom Rini's avatar
      mpc8xx: Expose show_regs() · 3f3c153e
      Tom Rini authored
      
      To match the other PowerPC platforms the function show_regs() must not
      be marked static but instead be an exposed global function.
      
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      3f3c153e
    • Tom Rini's avatar
      cmd/elf.c: Add SPDX tag · 89789ebd
      Tom Rini authored
      
      Based on reading the text of the license comment this appears to be
      the BSD-2-Clause license but with an imperfect word match as
      BSD-2-Clause was not (as far as I recall) a common license choice at the
      time the code was written.
      
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      89789ebd
    • MarkLee's avatar
      configs: mediatek: enable mt7622 ethernet support · a536de2b
      MarkLee authored
      
      This patch enable mt7622 ethernet support in its defconfig
      
      Signed-off-by: default avatarMarkLee <Mark-MC.Lee@mediatek.com>
      a536de2b
    • Frank Wunderlich's avatar
      eth: mtk-eth: aarch64: fix build warnings on ethernet-driver · 47b1431d
      Frank Wunderlich authored
      
      building mtk ethernet driver for aarch64 (mt7622) results
      in warnings/errors
      
        "error: cast from pointer to integer of different size"
      
      Fixes: 23f17164 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
      Signed-off-by: default avatarFrank Wunderlich <frank-w@public-files.de>
      47b1431d
    • MarkLee's avatar
      arm: dts: mediatek: add ethernet and sgmii dts node for mt7622 · 6efa4505
      MarkLee authored
      
      This patch add eth and sgmii dts node for mt7622 to support ethernet
      
      Signed-off-by: default avatarMarkLee <Mark-MC.Lee@mediatek.com>
      6efa4505
    • MarkLee's avatar
      eth: mtk-eth: add mt7622 support in mediatek eth driver · e395717c
      MarkLee authored
      
      This patch add mt7622 support in mediatek eth driver
      
      Signed-off-by: default avatarMarkLee <Mark-MC.Lee@mediatek.com>
      e395717c
    • MarkLee's avatar
      eth: mtk-eth: add sgmii mode support in mediatek eth driver · b4ef49a9
      MarkLee authored
      
      This patch add sgmii init part for the mediatek SoC that
      support sgmii mode. It is a must for mt7622.
      
      Signed-off-by: default avatarMarkLee <Mark-MC.Lee@mediatek.com>
      b4ef49a9
    • Marek Szyprowski's avatar
      fat: write: adjust data written in each partial write · a54ece40
      Marek Szyprowski authored
      
      The code for handing file overwrite incorrectly calculated the amount of
      data to write when writing to the last non-cluster aligned chunk. Fix
      this by ensuring that no more data than the 'filesize' is written to disk.
      While touching min()-based calculations, change it to type-safe min_t()
      function.
      
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      
      This patch finally fixes the issue revealed by the test script from the
      previous patch. The correctness of the change has been also verified by
      the following additional test scripts:
      
      --->8-fat_test2.sh---
      #!/bin/bash
      make sandbox_defconfig
      make
      dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
      mkfs.vfat -v /tmp/10M.img
      cat >/tmp/cmds <<EOF
      x
      host bind 0 /tmp/10M.img
      fatls host 0
      mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
      mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
      fatwrite host 0 0x1000000 file0001.raw 0x1000
      fatwrite host 0 0x1000000 file0002.raw 0x1000
      fatwrite host 0 0x1000000 file0003.raw 0x1000
      fatwrite host 0 0x1000000 file0004.raw 0x1000
      fatwrite host 0 0x1000000 file0005.raw 0x1000
      fatrm host 0 file0002.raw
      fatrm host 0 file0004.raw
      fatls host 0
      fatwrite host 0 0x1100000 file0007.raw 0x2000
      fatwrite host 0 0x1100000 file0007.raw 0x1f00
      reset
      EOF
      ./u-boot </tmp/cmds
      #verify
      rm -r /tmp/result /tmp/model
      mkdir /tmp/result
      mkdir /tmp/model
      yes ABC | head -c 4096 >/tmp/model/file0001.raw
      yes ABC | head -c 4096 >/tmp/model/file0003.raw
      yes ABC | head -c 4096 >/tmp/model/file0005.raw
      yes DEF | head -c 7936 >/tmp/model/file0007.raw
      mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
      hd /tmp/10M.img
      if diff -urq /tmp/model /tmp/result
      then
      	echo Test okay
      else
      	echo Test fail
      fi
      --->8-fat_test3.sh---
      #!/bin/bash
      make sandbox_defconfig
      make
      dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
      mkfs.vfat -v /tmp/10M.img
      cat >/tmp/cmds <<EOF
      x
      host bind 0 /tmp/10M.img
      fatls host 0
      mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
      mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
      fatwrite host 0 0x1000000 file0001.raw 0x1000
      fatwrite host 0 0x1000000 file0002.raw 0x1000
      fatwrite host 0 0x1000000 file0003.raw 0x1000
      fatwrite host 0 0x1000000 file0004.raw 0x1000
      fatwrite host 0 0x1000000 file0005.raw 0x1000
      fatrm host 0 file0002.raw
      fatrm host 0 file0004.raw
      fatls host 0
      fatwrite host 0 0x1100000 file0007.raw 0x2000
      fatwrite host 0 0x1100000 file0007.raw 0x2100
      reset
      EOF
      ./u-boot </tmp/cmds
      #verify
      rm -r /tmp/result /tmp/model
      mkdir /tmp/result
      mkdir /tmp/model
      yes ABC | head -c 4096 >/tmp/model/file0001.raw
      yes ABC | head -c 4096 >/tmp/model/file0003.raw
      yes ABC | head -c 4096 >/tmp/model/file0005.raw
      yes DEF | head -c 8448 >/tmp/model/file0007.raw
      mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
      hd /tmp/10M.img
      if diff -urq /tmp/model /tmp/result
      then
      	echo Test okay
      else
      	echo Test fail
      fi
      --->8-fat_test4.sh---
      #!/bin/bash
      make sandbox_defconfig
      make
      dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
      mkfs.vfat -v /tmp/10M.img
      cat >/tmp/cmds <<EOF
      x
      host bind 0 /tmp/10M.img
      fatls host 0
      mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
      mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
      mw 0x1200000 0x0a494847 0x8000 # "GHI\n"
      fatwrite host 0 0x1000000 file0001.raw 0x1000
      fatwrite host 0 0x1000000 file0002.raw 0x1000
      fatwrite host 0 0x1000000 file0003.raw 0x1000
      fatwrite host 0 0x1000000 file0004.raw 0x1000
      fatwrite host 0 0x1000000 file0005.raw 0x1000
      fatrm host 0 file0002.raw
      fatrm host 0 file0004.raw
      fatls host 0
      fatwrite host 0 0x1100000 file0007.raw 0x900
      fatwrite host 0 0x1200000 file0007.raw 0x900 0x900
      fatwrite host 0 0x1100000 file0007.raw 0x900 0x1200
      fatwrite host 0 0x1200000 file0007.raw 0x900 0x1b00
      reset
      EOF
      ./u-boot </tmp/cmds
      #verify
      rm -r /tmp/result /tmp/model
      mkdir /tmp/result
      mkdir /tmp/model
      yes ABC | head -c 4096 >/tmp/model/file0001.raw
      yes ABC | head -c 4096 >/tmp/model/file0003.raw
      yes ABC | head -c 4096 >/tmp/model/file0005.raw
      yes DEF | head -c 2304 >/tmp/model/file0007.raw
      yes GHI | head -c 2304 >>/tmp/model/file0007.raw
      yes DEF | head -c 2304 >>/tmp/model/file0007.raw
      yes GHI | head -c 2304 >>/tmp/model/file0007.raw
      mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
      hd /tmp/10M.img
      if diff -urq /tmp/model /tmp/result
      then
      	echo Test okay
      else
      	echo Test fail
      fi
      --->8---
      Feel free to prepare a proper sandbox/py_test based tests based on
      the provided test scripts.
      a54ece40
    • Marek Szyprowski's avatar
      fat: write: fix broken write to fragmented files · 5e615b74
      Marek Szyprowski authored
      
      The code for handing file overwrite incorrectly assumed that the file on
      disk is always contiguous. This resulted in corrupting disk structure
      every time when write to existing fragmented file happened. Fix this
      by adding proper check for cluster discontinuity and adjust chunk size
      on each partial write.
      
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      
      This patch partially fixes the issue revealed by the following test
      script:
      
      --->8-fat_test1.sh---
      #!/bin/bash
      make sandbox_defconfig
      make
      dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
      mkfs.vfat -v /tmp/10M.img
      cat >/tmp/cmds <<EOF
      x
      host bind 0 /tmp/10M.img
      fatls host 0
      mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
      mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
      fatwrite host 0 0x1000000 file0001.raw 0x1000
      fatwrite host 0 0x1000000 file0002.raw 0x1000
      fatwrite host 0 0x1000000 file0003.raw 0x1000
      fatwrite host 0 0x1000000 file0004.raw 0x1000
      fatwrite host 0 0x1000000 file0005.raw 0x1000
      fatrm host 0 file0002.raw
      fatrm host 0 file0004.raw
      fatls host 0
      fatwrite host 0 0x1100000 file0007.raw 0x4000
      fatwrite host 0 0x1100000 file0007.raw 0x4000
      reset
      EOF
      ./u-boot </tmp/cmds
      #verify
      rm -r /tmp/result /tmp/model
      mkdir /tmp/result
      mkdir /tmp/model
      yes ABC | head -c 4096 >/tmp/model/file0001.raw
      yes ABC | head -c 4096 >/tmp/model/file0003.raw
      yes ABC | head -c 4096 >/tmp/model/file0005.raw
      yes DEF | head -c 16384 >/tmp/model/file0007.raw
      mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
      mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
      hd /tmp/10M.img
      if diff -urq /tmp/model /tmp/result
      then
      	echo Test okay
      else
      	echo Test fail
      fi
      --->8---
      
      Overwritting a discontiguous test file (file0007.raw) no longer causes
      corruption to file0003.raw, which's data lies between the chunks of the
      test file. The amount of data written to disk is still incorrect, what
      causes damage to the file (file0005.raw), which's data lies next to the
      test file. This will be fixed by the next patch.
      
      Feel free to prepare a proper sandbox/py_test based tests based on the
      provided test scripts.
      5e615b74
    • Luka Kovacic's avatar
      cmd: gpio: Correct do_gpio() return value · 4dbc107f
      Luka Kovacic authored
      
      Use the correct return value in function do_gpio() and update
      commands documentation with the return values from command_ret_t enum.
      
      CMD_RET_SUCCESS is returned on command success and CMD_RET_FAILURE is
      returned on command failure.
      
      The command was returning the pin value, which caused confusion when
      debugging (#define DEBUG).
      
      Signed-off-by: default avatarLuka Kovacic <luka.kovacic@sartura.hr>
      Tested-by: default avatarRobert Marko <robert.marko@sartura.hr>
      4dbc107f
    • Tom Rini's avatar
      azure/gitlab: Update to Docker to have SDL2 available · 96ff825d
      Tom Rini authored
      
      Update to a newer Docker image that contains SDL2 libraries as required
      by recent Sandbox changes.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      96ff825d
    • Tom Rini's avatar
      azure: Use our own GRUB binaries · 6049d516
      Tom Rini authored
      
      Use the same logic from 24df1b14 to use our own GRUB binaries in
      Azure pipelines as well.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      6049d516
    • Heinrich Schuchardt's avatar
      gitlab: use our own GRUB · 24df1b14
      Heinrich Schuchardt authored
      
      Up to now we have been relying on openSUSE repositories for GRUB on arm and
      arm64 though we have included GRUB in our Docker image.
      
      Use the GRUB included in our Docker image.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      24df1b14
    • Tom Rini's avatar
      Merge tag 'efi-2020-04-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi · 904ea003
      Tom Rini authored
      Pull request for UEFI sub-system for efi-2020-04-rc2
      
      Fix pylint issues in Python based tests.
      904ea003
    • Tom Rini's avatar
      Merge branch 'master' of git://git.denx.de/u-boot-socfpga · 457faef2
      Tom Rini authored
      - Gen 5 and Watchdog fixes
      457faef2
  4. Feb 06, 2020
  5. Feb 05, 2020
  6. Feb 04, 2020
Loading