diff options
Diffstat (limited to 'include/asm-avr32')
-rw-r--r-- | include/asm-avr32/arch-at32ap/at32ap7000.h | 33 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/board.h | 3 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/portmux.h | 20 | ||||
-rw-r--r-- | include/asm-avr32/dma-mapping.h | 12 |
4 files changed, 54 insertions, 14 deletions
diff --git a/include/asm-avr32/arch-at32ap/at32ap7000.h b/include/asm-avr32/arch-at32ap/at32ap7000.h new file mode 100644 index 000000000000..ba85e04553d4 --- /dev/null +++ b/include/asm-avr32/arch-at32ap/at32ap7000.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Pin definitions for AT32AP7000. | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_AT32AP7000_H__ | ||
11 | #define __ASM_ARCH_AT32AP7000_H__ | ||
12 | |||
13 | #define GPIO_PERIPH_A 0 | ||
14 | #define GPIO_PERIPH_B 1 | ||
15 | |||
16 | #define NR_GPIO_CONTROLLERS 4 | ||
17 | |||
18 | /* | ||
19 | * Pin numbers identifying specific GPIO pins on the chip. They can | ||
20 | * also be converted to IRQ numbers by passing them through | ||
21 | * gpio_to_irq(). | ||
22 | */ | ||
23 | #define GPIO_PIOA_BASE (0) | ||
24 | #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) | ||
25 | #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) | ||
26 | #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) | ||
27 | |||
28 | #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) | ||
29 | #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) | ||
30 | #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) | ||
31 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) | ||
32 | |||
33 | #endif /* __ASM_ARCH_AT32AP7000_H__ */ | ||
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index a39b3e999f18..b120ee030c86 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
@@ -21,10 +21,7 @@ void at32_map_usart(unsigned int hw_id, unsigned int line); | |||
21 | struct platform_device *at32_add_device_usart(unsigned int id); | 21 | struct platform_device *at32_add_device_usart(unsigned int id); |
22 | 22 | ||
23 | struct eth_platform_data { | 23 | struct eth_platform_data { |
24 | u8 valid; | ||
25 | u8 mii_phy_addr; | ||
26 | u8 is_rmii; | 24 | u8 is_rmii; |
27 | u8 hw_addr[6]; | ||
28 | }; | 25 | }; |
29 | struct platform_device * | 26 | struct platform_device * |
30 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | 27 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); |
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h index 4d50421262a1..83c690571322 100644 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ b/include/asm-avr32/arch-at32ap/portmux.h | |||
@@ -7,10 +7,20 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_AVR32_AT32_PORTMUX_H__ | 10 | #ifndef __ASM_ARCH_PORTMUX_H__ |
11 | #define __ASM_AVR32_AT32_PORTMUX_H__ | 11 | #define __ASM_ARCH_PORTMUX_H__ |
12 | 12 | ||
13 | void portmux_set_func(unsigned int portmux_id, unsigned int pin_id, | 13 | /* |
14 | unsigned int function_id); | 14 | * Set up pin multiplexing, called from board init only. |
15 | * | ||
16 | * The following flags determine the initial state of the pin. | ||
17 | */ | ||
18 | #define AT32_GPIOF_PULLUP 0x00000001 /* Enable pull-up */ | ||
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* Enable output driver */ | ||
20 | #define AT32_GPIOF_HIGH 0x00000004 /* Set output high */ | ||
21 | |||
22 | void at32_select_periph(unsigned int pin, unsigned int periph, | ||
23 | unsigned long flags); | ||
24 | void at32_select_gpio(unsigned int pin, unsigned long flags); | ||
15 | 25 | ||
16 | #endif /* __ASM_AVR32_AT32_PORTMUX_H__ */ | 26 | #endif /* __ASM_ARCH_PORTMUX_H__ */ |
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index 0580b5d62bba..5c01e27f0b41 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -109,7 +109,7 @@ static inline dma_addr_t | |||
109 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 109 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
110 | enum dma_data_direction direction) | 110 | enum dma_data_direction direction) |
111 | { | 111 | { |
112 | dma_cache_sync(cpu_addr, size, direction); | 112 | dma_cache_sync(dev, cpu_addr, size, direction); |
113 | return virt_to_bus(cpu_addr); | 113 | return virt_to_bus(cpu_addr); |
114 | } | 114 | } |
115 | 115 | ||
@@ -211,7 +211,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
211 | 211 | ||
212 | sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; | 212 | sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; |
213 | virt = page_address(sg[i].page) + sg[i].offset; | 213 | virt = page_address(sg[i].page) + sg[i].offset; |
214 | dma_cache_sync(virt, sg[i].length, direction); | 214 | dma_cache_sync(dev, virt, sg[i].length, direction); |
215 | } | 215 | } |
216 | 216 | ||
217 | return nents; | 217 | return nents; |
@@ -256,14 +256,14 @@ static inline void | |||
256 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | 256 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, |
257 | size_t size, enum dma_data_direction direction) | 257 | size_t size, enum dma_data_direction direction) |
258 | { | 258 | { |
259 | dma_cache_sync(bus_to_virt(dma_handle), size, direction); | 259 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); |
260 | } | 260 | } |
261 | 261 | ||
262 | static inline void | 262 | static inline void |
263 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, | 263 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, |
264 | size_t size, enum dma_data_direction direction) | 264 | size_t size, enum dma_data_direction direction) |
265 | { | 265 | { |
266 | dma_cache_sync(bus_to_virt(dma_handle), size, direction); | 266 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, direction); |
267 | } | 267 | } |
268 | 268 | ||
269 | /** | 269 | /** |
@@ -286,7 +286,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
286 | int i; | 286 | int i; |
287 | 287 | ||
288 | for (i = 0; i < nents; i++) { | 288 | for (i = 0; i < nents; i++) { |
289 | dma_cache_sync(page_address(sg[i].page) + sg[i].offset, | 289 | dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, |
290 | sg[i].length, direction); | 290 | sg[i].length, direction); |
291 | } | 291 | } |
292 | } | 292 | } |
@@ -298,7 +298,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
298 | int i; | 298 | int i; |
299 | 299 | ||
300 | for (i = 0; i < nents; i++) { | 300 | for (i = 0; i < nents; i++) { |
301 | dma_cache_sync(page_address(sg[i].page) + sg[i].offset, | 301 | dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, |
302 | sg[i].length, direction); | 302 | sg[i].length, direction); |
303 | } | 303 | } |
304 | } | 304 | } |