diff options
author | Scott Wood <scottwood@freescale.com> | 2007-09-14 15:22:36 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-10-03 21:36:35 -0400 |
commit | fb533d0c5a9783ecafa9a177bace6384c47282a9 (patch) | |
tree | 7be09cf401674b176455530ab4fec98bf9681751 /arch/powerpc/sysdev/mpc8xx_pic.c | |
parent | ccf0d68e835003f19d5a9463d5a8c1e092d3a31a (diff) |
[POWERPC] 8xx: Infrastructure code cleanup.
1. Keep a global mpc8xx_immr mapping, rather than constantly
creating temporary mappings.
2. Look for new fsl,cpm1 and fsl,cpm1-pic names.
3. Always reset the CPM when not using the udbg console;
this is required in case the firmware initialized a device
that is incompatible with one that the kernel is about to
use.
4. Remove some superfluous casts and header includes.
5. Change a usage of IMAP_ADDR to get_immrbase().
6. Use phys_addr_t, not uint, for dpram_pbase.
7. Various sparse-related fixes, such as __iomem annotations.
8. Remove mpc8xx_show_cpuinfo, which doesn't provide anything
useful beyond the generic cpuinfo handler.
9. Move prototypes for 8xx support functions from board files
to sysdev/commproc.h.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpc8xx_pic.c')
-rw-r--r-- | arch/powerpc/sysdev/mpc8xx_pic.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index 565156ae65bc..7aa4ff5f5ec8 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
@@ -22,7 +22,7 @@ extern int cpm_get_irq(struct pt_regs *regs); | |||
22 | static struct irq_host *mpc8xx_pic_host; | 22 | static struct irq_host *mpc8xx_pic_host; |
23 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 23 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) |
24 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 24 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; |
25 | static sysconf8xx_t *siu_reg; | 25 | static sysconf8xx_t __iomem *siu_reg; |
26 | 26 | ||
27 | int cpm_get_irq(struct pt_regs *regs); | 27 | int cpm_get_irq(struct pt_regs *regs); |
28 | 28 | ||
@@ -159,13 +159,14 @@ static struct irq_host_ops mpc8xx_pic_host_ops = { | |||
159 | int mpc8xx_pic_init(void) | 159 | int mpc8xx_pic_init(void) |
160 | { | 160 | { |
161 | struct resource res; | 161 | struct resource res; |
162 | struct device_node *np = NULL; | 162 | struct device_node *np; |
163 | int ret; | 163 | int ret; |
164 | 164 | ||
165 | np = of_find_node_by_type(np, "mpc8xx-pic"); | 165 | np = of_find_compatible_node(NULL, NULL, "fsl,pq1-pic"); |
166 | 166 | if (np == NULL) | |
167 | np = of_find_node_by_type(NULL, "mpc8xx-pic"); | ||
167 | if (np == NULL) { | 168 | if (np == NULL) { |
168 | printk(KERN_ERR "Could not find open-pic node\n"); | 169 | printk(KERN_ERR "Could not find fsl,pq1-pic node\n"); |
169 | return -ENOMEM; | 170 | return -ENOMEM; |
170 | } | 171 | } |
171 | 172 | ||
@@ -173,11 +174,9 @@ int mpc8xx_pic_init(void) | |||
173 | if (ret) | 174 | if (ret) |
174 | goto out; | 175 | goto out; |
175 | 176 | ||
176 | siu_reg = (void *)ioremap(res.start, res.end - res.start + 1); | 177 | siu_reg = ioremap(res.start, res.end - res.start + 1); |
177 | if (siu_reg == NULL) { | 178 | if (siu_reg == NULL) |
178 | ret = -EINVAL; | 179 | return -EINVAL; |
179 | goto out; | ||
180 | } | ||
181 | 180 | ||
182 | mpc8xx_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR, | 181 | mpc8xx_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR, |
183 | 64, &mpc8xx_pic_host_ops, 64); | 182 | 64, &mpc8xx_pic_host_ops, 64); |