Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin arch: convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x

convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x as the defines
are redundant in these cases

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

authored by

Mike Frysinger and committed by
Bryan Wu
269647dc ffc89627

+30 -36
+1 -1
arch/blackfin/include/asm/gpio.h
··· 110 110 * MODIFICATION HISTORY : 111 111 **************************************************************/ 112 112 113 - #ifndef BF548_FAMILY 113 + #ifndef CONFIG_BF54x 114 114 void set_gpio_dir(unsigned, unsigned short); 115 115 void set_gpio_inen(unsigned, unsigned short); 116 116 void set_gpio_polar(unsigned, unsigned short);
+2 -2
arch/blackfin/include/asm/gptimers.h
··· 17 17 /* 18 18 * BF51x/BF52x/BF537: 8 timers: 19 19 */ 20 - #if defined(CONFIG_BF51x) || defined(BF527_FAMILY) || defined(BF537_FAMILY) 20 + #if defined(CONFIG_BF51x) || defined(CONFIG_BF52x) || defined(BF537_FAMILY) 21 21 # define MAX_BLACKFIN_GPTIMERS 8 22 22 # define TIMER0_GROUP_REG TIMER_ENABLE 23 23 #endif 24 24 /* 25 25 * BF54x: 11 timers (BF542: 8 timers): 26 26 */ 27 - #if defined(BF548_FAMILY) 27 + #if defined(CONFIG_BF54x) 28 28 # ifdef CONFIG_BF542 29 29 # define MAX_BLACKFIN_GPTIMERS 8 30 30 # else
+27 -27
arch/blackfin/kernel/bfin_gpio.c
··· 69 69 static struct gpio_port_t * const gpio_array[] = { 70 70 #if defined(BF533_FAMILY) || defined(BF538_FAMILY) 71 71 (struct gpio_port_t *) FIO_FLAG_D, 72 - #elif defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 72 + #elif defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 73 73 (struct gpio_port_t *) PORTFIO, 74 74 (struct gpio_port_t *) PORTGIO, 75 75 (struct gpio_port_t *) PORTHIO, ··· 77 77 (struct gpio_port_t *) FIO0_FLAG_D, 78 78 (struct gpio_port_t *) FIO1_FLAG_D, 79 79 (struct gpio_port_t *) FIO2_FLAG_D, 80 - #elif defined(BF548_FAMILY) 80 + #elif defined(CONFIG_BF54x) 81 81 (struct gpio_port_t *)PORTA_FER, 82 82 (struct gpio_port_t *)PORTB_FER, 83 83 (struct gpio_port_t *)PORTC_FER, ··· 93 93 #endif 94 94 }; 95 95 96 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 96 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 97 97 static unsigned short * const port_fer[] = { 98 98 (unsigned short *) PORTF_FER, 99 99 (unsigned short *) PORTG_FER, ··· 109 109 110 110 static const 111 111 u8 pmux_offset[][16] = { 112 - # if defined(BF527_FAMILY) 112 + # if defined(CONFIG_BF52x) 113 113 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 8, 10, 10 }, /* PORTF */ 114 114 { 0, 0, 0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 10, 12, 12 }, /* PORTG */ 115 115 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 4, 4 }, /* PORTH */ 116 - # elif defined(BF518_FAMILY) 116 + # elif defined(CONFIG_BF51x) 117 117 { 0, 2, 2, 2, 2, 2, 2, 4, 6, 6, 6, 8, 8, 8, 8, 10 }, /* PORTF */ 118 118 { 0, 0, 0, 2, 4, 6, 6, 6, 8, 10, 10, 12, 14, 14, 14, 14 }, /* PORTG */ 119 119 { 0, 0, 0, 0, 2, 2, 4, 6, 10, 10, 10, 10, 10, 10, 10, 10 }, /* PORTH */ ··· 139 139 140 140 inline int check_gpio(unsigned gpio) 141 141 { 142 - #if defined(BF548_FAMILY) 142 + #if defined(CONFIG_BF54x) 143 143 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 144 144 || gpio == GPIO_PH14 || gpio == GPIO_PH15 145 145 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15) ··· 187 187 if (check_gpio(gpio)) 188 188 return; 189 189 190 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 190 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 191 191 if (usage == GPIO_USAGE) 192 192 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio); 193 193 else 194 194 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); 195 195 SSYNC(); 196 - #elif defined(BF548_FAMILY) 196 + #elif defined(CONFIG_BF54x) 197 197 if (usage == GPIO_USAGE) 198 198 gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio); 199 199 else ··· 273 273 } 274 274 } 275 275 } 276 - #elif defined(BF548_FAMILY) 276 + #elif defined(CONFIG_BF54x) 277 277 inline void portmux_setup(unsigned short per) 278 278 { 279 279 u32 pmux; ··· 297 297 298 298 return (pmux >> (2 * gpio_sub_n(ident)) & 0x3); 299 299 } 300 - #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) 300 + #elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 301 301 inline void portmux_setup(unsigned short per) 302 302 { 303 303 u16 pmux, ident = P_IDENT(per), function = P_FUNCT2MUX(per); ··· 322 322 arch_initcall(bfin_gpio_init); 323 323 324 324 325 - #ifndef BF548_FAMILY 325 + #ifndef CONFIG_BF54x 326 326 /*********************************************************** 327 327 * 328 328 * FUNCTIONS: Blackfin General Purpose Ports Access Functions ··· 489 489 IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX 490 490 #elif defined(BF538_FAMILY) 491 491 IRQ_PORTF_INTB 492 - #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) 492 + #elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 493 493 IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB 494 494 #elif defined(BF561_FAMILY) 495 495 IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB ··· 586 586 gpio_array[bank]->maskb = 0; 587 587 588 588 if (mask) { 589 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 589 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 590 590 gpio_bank_saved[bank].fer = *port_fer[bank]; 591 591 #endif 592 592 gpio_bank_saved[bank].inen = gpio_array[bank]->inen; ··· 631 631 bank = gpio_bank(i); 632 632 633 633 if (mask) { 634 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 634 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 635 635 *port_fer[bank] = gpio_bank_saved[bank].fer; 636 636 #endif 637 637 gpio_array[bank]->inen = gpio_bank_saved[bank].inen; ··· 657 657 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { 658 658 bank = gpio_bank(i); 659 659 660 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 660 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 661 661 gpio_bank_saved[bank].fer = *port_fer[bank]; 662 - #if defined(BF527_FAMILY) || defined(BF518_FAMILY) 662 + #if defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 663 663 gpio_bank_saved[bank].mux = *port_mux[bank]; 664 664 #else 665 665 if (bank == 0) ··· 685 685 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { 686 686 bank = gpio_bank(i); 687 687 688 - #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) 689 - #if defined(BF527_FAMILY) || defined(BF518_FAMILY) 688 + #if defined(CONFIG_BF52x) || defined(BF537_FAMILY) || defined(CONFIG_BF51x) 689 + #if defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 690 690 *port_mux[bank] = gpio_bank_saved[bank].mux; 691 691 #else 692 692 if (bank == 0) ··· 710 710 711 711 712 712 #endif 713 - #else /* BF548_FAMILY */ 713 + #else /* CONFIG_BF54x */ 714 714 #ifdef CONFIG_PM 715 715 716 716 u32 bfin_pm_standby_setup(void) ··· 762 762 } 763 763 EXPORT_SYMBOL(get_gpio_dir); 764 764 765 - #endif /* BF548_FAMILY */ 765 + #endif /* CONFIG_BF54x */ 766 766 767 767 /*********************************************************** 768 768 * ··· 817 817 * be requested and used by several drivers 818 818 */ 819 819 820 - #ifdef BF548_FAMILY 820 + #ifdef CONFIG_BF54x 821 821 if (!((per & P_MAYSHARE) && get_portmux(per) == P_FUNCT2MUX(per))) { 822 822 #else 823 823 if (!(per & P_MAYSHARE)) { ··· 964 964 printk(KERN_NOTICE "bfin-gpio: GPIO %d is already reserved as gpio-irq!" 965 965 " (Documentation/blackfin/bfin-gpio-notes.txt)\n", gpio); 966 966 } 967 - #ifndef BF548_FAMILY 967 + #ifndef CONFIG_BF54x 968 968 else { /* Reset POLAR setting when acquiring a gpio for the first time */ 969 969 set_gpio_polar(gpio, 0); 970 970 } ··· 1072 1072 1073 1073 static inline void __bfin_gpio_direction_input(unsigned gpio) 1074 1074 { 1075 - #ifdef BF548_FAMILY 1075 + #ifdef CONFIG_BF54x 1076 1076 gpio_array[gpio_bank(gpio)]->dir_clear = gpio_bit(gpio); 1077 1077 #else 1078 1078 gpio_array[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio); ··· 1100 1100 1101 1101 void bfin_gpio_irq_prepare(unsigned gpio) 1102 1102 { 1103 - #ifdef BF548_FAMILY 1103 + #ifdef CONFIG_BF54x 1104 1104 unsigned long flags; 1105 1105 #endif 1106 1106 1107 1107 port_setup(gpio, GPIO_USAGE); 1108 1108 1109 - #ifdef BF548_FAMILY 1109 + #ifdef CONFIG_BF54x 1110 1110 local_irq_save_hw(flags); 1111 1111 __bfin_gpio_direction_input(gpio); 1112 1112 local_irq_restore_hw(flags); ··· 1135 1135 1136 1136 gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 1137 1137 gpio_set_value(gpio, value); 1138 - #ifdef BF548_FAMILY 1138 + #ifdef CONFIG_BF54x 1139 1139 gpio_array[gpio_bank(gpio)]->dir_set = gpio_bit(gpio); 1140 1140 #else 1141 1141 gpio_array[gpio_bank(gpio)]->dir |= gpio_bit(gpio); ··· 1150 1150 1151 1151 int bfin_gpio_get_value(unsigned gpio) 1152 1152 { 1153 - #ifdef BF548_FAMILY 1153 + #ifdef CONFIG_BF54x 1154 1154 return (1 & (gpio_array[gpio_bank(gpio)]->data >> gpio_sub_n(gpio))); 1155 1155 #else 1156 1156 unsigned long flags;
-2
arch/blackfin/mach-bf518/include/mach/blackfin.h
··· 32 32 #ifndef _MACH_BLACKFIN_H_ 33 33 #define _MACH_BLACKFIN_H_ 34 34 35 - #define BF518_FAMILY 36 - 37 35 #include "bf518.h" 38 36 #include "mem_map.h" 39 37 #include "defBF512.h"
-2
arch/blackfin/mach-bf527/include/mach/blackfin.h
··· 32 32 #ifndef _MACH_BLACKFIN_H_ 33 33 #define _MACH_BLACKFIN_H_ 34 34 35 - #define BF527_FAMILY 36 - 37 35 #include "bf527.h" 38 36 #include "mem_map.h" 39 37 #include "defBF522.h"
-2
arch/blackfin/mach-bf548/include/mach/blackfin.h
··· 32 32 #ifndef _MACH_BLACKFIN_H_ 33 33 #define _MACH_BLACKFIN_H_ 34 34 35 - #define BF548_FAMILY 36 - 37 35 #include "bf548.h" 38 36 #include "mem_map.h" 39 37 #include "anomaly.h"