diff options
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap7000.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index 1d2bf347a1d6..4dda42d3f6d5 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/fb.h> | 9 | #include <linux/fb.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/dma-mapping.h> | ||
12 | #include <linux/spi/spi.h> | 13 | #include <linux/spi/spi.h> |
13 | 14 | ||
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
@@ -45,19 +46,30 @@ | |||
45 | .flags = IORESOURCE_IRQ, \ | 46 | .flags = IORESOURCE_IRQ, \ |
46 | } | 47 | } |
47 | 48 | ||
49 | /* REVISIT these assume *every* device supports DMA, but several | ||
50 | * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more. | ||
51 | */ | ||
48 | #define DEFINE_DEV(_name, _id) \ | 52 | #define DEFINE_DEV(_name, _id) \ |
53 | static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ | ||
49 | static struct platform_device _name##_id##_device = { \ | 54 | static struct platform_device _name##_id##_device = { \ |
50 | .name = #_name, \ | 55 | .name = #_name, \ |
51 | .id = _id, \ | 56 | .id = _id, \ |
57 | .dev = { \ | ||
58 | .dma_mask = &_name##_id##_dma_mask, \ | ||
59 | .coherent_dma_mask = DMA_32BIT_MASK, \ | ||
60 | }, \ | ||
52 | .resource = _name##_id##_resource, \ | 61 | .resource = _name##_id##_resource, \ |
53 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ | 62 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ |
54 | } | 63 | } |
55 | #define DEFINE_DEV_DATA(_name, _id) \ | 64 | #define DEFINE_DEV_DATA(_name, _id) \ |
65 | static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ | ||
56 | static struct platform_device _name##_id##_device = { \ | 66 | static struct platform_device _name##_id##_device = { \ |
57 | .name = #_name, \ | 67 | .name = #_name, \ |
58 | .id = _id, \ | 68 | .id = _id, \ |
59 | .dev = { \ | 69 | .dev = { \ |
70 | .dma_mask = &_name##_id##_dma_mask, \ | ||
60 | .platform_data = &_name##_id##_data, \ | 71 | .platform_data = &_name##_id##_data, \ |
72 | .coherent_dma_mask = DMA_32BIT_MASK, \ | ||
61 | }, \ | 73 | }, \ |
62 | .resource = _name##_id##_resource, \ | 74 | .resource = _name##_id##_resource, \ |
63 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ | 75 | .num_resources = ARRAY_SIZE(_name##_id##_resource), \ |