diff options
Diffstat (limited to 'arch/mips/include/asm/mach-au1x00/gpio-au1000.h')
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/gpio-au1000.h | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 1f41a522906..73853b5a2a3 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h | |||
@@ -347,17 +347,6 @@ static inline int alchemy_gpio2_to_irq(int gpio) | |||
347 | 347 | ||
348 | /**********************************************************************/ | 348 | /**********************************************************************/ |
349 | 349 | ||
350 | /* On Au1000, Au1500 and Au1100 GPIOs won't work as inputs before | ||
351 | * SYS_PININPUTEN is written to at least once. On Au1550/Au1200 this | ||
352 | * register enables use of GPIOs as wake source. | ||
353 | */ | ||
354 | static inline void alchemy_gpio1_input_enable(void) | ||
355 | { | ||
356 | void __iomem *base = (void __iomem *)KSEG1ADDR(AU1000_SYS_PHYS_ADDR); | ||
357 | __raw_writel(0, base + SYS_PININPUTEN); /* the write op is key */ | ||
358 | wmb(); | ||
359 | } | ||
360 | |||
361 | /* GPIO2 shared interrupts and control */ | 350 | /* GPIO2 shared interrupts and control */ |
362 | 351 | ||
363 | static inline void __alchemy_gpio2_mod_int(int gpio2, int en) | 352 | static inline void __alchemy_gpio2_mod_int(int gpio2, int en) |
@@ -561,6 +550,7 @@ static inline int alchemy_irq_to_gpio(int irq) | |||
561 | 550 | ||
562 | #ifndef CONFIG_GPIOLIB | 551 | #ifndef CONFIG_GPIOLIB |
563 | 552 | ||
553 | #ifdef CONFIG_ALCHEMY_GPIOINT_AU1000 | ||
564 | 554 | ||
565 | #ifndef CONFIG_ALCHEMY_GPIO_INDIRECT /* case (4) */ | 555 | #ifndef CONFIG_ALCHEMY_GPIO_INDIRECT /* case (4) */ |
566 | 556 | ||
@@ -665,24 +655,7 @@ static inline void gpio_unexport(unsigned gpio) | |||
665 | 655 | ||
666 | #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ | 656 | #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ |
667 | 657 | ||
668 | 658 | #endif /* CONFIG_ALCHEMY_GPIOINT_AU1000 */ | |
669 | #else /* CONFIG GPIOLIB */ | ||
670 | |||
671 | |||
672 | /* using gpiolib to provide up to 2 gpio_chips for on-chip gpios */ | ||
673 | #ifndef CONFIG_ALCHEMY_GPIO_INDIRECT /* case (2) */ | ||
674 | |||
675 | /* get everything through gpiolib */ | ||
676 | #define gpio_to_irq __gpio_to_irq | ||
677 | #define gpio_get_value __gpio_get_value | ||
678 | #define gpio_set_value __gpio_set_value | ||
679 | #define gpio_cansleep __gpio_cansleep | ||
680 | #define irq_to_gpio alchemy_irq_to_gpio | ||
681 | |||
682 | #include <asm-generic/gpio.h> | ||
683 | |||
684 | #endif /* !CONFIG_ALCHEMY_GPIO_INDIRECT */ | ||
685 | |||
686 | 659 | ||
687 | #endif /* !CONFIG_GPIOLIB */ | 660 | #endif /* !CONFIG_GPIOLIB */ |
688 | 661 | ||