17 Feb, 2018

1 commit

  • Commit 7d714a24d725 ("env: Support multiple environments") added
    static variable env_load_location. When saving environmental
    variables, this variable is presumed to have the value set before.
    In case the value was set before relocation and U-Boot runs from a
    NOR flash, this variable wasn't writable. This causes failure when
    saving the environment. To save this location, global data must be
    used instead.

    Signed-off-by: York Sun
    CC: Maxime Ripard

    York Sun
     

10 Feb, 2018

1 commit

  • Before the patch an undefined constant EFI_SUBSYSTEM was used in the
    crt0 code. The current version of binutils does not swallow the error.

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888403

    The necessary constant IMAGE_SUBSYSTEM_EFI_APPLICATION is already
    defined in pe.h. So let's factor out asm-generic/pe.h for the
    image subsystem constants and use it in our assembler code.

    IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER does not exist in the specification
    let's use IMAGE_SUBSYSTEM_EFI_ROM instead.

    The include pe.h is only used in code maintained by Alex so let him be the
    maintainer here too.

    Reported-by: Andre Przywara
    Signed-off-by: Heinrich Schuchardt
    Tested-by: Vagrant Cascadian
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

04 Feb, 2018

1 commit

  • It is useful to be able to control the output format of log records on the
    console. As a starting point, add definitions for controlling which
    elements of the log record are displayed. Use function and message as the
    default, since these are the most useful fields.

    Signed-off-by: Simon Glass

    Simon Glass
     

28 Jan, 2018

1 commit

  • Several inline functions in this file reference undefined functions in
    U-Boot. For example:

    atomic-long.h:73:9: warning: implicit declaration of function
    'atomic64_sub_and_test'
    atomic-long.h:80:9: warning: implicit declaration of function
    'atomic64_dec_and_test'
    atomic-long.h:87:9: warning: implicit declaration of function
    'atomic64_inc_and_test'

    Handle this the same as the 32 bit build by wrapping these functions in
    a __UBOOT__ check.

    Signed-off-by: Bradley Bolen

    Bradley Bolen
     

27 Jan, 2018

1 commit

  • Since we want to have multiple environments, we will need to initialise
    all the environments since we don't know at init time what drivers might
    fail when calling load.

    Let's init all of them, and only consider for further operations the ones
    that have not reported any errors at init time.

    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     

08 Dec, 2017

3 commits


03 Oct, 2017

1 commit

  • Most architectures currently supported by U-Boot use trivial
    implementations of map_to_physmem & virt_to_phys which simply cast a
    physical address to a pointer for use a virtual address & vice-versa.
    This results in a lot of duplicate implementations of these mapping
    functions.

    The set of functions provided by different architectures also differs,
    with some having implementations of phys_to_virt & others not. A later
    patch will make use of phys_to_virt in architecture-neutral code, and so
    requires that it be provided for all architectures.

    This patch introduces an asm-generic/io.h which provides generic
    implementations of address mapping functions, allowing the duplication
    of them between architectures to be removed. Once architectures are
    converted to make use of this generic header it will also ensure that
    all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
    provided. The 2 families of functions differ in that map_physmem may
    create dynamic mappings whilst phys_to_virt may not & therefore is more
    limited in scope but doesn't require information such as a length &
    flags.

    This patch doesn't convert any architectures to make use of this generic
    header - later patches in the series will do so.

    Signed-off-by: Paul Burton
    Cc: Albert Aribaud
    Cc: Alexey Brodkin
    Cc: Angelo Dureghello
    Cc: Bin Meng
    Cc: Daniel Schwierzeck
    Cc: Macpaul Lin
    Cc: Michal Simek
    Cc: Nobuhiro Iwamatsu
    Cc: Thomas Chou
    Cc: Wolfgang Denk
    Acked-by: Angelo Dureghello
    Tested-by: Angelo Dureghello
    Reviewed-by: Simon Glass
    Reviewed-by: Daniel Schwierzeck

    Paul Burton
     

19 Sep, 2017

1 commit

  • In scripts/Makefile.lib we build section including helloworld.efi.
    This allows to load the EFI binary with command 'bootefi hello'.

    scripts/Makefile.lib contains explicit references to strings
    containing helloworld and hello_world. This makes it impossible
    to generalize the coding to accomodate additional built in
    EFI binaries.

    Let us rename the variables __efi_hello_world_* to
    __efi_helloworld_*.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

15 Aug, 2017

1 commit


27 Jul, 2017

1 commit

  • Some platforms have very limited SRAM to run SPL code, so there may
    not be the same amount space for a malloc pool before relocation in
    the SPL stage as the normal U-Boot stage.

    Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN,
    so the size of pre-relocation malloc pool can be configured memory
    space independently.

    Signed-off-by: Andy Yan
    Reviewed-by: Tom Rini
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich
    [fixed up commit-message:]
    Signed-off-by: Philipp Tomsich

    Andy Yan
     

09 Jul, 2017

1 commit

  • CS Systemes d'Information (CSSI) manufactures 8xx boards for
    critical communication systems. Those boards have been
    running U-Boot since 2010 and will have to be maintained
    until at least 2027.

    commit 5b8e76c35ec312a3f73126bd1a2d2c0965b98a9f
    ("powerpc, 8xx: remove support for 8xx") orphaned those boards
    by removing support for the mpc8xx CPU.

    This commit partially restores support for the 8xx, with the
    following limitations:
    - Restores support for MPC866 and MPC885 only
    - Does not restore IDE, PCMCIA, I2C, USB
    - Does not restore examples
    - Does not restore POST
    - Does not restore Ethernet on SCC
    - Does not restore console on SCC
    - Does not restore bedbug and kgdb support

    As the 866 and 885 do not support the following features,
    they are not restored either:
    - VIDEO / LCD
    - RTC clock

    The CPM uCODE patch is not restored either, because:
    - 866 and 885 already have support for I2C and SPI relocation
    without a uCODE patch
    - relocation of SMC, I2C or SPI is only needed for using SCCs
    for Ethernet or QMC

    The dynamic setup/calculation of clocks is removed, we
    expect the target being use with the clock and PLPRCR register
    defined in the configuration.
    All the clock settings for 8xx prior to 866 is removed as
    well as we now only support 866 and 885.

    This code is mature and addresses mature boards. Therefore
    all code enclosed in '#if 0/#endif' and '#if XX_DEBUG/#endif'
    is unneeded.

    The following files are not restored by this patch:

    - arch/powerpc/cpu/mpc8xx/bedbug_860.c
    - arch/powerpc/cpu/mpc8xx/fec.h
    - arch/powerpc/cpu/mpc8xx/kgdb.S
    - arch/powerpc/cpu/mpc8xx/plprcr_write.S
    - arch/powerpc/cpu/mpc8xx/scc.c
    - arch/powerpc/cpu/mpc8xx/upatch.c
    - arch/powerpc/cpu/mpc8xx/video.c
    - arch/powerpc/include/asm/status_led.h
    - arch/powerpc/lib/ide.c
    - arch/powerpc/lib/ide.h
    - doc/README.MPC866
    - drivers/pcmcia/mpc8xx_pcmcia.c
    - drivers/rtc/mpc8xx.c
    - drivers/usb/gadget/mpc8xx_udc.c
    - drivers/video/mpc8xx_lcd.c
    - examples/standalone/test_burst.c
    - examples/standalone/test_burst.h
    - examples/standalone/test_burst_lib.S
    - examples/standalone/timer.c
    - include/mpc823_lcd.h
    - include/usb/mpc8xx_udc.h
    - post/cpu/mpc8xx/Makefile
    - post/cpu/mpc8xx/cache.c
    - post/cpu/mpc8xx/cache_8xx.S
    - post/cpu/mpc8xx/ether.c
    - post/cpu/mpc8xx/spr.c
    - post/cpu/mpc8xx/uart.c
    - post/cpu/mpc8xx/usb.c
    - post/cpu/mpc8xx/watchdog.c

    Some of the restored files are not located in a proper location.
    In order to keep traceability of the changes, they will be
    moved to their correct location and moved to Kconfig in a
    followup patch.

    This patch also declares CSSI as point of contact for the update
    of the 8xx platform, as those boards are the only ones still
    being maintained on the 8xx area. A later patch will add
    those boards to the tree.

    Signed-off-by: Christophe Leroy

    Christophe Leroy
     

07 Jul, 2017

1 commit

  • AVR32 is gone. It's already more than two years for no support in Buildroot,
    even longer there is no support in GCC (last version is heavily patched 4.2.4).

    Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully).

    There is no good point to keep this support in U-Boot either.

    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher
    Signed-off-by: Andy Shevchenko

    Andy Shevchenko
     

04 Jul, 2017

1 commit

  • There was for long time no activity in the 4xx area.
    We need to go further and convert to Kconfig, but it
    turned out, nobody is interested anymore in 4xx,
    so remove it.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

16 Jun, 2017

1 commit


12 Jun, 2017

3 commits


06 Jun, 2017

2 commits

  • Some boards cannot access pre-relocation data after relocation. Reserve
    space for this and copy it during preparation for relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present bootstage uses the data section of the image to store its
    information. There are a few problems with this:

    - It does not work on all boards (e.g. those which run from flash before
    relocation)
    - Allocated strings still point back to the pre-relocation data after
    relocation

    Now that U-Boot has a pre-relocation malloc() we can use this instead,
    with a pointer to the data in global_data. Update bootstage to do this and
    set up an init routine to allocate the memory.

    Now that we have a real init function, we can drop the fake 'reset' record
    and add a normal one instead.

    Note that part of the problem with allocated strings remains. They are
    reallocated but this will only work where pre-relocation memory is
    accessible after relocation.

    Signed-off-by: Simon Glass

    Simon Glass
     

01 Jun, 2017

4 commits


12 May, 2017

1 commit

  • Change type of timebase_l/h to unsigned int.
    >From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;
    This piece code is based on that timebase_h and timebase_l are
    32bits width, so change the type to unsigned int.

    Signed-off-by: Peng Fan
    Cc: Eddie Cai
    Cc: Jagan Teki
    Cc: York Sun
    Cc: "Robert P. J. Day"
    Cc: Michal Simek
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Peng Fan
     

06 Apr, 2017

1 commit


17 Mar, 2017

1 commit

  • At present malloc_base/_limit/_ptr are not initialised in spl_init() when
    we call spl_init() in board_init_f(). This is due to a recent change aimed
    at avoiding overwriting the malloc area set up on some boards by
    spl_relocate_stack_gd().

    However if CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN is not defined, we now
    skip setting up the memory area in spl_init() which is obviously wrong.

    To fix this, add a new function spl_early_init() which can be called in
    board_init_f().

    Fixes: b3d2861e (spl: Remove overwrite of relocated malloc limit)
    Signed-off-by: Eddie Cai
    Rewrote spl_{,early_}init() to avoid duplicate code:
    Rewrite/expand commit message:
    Signed-off-by: Simon Glass
    Reviewed-by: Eddie Cai

    Eddie Cai
     

15 Nov, 2016

1 commit


24 Oct, 2016

1 commit


11 Oct, 2016

1 commit


24 Sep, 2016

1 commit


07 Sep, 2016

1 commit


16 Jul, 2016

1 commit


06 Jun, 2016

2 commits


04 Jun, 2016

1 commit

  • Certain GPIO devices have the capability to switch their GPIOs into
    open-drain mode, that is, instead of actively driving the output
    (Push-pull output), the pin is connected to the collector (for a NPN
    transistor) or the drain (for a MOSFET) of a transistor, respectively.
    The pin then either forms an open circuit or a connection to ground,
    depending on the state of the transistor.

    This patch adds functions to the GPIO uclass to switch GPIOs to
    open-drain mode on devices that support it.

    Signed-off-by: Mario Six
    Reviewed-by: Simon Glass
    Reviewed-by: York Sun

    mario.six@gdsys.cc
     

17 May, 2016

1 commit

  • Many drivers use a common form of offset + flags for device
    tree nodes. e.g.:

    This patch adds a common implementation of this type of parsing
    and calls it when a gpio driver doesn't supply its' own xlate
    routine.

    This will allow removal of the driver-specific versions in a
    handful of drivers and simplify the addition of new drivers.

    Signed-off-by: Eric Nelson
    Reviewed-by: Stephen Warren
    Acked-by: Simon Glass

    Eric Nelson
     

17 Mar, 2016

1 commit