diff options
author | Matteo Vit <matteo.vit@dave.eu> | 2007-08-09 08:55:34 -0400 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-10-11 05:38:41 -0400 |
commit | 7808fa4853728a776d7e76d68fb406f515a4119c (patch) | |
tree | 815245c239af653a61382acf15b19cfde2c351c5 | |
parent | d938b89392bd3ff64e0610d8c4e0d3f7091d98db (diff) |
[AVR32] add multidrive support for pio driver
This patch add multidrive support for pio driver
Signed-off-by: Matteo Vit - Dave S.r.l. <matteo.vit@dave.eu>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
-rw-r--r-- | arch/avr32/mach-at32ap/pio.c | 4 | ||||
-rw-r--r-- | include/asm-avr32/arch-at32ap/portmux.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 1eb99b814f5b..d61a02da898c 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -110,6 +110,10 @@ void __init at32_select_gpio(unsigned int pin, unsigned long flags) | |||
110 | pio_writel(pio, SODR, mask); | 110 | pio_writel(pio, SODR, mask); |
111 | else | 111 | else |
112 | pio_writel(pio, CODR, mask); | 112 | pio_writel(pio, CODR, mask); |
113 | if (flags & AT32_GPIOF_MULTIDRV) | ||
114 | pio_writel(pio, MDER, mask); | ||
115 | else | ||
116 | pio_writel(pio, MDDR, mask); | ||
113 | pio_writel(pio, PUDR, mask); | 117 | pio_writel(pio, PUDR, mask); |
114 | pio_writel(pio, OER, mask); | 118 | pio_writel(pio, OER, mask); |
115 | } else { | 119 | } else { |
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h index 9930871decde..b1abe6b4e4ef 100644 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ b/include/asm-avr32/arch-at32ap/portmux.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ | 19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ |
20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ | 20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ |
21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ | 21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ |
22 | #define AT32_GPIOF_MULTIDRV 0x00000010 /* Enable multidriver option */ | ||
22 | 23 | ||
23 | void at32_select_periph(unsigned int pin, unsigned int periph, | 24 | void at32_select_periph(unsigned int pin, unsigned int periph, |
24 | unsigned long flags); | 25 | unsigned long flags); |