[U-Boot] [PATCH 4/6] usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver

Marek Vasut marex at denx.de
Sat Feb 1 03:55:20 CET 2014


On Friday, January 31, 2014 at 01:16:27 PM, Lukasz Majewski wrote:
> The Samsung's UDC driver is not anymore copying data from USB requests to
> data aligned internal buffers. Now it works directly in data allocated in
> the upper layers like UMS, DFU, THOR.
> 
> This change is possible since those gadgets now take care to allocate
> buffers aligned to cache line (CONFIG_SYS_CACHELINE_SIZE ).
> 
> Previously the UDC needed to copy this data to internal aligned buffer to
> prevent from unaligned access exceptions.
> 
> Test condition
> - test HW + measurement: Trats - Exynos4210 rev.1
> - test HW Trats2 - Exynos4412 rev.1
> 400 MiB compressed rootfs image download with `thor 0 mmc 0`
> 
> Measurement:
> Transmission speed: 27.04 MiB/s
> 
> Change-Id: I1df1fbafc72ec703f0367ddee3fedf3a3f5523ed
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Cc: Marek Vasut <marex at denx.de>

You should use ROUND_UP(), not ROUND() throughout the patch. Otherwise you might 
fail to flush/invalidate the last little bit of data in some cacheline.

Best regards,
Marek Vasut


More information about the U-Boot mailing list