[U-Boot] [PATCH v3 7/9] usb: rockchip: boost up write speed from 4MB/s to 15MB/s

2018-07-12 Thread Alberto Panizzo
Speedup transfers increasing the max chunk size. Buffers are allocated with memalign thus developer is noticed when heap is full and in current configuration a buffer allocation of 64K till now is safe. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 2 +- 1

[U-Boot] [PATCH v3 4/9] usb: rockchip: implement K_FW_LBA_READ_10 command

2018-07-12 Thread Alberto Panizzo
the maximum size per chunk far lower than max int values. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 3 + doc/README.rockusb | 1 + drivers/usb/gadget/f_rockusb.c | 104 - 3 files changed, 107

[U-Boot] [PATCH v3 5/9] usb: rockchip: implement K_FW_LBA_ERASE_10 command

2018-07-12 Thread 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 --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 1 + doc/README.rockusb | 1 + drivers/usb

[U-Boot] [PATCH v3 9/9] usb: rockchip: on K_FW_LBA_WRITE_10 remove magic block size of 512 bytes

2018-07-12 Thread Alberto Panizzo
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 --- d

[U-Boot] [PATCH v3 8/9] usb: rockchip: fix printing csw debug info

2018-07-12 Thread Alberto Panizzo
Workstation tool was happy while console on device were printing random numbers.. Signed-off-by: Alberto Panizzo --- drivers/usb/gadget/f_rockusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index 0959b8c

[U-Boot] [PATCH v3 6/9] usb: rockchip: be quiet on serial port while transferring data

2018-07-12 Thread Alberto Panizzo
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 --- drivers/usb/gadget/f_rockusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[U-Boot] [PATCH v3 3/9] rockchip: rk3288: implement reading chip version from bootrom code

2018-07-12 Thread Alberto Panizzo
This allows rockusb code to reply correctly to K_FW_GET_CHIP_VER command. On RK3288 chip version is at 0x4ff0 and on tested hardware it corresponds at the string "320A20140813V200" Signed-off-by: Alberto Panizzo --- arch/arm/mach-rockchip/rk3288/Makefile | 1 + arc

[U-Boot] [PATCH v3 1/9] usb: rockchip: fix command failed on host side due to missing data

2018-07-12 Thread Alberto Panizzo
DEBUG is not defined. Signed-off-by: Alberto Panizzo --- drivers/usb/gadget/f_rockusb.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index b8833d0..58e483c 100644 --- a/drivers/usb/

[U-Boot] [PATCH v3 2/9] usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command

2018-07-12 Thread 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

[U-Boot] [PATCH v3 0/9] Improve rockusb support in U-Boot

2018-07-12 Thread Alberto Panizzo
implemented commands original behavior of re-probing a non present block device (like a non plugged SD-Card) is kept Alberto Panizzo (9): usb: rockchip: fix command failed on host side due to missing data usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command rockchip: rk3288: implement

Re: [U-Boot] [PATCH 4/7] usb: rockchip: implement K_FW_LBA_READ_10 command

2018-07-05 Thread Alberto Panizzo
Hi Kever, On Thu, Jul 5, 2018 at 3:19 AM, Kever Yang wrote: > > Hi Alberto, > > > On 07/04/2018 03:02 AM, Alberto Panizzo wrote: > > It is now possible to read from block device al logic layer. > > Corresponding command on workstation is: > > rkdeveloptool rl

Re: [U-Boot] [PATCH 0/7] Improve rockusb support in U-Boot

2018-07-05 Thread Alberto Panizzo
f coexistence and maintainability of resulting f_mass_storage.c Do you plan to upstream your tree? I saw patches in your tree and resulting f_rockusb.c is more clear yes. But we pay the price in f_mass_storage.c. Best Regards, Alberto Panizzo -- Amarula Solutions SRL Via le Caneva

[U-Boot] [PATCH 5/5] rk3288: vyasa: Fixup indentation

2018-07-04 Thread Alberto Panizzo
Indent file using tabs Signed-off-by: Alberto Panizzo --- board/amarula/vyasa-rk3288/vyasa-rk3288.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/board/amarula/vyasa-rk3288/vyasa-rk3288.c b/board/amarula/vyasa-rk3288/vyasa-rk3288.c index 2b509f5..4367ed2 100644

[U-Boot] [PATCH 4/5] rk3288: vyasa: Allow booting from internal eMMC

2018-07-04 Thread Alberto Panizzo
Keeping SD-Card as priority for easy board recovery Signed-off-by: Alberto Panizzo --- include/configs/vyasa-rk3288.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/vyasa-rk3288.h b/include/configs/vyasa-rk3288.h index 382fdac..4114bf0 100644 --- a/include/configs/vyasa

[U-Boot] [PATCH 3/5] rockchip: rk3288-vyasa: increase heap space after relocation

2018-07-04 Thread Alberto Panizzo
Before relocation (TPL or early SPL) we are executing in internal SDRAM with limited space. As soon as SPL is relocated increase malloc size, big enough to manage loading kernel images from eMMC Signed-off-by: Alberto Panizzo --- configs/vyasa-rk3288_defconfig | 8 +--- 1 file changed, 5

[U-Boot] [PATCH 2/5] mmc: dw_mmc: increase cmd timeout to fix eMMC enumeration error

2018-07-04 Thread Alberto Panizzo
Errors are reported to happen running U-Boot after SPL kernel load failure. In this case mmc host is not clean, and card enumeration timeouts do happen frequently. Signed-off-by: Alberto Panizzo --- drivers/mmc/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[U-Boot] [PATCH 1/5] mmc: dw_mmc: prevent silent memory corruption when stack and heap are too small

2018-07-04 Thread Alberto Panizzo
corruptions of heap on mmc transfer and random errors or CPU hang. Using malloc_cache_aligned() we will alloc slightly bigger buffers but we do have evidence about memory allocation failure allowing developer to recognize the issue and take actions. Signed-off-by: Alberto Panizzo --- drivers/mmc/dw_mmc.c

[U-Boot] [PATCH 0/5] Fix Falcon Boot from internal eMMC on RK3288 Vyasa

2018-07-04 Thread Alberto Panizzo
helps a lot in profiling the same issue in the future. [1]: https://patchwork.ozlabs.org/patch/833821/ Alberto Panizzo (5): mmc: dw_mmc: prevent silent memory corruption when stack and heap are too small mmc: dw_mmc: increase cmd timeout to fix eMMC enumeration error rockchip: rk3288

[U-Boot] [PATCH v2 6/8] usb: rockchip: be quiet on serial port while transferring data

2018-07-04 Thread Alberto Panizzo
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 --- drivers/usb/gadget/f_rockusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[U-Boot] [PATCH v2 8/8] usb: rockchip: fix printing csw debug info

2018-07-04 Thread Alberto Panizzo
Workstation tool was happy while console on device were printing random numbers.. Signed-off-by: Alberto Panizzo --- drivers/usb/gadget/f_rockusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index 6f97646

[U-Boot] [PATCH v2 5/8] usb: rockchip: implement K_FW_LBA_ERASE_10 command

2018-07-04 Thread 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 --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 1 + doc/README.rockusb | 1 + drivers/usb

[U-Boot] [PATCH v2 3/8] rockchip: rk3288: implement reading chip version from bootrom code

2018-07-04 Thread Alberto Panizzo
This allows rockusb code to reply correctly to K_FW_GET_CHIP_VER command. On RK3288 chip version is at 0x4ff0 and on tested hardware it corresponds at the string "320A20140813V200" Signed-off-by: Alberto Panizzo --- arch/arm/mach-rockchip/rk3288/Makefile | 1 + arc

[U-Boot] [PATCH v2 4/8] usb: rockchip: implement K_FW_LBA_READ_10 command

2018-07-04 Thread Alberto Panizzo
the maximum size per chunk far lower than max int values. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 3 + doc/README.rockusb | 1 + drivers/usb/gadget/f_rockusb.c | 101 - 3 files changed, 104

[U-Boot] [PATCH v2 7/8] usb: rockchip: boost up write speed from 4MB/s to 15MB/s

2018-07-04 Thread Alberto Panizzo
Speedup transfers increasing the max chunk size. Buffers are allocated with memalign thus developer is noticed when heap is full and in current configuration a buffer allocation of 64K till now is safe. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 2 +- 1

[U-Boot] [PATCH v2 2/8] usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command

2018-07-04 Thread 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

[U-Boot] [PATCH v2 1/8] usb: rockchip: fix command failed on host side due to missing data

2018-07-04 Thread Alberto Panizzo
DEBUG is not defined. Signed-off-by: Alberto Panizzo --- drivers/usb/gadget/f_rockusb.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index b8833d0..58e483c 100644 --- a/drivers/usb/

[U-Boot] [PATCH v2 0/8] Improve rockusb support in U-Boot

2018-07-04 Thread Alberto Panizzo
/write speed Changes in v2: - Reworked patch 1/8 to obtain simpler and more logical code - Rewrote some patch messages - Updated documentation in README.rockusb patch by patch - Added patch 8/8 to fix debug prints of original code Alberto Panizzo (8): usb: rockchip: fix command failed on host side

Re: [U-Boot] [PATCH 6/7] usb: rockchip: be quiet on serial port while transferring data

2018-07-04 Thread Alberto Panizzo
or transfer failed. On board side errors will be prompted. Fastboot is different: workstation tool do just download data which is buffered in memory and than flashed. Workstation than obtain a result at the end of the process, so an indication about things are proceeding is than really

Re: [U-Boot] [PATCH 4/7] usb: rockchip: implement K_FW_LBA_READ_10 command

2018-07-04 Thread Alberto Panizzo
adding tests into test/py/tests/ as we already have > such tests for test_ums.py and test_dfu.py I'll try, it's on my TODO > > > Corresponding command on workstation is: > > rkdeveloptool rl > > > > Signed-off-by: Alberto Panizzo > > --- > > ar

Re: [U-Boot] [PATCH 2/7] usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command

2018-07-04 Thread Alberto Panizzo
gt; > > Note that memory version do invert MSB/LSB so printing the char > > buffer will show: A02341023180002V > > > > Signed-off-by: Alberto Panizzo > > --- > > drivers/usb/gadget/f_rockusb.c | 38 > > +- 1 file changed

Re: [U-Boot] [PATCH 1/7] usb: rockchip: fix command failed on host side due to missing data

2018-07-04 Thread Alberto Panizzo
ed because the time spent > > printing debug info was enough for request to complete. > > Serialization by printf. > > > > > This patch add a way to postpone sending csw after first > > rockusb_tx_write is completed (indeed inside rockusb_complete) fixing >

[U-Boot] [PATCH 7/7] usb: rockchip: boost up write speed from 4MB/s to 15MB/s

2018-07-03 Thread Alberto Panizzo
Speedup transfers increasing the max chunk size. Buffers are allocated with memalign thus developer is noticed when heap is full and in current configuration a buffer allocation of 64K till now is safe. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 2 +- 1

[U-Boot] [PATCH 2/7] usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command

2018-07-03 Thread 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 will show: A02341023180002V Signed-off-by: Alberto Panizzo

[U-Boot] [PATCH 3/7] rockchip: rk3288: implement reading chip version from bootrom code

2018-07-03 Thread Alberto Panizzo
This allows rockusb code to reply correctly to K_FW_GET_CHIP_VER command. On RK3288 chip version is at 0x4ff0 and on tested hardware it corresponds at the string "320A20140813V200" Signed-off-by: Alberto Panizzo --- arch/arm/mach-rockchip/rk3288/Makefile | 1 + arc

[U-Boot] [PATCH 6/7] usb: rockchip: be quiet on serial port while transferring data

2018-07-03 Thread Alberto Panizzo
. Signed-off-by: Alberto Panizzo --- drivers/usb/gadget/f_rockusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index 230fbec..4fc8484 100644 --- a/drivers/usb/gadget/f_rockusb.c +++ b/drivers/usb/gadget

[U-Boot] [PATCH 4/7] usb: rockchip: implement K_FW_LBA_READ_10 command

2018-07-03 Thread Alberto Panizzo
It is now possible to read from block device al logic layer. Corresponding command on workstation is: rkdeveloptool rl Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 2 + drivers/usb/gadget/f_rockusb.c | 102 - 2

[U-Boot] [PATCH 5/7] usb: rockchip: implement K_FW_LBA_ERASE_10 command

2018-07-03 Thread Alberto Panizzo
This command is part of the write LBA sector sequence performed by rkdeveloptool Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 1 + drivers/usb/gadget/f_rockusb.c | 46 ++ 2 files changed, 47 insertions(+) diff

[U-Boot] [PATCH 1/7] usb: rockchip: fix command failed on host side due to missing data

2018-07-03 Thread Alberto Panizzo
mplete) fixing execution of: $ rkdeveloptool rfi when DEBUG is not defined. Signed-off-by: Alberto Panizzo --- arch/arm/include/asm/arch-rockchip/f_rockusb.h | 1 + drivers/usb/gadget/f_rockusb.c | 37 ++ 2 files changed, 33 insertions(+), 5 deletions(-) diff

[U-Boot] [PATCH 0/7] Improve rockusb support in U-Boot

2018-07-03 Thread Alberto Panizzo
/write speed Alberto Panizzo (7): usb: rockchip: fix command failed on host side due to missing data usb: rockchip: implement skeleton for K_FW_GET_CHIP_VER command rockchip: rk3288: implement reading chip version from bootrom code usb: rockchip: implement K_FW_LBA_READ_10 command usb