]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: mv_udc: Add cacheline length check
authorMarek Vasut <marex@denx.de>
Wed, 10 Jul 2013 01:16:38 +0000 (03:16 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 29 Jul 2013 21:01:32 +0000 (23:01 +0200)
Check the length of system cacheline at compile-time and fail
if the system uses too long cachelines.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
drivers/usb/gadget/mv_udc.c

index bbf4418a2e540dc51fd41fe1f8933ca23e083d29..1ead2f24599d657aa27a31888818745dd1c65098 100644 (file)
 #error This driver only supports one single controller.
 #endif
 
+/*
+ * Check if the system has too long cachelines. If the cachelines are
+ * longer then 128b, the driver will not be able flush/invalidate data
+ * cache over separate QH entries. We use 128b because one QH entry is
+ * 64b long and there are always two QH list entries for each endpoint.
+ */
+#if ARCH_DMA_MINALIGN > 128
+#error This driver can not work on systems with caches longer than 128b
+#endif
+
 #ifndef DEBUG
 #define DBG(x...) do {} while (0)
 #else