27 Feb, 2014

1 commit

  • When we tell the compiler to optimize for ARMv7 (and ARMv6 for that
    matter) it assumes a default of SCTRL.A being cleared and unaligned
    accesses being allowed and fast at the hardware level. We set this bit
    and must pass along -mno-unaligned-access so that the compiler will
    still breakdown accesses and not trigger a data abort.

    To better help understand the requirements of the project with respect
    to unaligned memory access, the
    Documentation/unaligned-memory-access.txt file has been added as
    doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1
    tag of the kernel.

    Cc: Albert ARIBAUD
    Cc: Mans Rullgard
    Signed-off-by: Tom Rini

    Tom Rini
     

20 Feb, 2014

2 commits

  • 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:
    scripts/{Makefile.build,Makefile.host,Makefile.lib}.

    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: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     
  • 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 " syntax when descending into the
    sub-directories.

    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="
    syntax for descending into sub-directories.
    (We can write it like "make $(obj)=" with a shorthand.)
    This means the current working directory is always the top
    of the output directory.

    Signed-off-by: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     

13 Feb, 2014

1 commit


04 Feb, 2014

1 commit

  • Tegra124's MMC controller is very similar to earlier SoC generations,
    and can be supported by the same driver.

    However, there are some non-backwards-compatible HW differences, and
    hence a new DT compatible value must be used to describe the HW. This
    patch updates the driver to support that new compatible value.

    That said, the HW differences are only relevant when enabling certain
    high-performance transfer modes. Since the driver is currently very
    simple and doesn't enable those modes, we don't actually need to address
    any of these HW differences in the code yet, hence the simple nature of
    this patch.

    Signed-off-by: Stephen Warren
    Acked-by: Pantelis Antoniou
    Tested-by: Thierry Reding
    Acked-by: Simon Glass
    Signed-off-by: Tom Warren

    Stephen Warren
     

03 Feb, 2014

1 commit

  • Changes:
    - check image bpp instead of resolution when returns logo address
    - remove 32bpp logo
    - add 16bpp logo in two formats: bmp and gzipped bmp
    - init logo address with "0" for unsupported bpp mode
    - update boards configs with proper image size for gunzip
    - extend structure vidinfo by two fields: logo_x_offset and logo_y_offset.

    Signed-off-by: Przemyslaw Marczak
    Tested-by: Hyungwon Hwang
    Signed-off-by: Minkyu Kang

    Przemyslaw Marczak
     

25 Jan, 2014

2 commits

  • When CONFIG_SYS_VSNPRINTF is enabled, it protects print operations
    such as sprintf, snprintf, vsnprintf, etc., from buffer overflows.
    But vsnprintf_internal includes the terminating NULL character in
    the calculation of number of characters written. This affects sprintf
    and snprintf return values. Fix this issue by setting pointer 'str'
    back to the location of the '\0'.

    Signed-off-by: Darwin Rambo
    Reviewed-by: Steve Rae

    Darwin Rambo
     
  • If timer_init() is made a weak stub function, then it allows us to
    remove several empty timer_init functions for those boards that
    already have a timer initialized when u-boot starts. Architectures
    that use the timer framework may also remove the need for timer.c.

    Signed-off-by: Darwin Rambo
    Reviewed-by: Tim Kryger

    Darwin Rambo
     

14 Jan, 2014

1 commit

  • Variable uncompressedSize references the space available, while outSizeFull is
    the actual expected uncompressed size. Using the wrong value causes LzmaDecode
    to return SZ_ERROR_INPUT_EOF. Problem was introduced in commit afca294. While
    at it add additional debug message.

    Signed-off-by: Antonios Vamporakis
    CC: Kees Cook
    CC: Simon Glass
    CC: Daniel Schwierzeck
    CC: Luka Perkov

    Antonios Vamporakis
     

09 Jan, 2014

1 commit

  • Add an implementation of the CRC8 algorithm. This is required by the TPM
    emulation, but is probably useful to U-Boot in general.

    Signed-off-by: Simon Glass

    Signed-off-by: Simon Glass
    Reviewed-by: Simon Glass

    Simon Glass
     

13 Dec, 2013

1 commit

  • Commit 8dfafdde88eb ("Introduce common timer functions") created a
    common definition of usec_to_tick() which had a couple problems:

    static unsigned long long usec_to_tick(unsigned long usec)
    {
    uint64_t tick = usec * get_tbclk();

    That likely overflows.

    usec *= get_tbclk();

    That was an attempt to fix it by performing the multiply after the
    promotion of usec to 64-bit, but was applied to the wrong variable,
    which was never used.

    This patch fixes these issues. A user-visible symptom of the problem was
    the e.g. "dhcp zImage" using an ASIX USB Ethernet dongle would print:

    Waiting for Ethernet connection... unable to connect.

    ... with no delay before "unable to connect". There are likely other
    symptoms.

    Signed-off-by: Stephen Warren
    Acked-by: Rob Herring

    Stephen Warren
     

25 Nov, 2013

2 commits


22 Nov, 2013

1 commit


18 Nov, 2013

1 commit


11 Nov, 2013

1 commit

  • Commit 8dfafdde88eb3e71d5569846396ae67a91017232 introduced
    new gcc warnings on MIPS64:

    time.c: In function 'tick_to_time':
    time.c:59:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    time.c:59:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
    In file included from time.c:10:0:
    ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'
    time.c: In function 'usec_to_tick':
    time.c:76:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    time.c:76:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
    In file included from time.c:10:0:
    ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'

    Signed-off-by: Daniel Schwierzeck

    Daniel Schwierzeck
     

09 Nov, 2013

2 commits


05 Nov, 2013

2 commits

  • Many platforms duplicate pretty much the same timer code yet they all have
    a 32-bit freerunning counter register. Create a common implementation that
    minimally requires 2 or 3 defines to add timer support:

    CONFIG_SYS_TIMER_RATE - Clock rate of the timer counter
    CONFIG_SYS_TIMER_COUNTER - Address of 32-bit counter
    CONFIG_SYS_TIMER_COUNTS_DOWN - Define if counter counts down

    All functions are weak or ifdef'ed so they can still be overriden by any
    platform.

    Signed-off-by: Rob Herring

    Rob Herring
     
  • According to the README, CONFIG_SYS_HZ must be 1000 and most platforms
    follow that. In preparation to remove CONFIG_SYS_HZ from all these
    platforms, provide a common definition. The platforms which use a value
    other than 1000 will get build warning now. These configs are:

    include/configs/M5271EVB.h:#define CONFIG_SYS_HZ 1000000
    include/configs/balloon3.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */
    include/configs/idmr.h:#define CONFIG_SYS_HZ (50000000 / 64)
    include/configs/mini2440.h:#define CONFIG_SYS_HZ 1562500
    include/configs/mx1ads.h:#define CONFIG_SYS_HZ 3686400
    include/configs/omap3_zoom2.h:#define CONFIG_SYS_HZ ((V_SCLK) / (2 << CONFIG_SYS_PTV))
    include/configs/omap730p2.h:#define CONFIG_SYS_HZ ((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))
    include/configs/palmld.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */
    include/configs/palmtc.h:#define CONFIG_SYS_HZ 3686400 /* Timer @ 3686400 Hz */
    include/configs/rsk7203.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/rsk7264.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/rsk7269.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/scb9328.h:#define CONFIG_SYS_HZ 3686400 /* incrementer freq: 3.6864 MHz */
    include/configs/versatile.h:#define CONFIG_SYS_HZ (1000000 / 256)
    include/configs/zipitz2.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */

    Signed-off-by: Rob Herring

    Rob Herring
     

01 Nov, 2013

1 commit


21 Oct, 2013

1 commit


15 Oct, 2013

2 commits


20 Sep, 2013

1 commit


04 Sep, 2013

3 commits


10 Aug, 2013

1 commit


24 Jul, 2013

5 commits


23 Jul, 2013

1 commit


17 Jul, 2013

1 commit

  • Extend the tpm library with support for single authorized (AUTH1) commands
    as specified in the TCG Main Specification 1.2. (The internally used helper
    functions are implemented in a way that they could also be used for double
    authorized commands if someone needs it.)

    Provide enums with the return codes from the TCG Main specification.

    For now only a single OIAP session is supported.

    OIAP authorized version of the commands TPM_LoadKey2 and TPM_GetPubKey are
    provided. Both features are available using the 'tpm' command, too.

    Authorized commands are enabled with CONFIG_TPM_AUTH_SESSIONS. (Note that
    this also requires CONFIG_SHA1 to be enabled.)

    Signed-off-by: Reinhard Pfau
    Signed-off-by: Dirk Eibach
    Acked-by: Che-Liang Chiou
    Signed-off-by: Andy Fleming

    Reinhard Pfau
     

12 Jul, 2013

2 commits


03 Jul, 2013

1 commit


26 Jun, 2013

1 commit