25 Nov, 2014

4 commits


24 Nov, 2014

3 commits

  • Implement sata stop command.
    This introduces the __sata_stop() weak function, which mirrors
    the weak __sata_initialize() function, giving users the option of
    undoing the custom steps performed in overrides of sata_initialize().

    Signed-off-by: Nikita Kiryanov
    Cc: Marek Vasut
    Cc: Tom Rini

    Nikita Kiryanov
     
  • Add reset_sata() to the sata driver interface and implement it
    for dwc_ahsata. This function cleans up after sata_init(), and
    therefore accepts a device number like sata_init() does.
    A dummy implementation is provided for the rest of the drivers.

    Signed-off-by: Nikita Kiryanov
    Cc: Simon Glass
    Cc: Stefano Babic

    Nikita Kiryanov
     
  • Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options, this is a
    preparation patch for adding an env variable to choose between secure /
    non-secure boot on non-secure boot capable systems, specifically this
    prepares for adding CONFIG_ARMV7_BOOT_SEC_DEFAULT as a proper Kconfig option.

    Signed-off-by: Hans de Goede

    Hans de Goede
     

23 Nov, 2014

10 commits

  • The sandbox/ext4/fat/generic fs commands do not gracefully deal with files
    greater than 2GB. Negative values are returned in such cases.

    To handle this, the fs functions have been modified to take an additional
    parameter of type "* loff_t" which is then populated. The return value
    of the fs functions are used only for error conditions.

    Signed-off-by: Suriyan Ramasami
    Acked-by: Simon Glass
    [trini: Update board/gdsys/p1022/controlcenterd-id.c,
    drivers/fpga/zynqpl.c for changes]
    Signed-off-by: Tom Rini

    Suriyan Ramasami
     
  • Change the internal sandbox functions to use loff_t for file offsets.

    Signed-off-by: Suriyan Ramasami

    Acked-by: Simon Glass

    Suriyan Ramasami
     
  • Change the internal EXT4 functions to use loff_t for offsets.

    Signed-off-by: Suriyan Ramasami
    Acked-by: Simon Glass
    [trini: Update common/spl/spl_ext.c]
    Signed-off-by: Tom Rini

    Suriyan Ramasami
     
  • Change the internal FAT functions to use loff_t for offsets.

    Signed-off-by: Suriyan Ramasami
    Acked-by: Simon Glass
    [trini: Fix fs/fat/fat.c for min3 updates]
    Signed-off-by: Tom Rini

    Suriyan Ramasami
     
  • Enable md5sum to obtain the MD5 of the read and written files to check
    their contents for validity.
    Use map_sysmem() to map buffer in a sandbox environment.

    Signed-off-by: Suriyan Ramasami

    Acked-by: Simon Glass

    Suriyan Ramasami
     
  • Since commit 0defddc851ed (config: Add a default CONFIG_SYS_PROMPT),
    each board header does not need to define CONFIG_SYS_PROMPT
    as long as it uses the default prompt "=> ".

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • This macro can be overridden in source files (before including common.h)
    and can be used to specify a prefix for debug and error messages. An
    example of how to use this is shown below:

    #define pr_fmt(fmt) "foo: " fmt

    #include

    ...
    debug("bar");

    The resulting message will read:

    foo: bar

    Acked-by: Simon Glass
    Signed-off-by: Thierry Reding
    Signed-off-by: Simon Glass

    Thierry Reding
     
  • When enumerating devices, honour the pci_skip_dev() function. This can
    be used by PCI controller drivers to restrict which devices will be
    probed.

    This is required by the NVIDIA Tegra PCIe controller driver, which will
    fail with a data abort exception if an access is attempted to a device
    number larger than 0 outside of bus 0. pci_skip_dev() is therefore
    implemented to prevent any such accesses.

    Signed-off-by: Thierry Reding
    Signed-off-by: Simon Glass

    Thierry Reding
     
  • Some filesystems have a UUID stored in its superblock. To
    allow using root=UUID=... for the kernel command line we
    need a way to read-out the filesystem UUID.

    changes rfc -> v1:
    - make the environment variable an option parameter. If not
    given, the UUID is printed out. If given, it is stored in the env
    variable.
    - corrected typos
    - return error codes

    changes v1 -> v2:
    - fix return code of do_fs_uuid(..)
    - document do_fs_uuid(..)
    - implement fs_uuid_unsuported(..) be more consistent with the
    way other optional functionality works

    changes v2 -> v3:
    - change ext4fs_uuid(..) to make use of #if .. #else .. #endif
    construct to get rid of unreachable code

    Hit any key to stop autoboot: 0
    => fsuuid
    fsuuid - Look up a filesystem UUID

    Usage:
    fsuuid :
    - print filesystem UUID
    fsuuid :
    - set environment variable to filesystem UUID

    => fsuuid mmc 0:1
    d9f9fc05-45ae-4a36-a616-fccce0e4f887
    => fsuuid mmc 0:2
    eb3db83c-7b28-499f-95ce-9e0bb21cda81
    => fsuuid mmc 0:1 uuid1
    => fsuuid mmc 0:2 uuid2
    => printenv uuid1
    uuid1=d9f9fc05-45ae-4a36-a616-fccce0e4f887
    => printenv uuid2
    uuid2=eb3db83c-7b28-499f-95ce-9e0bb21cda81
    =>

    Signed-off-by: Christian Gmeiner
    Acked-by: Stephen Warren

    Christian Gmeiner
     
  • U-Boot has never cared about the type when we get max/min of two
    values, but Linux Kernel does. This commit gets min, max, min3, max3
    macros synced with the kernel introducing type checks.

    Many of references of those macros must be fixed to suppress warnings.
    We have two options:
    - Use min, max, min3, max3 only when the arguments have the same type
    (or add casts to the arguments)
    - Use min_t/max_t instead with the appropriate type for the first
    argument

    Signed-off-by: Masahiro Yamada
    Acked-by: Pavel Machek
    Acked-by: Lukasz Majewski
    Tested-by: Lukasz Majewski
    [trini: Fixup arch/blackfin/lib/string.c]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

22 Nov, 2014

5 commits


21 Nov, 2014

18 commits

  • Enable i.MX thermal DM driver to mx6sabre_common.h file. Since the
    thermal is used in init_sequence_f, so define the CONFIG_SYS_MALLOC_F_LEN
    to support DM driver using in pre relocation phase.

    Additional, thermal driver depends on ocotp, make sure to enable
    CONFIG_MXC_OCOTP when CONFIG_IMX6_THERMAL is selected.

    Signed-off-by: Ye.Li
    Signed-off-by: Nitin Garg

    Ye.Li
     
  • Add a new thermal uclass for thermal sensor and implement the imx
    thermal driver basing on this uclass.

    Signed-off-by: Ye.Li
    Acked-by: Stefano Babic

    Ye.Li
     
  • Since this function can use up quite a bit of space for its strings, disable
    it by default in SPL. Use CONFIG_DM_WARN to re-enable it.

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

    Simon Glass
     
  • Provide a CONFIG_DM_STDIO option to enable registering a serial device
    with the stdio library. This is seldom useful in SPL, so disable it by
    default when building for SPL.

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

    Simon Glass
     
  • For SPL we don't expect to need to remove a device. Save some code space
    by dropping this feature. The board config can define
    CONFIG_DM_DEVICE_REMOVE if this is in fact needed.

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

    Simon Glass
     
  • The simple malloc() implementation is used when memory is tight. It provides
    a simple buffer with an incrementing pointer.

    At present the implementation is inside dlmalloc. Move it into its own file
    so that it is easier to find.

    Rather than using relocation as a signal that the full malloc() is
    available, add a special GD_FLG_FULL_MALLOC_INIT flag. This signals that the
    simple malloc() should no longer be used.

    In some cases, such as SPL, even the code space used by the full malloc() is
    wasteful. Add a CONFIG_SYS_MALLOC_SIMPLE option to provide only the simple
    malloc. In this case the full malloc is not available at all. It saves about
    1KB of code space and about 0.5KB of data on Thumb 2.

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

    Simon Glass
     
  • The faster functions are not actually available in SPL and the code size
    likely isn't worth it. Use the normal memcpy() in SPL.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Convert this at91sam9260-based board to use driver model. This should serve
    as an example for other similar boards. Serial and GPIO are supported so
    far.

    Signed-off-by: Simon Glass
    Acked-by: Andreas Bießmann

    Simon Glass
     
  • This works correctly, so switch it over before the deadline.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The value should be 0x21f00000. Fix it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • 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
     
  • Enable GPIO support and provide the required GPIO setup information to
    the driver.

    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
     
  • Enable PCI so we can access devices that need to be set up before relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • On x86 machines U-Boot needs to be added to a large ROM image which is
    then flashed onto the target board. The ROM has a particular format so it
    makes sense for U-Boot to build this image automatically. Unfortunately
    it relies on binary blobs so we cannot require this for the default
    build as yet.

    Create a u-boot.rom output file for this purpose.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This board is a 'bare' version of the existing 'link 'board. It does not
    require coreboot to run, but is intended to start directly from the reset
    vector.

    This initial commit has place holders for a wide range of features. These
    will be added in follow-on patches and series. So far it cannot be booted
    as there is no ROM image produced, but it does build without errors.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Many of the x86 CONFIG options will be common across different boards. Move
    them to a common file.

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

    Simon Glass
     
  • For board IDs a common approach is to set aside several GPIOs for use in
    determining the board ID. This can provide information about board features
    and the revision.

    Add a function that turns a list of GPIOs into an integer by assigning
    each GPIO to a single bit.

    Signed-off-by: Simon Glass

    Simon Glass