14 Dec, 2014

1 commit

  • Move GD_BIST from lib/asm-offsets.c to arch/x86/lib/asm-offsets.c
    as it is x86 arch specific stuff. Also remove GENERATED_GD_RELOC_OFF
    which is not referenced anymore.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass

    Bin Meng
     

12 Dec, 2014

2 commits

  • The functions error's numbers are standarized - but the error
    messages are not.

    The errors are often handled with unclear error messages,
    so why not use an errno standarized messages.

    Advantages:
    - This could decrease the binary size.
    - Appended with a detailed information,
    the error message will be clear.

    This commit introduces new function:
    - const char *errno_to_str(int errno)

    The functions returns a pointer to the errno corresponding text message:
    - if errno is null or positive number - a pointer to "Success" message
    - if errno is negative - a pointer to errno related message

    Signed-off-by: Przemyslaw Marczak
    Reviewed-by: Tom Rini

    Przemyslaw Marczak
     
  • Move strlcpy() definition from drivers/usb/gadget/ether.c to
    lib/string.c because it is a very useful function.
    Let's add the prototype to include/linux/string.h too.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     

08 Dec, 2014

4 commits


02 Dec, 2014

2 commits


28 Nov, 2014

1 commit


27 Nov, 2014

1 commit


25 Nov, 2014

5 commits


23 Nov, 2014

1 commit

  • Provide a new modifier to vsprintf() to print phys_addr_t variables to
    avoid having to cast or #ifdef when printing them out. The %pa modifier
    is used for this purpose, so phys_addr_t variables need to be passed by
    reference, like so:

    phys_addr_t start = 0;

    printf("start: %pa\n", &start);

    Depending on the size of phys_addr_t this will print out the address
    with 8 or 16 hexadecimal digits following a 0x prefix.

    Signed-off-by: Thierry Reding
    Tested-by: Stephen Warren
    Signed-off-by: Simon Glass

    Thierry Reding
     

22 Nov, 2014

1 commit


21 Nov, 2014

9 commits

  • Implement SDRAM init using the Memory Reference Code (mrc.bin) provided in
    the board directory and the SDRAM SPD information in the device tree. This
    also needs the Intel Management Engine (me.bin) to work. Binary blobs
    everywhere: so far we have MRC, ME and microcode.

    SDRAM init works by setting up various parameters and calling the MRC. This
    in turn does some sort of magic to work out how much memory there is and
    the timing parameters to use. It also sets up the DRAM controllers. When
    the MRC returns, we use the information it provides to map out the
    available memory in U-Boot.

    U-Boot normally moves itself to the top of RAM. On x86 the RAM is not
    generally contiguous, and anyway some RAM may be above 4GB which doesn't
    work in 32-bit mode. So we relocate to the top of the largest block of
    RAM we can find below 4GB. Memory above 4GB is accessible with special
    functions (see physmem).

    It would be possible to build U-Boot in 64-bit mode but this wouldn't
    necessarily provide any more memory, since the largest block is often below
    4GB. Anyway U-Boot doesn't need huge amounts of memory - even a very large
    ramdisk seldom exceeds 100-200MB. U-Boot has support for booting 64-bit
    kernels directly so this does not pose a limitation in that area. Also there
    are probably parts of U-Boot that will not work correctly in 64-bit mode.
    The MRC is one.

    There is some work remaining in this area. Since memory init is very slow
    (over 500ms) it is possible to save the parameters in SPI flash to speed it
    up next time. Suspend/resume support is not fully implemented, or at least
    it is not efficient.

    With this patch, link boots to a prompt.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Microcode updates are stored in the device tree. Work through these and
    apply any that are needed.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Sometimes an array can be of variable size up to a maximum. Add a helper
    function to decode this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The built in self test value is available in register eax on start-up. Save
    it so that it can be accessed later. Unfortunately we must wait until the
    global_data is available before we can do this, so there is a little bit of
    shuffling to keep it around.

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

    Simon Glass
     
  • Permit decoding of a named memory region from the device tree. This allows
    easy run-time configuration of the address of on-chip SRAM, SDRAM, etc.

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

    Simon Glass
     
  • Flash regions can optionally be compressed or hashed. Add the ability to
    read this information from the flashmap.

    Signed-off-by: Simon Glass
    Acked-by: Anatolij Gustschin
    Reviewed-by: Tom Rini

    Simon Glass
     
  • Use the correct FDT data types for this function. Also add more debugging.

    Acked-by: Anatolij Gustschin
    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     
  • U-Boot has imported various utility macros from Linux
    scattering them to various places without consistency.

    In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
    container_of, DIV_ROUND_UP, etc.
    In include/linux/compat.h are min_t, max_t, round_up, round_down,
    etc.
    We also have duplicated defines of min_t in some *.c files.

    Moreover, we are suffering from too cluttered include/common.h.

    This commit moves various macros that originate in
    include/linux/kernel.h of Linux to their original position.

    Note:
    This commit simply moves the macros; the macros roundup,
    min, max, min2, max3, ARRAY_SIZE are different
    from those of Linux at this point.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The Linux-compatible macro DIV_ROUND_CLOSEST is a bit more flexible
    and safer than DIV_ROUND.

    For example,
    foo = DIV_ROUND_CLOSEST(x, y++)
    works expectedly, but
    foo = DIV_ROUND(x, y++)
    does not. (y is incremented twice.)

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

27 Oct, 2014

3 commits


25 Oct, 2014

1 commit


24 Oct, 2014

2 commits

  • The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
    Those architectures should "select" HAVE_PRIVATE_LIBGCC and
    CONFIG_USE_PRIVATE_LIBGCC should depend on it.

    Currently, this option is enabled on Tegra boards and x86 architecture.
    Move the definition from header files to Kconfig.

    Signed-off-by: Masahiro Yamada
    Tested-by: Simon Glass
    Acked-by: Simon Glass
    Cc: Stephen Warren
    Cc: Tom Warren

    Masahiro Yamada
     
  • CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
    (but some boards still have redundant definitions).

    This commit moves the definition and the document in README to
    Kconfig. Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
    the sanity check in lib/time.c should be removed.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Marek Vasut

    Masahiro Yamada
     

23 Oct, 2014

7 commits