08 Dec, 2017

1 commit

  • While sandbox works OK without the special-case code, it does result in
    console output being stored in the pre-console buffer while sandbox starts
    up. If there is a crash or a problem then there is no indication of what
    is going on.

    For ease of debugging it seems better to revert this change.

    This reverts commit 47b98ad0f6779485d0f0c14f337c3eece273eb54.

    Signed-off-by: Simon Glass

    Simon Glass
     

17 Nov, 2017

1 commit


09 Oct, 2017

1 commit


04 Oct, 2017

1 commit


03 Oct, 2017

1 commit

  • Convert the sandbox architecture to make use of the new asm-generic/io.h
    to provide address mapping functions. As sandbox actually performs
    non-identity mapping between physical & virtual addresses we can't
    simply make use of the generic mapping functions, but are able to
    implement phys_to_virt() & make use of it from map_physmem().

    Signed-off-by: Paul Burton
    Cc: Simon Glass
    Acked-by: Simon Glass

    Paul Burton
     

12 Sep, 2017

3 commits


28 Aug, 2017

1 commit


29 Jul, 2017

1 commit


27 Jul, 2017

1 commit


12 Jul, 2017

3 commits


09 Jun, 2017

1 commit

  • In os_dirent_get_typename() we are checking that type falls within the
    known values of the enum os_dirent_t. With clang-3.8 testing this value
    as being >= 0 results in a warning as it will always be true. This
    assumes of course that we are only given valid data. Given that we want
    to sanity check the input, we change this to check that it falls within
    the range of the first to the last entry in the given enum.

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

    Tom Rini
     

06 Jun, 2017

1 commit

  • At present we provide a default version of this function for use by
    bootstage. However it uses the system timer and therefore likely requires
    driver model. This makes it impossible to time driver-model init.

    Drop the function and require boards to provide their own. Add a sandbox
    version also. There is a default implememtation in lib/time.c for boards
    which use CONFIG_SYS_TIMER_COUNTER.

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Jun, 2017

1 commit


01 Jun, 2017

3 commits

  • Running a new test should reset the sandbox state to avoid tests
    interferring with each other. Move the existing state-reset code into a
    function so it can be used from tests.

    Also update the code to reset the SPI devices and adjust the test code to
    call it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The intention with block devices is that the device number (devnum field
    in its descriptor) matches the alias of its parent device. For example,
    with:

    aliases {
    mmc0 = "/sdhci@700b0600";
    mmc1 = "/sdhci@700b0400";
    }

    we expect that the block devices for mmc0 and mmc1 would have device
    numbers of 0 and 1 respectively.

    Unfortunately this does not currently always happen. If there is another
    MMC device earlier in the driver model data structures its block device
    will be created first. It will therefore get device number 0 and mmc0
    will therefore miss out. In this case the MMC device will have sequence
    number 0 but its block device will not.

    To avoid this, allow a device to request a device number and bump any
    existing device number that is using it. This all happens during the
    binding phase so it is safe to change these numbers around. This allows
    device numbers to match the aliases in all circumstances.

    Add a test to verify the behaviour.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This header includes things that are needed to make driver build. Adjust
    existing users to include that always, even if other dm/ includes are
    present

    Signed-off-by: Simon Glass

    Simon Glass
     

10 May, 2017

1 commit

  • Those tests check:
    - the ability for a phy-user to get a phy based on its name or its index
    - the ability of a phy device (provider) to manage multiple ports
    - the ability to perform operations on the phy (init,deinit,on,off)
    - the behavior of the uclass when optional operations are not implemented

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Simon Glass

    Jean-Jacques Hiblot
     

08 May, 2017

1 commit

  • This is a simple uclass for Watchdog Timers. It has four operations:
    start, restart, reset, stop. Drivers must implement start, restart and
    stop operations, while implementing reset is optional: It's default
    implementation expires watchdog timer in one clock tick.

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

    maxims@google.com
     

28 Apr, 2017

1 commit

  • Unfortunately a test for the PWM uclass was not included when it was
    submitted. This was noticed when trying to add more functionality:

    http://patchwork.ozlabs.org/patch/748172/

    Add a simple test to get us started.

    Signed-off-by: Simon Glass

    Simon Glass
     

15 Apr, 2017

1 commit


13 Apr, 2017

1 commit


06 Apr, 2017

2 commits


08 Feb, 2017

1 commit


09 Dec, 2016

2 commits


03 Dec, 2016

1 commit

  • Commit e2f88dfd2d96 ("libfdt: Introduce new ARCH_FIXUP_FDT option")
    allows us to skip memory setup of DTB, but a problem for ARM is that
    spin_table_update_dt() and psci_update_dt() are skipped as well if
    CONFIG_ARCH_FIXUP_FDT is disabled.

    This commit allows us to skip only fdt_fixup_memory_banks() instead
    of the whole of arch_fixup_fdt(). It will be useful when we want to
    use a memory node from a kernel DTB as is, but need some fixups for
    Spin-Table/PSCI.

    Signed-off-by: Masahiro Yamada
    Acked-by: Alexey Brodkin
    Acked-by: Simon Glass
    Fixed build error for x86:
    Signed-off-by: Simon Glass

    Masahiro Yamada
     

28 Oct, 2016

1 commit


19 Oct, 2016

1 commit


12 Oct, 2016

5 commits

  • The "hostfs ls" command prefixes each directory entry with either DIR,
    LNK or " " if it is a directory, symlink resp. regular file, or
    "???" for any other or unknown type.
    The latter only works if the type is set correctly, as the entry defaults
    to OS_FILET_REG and e.g. socket files show up as regular files.

    Signed-off-by: Stefan Brüns
    Acked-by: Simon Glass

    Stefan Brüns
     
  • At present these functions do not touch addr, which can raising warnings
    about unused variables.

    This fixes the following warnings:

    sandbox_spl defconfig
    drivers/core/regmap.c: In function ‘regmap_read’:
    drivers/core/regmap.c:125:12: warning: unused variable ‘ptr’ [-Wunused-variable]
    uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);
    ^
    drivers/core/regmap.c: In function ‘regmap_write’:
    drivers/core/regmap.c:134:12: warning: unused variable ‘ptr’ [-Wunused-variable]
    uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);

    Signed-off-by: Simon Glass
    Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write)

    Simon Glass
     
  • Using readdir_r limits the maximum file name length and may even be
    unsafe, and is thus deprecated in since glibc 2.24.

    Signed-off-by: Stefan Brüns
    Acked-by: Simon Glass

    Stefan Brüns
     
  • The readdir linux manpage explicitly states (quoting POSIX.1) that
    sizeof(d_name) is not correct for determining the required size, but to
    always use strlen. Grow the buffer if needed.

    Signed-off-by: Stefan Brüns
    Acked-by: Simon Glass

    Stefan Brüns
     
  • Previously, after reading/creating the second dirent, the second entry
    would be chained to the first entry and the first entry would be linked
    to head. Instead, immediately link the first entry to head.

    Signed-off-by: Stefan Brüns
    Acked-by: Simon Glass

    Stefan Brüns
     

07 Oct, 2016

2 commits