25 Sep, 2014

2 commits


17 Sep, 2014

1 commit

  • U-Boot has imported various source files from other projects,
    mostly Linux.

    Something like

    #ifdef __UBOOT__
    [ modification for U-Boot ]
    #else
    [ original code ]
    #endif

    is an often used strategy for clarification of adjusted parts,
    that is, easier re-sync in future.

    Instead of defining __UBOOT__ in each source file,
    passing it from the top Makefile would be easier.

    Signed-off-by: Masahiro Yamada
    Acked-by: Marek Vasut
    Acked-by: Heiko Schocher

    Masahiro Yamada
     

14 Sep, 2014

1 commit


11 Sep, 2014

1 commit


05 Sep, 2014

2 commits


26 Aug, 2014

3 commits

  • - move linux specific defines from usb and video code
    into linux/compat.h
    - move common linux specific defines from include/ubi_uboot.h
    to linux/compat.h
    - add for new mtd/ubi/ubifs sync new needed linux specific
    defines to linux/compat.h

    Signed-off-by: Heiko Schocher
    Cc: Marek Vasut
    Cc: Anatolij Gustschin
    [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
    usb/lin_gadet_compat.h]
    Signed-off-by: Tom Rini

    Heiko Schocher
     
  • from linux 3.14:

    commit 455c6fdbd219161bd09b1165f11699d6d73de11c
    Author: Linus Torvalds
    Date: Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

    Needed for the MTD/UBI/UBIFS resync

    Just copied the files from Linux, and added in the c-file
    the "#define __UBOOT__" for adding U-Boot special code. In
    this case we use this just for adding including U-Boot
    headers.

    Signed-off-by: Heiko Schocher
    Cc: Marek Vasut
    Cc: Sergey Lapin
    Cc: Scott Wood
    Cc: Tom Rini

    Heiko Schocher
     
  • resync with linux:

    commit 455c6fdbd219161bd09b1165f11699d6d73de11c
    Author: Linus Torvalds
    Date: Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

    Needed for the MTD/UBI/UBIFS resync

    Just copied the files from Linux, changed the license file header,
    and add in the c-file:

    +#define __UBOOT__
    #include
    +#ifndef __UBOOT__
    #include
    +#else
    +#include
    +#endif

    so, it compiles for U-Boot.

    Signed-off-by: Heiko Schocher
    Cc: Marek Vasut
    Cc: Sergey Lapin
    Cc: Scott Wood
    Cc: Tom Rini

    Heiko Schocher
     

09 Aug, 2014

4 commits

  • If a 32-bit system has 2GB of RAM, and the base address of that RAM is
    2GB, then start+size will overflow a 32-bit value (to a value of 0).

    __lmb_alloc_base is affected by this; it calculates the minimum of
    (start+size of RAM) and max_addr. However, when start+size is 0, it
    is always less than max_addr, which causes the value of max_addr not
    to be taken into account when restricting the allocation's location.

    Fix this by calculating start+size separately, and if that calculation
    underflows, using -1 (interpreted as the max unsigned value) as the
    value instead, and then taking the min of that and max_addr. Now that
    start+size doesn't overflow, it's typically large, and max_addr
    dominates the min() call, and is taken into account.

    The user-visible symptom of this bug is that CONFIG_BOOTMAP_SZ is ignored
    on Tegra124 systems with 2GB of RAM, which in turn causes the DT to be
    relocated at the very end of RAM, which the ARM Linux kernel doesn't map
    during early boot, and which causes boot failures. With this fix,
    CONFIG_BOOTMAP_SZ correctly restricts the relocated DT to a much lower
    address, and everything works.

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • 1. Failure to set the return code correctly
    2. Failure to detect the loop end condition when the value is equal to
    the modulus.

    Reported-by: Jeroen Hofstee
    Signed-off-by: Simon Glass

    Simon Glass
     
  • This brings in changes up to commit f9e91a48 in the libfdt repo.
    Mostly this is whitespace/minor changes. But there are a few new
    features:

    - fdt_size_cells() and fdt_address_cells()
    - fdt_resize()

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Remove the verified boot limitation that only allows a single
    RSA public exponent of 65537 (F4). This change allows use with
    existing PKI infrastructure and has been tested with HSM-based
    PKI.

    Change the configuration OF tree format to store the RSA public
    exponent as a 64 bit integer and implement backward compatibility
    for verified boot configuration trees without this extra field.

    Parameterise vboot_test.sh to test different public exponents.

    Mathematics and other hard work by Andrew Bott.

    Tested with the following public exponents: 3, 5, 17, 257, 39981,
    50457, 65537 and 4294967297.

    Signed-off-by: Andrew Bott
    Signed-off-by: Andrew Wishart
    Signed-off-by: Neil Piercy
    Signed-off-by: Michael van der Westhuizen
    Cc: Simon Glass

    Michael van der Westhuizen
     

23 Jul, 2014

3 commits

  • This simple function returns the node offset of a named alias.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Aliases are used to provide U-Boot's numbering of devices, such as:

    aliases {
    spi0 = "/spi@12330000";
    }

    spi@12330000 {
    ...
    }

    This tells us that the SPI controller at 12330000 is considered to be the
    first SPI controller (SPI 0). So we have a numbering for the SPI node.

    Add a function that returns the numbering for a node assume that it exists
    in the list of aliases.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • If we are to have driver model before relocation we need to support some
    way of calling memory allocation routines.

    The standard malloc() is pretty complicated:

    1. It uses some BSS memory for its state, and BSS is not available before
    relocation

    2. It supports algorithms for reducing memory fragmentation and improving
    performace of free(). Before relocation we could happily just not support
    free().

    3. It includes about 4KB of code (Thumb 2) and 1KB of data. However since
    this has been loaded anyway this is not really a problem.

    The simplest way to support pre-relocation malloc() is to reserve an area
    of memory and allocate it in increasing blocks as needed. This
    implementation does this.

    To enable it, you need to define the size of the malloc() pool as described
    in the README. It will be located above the pre-relocation stack on
    supported architectures.

    Note that this implementation is only useful on machines which have some
    memory available before dram_init() is called - this includes those that
    do no DRAM init (like tegra) and those that do it in SPL (quite a few
    boards). Enabling driver model preior to relocation for the rest of the
    boards is left for a later exercise.

    Signed-off-by: Simon Glass

    Simon Glass
     

22 Jul, 2014

2 commits

  • When this option is enabled, CRLF is treated like LF when importing environments
    from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored.

    Drawback of enabling this option is that (maybe exported) variables which have
    a trailing CR in their content will get imported without that CR. But this
    drawback is very unlikely and the big advantage of letting Windows user create
    a *working* uEnv.txt too is likely more welcome.

    Signed-off-by: Alexander Holler

    Alexander Holler
     
  • As I initially suspected overflow in time handling, I took a detailed
    look at lib/time.c. This adds comments about units being used, reduces
    amount of type casting being done, and makes __udelay() always wait at
    least one tick. (Current code could do no delaying at all for short
    delays).

    Signed-off-by: Pavel Machek

    Pavel Machek
     

19 Jul, 2014

4 commits


23 Jun, 2014

1 commit

  • move fdtdec_get_int() out of lib/fdtdec.c into lib/fdtdec_common.c
    as this function is also used, if CONFIG_OF_CONTROL is not
    used. Poped up on the ids8313 board using signed FIT images,
    and activating CONFIG_SYS_GENERIC_BOARD. Without this patch
    it shows on boot:

    No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d

    With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
    enabled.

    Signed-off-by: Heiko Schocher
    Acked-by: Simon Glass
    Cc: Tom Rini

    Heiko Schocher
     

19 Jun, 2014

3 commits


12 Jun, 2014

2 commits

  • It seems the code tries to trick the compiler the argument
    is actually used. However compilers became too smart to
    fool them so easily an now warn. Gcc and clang don't seem
    to emit a warning when the argument is unused. If so it
    should be decorated with unused / (void).

    Signed-off-by: Jeroen Hofstee

    Jeroen Hofstee
     
  • When writing values into an FDT it is possible that there will be
    insufficient space. If the caller gets a useful error then it can
    potentially deal with the situation.

    Adjust these functions to return -ENOSPC when the FDT is full.

    Signed-off-by: Simon Glass

    Simon Glass
     

02 Jun, 2014

1 commit


28 May, 2014

3 commits

  • Add the ability to display the code offset of an initcall even after it
    is relocated. This makes it much easier to relate initcalls back to the
    U-Boot System.map file.

    Signed-off-by: Simon Glass
    Signed-off-by: Minkyu Kang

    Simon Glass
     
  • The backlight uses FETs on the TPS65090. Enable this so that the display
    is visible.

    Signed-off-by: Simon Glass
    Reviewed-by: Lukasz Majewski
    Signed-off-by: Minkyu Kang

    Simon Glass
     
  • This adds driver support for the TPS65090 PMU. Support includes
    hooking into the pmic infrastructure so that the pmic commands
    can be used on the console. The TPS65090 supports the following
    functionality:

    - fet enable/disable/querying
    - getting and setting of charge state

    Even though it is connected to the pmic infrastructure it does
    not hook into the pmic charging charging infrastructure.

    The device tree binding is from Linux, but only a small subset of
    functionality is supported.

    Signed-off-by: Tom Wai-Hong Tam
    Signed-off-by: Hatim Ali
    Signed-off-by: Katie Roberts-Hoffman
    Signed-off-by: Rong Chang
    Signed-off-by: Sean Paul
    Signed-off-by: Vincent Palatin
    Signed-off-by: Aaron Durbin
    Signed-off-by: Simon Glass
    Signed-off-by: Minkyu Kang

    Tom Wai-Hong Tam
     

23 May, 2014

1 commit


16 May, 2014

1 commit


13 May, 2014

1 commit

  • Commit 2842c1c24269a05142802d25520e7cb9035e456c introduced lib/sha256 into
    mkimage. Since then it will be compiled with HOSTCC which may produce errors
    on some systems. Most BSD systems (like OS X for me) do not ship a
    linux/string.h which will lead to take the U-Boot provided
    include/linux/string.h in the end. This header howver is completely wrong
    here. Just take the string.h if compiling with HOSTCC and linux/string.h when
    not.

    Signed-off-by: Andreas Bießmann
    Cc: Heiko Schocher
    Acked-by: Heiko Schocher

    Andreas Bießmann
     

19 Apr, 2014

1 commit

  • Tegra's crypto.c uses apply_cbc_chain_data() to sign the warm restart
    code. This function was recently moved into the core aes.c and made
    static, which prevents the Tegra code from compiling. Make it public
    again to avoid the compile errors:

    arch/arm/cpu/tegra20-common/crypto.c: In function ‘sign_object’:
    arch/arm/cpu/tegra20-common/crypto.c:74:3: warning: implicit declaration of function ‘apply_cbc_chain_data’ [-Wimplicit-function-declaration]
    arch/arm/cpu/built-in.o: In function `sign_object':
    .../arch/arm/cpu/tegra20-common/crypto.c:74: undefined reference to `apply_cbc_chain_data'
    .../arch/arm/cpu/tegra20-common/crypto.c:78: undefined reference to `apply_cbc_chain_data'

    Fixes: 6e7b9f4fa0ae ("aes: Move the AES-128-CBC encryption function to common code")
    Signed-off-by: Stephen Warren
    Reviewed-by: Simon Glass
    Acked-by: Marek Vasut

    Stephen Warren
     

18 Apr, 2014

1 commit


08 Apr, 2014

1 commit


03 Apr, 2014

1 commit