15 Jan, 2017

21 commits

  • Some refactoring of the top-level Kconfig file which includes:

    * using "if" to remove numerous identical dependency tests
    * reordering config entries to group related ones
    * spelling and grammar fixes

    There should be no functional changes, only aesthetic ones.

    Signed-off-by: Robert P. J. Day

    Robert P. J. Day
     
  • When using ARMv8 with ARMV8_SPIN_TABLE=y, we want the slave cores to
    wait on spin_table_cpu_release_addr, until the Linux kernel will "wake" them
    by writing to that location. The address of spin_table_cpu_release_addr is
    transferred to the kernel using the device tree that is updated by
    spin_table_update_dt().

    However, if we also use SPL, then the slave cores are stuck at
    CPU_RELEASE_ADDR instead and as a result, never wake up.

    This patch releases the slave cores by writing spl_image->entry_point to
    CPU_RELEASE_ADDR location before the end of the SPL code
    (at jump_to_image_no_args()).

    That way, the slave cores will start to execute the u-boot and will get to
    the spin-table code and wait on the correct address
    (spin_table_cpu_release_addr).

    Signed-off-by: Oded Gabbay
    Cc: Simon Glass
    Reviewed-by: Simon Glass

    Oded Gabbay
     
  • This was imported from Linux 4.9 and adjusted for U-Boot.

    - Replace the license block with SPDX
    - Drop all *_atomic variants, which make no sense for U-Boot
    - Remove the sleep_us argument, which makes no sense for U-Boot

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • It is not safe to compare timer values directly.

    On 32-bit systems, for example, timer_get_us() wraps around every
    72 min. (2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min). Depending on
    the get_ticks() implementation, it may wrap more frequently.
    The 72 min might be possible on the use of U-Boot.

    Let's borrow time_after, time_before, and friends to solve the
    wrap-around problem.

    These macros were copied from include/linux/jiffies.h of Linux 4.9.

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

    Masahiro Yamada
     
  • Copied from Linux 4.9.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The include/common.h is a collection of unrelated declarations,
    macros, etc.

    It is horrible to include such a cluttered header just for some
    timer functions. Split out timer functions into include/time.h.

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

    Masahiro Yamada
     
  • Currently, mdelay() and udelay() are declared in include/common.h,
    while ndelay() in include/linux/compat.h. It would be nice to
    collect them into include/linux/delay.h like Linux.

    While we are here, fix the ndelay() implementation; I used the
    DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer*
    than the given period of time.

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

    Masahiro Yamada
     
  • Using CONFIG_IS_ENABLED() doesn't work in SPL. This patch replaces the only
    occurrence of CONFIG_IS_ENABLED() in start.S to a regular #if defined().
    It also adds "&& !defined(CONFIG_SPL_BUILD)" to that #if statement because
    the spin-table code can't currently work in SPL, and the spin-table file
    isn't even compiled in SPL.

    Signed-off-by: Oded Gabbay

    Oded Gabbay
     
  • Add a new top-level config option so support booting an image stored
    in RAM. This allows to move the RAM boot support into a sparate file
    and having a single condition to compile that file.

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • This converts the following to Kconfig:
    CONFIG_SPL_RAM_DEVICE

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • On AM33xx devices the secure ROM uses a different call index for
    signature verification, the function and arguments are the same.

    Signed-off-by: Andrew F. Davis

    Andrew F. Davis
     
  • This allows us to specify a FIT configuration that will automatically
    use the correct images from the FIT blob.

    Signed-off-by: Andrew F. Davis

    Andrew F. Davis
     
  • Changes involving High-Security boards should be CC'd for additional
    assessment of the security implications.

    Signed-off-by: Andrew F. Davis

    Andrew F. Davis
     
  • Since commit aa6ab905b2, sata_initialize returns -1 if init_sata or
    scan_sata fails. But this return value becomes the do_sata return
    value which is equivalent to CMD_RET_USAGE.

    In case one issues 'sata init' and that the hardware fails to
    initialize, there's no need to display the command usage. Instead
    the command shoud just return the CMD_RET_FAILURE value.

    Fixes: aa6ab905b2 (sata: fix sata command can not being executed bug)

    Signed-off-by: Gary Bisson
    Reviewed-by: Eric Nelson
    Reviewed-by: Simon Glass

    Gary Bisson
     
  • There is no CONFIG_OF_PLATDATA, only CONFIG_SPL_OF_PLATDATA, so rename
    the two references to CONFIG_OF_PLATDATA to CONFIG_SPL_OF_PLATDATA.

    Signed-off-by: Tom Rini

    Tom Rini
     
  • This re-syncs the MACH_TYPE_xxx values from the Linux Kernel v4.9
    release. In addition this removes all of the machine_arch_type and
    machine_is_xxx logic that is unused in U-Boot. This removal removes a
    large number of otherwise unused CONFIG values from the list to be
    converted.

    Cc: Masahiro Yamada
    Signed-off-by: Tom Rini
    Tested-by: Adam Ford

    Tom Rini
     
  • Before we can sync with the latest mach-types.h file from the Linux
    Kernel we need to remove some instances of MACH_TYPE_xxx from our
    sources. As these values have been removed from the canonical upstream
    source we should not be using them either, so drop.

    Cc: Tom Warren
    Cc: Lucas Stach
    Cc: Luka Perkov
    Cc: Stephen Warren
    Cc: Heiko Schocher
    Cc: Thomas Weber
    Cc: Lucile Quirion
    Cc: Matthias Weisser
    Cc: Suriyan Ramasami
    Cc: Nobuhiro Iwamatsu
    Cc: Bo Shen
    Cc: Nick Thompson
    Cc: Stefano Babic
    Cc: Erik van Luijk
    Cc: Lokesh Vutla
    Signed-off-by: Tom Rini

    Tom Rini
     
  • The MACH_TYPE for IGEP0032 was never officially used and has been
    removed from upstream, so we must not use it. In order to remove this
    we need to rework the status LED logic.

    Cc: Enric Balletbo i Serra
    Signed-off-by: Tom Rini
    Acked-by: Enric Balletbo i Serra

    Tom Rini
     
  • The MACH_TYPE values for the omap37xx based platforms are no longer
    officially valid, so we must not set and pass them. In order to not
    reference them but still be able to set the default fdtfile based on the
    board detection logic we need to combine the two steps into one.

    Cc: Adam Ford
    Signed-off-by: Tom Rini
    Acked-by: Adam Ford

    Tom Rini
     
  • Tom Rini
     
  • On a Raspberry Pi 2 disagreements on cell endianness can be observed:

    U-Boot> fdt print /soc/gpio@7e200000 phandle
    phandle =
    U-Boot> fdt get value myvar /soc/gpio@7e200000 phandle; printenv myvar
    myvar=0x0D000000

    Fix this by always treating the pointer as BE and converting it in
    fdt_value_setenv(), like its counterpart fdt_parse_prop() already does.

    Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32().

    Fixes: bc80295 ("fdt: Add get commands to fdt")
    Cc: Joe Hershberger
    Cc: Gerald Van Baren
    Signed-off-by: Andreas Färber
    Acked-by: Simon Glass

    Andreas Färber
     

14 Jan, 2017

2 commits

  • There are lots of reason why a FDT application might fail, the
    error code might give an indication. Let the error code translate
    in a error string so users can try to understand what went wrong.

    Signed-off-by: Stefan Agner
    Acked-by: Maxime Ripard
    Acked-by: Simon Glass

    Stefan Agner
     
  • The fdt_overlay_apply() function purports to support the edge cases where
    an overlay has no fixups to be applied, or a base tree which has no
    symbols (the latter can only work if the former is also true). However it
    gets it wrong in a couple of small ways:

    * In the no fixups case, it doesn't fail immediately, but will attempt
    fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node
    offset, which will fail. Instead it should succeed immediately, since
    there's nothing to do.
    * In the case of no symbols, it again doesn't fail immediately. However
    if there is an actual fixup it will fail with an unexpected error,
    because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to
    look up the symbols. We should instead return -FDT_ERR_NOTFOUND
    directly.

    Both of these errors lead to the code returning misleading error codes in
    failing cases.

    [ DTC commit: 7d8ef6e1db9794f72805a0855f4f7f12fadd03d3 ]

    Signed-off-by: David Gibson
    Signed-off-by: Stefan Agner
    Acked-by: Simon Glass

    David Gibson
     

13 Jan, 2017

6 commits


12 Jan, 2017

11 commits