aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc/Kconfig7
-rw-r--r--arch/ppc/platforms/lite5200.c33
2 files changed, 37 insertions, 3 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 3a3e302b4ea2..75802ca0f8c7 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -715,6 +715,13 @@ config LITE5200
715 much but it's only been tested on this board version. I think this 715 much but it's only been tested on this board version. I think this
716 board is also known as IceCube. 716 board is also known as IceCube.
717 717
718config LITE5200B
719 bool "Freescale LITE5200B"
720 depends LITE5200
721 help
722 Support for the LITE5200B dev board for the MPC5200 from Freescale.
723 This is the new board with 2 PCI slots.
724
718config MPC834x_SYS 725config MPC834x_SYS
719 bool "Freescale MPC834x SYS" 726 bool "Freescale MPC834x SYS"
720 help 727 help
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 */