]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/8xx: Remove mpc8xx_pics_init()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 6 Apr 2022 06:23:20 +0000 (08:23 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2022 13:06:40 +0000 (23:06 +1000)
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
arch/powerpc/platforms/8xx/adder875.c
arch/powerpc/platforms/8xx/ep88xc.c
arch/powerpc/platforms/8xx/m8xx_setup.c
arch/powerpc/platforms/8xx/mpc86xads_setup.c
arch/powerpc/platforms/8xx/mpc885ads_setup.c
arch/powerpc/platforms/8xx/mpc8xx.h
arch/powerpc/platforms/8xx/pic.c
arch/powerpc/platforms/8xx/pic.h
arch/powerpc/platforms/8xx/tqm8xx_setup.c

index 1e337935a21ee6cb5a960c265bee5c6bb0fc0853..10e6e4fe77fcbd7727628678a55b13dac5602a94 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/udbg.h>
 
 #include "mpc8xx.h"
+#include "pic.h"
 
 struct cpm_pin {
        int port, pin, flags;
@@ -103,7 +104,7 @@ define_machine(adder875) {
        .name = "Adder MPC875",
        .probe = adder875_probe,
        .setup_arch = adder875_setup,
-       .init_IRQ = mpc8xx_pics_init,
+       .init_IRQ = mpc8xx_pic_init,
        .get_irq = mpc8xx_get_irq,
        .restart = mpc8xx_restart,
        .calibrate_decr = generic_calibrate_decr,
index ebcf34a147894fd0b7624688e6eb1331f3fedce0..b3b22520b435fb56833eb5159a1f86d82d35ef24 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/cpm1.h>
 
 #include "mpc8xx.h"
+#include "pic.h"
 
 struct cpm_pin {
        int port, pin, flags;
@@ -166,7 +167,7 @@ define_machine(ep88xc) {
        .name = "Embedded Planet EP88xC",
        .probe = ep88xc_probe,
        .setup_arch = ep88xc_setup_arch,
-       .init_IRQ = mpc8xx_pics_init,
+       .init_IRQ = mpc8xx_pic_init,
        .get_irq        = mpc8xx_get_irq,
        .restart = mpc8xx_restart,
        .calibrate_decr = mpc8xx_calibrate_decr,
index 14268f3aecc41ac553cbeae5e11af68254ead029..24f358f86d16cdd2fa8f38796a27c1b4ba4b0ade 100644 (file)
@@ -205,17 +205,3 @@ void __noreturn mpc8xx_restart(char *cmd)
        in_8(&clk_r->res[0]);
        panic("Restart failed\n");
 }
-
-/* Initialize the internal interrupt controllers.  The number of
- * interrupts supported can vary with the processor type, and the
- * 82xx family can have up to 64.
- * External interrupts can be either edge or level triggered, and
- * need to be initialized by the appropriate driver.
- */
-void __init mpc8xx_pics_init(void)
-{
-       if (mpc8xx_pic_init()) {
-               printk(KERN_ERR "Failed interrupt 8xx controller  initialization\n");
-               return;
-       }
-}
index 8d02f5ff44819b3a99ee68dfadce282708f7502b..03267e4a44a9c068ce52019ad285668c160be15c 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "mpc86xads.h"
 #include "mpc8xx.h"
+#include "pic.h"
 
 struct cpm_pin {
        int port, pin, flags;
@@ -140,7 +141,7 @@ define_machine(mpc86x_ads) {
        .name                   = "MPC86x ADS",
        .probe                  = mpc86xads_probe,
        .setup_arch             = mpc86xads_setup_arch,
-       .init_IRQ               = mpc8xx_pics_init,
+       .init_IRQ               = mpc8xx_pic_init,
        .get_irq                = mpc8xx_get_irq,
        .restart                = mpc8xx_restart,
        .calibrate_decr         = mpc8xx_calibrate_decr,
index a0c83c1905c678a190396bbbf20ac5fb1256d3cb..b1e39f96de0002ef5972965a93a66d307ee4945c 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "mpc885ads.h"
 #include "mpc8xx.h"
+#include "pic.h"
 
 static u32 __iomem *bcsr, *bcsr5;
 
@@ -216,7 +217,7 @@ define_machine(mpc885_ads) {
        .name                   = "Freescale MPC885 ADS",
        .probe                  = mpc885ads_probe,
        .setup_arch             = mpc885ads_setup_arch,
-       .init_IRQ               = mpc8xx_pics_init,
+       .init_IRQ               = mpc8xx_pic_init,
        .get_irq                = mpc8xx_get_irq,
        .restart                = mpc8xx_restart,
        .calibrate_decr         = mpc8xx_calibrate_decr,
index 31cc2ecace4238bf6abef837e8f1d6cd486035c1..79fae33248661c84fcb091bbf8b1f3ab0a1b6593 100644 (file)
@@ -15,7 +15,6 @@ extern void __noreturn mpc8xx_restart(char *cmd);
 extern void mpc8xx_calibrate_decr(void);
 extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
 extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
-extern void mpc8xx_pics_init(void);
 extern unsigned int mpc8xx_get_irq(void);
 
 #endif /* __MPC8xx_H */
index 1485b20dd37a33ebb0b2833ca17d5a9d91afcd81..ea6b0e523c60f05f92100c967b5ada9f565e6301 100644 (file)
@@ -124,7 +124,7 @@ static const struct irq_domain_ops mpc8xx_pic_host_ops = {
        .xlate = mpc8xx_pic_host_xlate,
 };
 
-int __init mpc8xx_pic_init(void)
+void __init mpc8xx_pic_init(void)
 {
        struct resource res;
        struct device_node *np;
@@ -135,7 +135,7 @@ int __init mpc8xx_pic_init(void)
                np = of_find_node_by_type(NULL, "mpc8xx-pic");
        if (np == NULL) {
                printk(KERN_ERR "Could not find fsl,pq1-pic node\n");
-               return -ENOMEM;
+               return;
        }
 
        ret = of_address_to_resource(np, 0, &res);
@@ -143,20 +143,13 @@ int __init mpc8xx_pic_init(void)
                goto out;
 
        siu_reg = ioremap(res.start, resource_size(&res));
-       if (siu_reg == NULL) {
-               ret = -EINVAL;
+       if (!siu_reg)
                goto out;
-       }
 
        mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL);
-       if (mpc8xx_pic_host == NULL) {
+       if (!mpc8xx_pic_host)
                printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
-               ret = -ENOMEM;
-               goto out;
-       }
 
-       ret = 0;
 out:
        of_node_put(np);
-       return ret;
 }
index 9fe00eebdc8b8cd150c11f0b1c836b092dc39b0e..c70f1b446f946c400b7e75ed621b9a3445690190 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 
-int mpc8xx_pic_init(void);
+void mpc8xx_pic_init(void);
 unsigned int mpc8xx_get_irq(void);
 
 /*
index 4cea8b1afa4473ab57e1225fdda5848e2db5aba6..3725d51248df155c9c625d485d1aa905ead24ce5 100644 (file)
@@ -43,6 +43,7 @@
 #include <asm/udbg.h>
 
 #include "mpc8xx.h"
+#include "pic.h"
 
 struct cpm_pin {
        int port, pin, flags;
@@ -142,7 +143,7 @@ define_machine(tqm8xx) {
        .name                   = "TQM8xx",
        .probe                  = tqm8xx_probe,
        .setup_arch             = tqm8xx_setup_arch,
-       .init_IRQ               = mpc8xx_pics_init,
+       .init_IRQ               = mpc8xx_pic_init,
        .get_irq                = mpc8xx_get_irq,
        .restart                = mpc8xx_restart,
        .calibrate_decr         = mpc8xx_calibrate_decr,