Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/8xx: Remove mpc8xx_pics_init()

mpc8xx_pics_init() is now only a trampoline to
mpc8xx_pic_init().

Remove mpc8xx_pics_init() and use mpc8xx_pic_init()
directly.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9c55a698adb5ba3b7b77023170fcaf0acb5d2d81.1649226186.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
e3ba31b7 14d893fc

+15 -32
+2 -1
arch/powerpc/platforms/8xx/adder875.c
··· 17 17 #include <asm/udbg.h> 18 18 19 19 #include "mpc8xx.h" 20 + #include "pic.h" 20 21 21 22 struct cpm_pin { 22 23 int port, pin, flags; ··· 104 103 .name = "Adder MPC875", 105 104 .probe = adder875_probe, 106 105 .setup_arch = adder875_setup, 107 - .init_IRQ = mpc8xx_pics_init, 106 + .init_IRQ = mpc8xx_pic_init, 108 107 .get_irq = mpc8xx_get_irq, 109 108 .restart = mpc8xx_restart, 110 109 .calibrate_decr = generic_calibrate_decr,
+2 -1
arch/powerpc/platforms/8xx/ep88xc.c
··· 20 20 #include <asm/cpm1.h> 21 21 22 22 #include "mpc8xx.h" 23 + #include "pic.h" 23 24 24 25 struct cpm_pin { 25 26 int port, pin, flags; ··· 167 166 .name = "Embedded Planet EP88xC", 168 167 .probe = ep88xc_probe, 169 168 .setup_arch = ep88xc_setup_arch, 170 - .init_IRQ = mpc8xx_pics_init, 169 + .init_IRQ = mpc8xx_pic_init, 171 170 .get_irq = mpc8xx_get_irq, 172 171 .restart = mpc8xx_restart, 173 172 .calibrate_decr = mpc8xx_calibrate_decr,
-14
arch/powerpc/platforms/8xx/m8xx_setup.c
··· 205 205 in_8(&clk_r->res[0]); 206 206 panic("Restart failed\n"); 207 207 } 208 - 209 - /* Initialize the internal interrupt controllers. The number of 210 - * interrupts supported can vary with the processor type, and the 211 - * 82xx family can have up to 64. 212 - * External interrupts can be either edge or level triggered, and 213 - * need to be initialized by the appropriate driver. 214 - */ 215 - void __init mpc8xx_pics_init(void) 216 - { 217 - if (mpc8xx_pic_init()) { 218 - printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); 219 - return; 220 - } 221 - }
+2 -1
arch/powerpc/platforms/8xx/mpc86xads_setup.c
··· 29 29 30 30 #include "mpc86xads.h" 31 31 #include "mpc8xx.h" 32 + #include "pic.h" 32 33 33 34 struct cpm_pin { 34 35 int port, pin, flags; ··· 141 140 .name = "MPC86x ADS", 142 141 .probe = mpc86xads_probe, 143 142 .setup_arch = mpc86xads_setup_arch, 144 - .init_IRQ = mpc8xx_pics_init, 143 + .init_IRQ = mpc8xx_pic_init, 145 144 .get_irq = mpc8xx_get_irq, 146 145 .restart = mpc8xx_restart, 147 146 .calibrate_decr = mpc8xx_calibrate_decr,
+2 -1
arch/powerpc/platforms/8xx/mpc885ads_setup.c
··· 42 42 43 43 #include "mpc885ads.h" 44 44 #include "mpc8xx.h" 45 + #include "pic.h" 45 46 46 47 static u32 __iomem *bcsr, *bcsr5; 47 48 ··· 217 216 .name = "Freescale MPC885 ADS", 218 217 .probe = mpc885ads_probe, 219 218 .setup_arch = mpc885ads_setup_arch, 220 - .init_IRQ = mpc8xx_pics_init, 219 + .init_IRQ = mpc8xx_pic_init, 221 220 .get_irq = mpc8xx_get_irq, 222 221 .restart = mpc8xx_restart, 223 222 .calibrate_decr = mpc8xx_calibrate_decr,
-1
arch/powerpc/platforms/8xx/mpc8xx.h
··· 15 15 extern void mpc8xx_calibrate_decr(void); 16 16 extern int mpc8xx_set_rtc_time(struct rtc_time *tm); 17 17 extern void mpc8xx_get_rtc_time(struct rtc_time *tm); 18 - extern void mpc8xx_pics_init(void); 19 18 extern unsigned int mpc8xx_get_irq(void); 20 19 21 20 #endif /* __MPC8xx_H */
+4 -11
arch/powerpc/platforms/8xx/pic.c
··· 124 124 .xlate = mpc8xx_pic_host_xlate, 125 125 }; 126 126 127 - int __init mpc8xx_pic_init(void) 127 + void __init mpc8xx_pic_init(void) 128 128 { 129 129 struct resource res; 130 130 struct device_node *np; ··· 135 135 np = of_find_node_by_type(NULL, "mpc8xx-pic"); 136 136 if (np == NULL) { 137 137 printk(KERN_ERR "Could not find fsl,pq1-pic node\n"); 138 - return -ENOMEM; 138 + return; 139 139 } 140 140 141 141 ret = of_address_to_resource(np, 0, &res); ··· 143 143 goto out; 144 144 145 145 siu_reg = ioremap(res.start, resource_size(&res)); 146 - if (siu_reg == NULL) { 147 - ret = -EINVAL; 146 + if (!siu_reg) 148 147 goto out; 149 - } 150 148 151 149 mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL); 152 - if (mpc8xx_pic_host == NULL) { 150 + if (!mpc8xx_pic_host) 153 151 printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); 154 - ret = -ENOMEM; 155 - goto out; 156 - } 157 152 158 - ret = 0; 159 153 out: 160 154 of_node_put(np); 161 - return ret; 162 155 }
+1 -1
arch/powerpc/platforms/8xx/pic.h
··· 4 4 #include <linux/irq.h> 5 5 #include <linux/interrupt.h> 6 6 7 - int mpc8xx_pic_init(void); 7 + void mpc8xx_pic_init(void); 8 8 unsigned int mpc8xx_get_irq(void); 9 9 10 10 /*
+2 -1
arch/powerpc/platforms/8xx/tqm8xx_setup.c
··· 43 43 #include <asm/udbg.h> 44 44 45 45 #include "mpc8xx.h" 46 + #include "pic.h" 46 47 47 48 struct cpm_pin { 48 49 int port, pin, flags; ··· 143 142 .name = "TQM8xx", 144 143 .probe = tqm8xx_probe, 145 144 .setup_arch = tqm8xx_setup_arch, 146 - .init_IRQ = mpc8xx_pics_init, 145 + .init_IRQ = mpc8xx_pic_init, 147 146 .get_irq = mpc8xx_get_irq, 148 147 .restart = mpc8xx_restart, 149 148 .calibrate_decr = mpc8xx_calibrate_decr,