History log of /rk3399_rockchip-uboot/drivers/usb/gadget/storage_common.c (Results 1 – 24 of 24)
Revision Date Author Comments
# 18188f57 21-Dec-2023 William Wu <william.wu@rock-chips.com>

usb: gadget: rockusb: Improve rockusb download speed

This patch increase the usb transfer size for rockusb,
the current size is 256KB, it can increase to 4MB for
the usb dwc3 controller and the new

usb: gadget: rockusb: Improve rockusb download speed

This patch increase the usb transfer size for rockusb,
the current size is 256KB, it can increase to 4MB for
the usb dwc3 controller and the new upgrade tool.

Test on RK3588 EVB1 with windows upgrade tool V1.85

before:
USB2.0 loader download speed: 27.10 MBps
USB3.0 loader download speed: 39.73 MBps

after:
USB2.0 loader download speed: 28.04 MBps
USB3.0 loader download speed: 59.59 MBps

Change-Id: Iae8899115466da7f329d83f54c7051f69d06d412
Signed-off-by: William Wu <william.wu@rock-chips.com>

show more ...


# c637f232 16-Apr-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot

Change-Id: I22ac688008080eac49169d752a94b66668f890fc

Conflicts:
drivers/phy/Kconfig
drivers/phy/Makefile


# 3e677766 03-Mar-2020 Frank Wang <frank.wang@rock-chips.com>

usb: gadget: vary ep max packet by usb speed

The EP Maxpacket should be varied due the USB speed may be changed
at enumeration time.

Change-Id: I6cf8e1e8b6e3c24d14f7b24638aff88f8dd066e0
Signed-off-

usb: gadget: vary ep max packet by usb speed

The EP Maxpacket should be varied due the USB speed may be changed
at enumeration time.

Change-Id: I6cf8e1e8b6e3c24d14f7b24638aff88f8dd066e0
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>

show more ...


# 1a4f6af8 02-Mar-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot


# a61b9434 13-Jan-2020 Frank Wang <frank.wang@rock-chips.com>

usb: gadget: amend usb download req buffer to 256K

Through contrast test, the use of 256K buffer can improve the
download speed than 128K buffer about 14% for USB2 and 27% for USB3.

The statistics

usb: gadget: amend usb download req buffer to 256K

Through contrast test, the use of 256K buffer can improve the
download speed than 128K buffer about 14% for USB2 and 27% for USB3.

The statistics on RK3328-EVB as below:

Buffer USB2.0 USB3.0
128K 21MB/S 30MB/S
256K 24MB/S 38MB/S

Change-Id: I3b040ed225b212196fc5ca677a4fce240ad290f3
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>

show more ...


# 28386b6d 05-Jun-2018 Alexey Brodkin <Alexey.Brodkin@synopsys.com>

UPSTREAM: lib: Add hexdump

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 i

UPSTREAM: lib: Add hexdump

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 <abrodkin@synopsys.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Stefan Roese <sr@denx.de>

Change-Id: I038b41f51d45d1b853da499578bf8ef384a63730
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit f8c987f8f127f867d96ca74bcd1fcb11d8265b67)

show more ...


# 26dd3474 29-Sep-2018 William Wu <william.wu@rock-chips.com>

usb: gadget: add SuperSpeed support to the Gadget Framework

This patch implements the Binary Device Object Store (BOS)
Descriptor for SuperSpeed. It also add SuperSpeed Endpoint
Descriptors for fast

usb: gadget: add SuperSpeed support to the Gadget Framework

This patch implements the Binary Device Object Store (BOS)
Descriptor for SuperSpeed. It also add SuperSpeed Endpoint
Descriptors for fastboot and rockusb gadget.

Change-Id: I7d858e1b5117d403919f5fdacb40072a5fad336f
Signed-off-by: William Wu <william.wu@rock-chips.com>

show more ...


# 14595d81 19-Oct-2017 Marek Vasut <marex@denx.de>

UPSTREAM: usb: gadget: storage: Increase FSG_BUFLEN

Increase the buffer length to be just above maximum permissible value
of 128 kiB . This increases the performance of the UMS and alike by a
factor

UPSTREAM: usb: gadget: storage: Increase FSG_BUFLEN

Increase the buffer length to be just above maximum permissible value
of 128 kiB . This increases the performance of the UMS and alike by a
factor of 2 - 2.5 as the buffers are less fragmented.

Change-Id: I8b285031fd251b2ebf672c2295a19bfcba77d8c6
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit a8c402f45c758235916615757ac537db8e96fc31)

show more ...


# 02585eb3 07-Dec-2015 Stephen Warren <swarren@nvidia.com>

ums: support multiple LUNs at once

Extend the ums command to accept a list of block devices. Each of these
will be exported as a separate LUN. An example use-case would be:

ums 0 mmc 0,0.1,0.2

...

ums: support multiple LUNs at once

Extend the ums command to accept a list of block devices. Each of these
will be exported as a separate LUN. An example use-case would be:

ums 0 mmc 0,0.1,0.2

... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW
partitions. This is useful since it allows the host access to everything
on the eMMC without having to somehow stop the ums command from executing
and restart it with different parameters.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

show more ...


# 0c06db59 24-Jun-2014 Heiko Schocher <hs@denx.de>

lib, linux: move linux specific defines to linux/compat.h

- move linux specific defines from usb and video code
into linux/compat.h
- move common linux specific defines from include/ubi_uboot.h

lib, linux: move linux specific defines to linux/compat.h

- move linux specific defines from usb and video code
into linux/compat.h
- move common linux specific defines from include/ubi_uboot.h
to linux/compat.h
- add for new mtd/ubi/ubifs sync new needed linux specific
defines to linux/compat.h

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
[trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
usb/lin_gadet_compat.h]
Signed-off-by: Tom Rini <trini@ti.com>

show more ...


# c9afa7ce 22-May-2014 Tom Rini <trini@ti.com>

Merge branch 'master' of git://git.denx.de/u-boot-usb


# e7f93505 15-May-2014 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot-arm


# d2a3e911 09-May-2014 Albert ARIBAUD <albert.u.boot@aribaud.net>

Merge branch 'u-boot/master'

Conflicts:
drivers/net/Makefile

(trivial merge)


# 340ed422 05-May-2014 Stephen Warren <swarren@nvidia.com>

usb: ums: remove ci_udc special case

Now that the ci_udc driver supports allocating multiple requests per
endpoint, we can revert the special-case added by a022c1e13c01 "usb:
ums: use only 1 buffer

usb: ums: remove ci_udc special case

Now that the ci_udc driver supports allocating multiple requests per
endpoint, we can revert the special-case added by a022c1e13c01 "usb:
ums: use only 1 buffer for CI_UDC".

Signed-off-by: Stephen Warren <swarren@nvidia.com>

show more ...


# 3c3f13f8 06-May-2014 Tom Rini <trini@ti.com>

Merge branch 'master' of git://git.denx.de/u-boot-usb


# a022c1e1 24-Apr-2014 Stephen Warren <swarren@nvidia.com>

usb: ums: use only 1 buffer for CI_UDC

ci_udc.c allocates only a single buffer for each endpoint, which
ci_ep_alloc_request() returns as a hard-coded value rather than
dynamically allocating. Conseq

usb: ums: use only 1 buffer for CI_UDC

ci_udc.c allocates only a single buffer for each endpoint, which
ci_ep_alloc_request() returns as a hard-coded value rather than
dynamically allocating. Consequently, storage_common.c must limit
itself to using a single buffer at a time. Add a special case
to the definition of FSG_NUM_BUFFERS for this.

Another option would be to fix ci_ep_alloc_request() to dynamically
allocate the buffers like some/all(?) other device mode drivers do.
However, I don't think that ci_ep_queue() supports queueing up
multiple buffers either yet, and I'm not familiar enough with the
controller yet to implement that. As such, any attempt to use multiple
buffers simply results in data corruption and other errors.

Signed-off-by: Stephen Warren <swarren@nvidia.com>

show more ...


# 15c5cdf5 08-Nov-2013 Tom Rini <trini@ti.com>

Merge branch 'master' of git://www.denx.de/git/u-boot-usb


# 0697f206 23-Oct-2013 Przemyslaw Marczak <p.marczak@samsung.com>

usb: ums: fix disk capacity miscalculation and code cleanup

This patch prevents:
- ums disk capacity miscalculation because of integer overflow

Changes v2:
- Prevents passing zero size disk capacit

usb: ums: fix disk capacity miscalculation and code cleanup

This patch prevents:
- ums disk capacity miscalculation because of integer overflow

Changes v2:
- Prevents passing zero size disk capacity to ums gadget driver
- Change function ums_get_capacity() to ums_disk_init() and do ums disk
initialization before gadget init
- Remove unnecessary code from mass storage driver

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marex@denx.de>

show more ...


# 93c813b3 23-Oct-2013 Przemyslaw Marczak <p.marczak@samsung.com>

usb: ums: code refactoring to improve reusability on other boards.

This patch introduces some cleanups to ums code. Changes:

ums common:
- introduce UMS_START_SECTOR and UMS_NUM_SECTORS as defined

usb: ums: code refactoring to improve reusability on other boards.

This patch introduces some cleanups to ums code. Changes:

ums common:
- introduce UMS_START_SECTOR and UMS_NUM_SECTORS as defined in
usb_mass_storage.h both default values as 0 if board config
doesn't define them

common cleanup changes:
- change name of struct "ums_board_info" to "ums"
- "ums_device" fields are moved to struct ums and "dev_num" is removed
- change function name: board_ums_init to ums_init
- remove "extern" prefixes from usb_mass_storage.h

cmd_usb_mass_storage:
- change error() to printf() if need to print info message
- change return values to command_ret_t type at ums command code
- add command usage string

Changes v2:
ums common:
- always returns number of read/write sectors
- coding style clean-up
ums gadget:
- calculate amount of read/write from device returned value.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>

show more ...


# 326ea986 31-Jul-2013 Stefano Babic <sbabic@denx.de>

Merge git://git.denx.de/u-boot-arm

Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <s

Merge git://git.denx.de/u-boot-arm

Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <sbabic@denx.de>

show more ...


# 8b485ba1 25-Jul-2013 Albert ARIBAUD <albert.u.boot@aribaud.net>

Merge branch 'u-boot/master' into u-boot-arm/master


# 1a459660 08-Jul-2013 Wolfgang Denk <wd@denx.de>

Add GPL-2.0+ SPDX-License-Identifier to source files

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>


# 3c47f2f4 18-Mar-2013 Tom Rini <trini@ti.com>

Merge branch 'master' of git://git.denx.de/u-boot-usb


# dee1d999 05-Mar-2013 Lukasz Majewski <l.majewski@samsung.com>

usb:composite: USB Mass Storage - storage_common.c from Linux kernel

The storage_common.c source file from v2.6.36 Linux kernel.

commit d26a6aa08b9f12b44fb1ee65625e7480d3d5bb81
Author: Michal Nazar

usb:composite: USB Mass Storage - storage_common.c from Linux kernel

The storage_common.c source file from v2.6.36 Linux kernel.

commit d26a6aa08b9f12b44fb1ee65625e7480d3d5bb81
Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
Date: Mon Nov 9 14:15:23 2009 +0100

USB: g_mass_storage: code cleaned up and comments updated

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>

show more ...