diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2006-03-26 06:37:38 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-26 22:48:58 -0500 |
commit | f8dd311982c86141f4f2fd326c0edf0c2d9fd97b (patch) | |
tree | 474af7852e393a112456127b1185e84f1b7b57ab /arch | |
parent | 5931c4350059ce9bd5fe398b628c478753a11e44 (diff) |
[PATCH] ppc32: Adds support for the LITE5200B dev board
ppc32: Adds support for the LITE5200B dev board
This LITE5200B devboard is the new development board for the
Freescale MPC5200 processor. It has two PCI slots and so a
different PCI IRQ routing.
Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/Kconfig | 7 | ||||
-rw-r--r-- | arch/ppc/platforms/lite5200.c | 33 |
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 | ||
718 | config 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 | |||
718 | config MPC834x_SYS | 725 | config 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 | ||
73 | static int | ||
74 | lite5200_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 */ | ||
71 | static int | 91 | static int |
72 | lite5200_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 92 | lite5200_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 | ||
78 | static void __init | 99 | static void __init |
79 | lite5200_setup_cpu(void) | 100 | lite5200_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 */ |