25 Mar, 2016

3 commits


26 Feb, 2016

1 commit


25 Feb, 2016

4 commits

  • Tom Rini
     
  • Fix print message to show full 64bit addresses.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • Fix spelling errors in the "booti" help text and bring it more
    in line with the bootm/bootz help texts.

    Signed-off-by: Karsten Merker

    Karsten Merker
     
  • This patch fixes situation when one would like to write large file into
    medium with the file system (fat, ext4, etc).
    This change sets file size limitation to the DFU internal buffer size.

    Since u-boot is not supporting interrupts and seek on file systems, it
    becomes challenging to store large file appropriately.

    To reproduce this error - create large file (around 26 MiB) and sent it
    to the target board.

    Lets examine the flow of USB transactions:

    0. DFU uses EP0 with 64B MPS [Max Packet Size]

    1. Send file - OUT (PC->target) - dat_26MiB.img is sent with 4096 B transactions

    2. Get status - OUT (PC->target) - wait for DFU_STATE_dfuDNLOAD_IDLE (0x05) sent
    from target board - IN transaction
    (target->PC)

    3. The whole file content is sent to target - OUT (PC->target) with ZLP [Zero
    Length Packet]

    Now the interesting part starts:

    4. OUT (PC->target) Setup transaction (request to share DFU state)

    5. IN (target->PC) - reply the current DFU state
    - In the UDC driver the req->completion (with dfu_flush) is called
    after successful IN transfer.
    - The dfu_flush() (called from req->completion callback) saves the
    whole file at once (u-boot doesn't support seek on fs).
    Such operation takes considerable time. When the file
    is large - e.g. 26MiB - this time may be more than 5 seconds.

    6. OUT (PC->target) - ZLP, is send in the same time when dfu_flush()
    writes data to eMMC memory.
    The dfu-util application has hard coded timeout on USB transaction
    completion set to 5 seconds (it uses libusb calls).

    When the file to store is large (e.g. 26 MiB) the time needed to write it
    may excess the dfu-util timeout and following error message will be displayed:
    "unable to read DFU status" on the HOST PC console.

    This change is supposed to leverage DFU's part responsible for storing files
    on file systems. Other DFU operations - i.e. raw/partition write to NAND and
    eMMC should work as before.

    The only functional change is the error reporting. When dfu_flush() fails
    the u-boot prompt will exit with error information and dfu-util application
    exits afterwards as well.

    Test HW:
    - Odroid XU3 (Exynos5433) - test with large file
    - Trats (Exynos4210) - test for regression - eMMC, raw,

    Signed-off-by: Lukasz Majewski
    Reported-by: Alex Gdalevich
    Tested-by: Stephen Warren
    Tested-by: Heiko Schocher

    Lukasz Majewski
     

22 Feb, 2016

1 commit


16 Feb, 2016

1 commit

  • This is broken - we need to look at the first two characters to distinguish
    'gpio status' from 'gpio set'.

    Fixes: 0ffe6ab5 (gpio: Allow 's' as an abbreviation for 'status')
    Reported-by: Soeren Moch
    Signed-off-by: Simon Glass
    Tested-by: Soeren Moch
    Reviewed-by: Bin Meng
    Tested-by: Hannes Schmelzer

    Simon Glass
     

10 Feb, 2016

1 commit

  • On some systems, RAM starts at address 0. If the user executes itest
    against address 0 on such a system, it will call map_physmem(0, ...)
    which will return 0 back; mapping only changes the address on sandbox.
    This causes itest to believe map_physmem() has failed, and hence fails
    the comparison.

    Fix itest so that it allows map_physmem() to return 0 /if/ the orignal
    address passed to it was also 0.

    This fixes "tegra-uboot-flasher flash" on Tegra20.

    This has the disadvantage that on sandbox, failed mapping attempts for
    address 0 are not detected. Instead, should the code only call
    map_physmem() on sandbox? Or, should map_physmem() return its error status
    some other way. Or, should the special case only be allowed on systems
    where the base of RAM is 0 somehow?

    Fixes: 7861204c9af7 ("itest: make memory access work under sandbox")
    Signed-off-by: Stephen Warren

    Stephen Warren
     

08 Feb, 2016

1 commit


06 Feb, 2016

2 commits


30 Jan, 2016

1 commit


29 Jan, 2016

3 commits

  • With CONFIG_DM_PCI enabled, PCI buses are not enumerated at boot, as they
    are without that config option enabled. No command exists to enumerate the
    PCI buses. Hence, unless some board-specific code causes PCI enumeration,
    PCI-based Ethernet devices are not detected, and network access is not
    available.

    This patch implements "pci enum" in the CONFIG_DM_PCI case, thus giving a
    mechanism whereby PCI can be enumerated.

    do_pci()'s handling of case 'e' is moved into a single location before the
    dev variable is assigned, in order to skip calculation of dev. The enum
    sub-command doesn't need the dev value, and skipping its calculation
    avoids an irrelevant error being printed.

    Using a command to initialize PCI like this has a disadvantage relative to
    enumerating PCI at boot. In particular, Ethernet devices are not probed
    during PCI enumeration, but only when used. This defers setting variables
    such as ethact, ethaddr, etc. until the first network-related command is
    executed. Hopefully this will not cause further issues. Perhaps in the
    long term, we need a "net start/enum" command too?

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

    Stephen Warren
     
  • In case CONFIG_DM_TPM was set without any TPM chipset configured a fault
    was generated (NULL pointer access).

    Reviewed-by: Simon Glass
    Signed-off-by: Christophe Ricard

    Christophe Ricard
     
  • Tom Rini
     

27 Jan, 2016

2 commits


25 Jan, 2016

3 commits

  • BUILD_BUG_* macros have been defined in several headers. It would
    be nice to collect them in include/linux/bug.h like Linux.

    This commit is cherry-picking useful macros from include/linux/bug.h
    of Linux 4.4.

    I did not import BUILD_BUG_ON_MSG() because it would not work if it
    is used with include/common.h in U-Boot. I'd like to postpone it
    until the root cause (the "error()" macro in include/common.h causes
    the name conflict with "__attribute__((error()))") is fixed.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini

    Masahiro Yamada
     
  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass
     
  • There are a lot of unrelated files in common, including all of the commands.
    Moving them into their own directory makes them easier to find and is more
    logical.

    Some commands include non-command code, such as cmd_scsi.c. This should be
    sorted out at some point so that the function can be enabled with or without
    the associated command.

    Unfortunately, with m68k I get this error:

    m68k: + M5329AFEE
    +arch/m68k/cpu/mcf532x/start.o: In function `_start':
    +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

    I hope someone can shed some light on what this means. I hope it isn't
    depending on the position of code in the image.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass