diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-21 12:33:36 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-06-16 14:13:18 -0400 |
commit | c390aad0330f330ce9818ef5269169bbae335da9 (patch) | |
tree | 0dd100598ad0d40fdfd4c96afdad9046e2b7bb30 /drivers | |
parent | d5f46247e77a63bc3bb4b3f979281e5c700c218e (diff) |
gpio/omap: _get_gpio_irqbank_mask: replace hard-coded mask with bank->width
Replace hard-coded mask values with bank->width which is already coming
from platform_data.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 3f436c033611..0766aa1c3f31 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c | |||
@@ -710,46 +710,40 @@ static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank) | |||
710 | void __iomem *reg = bank->base; | 710 | void __iomem *reg = bank->base; |
711 | int inv = 0; | 711 | int inv = 0; |
712 | u32 l; | 712 | u32 l; |
713 | u32 mask; | 713 | u32 mask = (1 << bank->width) - 1; |
714 | 714 | ||
715 | switch (bank->method) { | 715 | switch (bank->method) { |
716 | #ifdef CONFIG_ARCH_OMAP1 | 716 | #ifdef CONFIG_ARCH_OMAP1 |
717 | case METHOD_MPUIO: | 717 | case METHOD_MPUIO: |
718 | reg += OMAP_MPUIO_GPIO_MASKIT / bank->stride; | 718 | reg += OMAP_MPUIO_GPIO_MASKIT / bank->stride; |
719 | mask = 0xffff; | ||
720 | inv = 1; | 719 | inv = 1; |
721 | break; | 720 | break; |
722 | #endif | 721 | #endif |
723 | #ifdef CONFIG_ARCH_OMAP15XX | 722 | #ifdef CONFIG_ARCH_OMAP15XX |
724 | case METHOD_GPIO_1510: | 723 | case METHOD_GPIO_1510: |
725 | reg += OMAP1510_GPIO_INT_MASK; | 724 | reg += OMAP1510_GPIO_INT_MASK; |
726 | mask = 0xffff; | ||
727 | inv = 1; | 725 | inv = 1; |
728 | break; | 726 | break; |
729 | #endif | 727 | #endif |
730 | #ifdef CONFIG_ARCH_OMAP16XX | 728 | #ifdef CONFIG_ARCH_OMAP16XX |
731 | case METHOD_GPIO_1610: | 729 | case METHOD_GPIO_1610: |
732 | reg += OMAP1610_GPIO_IRQENABLE1; | 730 | reg += OMAP1610_GPIO_IRQENABLE1; |
733 | mask = 0xffff; | ||
734 | break; | 731 | break; |
735 | #endif | 732 | #endif |
736 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 733 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
737 | case METHOD_GPIO_7XX: | 734 | case METHOD_GPIO_7XX: |
738 | reg += OMAP7XX_GPIO_INT_MASK; | 735 | reg += OMAP7XX_GPIO_INT_MASK; |
739 | mask = 0xffffffff; | ||
740 | inv = 1; | 736 | inv = 1; |
741 | break; | 737 | break; |
742 | #endif | 738 | #endif |
743 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 739 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
744 | case METHOD_GPIO_24XX: | 740 | case METHOD_GPIO_24XX: |
745 | reg += OMAP24XX_GPIO_IRQENABLE1; | 741 | reg += OMAP24XX_GPIO_IRQENABLE1; |
746 | mask = 0xffffffff; | ||
747 | break; | 742 | break; |
748 | #endif | 743 | #endif |
749 | #if defined(CONFIG_ARCH_OMAP4) | 744 | #if defined(CONFIG_ARCH_OMAP4) |
750 | case METHOD_GPIO_44XX: | 745 | case METHOD_GPIO_44XX: |
751 | reg += OMAP4_GPIO_IRQSTATUSSET0; | 746 | reg += OMAP4_GPIO_IRQSTATUSSET0; |
752 | mask = 0xffffffff; | ||
753 | break; | 747 | break; |
754 | #endif | 748 | #endif |
755 | default: | 749 | default: |