diff options
author | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:21 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:21 -0500 |
commit | 2f6f4bcdd611cb968b800f7569c4383727856668 (patch) | |
tree | e9de0755bfa40a932c2ca44e532aef8ae704ab9b /arch/blackfin/kernel/bfin_gpio.c | |
parent | 2563265bdb5fb21396cdc2125c8260e57f7c3991 (diff) |
Blackfin arch: add support for Blackfin latest processor family BF51x
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index e129102ad09b..5556e13993bf 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -125,7 +125,7 @@ static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | |||
125 | }; | 125 | }; |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 128 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
129 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | 129 | static struct gpio_port_t *gpio_bankb[gpio_bank(MAX_BLACKFIN_GPIOS)] = { |
130 | (struct gpio_port_t *) PORTFIO, | 130 | (struct gpio_port_t *) PORTFIO, |
131 | (struct gpio_port_t *) PORTGIO, | 131 | (struct gpio_port_t *) PORTGIO, |
@@ -139,7 +139,7 @@ static unsigned short *port_fer[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | |||
139 | }; | 139 | }; |
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | #ifdef BF527_FAMILY | 142 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
143 | static unsigned short *port_mux[gpio_bank(MAX_BLACKFIN_GPIOS)] = { | 143 | static unsigned short *port_mux[gpio_bank(MAX_BLACKFIN_GPIOS)] = { |
144 | (unsigned short *) PORTF_MUX, | 144 | (unsigned short *) PORTF_MUX, |
145 | (unsigned short *) PORTG_MUX, | 145 | (unsigned short *) PORTG_MUX, |
@@ -206,7 +206,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG_INTB | |||
206 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB}; | 206 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB}; |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | #ifdef BF527_FAMILY | 209 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
210 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB}; | 210 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB}; |
211 | #endif | 211 | #endif |
212 | 212 | ||
@@ -268,7 +268,7 @@ static int cmp_label(unsigned short ident, const char *label) | |||
268 | return -EINVAL; | 268 | return -EINVAL; |
269 | } | 269 | } |
270 | 270 | ||
271 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 271 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
272 | static void port_setup(unsigned gpio, unsigned short usage) | 272 | static void port_setup(unsigned gpio, unsigned short usage) |
273 | { | 273 | { |
274 | if (!check_gpio(gpio)) { | 274 | if (!check_gpio(gpio)) { |
@@ -383,7 +383,7 @@ inline u16 get_portmux(unsigned short portno) | |||
383 | 383 | ||
384 | return (pmux >> (2 * gpio_sub_n(portno)) & 0x3); | 384 | return (pmux >> (2 * gpio_sub_n(portno)) & 0x3); |
385 | } | 385 | } |
386 | #elif defined(BF527_FAMILY) | 386 | #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) |
387 | inline void portmux_setup(unsigned short portno, unsigned short function) | 387 | inline void portmux_setup(unsigned short portno, unsigned short function) |
388 | { | 388 | { |
389 | u16 pmux, ident = P_IDENT(portno); | 389 | u16 pmux, ident = P_IDENT(portno); |
@@ -683,7 +683,7 @@ u32 bfin_pm_standby_setup(void) | |||
683 | gpio_bankb[bank]->maskb = 0; | 683 | gpio_bankb[bank]->maskb = 0; |
684 | 684 | ||
685 | if (mask) { | 685 | if (mask) { |
686 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 686 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
687 | gpio_bank_saved[bank].fer = *port_fer[bank]; | 687 | gpio_bank_saved[bank].fer = *port_fer[bank]; |
688 | #endif | 688 | #endif |
689 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; | 689 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; |
@@ -728,7 +728,7 @@ void bfin_pm_standby_restore(void) | |||
728 | bank = gpio_bank(i); | 728 | bank = gpio_bank(i); |
729 | 729 | ||
730 | if (mask) { | 730 | if (mask) { |
731 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 731 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
732 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 732 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
733 | #endif | 733 | #endif |
734 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; | 734 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; |
@@ -754,9 +754,9 @@ void bfin_gpio_pm_hibernate_suspend(void) | |||
754 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 754 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
755 | bank = gpio_bank(i); | 755 | bank = gpio_bank(i); |
756 | 756 | ||
757 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 757 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
758 | gpio_bank_saved[bank].fer = *port_fer[bank]; | 758 | gpio_bank_saved[bank].fer = *port_fer[bank]; |
759 | #ifdef BF527_FAMILY | 759 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
760 | gpio_bank_saved[bank].mux = *port_mux[bank]; | 760 | gpio_bank_saved[bank].mux = *port_mux[bank]; |
761 | #else | 761 | #else |
762 | if (bank == 0) | 762 | if (bank == 0) |
@@ -782,8 +782,8 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
782 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 782 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
783 | bank = gpio_bank(i); | 783 | bank = gpio_bank(i); |
784 | 784 | ||
785 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | 785 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
786 | #ifdef BF527_FAMILY | 786 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
787 | *port_mux[bank] = gpio_bank_saved[bank].mux; | 787 | *port_mux[bank] = gpio_bank_saved[bank].mux; |
788 | #else | 788 | #else |
789 | if (bank == 0) | 789 | if (bank == 0) |