u-boot-brain/arch/arm
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
..
cpu watchdog: imx: add config to disable wdog reset 2019-01-01 14:12:18 +01:00
dts rockchip: rk3399-puma: Set VDD_LOG to 950 mV. 2019-01-02 22:40:02 +01:00
include arm: Round the dma_alloc_coherent memory size to cache line aligned 2019-01-09 07:13:31 -05:00
lib arm: efi: Generate Microsoft PE format compliant images 2018-12-02 21:59:36 +01:00
mach-aspeed regmap: change regmap_init_mem() to take ofnode instead udevice 2018-05-07 15:49:51 -04:00
mach-at91 ARM: at91: lds: add test for SPL binary size and bss size 2018-12-07 08:13:44 -05:00
mach-bcm283x efi_loader: Convert runtime reset from switch to if statements 2018-06-14 10:52:14 +02:00
mach-bcmstb board: arm: Add support for Broadcom BCM7260 2018-09-10 21:19:31 -04:00
mach-davinci driver: net: consolidate ti's code in separate folder 2018-11-05 10:41:59 -06:00
mach-exynos exynos: Leave the compiler to choose the register to avoid possible r0 corruption 2019-01-04 17:28:50 +09:00
mach-highbank SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-imx imx: add i.MX8MQ EVK support 2019-01-01 14:12:18 +01:00
mach-integrator
mach-k3 arm: K3: Fix usage of CONFIG_SYS_K3_KEY 2018-12-26 21:35:52 -05:00
mach-keystone ti: remove usage of DM_I2C_COMPAT and don't disable DM_I2C in SPL 2018-12-10 07:15:21 +01:00
mach-kirkwood Convert CONFIG_MII et al to Kconfig 2018-08-17 13:03:54 -04:00
mach-mediatek mt7629: use linux kernel compatible SMP initialization 2018-12-26 21:35:53 -05:00
mach-meson ARM: meson: Add boot device discovery 2018-11-26 14:40:52 +01:00
mach-mvebu ARM: mvebu: remove out of date comment 2018-12-21 08:59:05 +01:00
mach-omap2 ARM: mach-omap2: omap3: Fix GPIO clocking in SPL 2018-12-26 21:20:48 -05:00
mach-orion5x arm: remove prototype for get_timer_masked 2018-10-10 13:35:09 -04:00
mach-owl board: Add uCRobotics Bubblegum-96 board support 2018-07-09 15:25:23 -04:00
mach-qemu Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
mach-rmobile ARM: rmobile: Fix to enable icache early in Gen3 2018-12-07 16:31:15 +01:00
mach-rockchip rockchip: rk3036: ram: update license 2019-01-02 22:36:46 +01:00
mach-s5pc1xx SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-snapdragon db410c: serial# env using msm board serial 2018-09-30 13:00:35 -04:00
mach-socfpga arm: socfpga: stratix10: Enable Stratix10 FPGA Reconfiguration 2018-12-20 17:12:25 +01:00
mach-sti
mach-stm32 mach-stm32: Set MPU SDRAM size to 512MB for STM32F7/H7 2018-10-06 14:09:41 -04:00
mach-stm32mp gpio: stm32f7: Move STM32_GPIOS_PER_BANK into gpio.h 2018-12-07 08:13:47 -05:00
mach-sunxi sunxi: pmic_bus: Decrease boot time by not writing duplicate data 2018-12-07 22:24:33 +05:30
mach-tegra linux/sizes.h: sync from kernel 2018-11-20 13:08:15 +01:00
mach-uniphier ARM: uniphier: do not modify bootcmd environment variable at run-time 2018-12-29 11:38:33 +09:00
mach-versal arm64: versal: Add Xilinx Versal Virtual QEMU board 2018-10-16 16:53:24 +02:00
mach-versatile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mach-zynq Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq 2018-08-06 08:44:35 +02:00
mach-zynqmp-r5 arm: zynqmp: Add ZynqMP minimal R5 support 2018-05-11 09:38:23 +02:00
thumb1/include/asm/proc-armv SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
config.mk efi_loader: Rename sections to allow for implicit data 2018-07-25 14:57:44 +02:00
Kconfig sunxi: drop default SPL_LIBDISK_SUPPORT enablement 2019-01-09 07:13:30 -05:00
Kconfig.debug
Makefile imx: rename mx8m,MX8M to imx8m,IMX8M 2019-01-01 14:12:18 +01:00