15 Dec, 2018

1 commit

  • Currently it's not possible to get filesize of downloaded images and
    it's impossible to automate some tasks in scripts. So this patch adds
    `filesize` environment variable with size (as hex number in bytes) of
    the last successfully downloaded file via `sdp` command.

    Cc: Lukasz Majewski
    Cc: Marek Vasut
    Cc: Stefan Agner
    Signed-off-by: Petr Štetiar
    Reviewed-by: Stefan Agner

    Petr Štetiar
     

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
     

22 Feb, 2018

2 commits

  • The SDP protocol contains multiple 32bit pointers. Add a helper function
    to get a valid pointer from these values and use it.

    This fixes the following warnings:

    drivers/usb/gadget/f_sdp.c: In function ‘sdp_rx_data_complete’:
    drivers/usb/gadget/f_sdp.c:347:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    memcpy((void *)sdp->dnl_address, req->buf + 1, datalen);
    ^
    drivers/usb/gadget/f_sdp.c: In function ‘sdp_jump_imxheader’:
    drivers/usb/gadget/f_sdp.c:625:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    entry = (void *)headerv2->entry;
    ^
    drivers/usb/gadget/f_sdp.c: In function ‘sdp_handle_in_ep’:
    drivers/usb/gadget/f_sdp.c:668:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    memcpy(&data[1], (void *)sdp_func->dnl_address, datalen);
    ^
    drivers/usb/gadget/f_sdp.c:679:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    status = sdp_jump_imxheader((void *)sdp_func->jmp_address);
    ^

    Signed-off-by: Andre Heider

    Andre Heider
     
  • Cosmetic change.

    Signed-off-by: Andre Heider
    Reviewed-by: Lukasz Majewski
    Acked-by: Stefan Agner

    Andre Heider
     

26 Nov, 2017

1 commit


04 Oct, 2017

1 commit

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

23 Aug, 2017

2 commits

  • Support U-Boot images in SPL so that u-boot.img files can be
    directly downloaded and executed. Furthermore support U-Boot
    scripts download and execution in full U-Boot so that custom
    recovery actions can be downloaded from the host in a third
    step.

    Signed-off-by: Stefan Agner
    Reviewed-by: Łukasz Majewski
    Reviewed-by: Stefano Babic

    Stefan Agner
     
  • Add SDP (Serial Downloader Protocol) implementation for U-Boot. The
    protocol is used in NXP SoC's boot ROM and allows to download program
    images. Beside that, it can also be used to read/write registers and
    download complete Device Configuration Data (DCD) sets. This basic
    implementation supports downloading images with the imx header format
    reading and writing registers.

    Signed-off-by: Stefan Agner
    Reviewed-by: Łukasz Majewski

    Stefan Agner