aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/ints-priority.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common/ints-priority.c')
-rw-r--r--arch/blackfin/mach-common/ints-priority.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 1177369f9922..332dace6af34 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -444,7 +444,7 @@ static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle)
444static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS); 444static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS);
445extern void bfin_gpio_irq_prepare(unsigned gpio); 445extern void bfin_gpio_irq_prepare(unsigned gpio);
446 446
447#if !defined(CONFIG_BF54x) 447#if !BFIN_GPIO_PINT
448 448
449static void bfin_gpio_ack_irq(struct irq_data *d) 449static void bfin_gpio_ack_irq(struct irq_data *d)
450{ 450{
@@ -633,7 +633,7 @@ void bfin_demux_gpio_irq(unsigned int inta_irq,
633 bfin_demux_gpio_block(irq); 633 bfin_demux_gpio_block(irq);
634} 634}
635 635
636#else /* CONFIG_BF54x */ 636#else
637 637
638#define NR_PINT_SYS_IRQS 4 638#define NR_PINT_SYS_IRQS 4
639#define NR_PINT_BITS 32 639#define NR_PINT_BITS 32
@@ -647,24 +647,11 @@ void bfin_demux_gpio_irq(unsigned int inta_irq,
647static unsigned char irq2pint_lut[NR_PINTS]; 647static unsigned char irq2pint_lut[NR_PINTS];
648static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS]; 648static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS];
649 649
650struct pin_int_t { 650static struct bfin_pint_regs * const pint[NR_PINT_SYS_IRQS] = {
651 unsigned int mask_set; 651 (struct bfin_pint_regs *)PINT0_MASK_SET,
652 unsigned int mask_clear; 652 (struct bfin_pint_regs *)PINT1_MASK_SET,
653 unsigned int request; 653 (struct bfin_pint_regs *)PINT2_MASK_SET,
654 unsigned int assign; 654 (struct bfin_pint_regs *)PINT3_MASK_SET,
655 unsigned int edge_set;
656 unsigned int edge_clear;
657 unsigned int invert_set;
658 unsigned int invert_clear;
659 unsigned int pinstate;
660 unsigned int latch;
661};
662
663static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = {
664 (struct pin_int_t *)PINT0_MASK_SET,
665 (struct pin_int_t *)PINT1_MASK_SET,
666 (struct pin_int_t *)PINT2_MASK_SET,
667 (struct pin_int_t *)PINT3_MASK_SET,
668}; 655};
669 656
670inline unsigned int get_irq_base(u32 bank, u8 bmap) 657inline unsigned int get_irq_base(u32 bank, u8 bmap)
@@ -981,7 +968,7 @@ int __init init_arch_irq(void)
981 968
982 local_irq_disable(); 969 local_irq_disable();
983 970
984#ifdef CONFIG_BF54x 971#if BFIN_GPIO_PINT
985# ifdef CONFIG_PINTx_REASSIGN 972# ifdef CONFIG_PINTx_REASSIGN
986 pint[0]->assign = CONFIG_PINT0_ASSIGN; 973 pint[0]->assign = CONFIG_PINT0_ASSIGN;
987 pint[1]->assign = CONFIG_PINT1_ASSIGN; 974 pint[1]->assign = CONFIG_PINT1_ASSIGN;
@@ -999,16 +986,16 @@ int __init init_arch_irq(void)
999 irq_set_chip(irq, &bfin_internal_irqchip); 986 irq_set_chip(irq, &bfin_internal_irqchip);
1000 987
1001 switch (irq) { 988 switch (irq) {
1002#if defined(BF537_FAMILY) 989#if BFIN_GPIO_PINT
1003 case IRQ_PH_INTA_MAC_RX:
1004 case IRQ_PF_INTA_PG_INTA:
1005#elif defined(BF533_FAMILY)
1006 case IRQ_PROG_INTA:
1007#elif defined(CONFIG_BF54x)
1008 case IRQ_PINT0: 990 case IRQ_PINT0:
1009 case IRQ_PINT1: 991 case IRQ_PINT1:
1010 case IRQ_PINT2: 992 case IRQ_PINT2:
1011 case IRQ_PINT3: 993 case IRQ_PINT3:
994#elif defined(BF537_FAMILY)
995 case IRQ_PH_INTA_MAC_RX:
996 case IRQ_PF_INTA_PG_INTA:
997#elif defined(BF533_FAMILY)
998 case IRQ_PROG_INTA:
1012#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 999#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x)
1013 case IRQ_PORTF_INTA: 1000 case IRQ_PORTF_INTA:
1014 case IRQ_PORTG_INTA: 1001 case IRQ_PORTG_INTA: