diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 17:27:22 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 17:27:22 -0500 |
| commit | 6c0514ddd973ff13c3d2b2e7ac1422c982afb8eb (patch) | |
| tree | beccc0d9aa9df71f4af081736e8c0b007dfcb603 | |
| parent | 98d38dd2ee30322fc9934d7490be3c5bee80950e (diff) | |
| parent | 36855dcfc980f247909b8f63776664c6ccb6f183 (diff) | |
Merge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux
Pull blackfin updates from Steven Miao:
"Blackfin gpio changes, add adi pinctrl driver, and bug fixes"
* tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux:
blackfin: fix build warning for unused variable
smp: bf561: and smb_wmb()/smp_rmb() at ipi send/receive
pm: use GFP_ATOMIC when pm core call this function
blackfin: serial: Add serial port_fer and port_mux early platform resources.
blackfin: pinctrl-adi2: code cleanup after using pinctrl-adi2
blackfin: adi gpio driver and pinctrl driver support
bf609: update default config for spi
Blackfin: bfin_gpio: Use proper mask for comparing pfunc
| -rw-r--r-- | arch/blackfin/configs/BF609-EZKIT_defconfig | 2 | ||||
| -rw-r--r-- | arch/blackfin/include/asm/irq.h | 3 | ||||
| -rw-r--r-- | arch/blackfin/include/asm/irq_handler.h | 6 | ||||
| -rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 159 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf548/Kconfig | 34 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 538 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf548/include/mach/gpio.h | 8 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf548/include/mach/irq.h | 2 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf609/Kconfig | 42 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf609/boards/ezkit.c | 472 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf609/include/mach/gpio.h | 8 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf609/include/mach/irq.h | 2 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf609/include/mach/portmux.h | 4 | ||||
| -rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 421 | ||||
| -rw-r--r-- | arch/blackfin/mach-common/pm.c | 22 | ||||
| -rw-r--r-- | arch/blackfin/mach-common/smp.c | 12 |
16 files changed, 1025 insertions, 710 deletions
diff --git a/arch/blackfin/configs/BF609-EZKIT_defconfig b/arch/blackfin/configs/BF609-EZKIT_defconfig index 13eb73231a9a..4ca39ab6b2bf 100644 --- a/arch/blackfin/configs/BF609-EZKIT_defconfig +++ b/arch/blackfin/configs/BF609-EZKIT_defconfig | |||
| @@ -102,7 +102,7 @@ CONFIG_I2C_CHARDEV=y | |||
| 102 | CONFIG_I2C_BLACKFIN_TWI=y | 102 | CONFIG_I2C_BLACKFIN_TWI=y |
| 103 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 | 103 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 |
| 104 | CONFIG_SPI=y | 104 | CONFIG_SPI=y |
| 105 | CONFIG_SPI_BFIN6XX=y | 105 | CONFIG_SPI_BFIN_V3=y |
| 106 | CONFIG_GPIOLIB=y | 106 | CONFIG_GPIOLIB=y |
| 107 | CONFIG_GPIO_SYSFS=y | 107 | CONFIG_GPIO_SYSFS=y |
| 108 | # CONFIG_HWMON is not set | 108 | # CONFIG_HWMON is not set |
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h index 4ae1144a4578..2fd04f10cc26 100644 --- a/arch/blackfin/include/asm/irq.h +++ b/arch/blackfin/include/asm/irq.h | |||
| @@ -23,8 +23,7 @@ | |||
| 23 | /* | 23 | /* |
| 24 | * pm save bfin pint registers | 24 | * pm save bfin pint registers |
| 25 | */ | 25 | */ |
| 26 | struct bfin_pm_pint_save { | 26 | struct adi_pm_pint_save { |
| 27 | u32 mask_set; | ||
| 28 | u32 assign; | 27 | u32 assign; |
| 29 | u32 edge_set; | 28 | u32 edge_set; |
| 30 | u32 invert_set; | 29 | u32 invert_set; |
diff --git a/arch/blackfin/include/asm/irq_handler.h b/arch/blackfin/include/asm/irq_handler.h index 4fbf83575db1..4b2a992794d7 100644 --- a/arch/blackfin/include/asm/irq_handler.h +++ b/arch/blackfin/include/asm/irq_handler.h | |||
| @@ -12,11 +12,11 @@ | |||
| 12 | #include <mach/irq.h> | 12 | #include <mach/irq.h> |
| 13 | 13 | ||
| 14 | /* init functions only */ | 14 | /* init functions only */ |
| 15 | extern int __init init_arch_irq(void); | 15 | extern int init_arch_irq(void); |
| 16 | extern void init_exception_vectors(void); | 16 | extern void init_exception_vectors(void); |
| 17 | extern void __init program_IAR(void); | 17 | extern void program_IAR(void); |
| 18 | #ifdef init_mach_irq | 18 | #ifdef init_mach_irq |
| 19 | extern void __init init_mach_irq(void); | 19 | extern void init_mach_irq(void); |
| 20 | #else | 20 | #else |
| 21 | # define init_mach_irq() | 21 | # define init_mach_irq() |
| 22 | #endif | 22 | #endif |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index ed978f1c5cb9..a017359c1826 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
| @@ -11,11 +11,8 @@ | |||
| 11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
| 12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
| 13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
| 14 | #include <asm/blackfin.h> | 14 | #include <linux/gpio.h> |
| 15 | #include <asm/gpio.h> | ||
| 16 | #include <asm/portmux.h> | ||
| 17 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
| 18 | #include <asm/irq_handler.h> | ||
| 19 | 16 | ||
| 20 | #if ANOMALY_05000311 || ANOMALY_05000323 | 17 | #if ANOMALY_05000311 || ANOMALY_05000323 |
| 21 | enum { | 18 | enum { |
| @@ -58,19 +55,6 @@ static struct gpio_port_t * const gpio_array[] = { | |||
| 58 | (struct gpio_port_t *) FIO0_FLAG_D, | 55 | (struct gpio_port_t *) FIO0_FLAG_D, |
| 59 | (struct gpio_port_t *) FIO1_FLAG_D, | 56 | (struct gpio_port_t *) FIO1_FLAG_D, |
| 60 | (struct gpio_port_t *) FIO2_FLAG_D, | 57 | (struct gpio_port_t *) FIO2_FLAG_D, |
| 61 | #elif defined(CONFIG_BF54x) || defined(CONFIG_BF60x) | ||
| 62 | (struct gpio_port_t *)PORTA_FER, | ||
| 63 | (struct gpio_port_t *)PORTB_FER, | ||
| 64 | (struct gpio_port_t *)PORTC_FER, | ||
| 65 | (struct gpio_port_t *)PORTD_FER, | ||
| 66 | (struct gpio_port_t *)PORTE_FER, | ||
| 67 | (struct gpio_port_t *)PORTF_FER, | ||
| 68 | (struct gpio_port_t *)PORTG_FER, | ||
| 69 | # if defined(CONFIG_BF54x) | ||
| 70 | (struct gpio_port_t *)PORTH_FER, | ||
| 71 | (struct gpio_port_t *)PORTI_FER, | ||
| 72 | (struct gpio_port_t *)PORTJ_FER, | ||
| 73 | # endif | ||
| 74 | #else | 58 | #else |
| 75 | # error no gpio arrays defined | 59 | # error no gpio arrays defined |
| 76 | #endif | 60 | #endif |
| @@ -169,12 +153,6 @@ DECLARE_RESERVED_MAP(gpio_irq, GPIO_BANK_NUM); | |||
| 169 | 153 | ||
| 170 | inline int check_gpio(unsigned gpio) | 154 | inline int check_gpio(unsigned gpio) |
| 171 | { | 155 | { |
| 172 | #if defined(CONFIG_BF54x) | ||
| 173 | if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 | ||
| 174 | || gpio == GPIO_PH14 || gpio == GPIO_PH15 | ||
| 175 | || gpio == GPIO_PJ14 || gpio == GPIO_PJ15) | ||
| 176 | return -EINVAL; | ||
| 177 | #endif | ||
| 178 | if (gpio >= MAX_BLACKFIN_GPIOS) | 156 | if (gpio >= MAX_BLACKFIN_GPIOS) |
| 179 | return -EINVAL; | 157 | return -EINVAL; |
| 180 | return 0; | 158 | return 0; |
| @@ -212,12 +190,6 @@ static void port_setup(unsigned gpio, unsigned short usage) | |||
| 212 | else | 190 | else |
| 213 | *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); | 191 | *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); |
| 214 | SSYNC(); | 192 | SSYNC(); |
| 215 | #elif defined(CONFIG_BF54x) || defined(CONFIG_BF60x) | ||
| 216 | if (usage == GPIO_USAGE) | ||
| 217 | gpio_array[gpio_bank(gpio)]->port_fer &= ~gpio_bit(gpio); | ||
| 218 | else | ||
| 219 | gpio_array[gpio_bank(gpio)]->port_fer |= gpio_bit(gpio); | ||
| 220 | SSYNC(); | ||
| 221 | #endif | 193 | #endif |
| 222 | } | 194 | } |
| 223 | 195 | ||
| @@ -255,7 +227,7 @@ static int portmux_group_check(unsigned short per) | |||
| 255 | u16 ident = P_IDENT(per); | 227 | u16 ident = P_IDENT(per); |
| 256 | u16 function = P_FUNCT2MUX(per); | 228 | u16 function = P_FUNCT2MUX(per); |
| 257 | s8 offset = port_mux[ident]; | 229 | s8 offset = port_mux[ident]; |
| 258 | u16 m, pmux, pfunc; | 230 | u16 m, pmux, pfunc, mask; |
| 259 | 231 | ||
| 260 | if (offset < 0) | 232 | if (offset < 0) |
| 261 | return 0; | 233 | return 0; |
| @@ -270,10 +242,12 @@ static int portmux_group_check(unsigned short per) | |||
| 270 | continue; | 242 | continue; |
| 271 | 243 | ||
| 272 | if (offset == 1) | 244 | if (offset == 1) |
| 273 | pfunc = (pmux >> offset) & 3; | 245 | mask = 3; |
| 274 | else | 246 | else |
| 275 | pfunc = (pmux >> offset) & 1; | 247 | mask = 1; |
| 276 | if (pfunc != function) { | 248 | |
| 249 | pfunc = (pmux >> offset) & mask; | ||
| 250 | if (pfunc != (function & mask)) { | ||
| 277 | pr_err("pin group conflict! request pin %d func %d conflict with pin %d func %d\n", | 251 | pr_err("pin group conflict! request pin %d func %d conflict with pin %d func %d\n", |
| 278 | ident, function, m, pfunc); | 252 | ident, function, m, pfunc); |
| 279 | return -EINVAL; | 253 | return -EINVAL; |
| @@ -288,43 +262,21 @@ static void portmux_setup(unsigned short per) | |||
| 288 | u16 ident = P_IDENT(per); | 262 | u16 ident = P_IDENT(per); |
| 289 | u16 function = P_FUNCT2MUX(per); | 263 | u16 function = P_FUNCT2MUX(per); |
| 290 | s8 offset = port_mux[ident]; | 264 | s8 offset = port_mux[ident]; |
| 291 | u16 pmux; | 265 | u16 pmux, mask; |
| 292 | 266 | ||
| 293 | if (offset == -1) | 267 | if (offset == -1) |
| 294 | return; | 268 | return; |
| 295 | 269 | ||
| 296 | pmux = bfin_read_PORT_MUX(); | 270 | pmux = bfin_read_PORT_MUX(); |
| 297 | if (offset != 1) | 271 | if (offset == 1) |
