]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver
authorLukasz Majewski <l.majewski@samsung.com>
Wed, 5 Feb 2014 09:10:44 +0000 (10:10 +0100)
committerMarek Vasut <marex@denx.de>
Thu, 6 Feb 2014 01:22:45 +0000 (02:22 +0100)
commite0059eaef18dbdc65ee420a337aecfa555e8d493
treea9eddf70d639207c77f4399f94bed7629b74ea99
parent9c9822188cf2d7eeee7ae4f64a231a2d013df690
usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver

The Samsung's UDC driver is not anymore copying data from USB requests to
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 must take care to allocate
buffers aligned to cache line (CONFIG_SYS_CACHELINE_SIZE).

This can be achieved by using DEFINE_CACHE_ALIGN_BUFFER() or
ALLOC_CACHE_ALIGN_BUFFER() macros. Those take care to allocate buffer
aligned to cache line in both starting address and its size.
Sometimes it is enough to just use memalign() with size being a
multiplication of cache line size.

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

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/gadget/s3c_udc_otg.c
drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
include/usb/s3c_udc.h