summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* musb-new: omap2plus backend driverIlya Yanok2012-11-204-0/+692
| | | | | | | Backend driver for MUSB OTG controllers found on TI OMAP2/3/4 (tested only on OMAP3 Beagle). Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* musb-new: am35x backend driverIlya Yanok2012-11-203-0/+711
| | | | | | | | | | | | | Backend driver for MUSB OTG controllers found on TI AM35x. It seems that on AM35X interrupt status registers can be updated _before_ core registers. As we don't use true interrupts in U-Boot and poll interrupt status registers instead this can result in interrupt handler being called with non-updated core registers. This confuses the code and result in hanged transfers. Add a small delay in am35x_interrupt as a workaround. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* musb-new: dsps backend driverIlya Yanok2012-11-202-0/+772
| | | | | | | Backend driver for MUSB OTG controllers found on TI AM33xx and TI81xx SoCs (tested with AM33xx only). Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* musb-new: port of Linux musb driverIlya Yanok2012-11-2016-2/+10690
| | | | | | | | | | | | | | | | | | | | Existing U-Boot musb driver has no support for the new gadget framework and also seems to have other limitations. As gadget framework is ported from Linux it seems pretty natural to port musb gadget driver as well. This driver supports both host and peripheral modes. This is not a replacement for current musb driver (at least now) as there are still some consumers of the old UDC interface. No DMA operation support included, CONFIG_MUSB_PIO_ONLY should be defined. Virtual root hub device is not implemented. Known problems: with no devices connected usb_lowlevel_start() fails. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* usb: use linux/usb/ch9.h instead of usbdescriptors.hIlya Yanok2012-11-207-10/+22
| | | | | | | | | | | | | | | | | | | | | | Linux usb/ch9.h seems to have all the same information (and more) as usbdescriptors.h so use the former instead of the later one. As a consequense of this change USB_SPEED_* values don't correspond directly to EHCI speed encoding anymore, I've added necessary recoding in EHCI driver. Also there is no point to put speed into pipe anymore so it's removed and a bunch of host drivers fixed to look at usb_device->speed instead. Old usbdescriptors.h included is not removed as it seems to be used by old USB device code. This makes usb.h and usbdevice.h incompatible. Fortunately the only place that tries to include both are the old MUSB code and it needs usb.h only for USB_DMA_MINALIGN used in aligned attribute on musb_regs structure but this attribute seems to be unneeded (old MUSB code doesn't support any DMA at all). Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* linux/usb/ch9.h: update with the version from Linux treeIlya Yanok2012-11-205-5/+0
| | | | Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* usb gadget ether: Fix warning in is_eth_addr_valid()Tom Rini2012-11-041-2/+2
| | | | | | | | | | | | | | The gadget ethernet driver needs to keep copies of the MAC address (at both endpoints) as strings so it needs a custom function for validation of the MAC. It was not however performing a totally correct check and also was emitting a warning about a set but unused variable. The solution to both is that after checking the string contents we use the standard test for a valid MAC. Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Merge remote-tracking branch 'u-boot-ti/master'Albert ARIBAUD2012-10-261-1/+10
|\
| * USB: musb_udc: Make musb_peri_rx_ep check for MUSB_RXCSR_RXPKTRDYPankaj Bharadiya2012-10-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | The endpoint rx count register value will be zero if it is read before receive packet ready bit (PERI_RXCSR:RXPKTRDY) is set. Check for the receive packet ready bit (PERI_RXCSR:RXPKTRDY) before reading endpoint rx count register. Proceed with rx count read and FIFO read only if RXPKTRDY bit is set. Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
* | powerpc/usb: fix bug of CPU hang when missing USB PHY clockShengzhou Liu2012-10-221-6/+16
|/ | | | | | | | | | | | | when missing USB PHY clock, u-boot will hang during USB initialization when issuing "usb start". We should check USBGP[PHY_CLK_VALID] bit to avoid CPU hanging in this case. Due to controller issue of PHY_CLK_VALID in ULPI mode, we set USB_EN before checking PHY_CLK_VALID, otherwise PHY_CLK_VALID doesn't work. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Acked-by: Marek Vasut <marex@denx.de>
* dm: Move s3c24xx USB driver to a proper placeMarek Vasut2012-10-183-0/+2211
| | | | | | | | | Signed-off-by: Marek Vasut <marex@denx.de> Cc: David Müller <d.mueller@elsoft.ch> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: U-Boot DM <u-boot-dm@lists.denx.de>
* Remove lh7a40x cpu and serial driverAlbert ARIBAUD2012-10-161-21/+13
| | | | | | | Since commit 957731ed (ARM: remove broken "lpd7a40x" boards), lh7a40x cpu and serial driver have become unused. Remove them. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* mx51: Fix USB PHY clocksBenoît Thébaudeau2012-10-151-1/+2
| | | | | | | | | | | | | | | The i.MX51 has a single USB PHY clock, while the i.MX53 has two. These 3 clocks have different clock gate control bit-fields. The existing code was correct only for i.MX53, so this patch fixes the i.MX51 use case. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Jana Rapava <fermata7@gmail.com> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il>
* pxa25x: Add support for USB ethernet gadgetLukasz Dalek2012-10-153-0/+2222
| | | | | | | Add to pxa25x based devices support for USB ethernet gadget. This is a port of pxa25x UDC driver from Linux kernel. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Removed DEV_CONFIG_{CDC,SUBSET}Lukasz Dalek2012-10-151-45/+30
| | | | | | | Removed DEV_CONFIG_CDC and DEV_CONFIG_SUBSET and replaced it with CONFIG_USB_ETH_CDC and CONFIG_USB_ETH_SUBSET. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Define CONFIG_USB_ETH_{CDC,SUBSET}Lukasz Dalek2012-10-151-5/+14
| | | | | | | Introduced CONFIG_USB_ETH_CDC and CONFIG_USB_ETH_SUBSET as preparation for removal DEV_CONFIG_CDC and DEV_CONFIG_SUBSET Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Fixed bug when using with PXA25X chipsLukasz Dalek2012-10-151-1/+16
| | | | | | | | | | PXA25X chips don't support alternate settings so driver uses non-CDC driver. But only code defined between DEV_CONFIG_CDC signals that network is up. This patch is fixing this bug by signaling that network is up after USB SET_INTERFACE request. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usb: ulpi: add indicator configuration functionLucas Stach2012-10-151-4/+28
| | | | | | | | | | | Allows for easy configuration of the VBUS indicator related ULPI config bits. Also move the external indicator setup from ulpi_set_vbus() to the new function. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* usb: ehci: don't print debug outputLucas Stach2012-10-151-1/+1
| | | | | | | This is clearly some sort of debug output and should not be printed during normal operation. Signed-off-by: Lucas Stach <dev@lynxeye.de>
* tegra20: port to new ehci interfaceLucas Stach2012-10-151-3/+2
| | | | | | | EHCI interface now supports more than one controller. Wire up our usb functions to use this new interface. Signed-off-by: Lucas Stach <dev@lynxeye.de>
* usb: add support for multiple usb controllersLucas Stach2012-10-151-1/+1
| | | | | | | | | Allows to initialize more than one USB controller at once. v2: print message when controller stop fails Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ehci: rework to take advantage of new lowlevel interfaceLucas Stach2012-10-1519-200/+171
| | | | | | | | | | | | | | Kill off ehci-core.h It was used to specify some static controller data. To support more than one controller being active at any time we have to carry the controller data ourselfes. Change the ehci interface accordingly. NOTE: OMAP implemented the ehci stuff a bit backwards and should be fixed to do the same thing as other platforms. But the change for now is at least compile clean. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: lowlevel interface change to support multiple controllersLucas Stach2012-10-156-12/+12
| | | | | | | | | | | Carry an index in the lowlevel usb functions to make specify the respective usb controller. Also pass through an controller struct from lowlevel_init to the creation of the root usb device of this controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* net: asix: add AX88772B supportLucas Stach2012-09-261-12/+23
| | | | | | | | | | | | | | | | | | | | Add AX88772B ID together with two fixes needed to make this work. 1. The packet length check has to be adjusted, as all ASIX chips only use 11 bits to indicate the length. AX88772B uses the other bits to indicate unrelated things, which cause the check to fail. This fix is based on a fix for the Linux kernel by Marek Vasut. Linux upstream commit: bca0beb9363f8487ac902931a50eb00180a2d14a 2. AX88772B provides several bulk endpoints. Only the first IN/OUT endpoints work in the default configuration. So stop enumeration after we found them to avoid overwriting the endpoint config with a non-working one. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: add read_mac functionLucas Stach2012-09-261-12/+35
| | | | | | | | | | | | | | Initial device MAC should be read while getting info about the device, so it's wrong to only read it in asix_init(). Add a dedicated function to read the initial MAC, which is also able to handle devices that have their initial MAC stored in EEPROM. Call this function inasix_eth_get_info(). Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: add write_hwaddr functionLucas Stach2012-09-261-11/+52
| | | | | | | | | | | | | All ASIX chipsets aside from AX88172 are able to set the MAC address on the hardware level. Add a function to expose this ability. To differentiate between chip types we now carry flags as driver private data. Also while touching the asix_dongles array constify this. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: split out basic reset functionLucas Stach2012-09-261-18/+26
| | | | | | | | | | | | The basic device reset ensures that the device is ready to service commands and does not need to get redone before each network operation. Split out the basic reset from asix_init() and instead call it from asix_eth_get_info(), so that it only gets called once. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: introduce transparent driver private in ueth_dataLucas Stach2012-09-261-14/+35
| | | | | | | | | | Avoid clutter in ueth_data. Individual drivers should not mess with structures belonging to the core like this. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* usb: do explicit unaligned accessesLucas Stach2012-09-211-2/+5
| | | | | | | | | | | | | | | usb_hub_descriptor has to be packed as it's used for communication with the device. Member wHubCharacteristics violates the natural alignment rules. Use explicit unaligned access functions for this member. Fixes ARMv7 traping while using USB. v2: fix typo found by Thomas Langer v3: rebased on top of u-boot-usb/master Signed-off-by: Lucas Stach <dev@lynxeye.de>
* Merge branch 'master' of git://git.denx.de/u-boot-usbWolfgang Denk2012-09-028-135/+1355
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-usb: MUSB driver: Timeout is never detected as the while loop does not end usb: fix ulpi_set_vbus prototype pxa25x: Add UDC registers definitions USB: Fix strict aliasing in ohci-hcd usb: Optimize USB storage read/write ehci: Optimize qTD allocations usb_stor_BBB_transport: Do not delay when not required usb_storage: Remove EHCI constraints usb_storage: Restore non-EHCI support ehci-hcd: Boost transfer speed ehci: cosmetic: Define used constants ehci: Fail for multi-transaction interrupt transfers arm:trats: Enable g_dnl composite USB gadget with embedded DFU function on TRATS arm:trats: Support for USB UDC driver at TRATS board. dfu:cmd: Support for DFU u-boot command dfu: MMC specific routines for DFU operation dfu: DFU backend implementation dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadget dfu:usb: Support for g_dnl composite download gadget. ehci: cosmetic: Define the number of qt_buffers Signed-off-by: Wolfgang Denk <wd@denx.de>
| * MUSB driver: Timeout is never detected as the while loop does not endMatej Frančeškin2012-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timeout variable is decremented once more when while condition is not met. Following "if" does not detect correctly that timeout has occurred. Because of this bug the "usb start" command on AM335X-EVM board did not detect correctly that USB device was not attached. timeout = musb_cfg.timeout; while (timeout--) if (readb(&musbr->devctl) & MUSB_DEVCTL_HM) break; /* if musb core is not in host mode, then return */ if (!timeout) return -1; Signed-off-by: Matej Franceskin <Matej.Franceskin@comtrade.com> CC: Marek Vasut <matex@denx.de>?
| * USB: Fix strict aliasing in ohci-hcdTroy Kisky2012-09-011-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5f6aa03fda2a0a79940765865c1e4266be8a75f8 USB: Fix complaints about strict aliasing in OHCI-HCD tried to fix this, but gcc4.4 still complains. So, this patch basically reverts the above and does a simpler fix. also, the above commit incorrectly changed /* corresponds to data_buf[4-7] */ datab [1] = 0; to /* corresponds to databuf.u8[4-7] */ databuf.u8[1] = 0; This patch also fixes that. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| * ehci: Optimize qTD allocationsBenoît Thébaudeau2012-09-011-30/+37
| | | | | | | | | | | | | | | | | | | | Relax the qTD transfer alignment constraints in order to need less qTDs for buffers that are aligned to 512 bytes but not to pages. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * ehci-hcd: Boost transfer speedBenoît Thébaudeau2012-09-011-29/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid software and transfer splitting overhead so as to make transfers as fast as possible. The only drawback is a call to memalign. However, this is fast compared to the transfer timings, and the heap size to allocate is small, e.g. 128 kiB in the worst case for a transfer length of 65535 packets of 512 bytes. Tested on i.MX25, i.MX35 and i.MX51. In my test conditions, the speed gain was very significant (several times faster), which is really appreciable when accessing large files. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * ehci: cosmetic: Define used constantsBenoît Thébaudeau2012-09-012-69/+118
| | | | | | | | | | | | | | | | | | Make some light cosmetic code cleanup by the way. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * ehci: Fail for multi-transaction interrupt transfersBenoît Thébaudeau2012-09-011-1/+10
| | | | | | | | | | | | | | | | | | | | | | Interrupt transfers requiring several transactions are not supported by submit_int_msg() because bInterval is ignored. This patch returns a failure code and prints an error message in this case. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * dfu:usb: DFU USB function (f_dfu) support for g_dnl composite gadgetLukasz Majewski2012-09-013-0/+850
| | | | | | | | | | | | | | | | Support for f_dfu USB function. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * dfu:usb: Support for g_dnl composite download gadget.Lukasz Majewski2012-09-012-0/+203
| | | | | | | | | | | | | | | | | | Composite USB download gadget support (g_dnl) for download functions. This code works on top of composite gadget. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
| * ehci: cosmetic: Define the number of qt_buffersBenoît Thébaudeau2012-09-012-7/+8
| | | | | | | | | | | | | | Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Ilya Yanok <ilya.yanok@cogentembedded.com> Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
* | mxs: rename regs-clkctrl.h to regs-clkctrl-mx28.hOtavio Salvador2012-09-011-1/+1
| | | | | | | | | | | | | | The CLKCTRL registers are SoC specific so we ought to have it clear on filename. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* | da8xx/hawkboard: Add support for ohci host controllerSughosh Ganu2012-09-014-103/+51
| | | | | | | | | | | | | | | | | | | | Also enable the ohci port on hawkboard. These additions result in an increased u-boot size -- adjust the same accordingly in the board's config. Move the usb header for da8xx platforms under arch-davinci. Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
* | mxs: prefix register structs with 'mxs' prefixOtavio Salvador2012-09-011-8/+8
| | | | | | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* | mxs: prefix register acessor macros with 'mxs' prefixOtavio Salvador2012-09-011-4/+4
|/ | | | | | | As the register accessing mode is the same for all i.MXS SoCs we ought to use 'mxs' prefix intead of 'mx28'. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* i.mx: iomux-v3.h: move to imx-common include directoryTroy Kisky2012-07-311-1/+1
| | | | Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* Merge branch 'next' of git://git.denx.de/u-bootWolfgang Denk2012-07-301-13/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of git://git.denx.de/u-boot: MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c doc: cleanup - move board READMEs into respective board directories net: sh_eth: add support for SH7757's GETHER net: sh_eth: modify the definitions of regsiter net: sh_eth: add SH_ETH_TYPE_ condition net: sh_eth: clean up for the SH7757's code net: fec_mxc: Fix MDC for xMII net: fec_mxc: Fix setting of RCR for xMII net: nfs: make NFS_TIMEOUT configurable net: Inline the new eth_setenv_enetaddr_by_index function net: allow setting env enetaddr from net device setting net/designware: Consecutive writes to the same register to be avoided CACHE: net: asix: Fix asix driver to work with data cache on net: phy: micrel: make ksz9021 phy accessible net: abort network initialization if the PHY driver fails phylib: phy_startup() should return an error code on failure net: tftp: fix type of block arg to store_block Signed-off-by: Wolfgang Denk <wd@denx.de>
| * CACHE: net: asix: Fix asix driver to work with data cache onMarek Vasut2012-07-111-13/+17
| | | | | | | | | | | | | | | | | | The asix driver did not align buffers, therefore it didn't work with data cache enabled. Fix this. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
* | smsc95xx: align buffers to cache line sizeIlya Yanok2012-07-181-4/+9
| | | | | | | | | | | | | | Align buffers passed to the USB code to cache line size so they can be DMAed safely. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* | ehci-hcd: change debug() to printf() in case of errorsIlya Yanok2012-07-181-3/+3
| | | | | | | | | | | | Printing message could be useful if something goes really wrong. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* | ehci-hcd: fix external buffer cache handlingIlya Yanok2012-07-181-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer coming from upper layers should be cacheline aligned/padded to perform safe cache operations. For now we don't do bounce buffering so getting unaligned buffer is an upper layer error. We can't check if the buffer is properly padded with current interface so just assume it is (consider changing with in the future). The following changes are done: 1. Remove useless length alignment check. We get actual transfer length not the size of the underlying buffer so it's perfectly valid for it to be unaligned. 2. Move flush_dcache_range() out of while loop or it will flush too much. 3. Don't try to fix buffer address before calling invalidate: if it's unaligned it's an error anyway so let cache subsystem cry about that. 4. Fix end buffer address to be cacheline aligned assuming upper layer reserved enough space. This is potentially dangerous operation so upper layers should be careful about that. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* | ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignmentTom Rini2012-07-182-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we have a larger minimum requirement for cache coherency. In those cases, use that value rather than the USB spec minimum. We add a cpp check to <usb.h> to define USB_DMA_MINALIGN and make use of it in ehci-hcd.c and musb_core.h. We cannot use MAX() here as we are not allowed to have tests inside of align(...). Signed-off-by: Tom Rini <trini@ti.com> [marek.vasut]: introduce some crazy macro voodoo Signed-off-by: Marek Vasut <marex@denx.de> [ilya.yanok]: moved external buffer fixes to separate patch, we use {ALLOC,DEFINE}_ALIGN_BUFFER macros with alignment of USB_DMA_MINALIGN for qh_list, qh and qtd structures to make sure they are proper aligned for both controller and cache operations. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
OpenPOWER on IntegriCloud