diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-26 02:47:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-26 02:47:42 -0400 |
commit | f9bd170a87948a9e077149b70fb192c563770fdf (patch) | |
tree | c759b57b67ab41a859e19f7dcee571504b368202 /arch/powerpc/platforms/pseries/setup.c | |
parent | 25635c71e44111a6bd48f342e144e2fc02d0a314 (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/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 19 |
1 files changed, 4 insertions, 15 deletions
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); | |||
87 | static void pseries_shared_idle(void); | 87 | static void pseries_shared_idle(void); |
88 | static void pseries_dedicated_idle(void); | 88 | static void pseries_dedicated_idle(void); |
89 | 89 | ||
90 | static volatile void __iomem * chrp_int_ack_special; | ||
91 | struct mpic *pSeries_mpic; | 90 | struct mpic *pSeries_mpic; |
92 | 91 | ||
93 | void pSeries_show_cpuinfo(struct seq_file *m) | 92 | void 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 | ||
122 | static 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 | |||
130 | static void __init pSeries_init_mpic(void) | 121 | static 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 | ||
157 | static void __init pSeries_setup_mpic(void) | 146 | static void __init pSeries_setup_mpic(void) |