aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/lite5200.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/platforms/lite5200.c')
-rw-r--r--arch/ppc/platforms/lite5200.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
index 5171b53bccb5..d91efe1dc2d1 100644
--- a/arch/ppc/platforms/lite5200.c
+++ b/arch/ppc/platforms/lite5200.c
@@ -34,6 +34,7 @@
34#include <asm/mpc52xx.h> 34#include <asm/mpc52xx.h>
35#include <asm/ppc_sys.h> 35#include <asm/ppc_sys.h>
36#include <asm/machdep.h> 36#include <asm/machdep.h>
37#include <asm/pci-bridge.h>
37 38
38#include <syslib/mpc52xx_pci.h> 39#include <syslib/mpc52xx_pci.h>
39 40
@@ -68,12 +69,32 @@ lite5200_show_cpuinfo(struct seq_file *m)
68} 69}
69 70
70#ifdef CONFIG_PCI 71#ifdef CONFIG_PCI
72#ifdef CONFIG_LITE5200B
73static int
74lite5200_map_irq(struct pci_dev *dev, unsigned char idsel,
75 unsigned char pin)
76{
77 static char pci_irq_table[][4] =
78 /*
79 * PCI IDSEL/INTPIN->INTLINE
80 * A B C D
81 */
82 {
83 {MPC52xx_IRQ0, MPC52xx_IRQ1, MPC52xx_IRQ2, MPC52xx_IRQ3},
84 {MPC52xx_IRQ1, MPC52xx_IRQ2, MPC52xx_IRQ3, MPC52xx_IRQ0},
85 };
86
87 const long min_idsel = 24, max_idsel = 25, irqs_per_slot = 4;
88 return PCI_IRQ_TABLE_LOOKUP;
89}
90#else /* Original Lite */
71static int 91static int
72lite5200_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) 92lite5200_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
73{ 93{
74 return (pin == 1) && (idsel==24) ? MPC52xx_IRQ0 : -1; 94 return (pin == 1) && (idsel==24) ? MPC52xx_IRQ0 : -1;
75} 95}
76#endif 96#endif
97#endif
77 98
78static void __init 99static void __init
79lite5200_setup_cpu(void) 100lite5200_setup_cpu(void)
@@ -127,11 +148,17 @@ lite5200_setup_cpu(void)
127 out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_SNOOP); 148 out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_SNOOP);
128 out_be32(&xlb->snoop_window, MPC52xx_PCI_TARGET_MEM | 0x1d); 149 out_be32(&xlb->snoop_window, MPC52xx_PCI_TARGET_MEM | 0x1d);
129 150
130 /* IRQ[0-3] setup : IRQ0 - Level Active Low */ 151 /* IRQ[0-3] setup */
131 /* IRQ[1-3] - Level Active High */
132 intr_ctrl = in_be32(&intr->ctrl); 152 intr_ctrl = in_be32(&intr->ctrl);
133 intr_ctrl &= ~0x00ff0000; 153 intr_ctrl &= ~0x00ff0000;
134 intr_ctrl |= 0x00c00000; 154#ifdef CONFIG_LITE5200B
155 /* IRQ[0-3] Level Active Low */
156 intr_ctrl |= 0x00ff0000;
157#else
158 /* IRQ0 Level Active Low
159 * IRQ[1-3] Level Active High */
160 intr_ctrl |= 0x00c00000;
161#endif
135 out_be32(&intr->ctrl, intr_ctrl); 162 out_be32(&intr->ctrl, intr_ctrl);
136 163
137 /* Unmap reg zone */ 164 /* Unmap reg zone */