1. 24 Jan, 2020 1 commit
  2. 17 Jan, 2020 1 commit
  3. 02 Dec, 2019 1 commit
  4. 11 Aug, 2019 2 commits
  5. 15 Jan, 2019 4 commits
  6. 27 Nov, 2018 1 commit
  7. 18 Nov, 2018 3 commits
  8. 13 Jun, 2018 1 commit
    • Alexey Brodkin's avatar
      lib: Add hexdump · f8c987f8
      Alexey Brodkin authored
      Often during debugging session it's very interesting to see
      what data we were dealing with. For example what we write or read
      to/from memory or peripherals.
      
      This change introduces functions that allow to dump binary
      data with one simple function invocation like:
      ------------------->8----------------
      print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
      ------------------->8----------------
      
      which gives us the following:
      ------------------->8----------------
      00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35  ....baudrate=115
      00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e  200.bootargs=con
      00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30  sole=ttyS3,11520
      00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00  0n8.bootdelay=3.
      00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00  bootfile=uImage.
      00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39  fdtcontroladdr=9
      00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72  ffb1ba0.loadaddr
      00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65  =0x82000000.stde
      00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32  rr=serial0@e0022
      00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c  000.stdin=serial
      000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75  0@e0022000.stdou
      000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30  t=serial0@e00220
      000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00..............
      ...
      ------------------->8----------------
      
      Source of hexdump.c was copied from Linux kernel v4.7-rc2.
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Mario Six <mario.six@gdsys.cc>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Stefan Roese <sr@denx.de>
      f8c987f8
  9. 07 May, 2018 1 commit
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      83d290c5
  10. 22 Jan, 2018 1 commit
    • Heinrich Schuchardt's avatar
      vsprintf.c: add EFI device path printing · 256060e4
      Heinrich Schuchardt authored
      For debugging efi_loader we need the capability to print EFI
      device paths. With this patch we can write:
      
          debug("device path: %pD", dp);
      
      A possible output would be
      
          device path: /MemoryMapped(0x0,0x3ff93a82,0x3ff93a82)
      
      This enhancement is not available when building without EFI support
      and neither in the SPL nor in the API example.
      
      A test is provided. It can be executed in the sandbox with command
      ut_print.
      
      The development for EFI support in the sandbox is currently in
      branch u-boot-dm/efi-working. The branch currently lacks
      commit 6ea8b580 ("efi_loader: correct DeviceNodeToText
      for media types"). Ater rebasing the aforementioned branch on
      U-Boot v2018.01 the test is executed successfully.
      
      Without EFI support in the sandbox the test is simply skipped.
      Suggested-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Alexander Graf's avatarAlexander Graf <agraf@suse.de>
      256060e4
  11. 12 Jan, 2018 1 commit
    • Rick Chen's avatar
      riscv: Support standalone · c7d7e80a
      Rick Chen authored
      Run hello_world successfully.
      
      U-Boot 2018.01-rc2-00033-gb265b91-dirty (Dec 22 2017 - 13:54:21 +0800)
      
      DRAM:  1 GiB
      MMC:   mmc@f0e00000: 0
      SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 MiB
      In:    serial@f0300000
      Out:   serial@f0300000
      Err:   serial@f0300000
      Net:
      Warning: mac@e0100000 (eth0) using random MAC address - 0a:47:9b:f8:b4:f2
      eth0: mac@e0100000
      RISC-V # mmc rescan
      RISC-V # fatls mmc 0:1
      318907   u-boot-ae250-64.bin
      1252   hello_world_ae250_32.bin
      328787   u-boot-ae250-32.bin
      
      3 file(s), 0 dir(s)
      
      RISC-V # fatload mmc 0:1 0x600000 hello_world_ae250_32.bin
      reading hello_world_ae250_32.bin
      1252 bytes read in 23 ms (52.7 KiB/s)
      RISC-V # go 0x600000
      Example expects ABI version 9
      Actual U-Boot ABI version 9
      Hello World
      argc = 1
      argv[0] = "0x600000"
      argv[1] = "$B@"
      Hit any key to exit ...
      
      RISC-V #
      Signed-off-by: Rick Chen's avatarRick Chen <rick@andestech.com>
      Signed-off-by: default avatarRick Chen <rickchen36@gmail.com>
      Signed-off-by: default avatarGreentime Hu <green.hu@gmail.com>
      c7d7e80a
  12. 12 Sep, 2017 3 commits
    • Rob Clark's avatar
      examples: add fallback memcpy · 7e3e2056
      Rob Clark authored
      Solves build issue:
      
        Building current source for 134 boards (12 threads, 1 job per thread)
               arm:  +   lsxhl
        +examples/api/vsprintf.o: In function `string16':
        +lib/vsprintf.c:278: undefined reference to `memcpy'
        +examples/api/uuid.o: In function `uuid_bin_to_str':
        +lib/uuid.c:197: undefined reference to `memcpy'
        +lib/uuid.c:199: undefined reference to `memcpy'
        +make[3]: *** [examples/api/demo] Error 1
        +make[2]: *** [examples/api] Error 2
        +make[1]: *** [examples] Error 2
        +make: *** [sub-make] Error 2
          133    0    1 /134    sheevaplug
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      7e3e2056
    • Rob Clark's avatar
      vsprintf.c: add GUID printing · 22ada0c8
      Rob Clark authored
      This works (roughly) the same way as linux's, but we currently always
      print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
      mostly just because that is what uuid_bin_to_str() supports.
      
        %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
        %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10
      
      It will be used by a later efi_loader paths for efi variables and for
      device-path-to-text protocol, and also quite useful for debug prints
      of protocol GUIDs.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Tested-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      22ada0c8
    • Rob Clark's avatar
      vsprintf.c: add UTF-16 string (%ls) support · 274325c5
      Rob Clark authored
      This is convenient for efi_loader which deals a lot with UTF-16.  Only
      enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when
      CC_SHORT_WCHAR is not enabled.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      274325c5
  13. 06 Jul, 2017 1 commit
  14. 16 Jun, 2017 1 commit
  15. 12 Jun, 2017 2 commits
  16. 05 Apr, 2017 3 commits
    • Tom Rini's avatar
      OpenRISC: Remove · 70cc0c34
      Tom Rini authored
      The OpenRISC architecture is currently unmaintained, remove.
      
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      70cc0c34
    • Tom Rini's avatar
      SPARC: Remove · 936478e7
      Tom Rini authored
      The SPARC architecture is currently unmaintained, remove.
      
      Cc: Francois Retief <fgretief@spaceteq.co.za>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      936478e7
    • Tom Rini's avatar
      Blackfin: Remove · ea3310e8
      Tom Rini authored
      The architecture is currently unmaintained, remove.
      
      Cc: Benjamin Matthews <mben12@gmail.com>
      Cc: Chong Huang <chuang@ucrobotics.com>
      Cc: Dimitar Penev <dpn@switchfin.org>
      Cc: Haitao Zhang <hzhang@ucrobotics.com>
      Cc: I-SYST Micromodule <support@i-syst.com>
      Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Martin Strubel <strubel@section5.ch>
      Cc: Peter Meerwald <devel@bct-electronic.com>
      Cc: Sonic Zhang <sonic.adi@gmail.com>
      Cc: Valentin Yakovenkov <yakovenkov@niistt.ru>
      Cc: Wojtek Skulski <info@skutek.com>
      Cc: Wojtek Skulski <skulski@pas.rochester.edu>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      ea3310e8
  17. 20 Jan, 2017 1 commit
    • Tom Rini's avatar
      ARM: Default to using optimized memset and memcpy routines · 40d5534c
      Tom Rini authored
      We have long had available optimized versions of the memset and memcpy
      functions that are borrowed from the Linux kernel.  We should use these
      in normal conditions as the speed wins in many workflows outweigh the
      relatively minor size increase.  However, we have a number of places
      where we're simply too close to size limits in SPL and must be able to
      make the size vs performance trade-off in those cases.
      
      Cc: Philippe Reynes <tremyfr@yahoo.fr>
      Cc: Eric Jarrige <eric.jarrige@armadeus.org>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Magnus Lilja <lilja.magnus@gmail.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Chander Kashyap <k.chander@samsung.com>
      Cc: Akshay Saraswat <akshay.s@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefan Roese <sr@denx.de>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      Acked-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      40d5534c
  18. 15 Aug, 2016 1 commit
  19. 20 May, 2016 2 commits
  20. 08 Feb, 2016 1 commit
  21. 06 Feb, 2016 1 commit
  22. 23 Nov, 2015 1 commit
    • Stefan Roese's avatar
      lib/tiny-printf.c: Add tiny printf function for space limited environments · 7d9cde10
      Stefan Roese authored
      This patch adds a small printf() version that supports all basic formats.
      Its intented to be used in U-Boot SPL versions on platforms with very
      limited internal RAM sizes.
      
      To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
      will result in the SPL using this tiny function and the main U-Boot
      still using the full-blown printf() function.
      
      This code was copied from:
      http://www.sparetimelabs.com/printfrevisited
      With mostly only coding style related changes so that its checkpatch
      clean.
      
      The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
      (Marvell AXP) SPL:
      
      Without this patch:
        58963   18536    1928   79427   13643 ./spl/u-boot-spl
      
      With this patch:
        56542   18536    1956   77034   12cea ./spl/u-boot-spl
      
      Note:
      To make it possible to compile tiny-printf.c instead of vsprintf.c when
      CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
      moved from common/console.c into vsprintf.c in this patch.
      Signed-off-by: Stefan Roese's avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      7d9cde10
  23. 20 Nov, 2015 1 commit
  24. 10 Nov, 2015 2 commits
    • Tom Rini's avatar
      Various Makefiles: Add SPDX-License-Identifier tags · da58dec8
      Tom Rini authored
      After consulting with some of the SPDX team, the conclusion is that
      Makefiles are worth adding SPDX-License-Identifier tags too, and most of
      ours have one.  This adds tags to ones that lack them and converts a few
      that had full (or in one case, very partial) license blobs into the
      equivalent tag.
      
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      da58dec8
    • Albert ARIBAUD's avatar
      arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD · 62e92077
      Albert ARIBAUD authored
      When building a Thumb-1-only target with CONFIG_SYS_THUMB_BUILD,
      some files fail to build, most of the time because they include
      mcr instructions, which only exist for Thumb-2.
      
      This patch introduces a Kconfig option CONFIG_THUMB2 and uses
      it to select between Thumb-2 and ARM mode for the aforementioned
      files.
      Signed-off-by: default avatarAlbert ARIBAUD <albert.u.boot@aribaud.net>
      62e92077
  25. 19 May, 2015 1 commit
  26. 30 Jan, 2015 1 commit
    • Martin Dorwig's avatar
      Export redesign · 49cad547
      Martin Dorwig authored
      this is an atempt to make the export of functions typesafe.
      I replaced the jumptable void ** by a struct (jt_funcs) with function pointers.
      The EXPORT_FUNC macro now has 3 fixed parameters and one
      variadic parameter
      The first is the name of the exported function,
      the rest of the parameters are used to format a functionpointer
      in the jumptable,
      
      the EXPORT_FUNC macros are expanded three times,
      1. to declare the members of the struct
      2. to initialize the structmember pointers
      3. to call the functions in stubs.c
      Signed-off-by: default avatarMartin Dorwig <dorwig@tetronik.com>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      (resending to the list since my tweaks are not quite trivial)
      49cad547
  27. 05 Jan, 2015 1 commit