1. 03 Jun, 2016 21 commits
    • Marek Vasut's avatar
      lib: Enable private libgcc by default · 91b86e21
      Marek Vasut authored
      This patch decouples U-Boot binary from the toolchain on systems where
      private libgcc is available. Instead of pulling in functions provided
      by the libgcc from the toolchain, U-Boot will use it's own set of libgcc
      functions. These functions are usually imported from Linux kernel, which
      also uses it's own libgcc functions instead of the ones provided by the
      toolchain.
      
      This patch solves a rather common problem. The toolchain can usually
      generate code for many variants of target architecture and often even
      different endianness. The libgcc on the other hand is usually compiled
      for one particular configuration and the functions provided by it may
      or may not be suited for use in U-Boot. This can manifest in two ways,
      either the U-Boot fails to compile altogether and linker will complain
      or, in the much worse case, the resulting U-Boot will build, but will
      misbehave in very subtle and hard to debug ways.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      91b86e21
    • Marek Vasut's avatar
      arm: lib: Split asm symbols into different .text subsections · 13b0a91a
      Marek Vasut authored
      Split each symbol in lib1funcs into different .text.foo section instead
      of placing all of them into plain .text . This allows the linker to collect
      and discard unused assembler symbols.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      13b0a91a
    • Marek Vasut's avatar
      arm: lib: Import Thumb1 functions · 806f86bd
      Marek Vasut authored
      Import functions into lib1funcs.S which are required for Thumb1
      build. These functions come from gcc 5.3.1 release.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      806f86bd
    • Marek Vasut's avatar
      arm: lib: import muldi3.S from Linux · 0bf65c64
      Marek Vasut authored
      Import muldi3.S from Linux 4.4.6 , commit 0d1912303e54ed1b2a371be0bba51c384dd57326
      on arm32. This file implements __aeabi_lmul and it's alias __muldi3, which
      is needed when doing Thumb1 builds.
      
      This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
      which is necessary for correct build of these files both in ARM and
      Thumb mode, just like Linux does.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      0bf65c64
    • Marek Vasut's avatar
      arm: lib: Repair Warning: conditional infixes are deprecated in unified syntax · 40d67c75
      Marek Vasut authored
      Fix the following warning when building for thumb2 target by tweaking the
      instruction syntax:
      
      Warning: conditional infixes are deprecated in unified syntax
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      40d67c75
    • Marek Vasut's avatar
      arm: lib: Import __do_div64 from Linux · 7b9f9c5d
      Marek Vasut authored
      Import __do_div64 from Linux 4.4.6 , commit 0d1912303e54ed1b2a371be0bba51c384dd57326
      on arm32. This function is for some toolchains, which generate _udivmoddi4()
      for 64 bit division.
      
      Since we do not support stack unwinding, instead of importing the whole
      asm/unwind.h and all the baggage, this patch defines empty UNWIND() macro.
      
      This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
      which is necessary for correct build of these files both in ARM and
      Thumb mode, just like Linux does.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      7b9f9c5d
    • Marek Vasut's avatar
      arm: lib: Fix uldivmod.S build on Thumb2 · e64d7594
      Marek Vasut authored
      This assembler source won't build in Thumb2 mode, so fix it adding
      the necessary Thumb2 conditional macros from unified.h .
      
      This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
      which is necessary for correct build of these files both in ARM and
      Thumb mode, just like Linux does.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      e64d7594
    • Marek Vasut's avatar
      arm: lib: Sync libgcc 32b division/modulo operations · c5a543ea
      Marek Vasut authored
      Sync the libgcc 32bit division and modulo operations with Linux 4.4.6 ,
      commit 0d1912303e54ed1b2a371be0bba51c384dd57326 . The functions in these
      four files are present in lib1funcs.S in Linux, so replace these files
      with lib1funcs.S from Linux.
      
      Since we do not support stack unwinding, instead of importing the whole
      asm/unwind.h and all the baggage, this patch defines empty UNWIND() macro
      in lib1funcs.S . Moreover, to make all of the functions available, define
      CONFIG_AEABI , which is safe, because U-Boot is always compiled with ARM
      EABI.
      
      This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
      which is necessary for correct build of these files both in ARM and
      Thumb mode, just like Linux does.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      c5a543ea
    • Marek Vasut's avatar
      arm: lib: Sync libgcc shift operations · 06b36cb7
      Marek Vasut authored
      Sync the libgcc shift operations with Linux kernel 4.4.6 , commit
      0d1912303e54ed1b2a371be0bba51c384dd57326 . Syncing these three
      files is easy, as there is almost no change in them, except the
      addition of Thumb support.
      
      This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
      which is necessary for correct build of these files both in ARM and
      Thumb mode, just like Linux does.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      06b36cb7
    • Marek Vasut's avatar
      arm: lib: Drop underscore from private libgcc filenames · 11b1a9b2
      Marek Vasut authored
      Drop the underscore from the filenames of files implementing libgcc
      routines. There is no functional change. This change is done to make
      sync with Linux kernel easier.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      11b1a9b2
    • Marek Vasut's avatar
      arm: include: Import unified.h from Linux kernel · c0db6f8d
      Marek Vasut authored
      Import unified.h from Linux kernel 4.4.6 , commit
      0d1912303e54ed1b2a371be0bba51c384dd57326 . This header file contains
      macros used in libgcc functions in Linux kernel on ARM and will be
      needed for the libgcc sync.
      
      Since unified.h defines the W(instr) macro, we must drop this from
      the macro from memcpy.S , otherwise this triggers a warning about
      symbol redefinition. In order to keep the changes to unified.h to
      the minimum, tweak arch/arm/lib/Makefile such that it defines the
      CONFIG_ARM_ASM_UNIFIED macro, which places .syntax unified into all
      of the assembler files. This is mandatory.
      
      Moreover, for Thumb2 build, define CONFIG_THUMB2_KERNEL macro if and
      only if Thumb2 build is enabled. This macro is checked by unified.h
      and toggles between ARM and Thumb2 variant of the instructions in the
      assembler source files.
      
      Finally, this patch defines __LINUX_ARM_ARCH__=N macro based on the
      new CONFIG_SYS_ARM_ARCH Kconfig option. This macro selects between
      more optimal and more dense codepaths which work on armv5 and newer
      and less optimal codepaths which work on armv4 and possible armv3m.
      Tegra2 needs the same special handling as it does in arch/arm/Makefile
      to cater for the arm720t boot core.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      c0db6f8d
    • Marek Vasut's avatar
      arm: config: Introduce CONFIG_SYS_ARM_ARCH · 66020a67
      Marek Vasut authored
      Introduce new helper Kconfig option, which is automatically set to
      the version of ARM architecture for which the U-Boot is built. This
      is useful when selecting tuning options in the libgcc imported from
      Linux kernel.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      66020a67
    • Marek Vasut's avatar
      ARM: omap: Enable tiny printf on omap3_logic · e68df999
      Marek Vasut authored
      Enable support for tiny printf on the omap3_logic board to trim down
      the SPL size. This makes the SPL actually build again and fit into
      the SRAM.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: lesne@alse-fr.com
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      e68df999
    • Marek Vasut's avatar
      tiny-printf: Support sprintf() · abeb272d
      Marek Vasut authored
      Add a simple version of this function for SPL. It does not check the buffer
      size as this would add to the code size.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: lesne@alse-fr.com
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSylvain Lesne <lesne@alse-fr.com>
      Tested-by: default avatarSylvain Lesne <lesne@alse-fr.com>
      abeb272d
    • Marek Vasut's avatar
      arm: Select CONFIG_ARM64 for Cavium ThunderX · b4ba1693
      Marek Vasut authored
      Select the config option, since this board is ARM64.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      b4ba1693
    • Marek Vasut's avatar
      mips: wdr4300: Move the CONFIG_USE_PRIVATE_LIBGCC to Kconfig · 35016e39
      Marek Vasut authored
      This fixes the last remaining libgcc warning, where the symbol was
      defined twice.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      35016e39
    • Marek Vasut's avatar
      spl: Allow settings malloc_f base address · 94b9e22e
      Marek Vasut authored
      Allow configuring the begining of the malloc_f area in SPL.
      This patch uses the same CONFIG_MALLOC_F_ADDR established by
      the sandbox.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      94b9e22e
    • Marek Vasut's avatar
      serial: 16550: Drop OMAP1510 support · 03c6f176
      Marek Vasut authored
      The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      03c6f176
    • Marek Vasut's avatar
      serial: 16550: Make serial_io/out_shift available to debug mode · fa4ce723
      Marek Vasut authored
      The ns16550 driver needs serial_in_shift() and serial_out_shift()
      when compiled in debug UART mode, so shift the DM_SERIAL check a
      little to make these functions available.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      fa4ce723
    • Marek Vasut's avatar
      gpio: mxs: Remove netdev.h · 307c0b51
      Marek Vasut authored
      The MXS certainly does not support any sort of networking in GPIO code,
      remove the netdev.h header.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      307c0b51
    • Marek Vasut's avatar
      arm: Treat arm946es as v5te · 626f6e4f
      Marek Vasut authored
      The arm946es is armv5te , so use -march=armv5te instead of armv4t.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Tom Rini <trini@konsulko.com>
      626f6e4f
  2. 01 Jun, 2016 1 commit
  3. 31 May, 2016 18 commits