15 Dec, 2018

3 commits

  • For USB3.0, the max packetsize for GET_DESCRIPTOR should be
    sent as exponent value for 2. This means for 512, max packet
    size should be filled with 9(2^9=512). Also, fill the USB
    version field with 3.0 if speed is negotiated to Superspeed.
    This fixes the issue of DFU gadget download failure with
    superspeed. Without this patch, the max packet size is
    overflowed to zero as the bMaxPacketsize is of u8 and hence
    host is not able to detect this device.

    Signed-off-by: Siva Durga Prasad Paladugu
    Reviewed-by: Bin Meng

    Siva Durga Prasad Paladugu
     
  • The BITMAP related operations can now be moved to ./include/linux/bitmap.h
    file to mimic the Linux kernel directory tree.

    This change also allows to remove the lin_gadget_compat.h header file
    (which is a legacy code only for composite U-boot layer).
    It was also possible to remove #includes from several USB gadget drivers.

    Signed-off-by: Lukasz Majewski
    Reviewed-by: Stefan Agner

    Lukasz Majewski
     
  • 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 Dec, 2018

3 commits


27 Nov, 2018

1 commit


11 Oct, 2018

1 commit


01 Oct, 2018

2 commits


21 Aug, 2018

1 commit


10 Aug, 2018

1 commit


09 Aug, 2018

8 commits

  • As well as in K_FW_LBA_READ_10 and K_FW_LBA_ERASE_10 take device's
    block size from f_rkusb->desc->blksz instead of the fixed 512 bytes.

    Keep original behaviour of retry probing assigned block device on
    every host request to manage late SDCard plugs.

    Signed-off-by: Alberto Panizzo

    Alberto Panizzo
     
  • Workstation tool was happy while console on device were printing
    random numbers..

    Signed-off-by: Alberto Panizzo

    Alberto Panizzo
     
  • While downloading or uploading megabytes of data we had thousands of
    printf in console like:

    transfer 0x10000 bytes done
    OR
    Uploading 0x1000 bytes

    This because transfers are chunked and there is no way on target
    side to know the overall transfer size (to print one string per
    overall transfer).

    All these prints on serial console do slow down significantly the
    transfer and does not offer a significant information to the
    developer: rkdeveloptool and Rockchip original tool do use small
    chunks read/writes on big transfers. This allows on workstation
    to print percentage of transfer complete and as well offers to
    developer the information about: transfer is running OK.
    On error, either the percentage will stop or an error will be shown
    on workstation console.

    Signed-off-by: Alberto Panizzo

    Alberto Panizzo
     
  • This command is part of the write partition sequence performed by
    rkdeveloptool: one partition is first completely erased and
    than wrote.

    Signed-off-by: Alberto Panizzo
    Reviewed-by: Simon Glass

    Alberto Panizzo
     
  • This patch implement reading blocks form selected device with
    LBA addressing.

    Corresponding command on workstation is:
    rkdeveloptool rl

    While we support reading more than one blocks per K_FW_LBA_READ_10
    request, rkdeveloptool and original rockchip tool do perform
    chunk reads limiting the maximum size per chunk far lower
    than max int values.

    Signed-off-by: Alberto Panizzo
    Reviewed-by: Simon Glass

    Alberto Panizzo
     
  • Chip Version is a string saved in BOOTROM address space Little Endian.

    Ex for rk3288: 0x33323041 0x32303134 0x30383133 0x56323030
    which brings: 320A20140813V200

    Note that memory version do invert MSB/LSB so printing the char
    buffer would show: A02341023180002V

    Signed-off-by: Alberto Panizzo

    Alberto Panizzo
     
  • Two consecutive rockusb_tx_write without waiting for request complete
    do results in transfer reset of first request and thus no or incomplete
    data transfer. This because rockusb_tx_write do use just one USB request
    to keep serialization.

    So calls like:
    rockusb_tx_write_str(emmc_id);
    rockusb_tx_write_csw(cbw->tag, cbw->data_transfer_length, CSW_GOOD);

    was succeeding only when DEBUG was defined because the time spent
    printing debug info was enough for transfer to complete.

    This patch fixes the issue adding a simple request complete handler
    called rockusb_tx_write_csw to be set as complete handler of in_req
    when sending back simple payload + CSW replies to commands.

    This new handler will always send CSW_GOOD replies because in case
    of error the command callback itself must send back an error CSW as
    unique reply to command.

    This patch fixes execution of:
    $ rkdeveloptool rfi
    when DEBUG is not defined.

    Signed-off-by: Alberto Panizzo

    Alberto Panizzo
     
  • After the commit 6aae84769a0b ("gadget: f_thor: Fix memory leaks of
    usb request and its buffer"), there is hang-up with ctrl-c in some
    udc. It is because req of out_ep is freed before out_ep is disabled.
    Fix hang-up with ctrl-c by disabling ep before free req of the ep.

    Signed-off-by: Seung-Woo Kim

    Seung-Woo Kim
     

08 Aug, 2018

1 commit

  • The only platform left for the AU1x00 SoCs was the pb1x00 platform, an
    apparent clone of the dbau1x00 platform. As pb1x00 had no listed
    maintainer I am assuming that it is also orphaned. Remove this platform
    and then remove the unused SoC support.

    Cc: Daniel Schwierzeck
    Signed-off-by: Tom Rini
    Reviewed-by: Daniel Schwierzeck

    Tom Rini
     

13 Jun, 2018

1 commit

  • Often during debugging session it's very interesting to see
    what data we were dealing with. For example what we write or read
    to/from memory or peripherals.

    This change introduces functions that allow to dump binary
    data with one simple function invocation like:
    ------------------->8----------------
    print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
    ------------------->8----------------

    which gives us the following:
    ------------------->8----------------
    00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35 ....baudrate=115
    00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e 200.bootargs=con
    00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30 sole=ttyS3,11520
    00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00 0n8.bootdelay=3.
    00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00 bootfile=uImage.
    00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39 fdtcontroladdr=9
    00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72 ffb1ba0.loadaddr
    00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65 =0x82000000.stde
    00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 rr=serial0@e0022
    00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c 000.stdin=serial
    000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75 0@e0022000.stdou
    000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30 t=serial0@e00220
    000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00..............
    ...
    ------------------->8----------------

    Source of hexdump.c was copied from Linux kernel v4.7-rc2.

    Signed-off-by: Alexey Brodkin
    Cc: Anatolij Gustschin
    Cc: Mario Six
    Cc: Simon Glass
    Cc: Tom Rini
    Cc: Stefan Roese

    Alexey Brodkin
     

30 May, 2018

8 commits


18 May, 2018

2 commits

  • During file download, it only uses 32bit variable for file size and
    it limits maximum file size less than 4GB. Update to support more
    than 4GB file with using two 32bit variables for file size as thor
    protocol 5.0.

    Signed-off-by: Seung-Woo Kim

    Seung-Woo Kim
     
  • The thor sender can send filename without null character and it is
    used without consideration of overflow. Actually, character array
    for filename is assigned with DEFINE_CACHE_ALIGN_BUFFER() and it
    is bigger than size of memcpy, so there was no real overflow.
    Fix filename overflow for code level integrity.

    Signed-off-by: Seung-Woo Kim

    Seung-Woo Kim
     

16 May, 2018

2 commits

  • Compiling the f_mass_storage driver for an x86 target results in a
    compilation error as set_bit and clear_bit are provided by bitops.h

    To address that situation we discussed on the list moving to
    genetic_set_bit() instead.

    Doing a quick grep for similar situations in drivers/usb shows that the
    composite device is using __set_bit().

    This patch switches over to generic_set_bit to maintain consistency between
    the two gadget drivers.

    Signed-off-by: Bryan O'Donoghue
    Cc: Lukasz Majewski
    Cc: Marek Vasut

    Bryan O'Donoghue
     
  • Compiling the f_mass_storage driver for an x86 target results in a
    compilation error as set_bit and clear_bit are provided by bitops.h

    Looking at the provenance of the current u-boot code and the git change
    history in the kernel, it looks like we have a local copy of set_bit and
    clear_bit as a hold-over from porting the Linux driver into u-boot.

    These days __set_bit and __clear_bit are optionally provided by an arch and
    can be used as inputs to generic_bit_set and generic_bit_clear.

    This patch switches over to generic_set_bit and generic_clear_bit to
    accommodate.

    Tested on i.MX WaRP7 and Intel Edison

    Signed-off-by: Bryan O'Donoghue
    Cc: Lukasz Majewski
    Cc: Marek Vasut

    Bryan O'Donoghue
     

07 May, 2018

2 commits

  • 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 multiple licenses (in
    these cases, dual license) declared in the SPDX-License-Identifier tag.
    In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
    or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
    as per the Linux Kernel style document. Note that parenthesis are
    allowed so when they were used before we continue to use them.

    Reviewed-by: Fabio Estevam
    Signed-off-by: Tom Rini

    Tom Rini
     
  • 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
     

01 May, 2018

2 commits


26 Apr, 2018

1 commit


09 Apr, 2018

1 commit

  • In order that we can use eth_env_* even when CONFIG_NET isn't set, move
    these functions to environment code from net code.

    This fixes failures such as:

    board/ti/am335x/built-in.o: In function `board_late_init':
    board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
    u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

    which caters for use cases such as:

    commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
    variable")

    when Ethernet is required in Linux, but not U-Boot.

    Signed-off-by: Alex Kiernan

    Alex Kiernan