summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
Commit message (Collapse)AuthorAgeFilesLines
* linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* usb: s3c-otg: Allow custom gusbcfgMarek Vasut2014-11-071-1/+1
| | | | | | | | | | | | | | Allow passing in a custom configuration of the gusbcfg register via platform data. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Vince Bridgers <vbridger@altera.com> Acked-by: Pavel Machek <pavel@denx.de> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* USB: gadget: s3c: get rid of debug compile warningBo Shen2014-09-021-3/+3
| | | | | | | | | | When enable debug option to compile, it will give the following warning, this patch is used to get rid of it. --->8--- warning: 'flags' is used uninitialized in this function [-Wuninitialized] ---8<--- Signed-off-by: Bo Shen <voice.shen@atmel.com>
* usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driverLukasz Majewski2014-02-061-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* usb:udc:samsung: Allow burst transfers for non EP0 endpintsLukasz Majewski2014-02-061-4/+3
| | | | | | | | | | | | | | | | | | | This patch removed obscure restriction on the HW setting of DMA transfers. Before this change each transaction sent up to 512 bytes (with packet count equal to 1) for non EP0 transfer. Now it is possible to setup DMA transaction up to DMA_BUFFER_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: 20.74 MiB/s Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* usb:udc:samsung: Remove redundant cache operation from Samsung UDC driverLukasz Majewski2014-02-061-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A set of cache operations (both invalidation and flush) were redundant in the S3C HS OTG Samsung driver: 1. s3c_udc_ep0_zlp - to transmit EP0's ZLP packets one don't need to flush the cache (since it is the zero length transmission) 2. s3c_udc_pre_setup and s3c_ep0_complete_out - cache invalidation is not needed when the buffer for OUT EP0 transmission is setup, since no data has yet arrived. Cache cleanups presented above don't contribute much to transmission speed up, hence shall be regarded as cosmetic changes. 3. setdma_rx - here the s3c UDC driver's internal buffers were invalidated. This call is not needed anymore since we reuse the buffers passed from gadgets. This is a key contribution to transmission speed improvement. 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` Measurements: Base values (without improvement): Transmission speed: 9.51 MiB/s After the change: Transmission speed: 10.15 MiB/s Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* usb:udc:s3c: Reduce dcache invalidate range for UDC receive bufferLukasz Majewski2013-10-201-1/+2
| | | | | | | | | The s3c udc driver sends data in a max packet size. Therefore the dcache invalidate range shall be equal to max packet, not the entire DMA_BUFFER_SIZE. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-14/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* usb:udc:samsung:cleanup Replace DEBUG_* macros with debug_cond() callsLukasz Majewski2012-05-201-115/+172
| | | | | | | | | This patch cleans up the Samsung's UDC driver. It replaces several DEBUG_* macros with debug_cond(). Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
* lin_gadget: use common linux/compat.hMike Frysinger2012-04-301-1/+1
| | | | | | | | | | | | | | | | Merge our duplicate definitions with the common header. Also fix drivers/usb/gadget/s3c_udc_otg_xfer_dma.c to use min() instead of min_t() since we remove the latter from compat.h. Additionally use memalign() directly as the lin_gadget specific kmalloc() macro is removed from lin_gadget_compat.h by this patch. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com>
* usb:udc:samsung:fix Remove the req_config flagŁukasz Majewski2012-03-191-13/+5
| | | | | | | | | | The dev->req_config flag was indicating that the forwarded request needs to perform the usb gadget delayed status. This is however not needed anymore, so it can be removed. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
* usb: s3c_udc_otg: fix GCC 4.6 build warningsAnatolij Gustschin2011-12-201-76/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: In file included from s3c_udc_otg.c:216:0: s3c_udc_otg_xfer_dma.c: In function 'complete_tx': s3c_udc_otg_xfer_dma.c:280:33: warning: variable 'is_short' set but not used s3c_udc_otg_xfer_dma.c:280:6: warning: variable 'ep_tsr' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_udc_irq': s3c_udc_otg_xfer_dma.c:469:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c:468:18: warning: variable 'gintmsk' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_queue': s3c_udc_otg_xfer_dma.c:582:14: warning: variable 'gintsts' set but not used s3c_udc_otg_xfer_dma.c:581:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_read': s3c_udc_otg_xfer_dma.c:778:6: warning: variable 'ret' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_udc_set_halt': s3c_udc_otg_xfer_dma.c:1020:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_setup': s3c_udc_otg_xfer_dma.c:1258:13: warning: initialization from incompatible pointer type [enabled by default] s3c_udc_otg_xfer_dma.c:1239:16: warning: variable 'is_in' set but not used s3c_udc_otg_xfer_dma.c:1239:9: warning: variable 'bytes' set but not used s3c_udc_otg.c: In function 'usb_gadget_register_driver': s3c_udc_otg.c:292:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 'usb_gadget_unregister_driver': s3c_udc_otg.c:338:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_ep_enable': s3c_udc_otg.c:582:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_ep_disable': s3c_udc_otg.c:646:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_dequeue': s3c_udc_otg.c:704:16: warning: variable 'flags' set but not used Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Remy Bohmer <linux@bohmer.net>
* usb:gadget:s5p USB Device Controller (UDC) implementationLukasz Majewski2011-12-111-0/+1444
This commit provides UDC driver support for Samsung's SoC family of processors. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net>
OpenPOWER on IntegriCloud