u-boot-brain/arch
Ye Li 9d47d1316d arm: Round the dma_alloc_coherent memory size to cache line aligned
When running usb dwc3 gadget driver, we meet random USB enumeration failure in fastboot.
The root cause is a cache coherence issue. When it happens, the ctrl_req in
gadget driver is allocated at 0xfe932f40, and the usb_composite_dev (cdev)
is allocated at 0xfe932f60. So after we submit the setup request (cache flushed) to USB
controller, any accessing to usb_composite_dev variable will cause the cache line refill, then
when setup transfer is completed, reading the setup data in ctrl_req will gets old value from
cache not from memory.

The ctrl_req is allocated by API dma_alloc_coherent, but u-boot don't have cohernet memory.
so it still needs cache maintain operations before/after HW accessing. Since the cache flush or
invalidate bases on cache line, so when the allocated memory size is not cache line aligned,
potentially it may meet such issue.

This patch modifies the dma_alloc_coherent API to round the size to cache line aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 07:13:31 -05:00
..
arc ARC: Improve identification of ARC cores 2018-12-03 14:26:18 +03:00
arm arm: Round the dma_alloc_coherent memory size to cache line aligned 2019-01-09 07:13:31 -05:00
m68k m68k: ColdFire mcf5441x, add eSDHC support 2018-09-16 00:01:13 +02:00
microblaze arch: types.h: factor out fixed width typedefs to int-ll64.h 2018-09-10 20:48:16 -04:00
mips mips: jz47xx: Add Creator CI20 platform 2018-12-19 15:23:02 +01:00
nds32 Drop CONFIG_INIT_CRITICAL 2018-11-26 13:57:31 +08:00
nios2 .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2018-06-18 14:43:12 -04:00
powerpc Merge branch 'master' of git://git.denx.de/u-boot-spi 2018-12-05 15:06:24 -05:00
riscv riscv: bootm: Support booting VxWorks 2018-12-31 08:08:51 -05:00
sandbox dm: sandbox: Allow selection of sample rate and channels 2018-12-13 16:37:09 -07:00
sh Kbuild: add LDFLAGS_STANDALONE 2018-11-18 16:02:23 +01:00
x86 efi: payload: only init usb if necessary 2018-12-10 10:14:42 +08:00
xtensa xtensa: use asm-generic/atomic.h 2018-09-25 21:49:18 -04:00
.gitignore
Kconfig dm: sound: Create an option to use driver model for sound 2018-12-13 16:32:49 -07:00