1. 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: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
  2. 15 Aug, 2016 1 commit
  3. 20 May, 2016 2 commits
  4. 08 Feb, 2016 1 commit
  5. 06 Feb, 2016 1 commit
  6. 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:
      With mostly only coding style related changes so that its checkpatch
      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
      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: default 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>
  7. 20 Nov, 2015 1 commit
  8. 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: default avatarTom Rini <trini@konsulko.com>
    • 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
      Signed-off-by: default avatarAlbert ARIBAUD <albert.u.boot@aribaud.net>
  9. 19 May, 2015 1 commit
  10. 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: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      (resending to the list since my tweaks are not quite trivial)
  11. 05 Jan, 2015 1 commit
  12. 16 Sep, 2014 2 commits
  13. 23 May, 2014 1 commit
  14. 17 Apr, 2014 1 commit
  15. 07 Mar, 2014 2 commits
    • Masahiro Yamada's avatar
      powerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260 · 58dac327
      Masahiro Yamada authored
      Before this commit, CONFIG_MPC8260 and CONFIG_8260
      were used mixed-up.
      All boards with mpc8260 cpu defined both of them:
        - CONFIG_MPC8260 was defined in board config headers
            and include/common.h
        - CONFIG_8260 was defined arch/powerpc/cpu/mpc8260/config.mk
      We do not need to have both of them.
      This commit keeps only CONFIG_MPC8260.
      This commit does:
       - Delete CONFIG_8260 and CONFIG_MPC8260 definition
         in config headers and include/common.h
       - Rename CONFIG_8260 to CONFIG_MPC8260
          in arch/powerpc/cpu/mpc8260/config.mk.
       - Rename #ifdef CONFIG_8260 to #ifdef CONFIG_MPC8260
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Wolfgang Denk <wd@denx.de>
    • Masahiro Yamada's avatar
      kbuild: improve Kbuild speed · 026f9cf2
      Masahiro Yamada authored
      Kbuild brought about many advantages for us but a significant
      performance regression was reported by Simon Glass.
      After some discussions and analysis, it turned out
      its main cause is in $(call cc-option,...).
      Historically, U-Boot parses all config.mk
      (arch/*/config.mk and board/*/config.mk)
      every time descending into subdirectories.
      That means cc-options are evaluated over and over again.
      $(call cc-option,...) is useful but costly.
      So we want to evaluate them only in ./Makefile
      and spl/Makefile and export compiler flags.
      This commit changes the build system as follows:
        - Modify scripts/Makefile.build to not include config.mk
          Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
        - Export many variables
          Going forward, Kbuild will not parse config.mk files
          when it descends into subdirectories.
          If we want to set variables in config.mk and use them
          in subdirectories, they must be exported.
          This is the list of variables to get exported:
              (used in nand_spl/board/*/*/Makefile)
              (used in examples/standalone/Makefile)
              (used in examples/standalone/Makefile)
              (used in examples/standalone/Makefile)
        - Delete CPPFLAGS
          This variable has been replaced with PLATFORM_CPPFLAGS
        - Copy gcclibdir from example/standalone/Makefile
          to arch/sparc/config.mk
          The reference in CONFIG_STANDALONE_LOAD_ADDR must be
          resolved before it is exported.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Reported-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: Simon Glass <sjg@chromium.org> [on Sandbox]
      Tested-by: Stephen Warren <swarren@nvidia.com> [on Tegra]
  16. 25 Feb, 2014 2 commits
  17. 19 Feb, 2014 6 commits
    • Masahiro Yamada's avatar
    • Masahiro Yamada's avatar
      kbuild: use Linux Kernel build scripts · 6825a95b
      Masahiro Yamada authored
      Now we are ready to switch over to real Kbuild.
      This commit disables temporary scripts:
        scripts/{Makefile.build.tmp, Makefile.host.tmp}
      and enables real Kbuild scripts:
      This switch is triggered by the line in scripts/Kbuild.include
        -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
        +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
      We need to adjust some build scripts for U-Boot.
      But smaller amount of modification is preferable.
      Additionally, we need to fix compiler flags which are
      locally added or removed.
      In Kbuild, it is not allowed to change CFLAGS locally.
      Instead, ccflags-y, asflags-y, cppflags-y,
      CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
      are prepared for that purpose.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
    • Masahiro Yamada's avatar
      kbuild: change out-of-tree build · 9e414032
      Masahiro Yamada authored
      This commit changes the working directory
      where the build process occurs.
      Before this commit, build process occurred under the source
      tree for both in-tree and out-of-tree build.
      That's why we needed to add $(obj) prefix to all generated
      files in makefiles like follows:
        $(obj)u-boot.bin:  $(obj)u-boot
      Here, $(obj) is empty for in-tree build, whereas it points
      to the output directory for out-of-tree build.
      And our old build system changes the current working directory
      with "make -C <sub-dir>" syntax when descending into the
      On the other hand, Kbuild uses a different idea
      to handle out-of-tree build and directory descending.
      The build process of Kbuild always occurs under the output tree.
      When "O=dir/to/store/output/files" is given, the build system
      changes the current working directory to that directory and
      restarts the make.
      Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
      syntax for descending into sub-directories.
      (We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
      This means the current working directory is always the top
      of the output directory.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
    • Masahiro Yamada's avatar
      Makefile: move some flags to examples makefiles · d9580025
      Masahiro Yamada authored
      This commit moves some flags which are used
      under examples/ directory only.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
    • Masahiro Yamada's avatar
      Makfile: move suffix rules to Makefile.build · 5651ccff
      Masahiro Yamada authored
      This commit moves suffix rules from config.mk
      to scripts/Makefile.build, which will allow us
      to switch smoothly to real Kbuild.
      post/lib_powerpc/fpu/Makefile has
      its own rule to compile C sources.
      We need to tweak it to keep the same behavior.
      There are two file2 with the same name:
      arch/arm/lib/crt0.S and eamples/api/crt0.S.
      To keep the same build behavior,
      examples/api/Makefile also has to be treaked.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
    • Masahiro Yamada's avatar
  18. 07 Feb, 2014 1 commit
  19. 09 Jan, 2014 1 commit
  20. 16 Dec, 2013 3 commits
  21. 12 Dec, 2013 1 commit
    • Jeroen Hofstee's avatar
      ARM: fix the standalone programs · a5a42eec
      Jeroen Hofstee authored
      The standalone programs do not use the api calls, but rely
      directly on u-boot variable gd->jt for the jump table. Commit
      fe1378a9 - "ARM: use r9 for gd" changed the register holding
      the address of gd, but the assembly code in the standalone
      examples was not updated accordingly. This broke the programs
      on ARM relying on the jumptable in the v2013.10 release.
      This patch unbricks them by using the correct register.
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Signed-off-by: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
  22. 25 Nov, 2013 2 commits
  23. 15 Nov, 2013 1 commit
  24. 08 Nov, 2013 1 commit
  25. 04 Nov, 2013 1 commit
  26. 20 Sep, 2013 1 commit
  27. 12 Sep, 2013 1 commit
    • Tom Rini's avatar
      Revert "standalone-examples: support custom GCC lib" · 8386ca8b
      Tom Rini authored
      After further testing, this patch has two problems.  First,
      examples/standalone/Makefile was already inherting PLATFORM_LIBS from
      the top-level Makefile so this lead to duplicating the private libgcc.
      Second, currently the private libgcc has a reference to 'hang' that is
      not being fulfilled.
      This reverts commit 4412db46.
      Signed-off-by: default avatarTom Rini <trini@ti.com>