03 Dec, 2019

1 commit


08 Nov, 2019

1 commit

  • API_dev_write(va_list ap) is currently lacking the write support
    to storage devices because, historically, those devices did not
    implement block_write()

    The solution has been tested by loading and booting a (patched)
    GRUB instance in a QEMU vexpress-a9 environment. The disk write
    operations were triggered with GRUB's save_env command.

    Signed-off-by: Cristian Ciocaltea

    Cristian Ciocaltea
     

12 Aug, 2019

4 commits

  • This file contains lots of internal details about the environment. Most
    code can include env.h instead, calling the functions there as needed.

    Rename this file and add a comment at the top to indicate its internal
    nature.

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger
    Reviewed-by: Simon Goldschmidt
    [trini: Fixup apalis-tk1.c]
    Signed-off-by: Tom Rini

    Simon Glass
     
  • Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to
    both the enum and its members to make it clear that these are related to
    the environment.

    Add an ENV prefix to these two flags so that it is clear what they relate
    to. Also move them to env.h since they are part of the public API. Use an
    enum rather than a #define to tie them together.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • U-Boot is not supposed to use typedef for structs anymore. Also this name
    is the same as the ENTRY() macro used in assembler files, and 'entry'
    itself is widely used in U-Boot (>8k matches).

    Drop the typedef and rename the struct to env_entry to reduce confusion.

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger

    Simon Glass
     
  • Move env_set_hex() over to the new header file along with env_set_addr()
    which uses it.

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger

    Simon Glass
     

27 Dec, 2018

1 commit

  • dev_stor_get() is not able to find the next available device in the current
    storage group when the previous enumerated device belongs to a different
    group or class (e.g. network).

    The root cause is the device group iterator not being reset after an
    unsuccessful search for the last returned device so that the following
    search for the next available device will start from beginning.

    The issue has been identified by loading and booting GRUB in a QEMU
    vexpress-a9 environment.

    Signed-off-by: Cristian Ciocaltea

    Cristian Ciocaltea
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

28 Apr, 2018

1 commit


07 Apr, 2018

1 commit


16 Aug, 2017

3 commits

  • 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
     
  • We are now using an env_ prefix for environment functions. Rename these
    commonly used functions, for consistency. Also add function comments in
    common.h.

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

    Simon Glass
     
  • We are now using an env_ prefix for environment functions. Rename setenv()
    for consistency. Also add function comments in common.h.

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

    Simon Glass
     

14 Aug, 2017

1 commit


12 Jul, 2017

1 commit


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
     

23 Jun, 2017

1 commit


16 Jun, 2017

1 commit


12 Jun, 2017

3 commits


23 May, 2017

1 commit

  • At present IDE support is controlled by CONFIG_CMD_IDE. Add a separate
    CONFIG_IDE option so that IDE support can be enabled without requiring
    the 'ide' command.

    Update existing users and move the ide driver into drivers/block since
    it should not be in common/.

    Signed-off-by: Simon Glass

    Simon Glass
     

08 Apr, 2017

1 commit

  • Good evening,

    I am trying to port FreeBSD to the ASUS Tinker Board, a computer based
    on the Rockchip 3288 SoC. FreeBSD's boot loader (named loader(8)) needs
    CONFIG_API to be enabled, but trying to build an U-Boot from trunk with
    both CONFIG_API and CONFIG_BLK (as required for Rockchip SoC's?) leads
    to the following build failure:

    $ CROSS_COMPILE=arm-none-eabi- gmake tinker-rk3288_defconfig all
    ...
    CC api/api_storage.o
    api/api_storage.c: In function 'dev_read_stor':
    api/api_storage.c:334:9: error: 'struct blk_desc' has no member named 'block_read'
    if ((dd->block_read) == NULL) {
    ^~
    api/api_storage.c:339:11: error: 'struct blk_desc' has no member named 'block_read'
    return dd->block_read(dd, start, len, buf);
    ^~
    api/api_storage.c:340:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    gmake[2]: *** [scripts/Makefile.build:281: api/api_storage.o] Fehler 1
    gmake[1]: *** [Makefile:1229: api] Fehler 2
    gmake: *** [Makefile:460: __build_one_by_one] Error 2

    I applied the following fix, but the product doesn't boot. Perhaps
    that's not a property of the fix though:

    Yours,
    Robert Clausecker

    fuz@fuz.su
     

09 Feb, 2017

1 commit


21 Jan, 2017

1 commit

  • In a config with one MMC at device id '1' and no MMC at device id '0'
    (a BeagleBone Black with no sd inserted for example), the current code
    will first test to access the MMC 0 (sd port), seeing that no device is
    present it will simply return that no more device are present for this
    class.
    This patch fixes this by testing all devices for each class.

    Signed-off-by: Emmanuel Vadot

    Emmanuel Vadot
     

20 Jan, 2017

1 commit


05 Dec, 2016

5 commits


24 Oct, 2016

1 commit


22 Jul, 2016

1 commit

  • When CONFIG_API is selected with DM_ETH this
    error is present:
    api/api_net.c: In function 'dev_enum_net':
    api/api_net.c:61:35: warning: initialization from incompatible pointer
    type
    struct eth_device *eth_current = eth_get_dev();
    ^
    api/api_net.c:68:39: error: dereferencing pointer to incomplete type
    memcpy(di->di_net.hwaddr, eth_current->enetaddr, 6);
    ^
    Disable api_net functions when ETH_DM is selected.

    Signed-off-by: Chris Johns
    Signed-off-by: Michal Simek

    Michal Simek
     

21 May, 2016

1 commit


17 May, 2016

1 commit


15 Mar, 2016

2 commits


09 Mar, 2016

1 commit


08 Feb, 2016

1 commit


14 Jan, 2016

1 commit

  • This will allow the implementation to make use of data in the block_dev
    structure beyond the base device number. This will be useful so that eMMC
    block devices can encompass the HW partition ID rather than treating this
    out-of-band. Equally, the existence of the priv field is crying out for
    this patch to exist.

    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini

    Stephen Warren