aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-11 21:28:59 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-11 21:28:59 -0500
commitcd39301a68f9604854f3543117b01dc73cbe193f (patch)
tree0be77134407d73aece97050151d80ed4b07b23bc /include
parent13d7d84e078f49f08b657a3fba0d7a0b7b44ba65 (diff)
parent3fc0eb47aa96b1d9230ff85b722c45c3b9e83d14 (diff)
Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32
* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32: [AVR32] Add missing #include <linux/param.h> to delay.c [AVR32] Pass dev parameter to dma_cache_sync() [AVR32] Implement intc_get_pending() [AVR32] Don't include <asm/delay.h> [AVR32] Put the chip in "stop" mode when halting the system [AVR32] Set flow handler for external interrupts [AVR32] Remove unused file [AVR32] Remove mii_phy_addr and eth_addr from eth_platform_data [AVR32] Move ethernet tag parsing to board-specific code [AVR32] Add macb1 platform_device [AVR32] Portmux API update
Diffstat (limited to 'include')
-rw-r--r--include/asm-avr32/arch-at32ap/at32ap7000.h33
-rw-r--r--include/asm-avr32/arch-at32ap/board.h3
-rw-r--r--include/asm-avr32/arch-at32ap/portmux.h20
-rw-r--r--include/asm-avr32/dma-mapping.h12
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);
21struct platform_device *at32_add_device_usart(unsigned int id); 21struct platform_device *at32_add_device_usart(unsigned int id);
22 22
23struct eth_platform_data { 23struct 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};
29struct platform_device * 26struct platform_device *
30at32_add_device_eth(unsigned int id, struct eth_platform_data *data); 27at32_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
13void 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
22void at32_select_periph(unsigned int pin, unsigned int periph,
23 unsigned long flags);
24void 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
109dma_map_single(struct device *dev, void *cpu_addr, size_t size, 109dma_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
256dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, 256dma_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
262static inline void 262static inline void
263dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 263dma_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}