hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/powerpc/platforms/83xx/km83xx.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2008-2011 DENX Software Engineering GmbH
34 * Author: Heiko Schocher <hs@denx.de>
45 *
56 * Description:
67 * Keymile 83xx platform specific routines.
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
128 */
139
1410 #include <linux/stddef.h>
....@@ -38,7 +34,6 @@
3834 #include <sysdev/fsl_soc.h>
3935 #include <sysdev/fsl_pci.h>
4036 #include <soc/fsl/qe/qe.h>
41
-#include <soc/fsl/qe/qe_ic.h>
4237
4338 #include "mpc83xx.h"
4439
....@@ -58,17 +53,19 @@
5853
5954 np_par = of_find_node_by_name(NULL, "par_io");
6055 if (np_par == NULL) {
61
- pr_warn("%s couldn;t find par_io node\n", __func__);
56
+ pr_warn("%s couldn't find par_io node\n", __func__);
6257 return;
6358 }
6459 /* Map Parallel I/O ports registers */
6560 ret = of_address_to_resource(np_par, 0, &res);
6661 if (ret) {
67
- pr_warn("%s couldn;t map par_io registers\n", __func__);
68
- return;
62
+ pr_warn("%s couldn't map par_io registers\n", __func__);
63
+ goto out;
6964 }
7065
71
- base = ioremap(res.start, res.end - res.start + 1);
66
+ base = ioremap(res.start, resource_size(&res));
67
+ if (!base)
68
+ goto out;
7269
7370 /*
7471 * set output delay adjustments to default values according
....@@ -116,6 +113,7 @@
116113 setbits32((base + 0xac), 0x0000c000);
117114 }
118115 iounmap(base);
116
+out:
119117 of_node_put(np_par);
120118 }
121119
....@@ -182,7 +180,7 @@
182180 .name = "mpc83xx-km-platform",
183181 .probe = mpc83xx_km_probe,
184182 .setup_arch = mpc83xx_km_setup_arch,
185
- .init_IRQ = mpc83xx_ipic_and_qe_init_IRQ,
183
+ .init_IRQ = mpc83xx_ipic_init_IRQ,
186184 .get_irq = ipic_get_irq,
187185 .restart = mpc83xx_restart,
188186 .time_init = mpc83xx_time_init,