From 2ae795b02aa46a99d845958ae8d7bc8afa04292b Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 24 May 2007 13:52:08 -0700 Subject: [AVR32] gpio_*_cansleep() fix The AVR32 was missing the gpio_*_cansleep() calls, breaking compilation for some code using them. Signed-off-by: David Brownell Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/arch-at32ap/gpio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h index 80a21aa9ae77..af7f9535bab3 100644 --- a/include/asm-avr32/arch-at32ap/gpio.h +++ b/include/asm-avr32/arch-at32ap/gpio.h @@ -14,6 +14,8 @@ int gpio_direction_output(unsigned int gpio, int value); int gpio_get_value(unsigned int gpio); void gpio_set_value(unsigned int gpio, int value); +#include /* cansleep wrappers */ + static inline int gpio_to_irq(unsigned int gpio) { return gpio + GPIO_IRQ_BASE; -- cgit v1.2.3 From 093d0faf57e59feee224217273f944e10e4e3562 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 11 Jun 2007 17:17:14 +0200 Subject: [AVR32] Define ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES This allows SLUB debugging to be used without fear of messing up DMA transfers. SPI is one example that easily breaks without this patch. Signed-off-by: Haavard Skinnemoen --- include/asm-avr32/cache.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h index dabb955f3c00..d3cf35ab11ab 100644 --- a/include/asm-avr32/cache.h +++ b/include/asm-avr32/cache.h @@ -4,6 +4,15 @@ #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +/* + * Memory returned by kmalloc() may be used for DMA, so we must make + * sure that all such allocations are cache aligned. Otherwise, + * unrelated code may cause parts of the buffer to be read into the + * cache before the transfer is done, causing old data to be seen by + * the CPU. + */ +#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES + #ifndef __ASSEMBLER__ struct cache_info { unsigned int ways; -- cgit v1.2.3