aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-26 02:47:42 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-26 02:47:42 -0400
commitf9bd170a87948a9e077149b70fb192c563770fdf (patch)
treec759b57b67ab41a859e19f7dcee571504b368202 /arch/powerpc/platforms
parent25635c71e44111a6bd48f342e144e2fc02d0a314 (diff)
powerpc: Merge i8259.c into arch/powerpc/sysdev
This changes the parameters for i8259_init so that it takes two parameters: a physical address for generating an interrupt acknowledge cycle, and an interrupt number offset. i8259_init now sets the irq_desc[] for its interrupts; all the callers were doing this, and that code is gone now. This also defines a CONFIG_PPC_I8259 symbol to select i8259.o for inclusion, and makes the platforms that need it select that symbol. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig5
-rw-r--r--arch/powerpc/platforms/pseries/setup.c19
2 files changed, 9 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 784b41e19465..81250090f98d 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -48,6 +48,7 @@ config EV64260
48 48
49config LOPEC 49config LOPEC
50 bool "Motorola-LoPEC" 50 bool "Motorola-LoPEC"
51 select PPC_I8259
51 52
52config MVME5100 53config MVME5100
53 bool "Motorola-MVME5100" 54 bool "Motorola-MVME5100"
@@ -55,6 +56,7 @@ config MVME5100
55 56
56config PPLUS 57config PPLUS
57 bool "Motorola-PowerPlus" 58 bool "Motorola-PowerPlus"
59 select PPC_I8259
58 select PPC_INDIRECT_PCI 60 select PPC_INDIRECT_PCI
59 61
60config PRPMC750 62config PRPMC750
@@ -67,12 +69,14 @@ config PRPMC800
67 69
68config SANDPOINT 70config SANDPOINT
69 bool "Motorola-Sandpoint" 71 bool "Motorola-Sandpoint"
72 select PPC_I8259
70 help 73 help
71 Select SANDPOINT if configuring for a Motorola Sandpoint X3 74 Select SANDPOINT if configuring for a Motorola Sandpoint X3
72 (any flavor). 75 (any flavor).
73 76
74config RADSTONE_PPC7D 77config RADSTONE_PPC7D
75 bool "Radstone Technology PPC7D board" 78 bool "Radstone Technology PPC7D board"
79 select PPC_I8259
76 80
77config PAL4 81config PAL4
78 bool "SBS-Palomar4" 82 bool "SBS-Palomar4"
@@ -307,6 +311,7 @@ config HARRIER_STORE_GATHERING
307config MVME5100_IPMC761_PRESENT 311config MVME5100_IPMC761_PRESENT
308 bool "MVME5100 configured with an IPMC761" 312 bool "MVME5100 configured with an IPMC761"
309 depends on MVME5100 313 depends on MVME5100
314 select PPC_I8259
310 315
311config SPRUCE_BAUD_33M 316config SPRUCE_BAUD_33M
312 bool "Spruce baud clock support" 317 bool "Spruce baud clock support"
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 92d18003f152..0fa5beae6d1b 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -87,7 +87,6 @@ extern int pSeries_machine_check_exception(struct pt_regs *regs);
87static void pseries_shared_idle(void); 87static void pseries_shared_idle(void);
88static void pseries_dedicated_idle(void); 88static void pseries_dedicated_idle(void);
89 89
90static volatile void __iomem * chrp_int_ack_special;
91struct mpic *pSeries_mpic; 90struct mpic *pSeries_mpic;
92 91
93void pSeries_show_cpuinfo(struct seq_file *m) 92void pSeries_show_cpuinfo(struct seq_file *m)
@@ -119,19 +118,11 @@ static void __init fwnmi_init(void)
119 fwnmi_active = 1; 118 fwnmi_active = 1;
120} 119}
121 120
122static int pSeries_irq_cascade(struct pt_regs *regs, void *data)
123{
124 if (chrp_int_ack_special)
125 return readb(chrp_int_ack_special);
126 else
127 return i8259_irq(regs);
128}
129
130static void __init pSeries_init_mpic(void) 121static void __init pSeries_init_mpic(void)
131{ 122{
132 unsigned int *addrp; 123 unsigned int *addrp;
133 struct device_node *np; 124 struct device_node *np;
134 int i; 125 unsigned long intack = 0;
135 126
136 /* All ISUs are setup, complete initialization */ 127 /* All ISUs are setup, complete initialization */
137 mpic_init(pSeries_mpic); 128 mpic_init(pSeries_mpic);
@@ -142,16 +133,14 @@ static void __init pSeries_init_mpic(void)
142 get_property(np, "8259-interrupt-acknowledge", NULL))) 133 get_property(np, "8259-interrupt-acknowledge", NULL)))
143 printk(KERN_ERR "Cannot find pci to get ack address\n"); 134 printk(KERN_ERR "Cannot find pci to get ack address\n");
144 else 135 else
145 chrp_int_ack_special = ioremap(addrp[prom_n_addr_cells(np)-1], 1); 136 intack = addrp[prom_n_addr_cells(np)-1];
146 of_node_put(np); 137 of_node_put(np);
147 138
148 /* Setup the legacy interrupts & controller */ 139 /* Setup the legacy interrupts & controller */
149 for (i = 0; i < NUM_ISA_INTERRUPTS; i++) 140 i8259_init(intack, 0);
150 irq_desc[i].handler = &i8259_pic;
151 i8259_init(0);
152 141
153 /* Hook cascade to mpic */ 142 /* Hook cascade to mpic */
154 mpic_setup_cascade(NUM_ISA_INTERRUPTS, pSeries_irq_cascade, NULL); 143 mpic_setup_cascade(NUM_ISA_INTERRUPTS, i8259_irq_cascade, NULL);
155} 144}
156 145
157static void __init pSeries_setup_mpic(void) 146static void __init pSeries_setup_mpic(void)