.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2008-2011 DENX Software Engineering GmbH |
---|
3 | 4 | * Author: Heiko Schocher <hs@denx.de> |
---|
4 | 5 | * |
---|
5 | 6 | * Description: |
---|
6 | 7 | * 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. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/stddef.h> |
---|
.. | .. |
---|
38 | 34 | #include <sysdev/fsl_soc.h> |
---|
39 | 35 | #include <sysdev/fsl_pci.h> |
---|
40 | 36 | #include <soc/fsl/qe/qe.h> |
---|
41 | | -#include <soc/fsl/qe/qe_ic.h> |
---|
42 | 37 | |
---|
43 | 38 | #include "mpc83xx.h" |
---|
44 | 39 | |
---|
.. | .. |
---|
58 | 53 | |
---|
59 | 54 | np_par = of_find_node_by_name(NULL, "par_io"); |
---|
60 | 55 | 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__); |
---|
62 | 57 | return; |
---|
63 | 58 | } |
---|
64 | 59 | /* Map Parallel I/O ports registers */ |
---|
65 | 60 | ret = of_address_to_resource(np_par, 0, &res); |
---|
66 | 61 | 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; |
---|
69 | 64 | } |
---|
70 | 65 | |
---|
71 | | - base = ioremap(res.start, res.end - res.start + 1); |
---|
| 66 | + base = ioremap(res.start, resource_size(&res)); |
---|
| 67 | + if (!base) |
---|
| 68 | + goto out; |
---|
72 | 69 | |
---|
73 | 70 | /* |
---|
74 | 71 | * set output delay adjustments to default values according |
---|
.. | .. |
---|
116 | 113 | setbits32((base + 0xac), 0x0000c000); |
---|
117 | 114 | } |
---|
118 | 115 | iounmap(base); |
---|
| 116 | +out: |
---|
119 | 117 | of_node_put(np_par); |
---|
120 | 118 | } |
---|
121 | 119 | |
---|
.. | .. |
---|
182 | 180 | .name = "mpc83xx-km-platform", |
---|
183 | 181 | .probe = mpc83xx_km_probe, |
---|
184 | 182 | .setup_arch = mpc83xx_km_setup_arch, |
---|
185 | | - .init_IRQ = mpc83xx_ipic_and_qe_init_IRQ, |
---|
| 183 | + .init_IRQ = mpc83xx_ipic_init_IRQ, |
---|
186 | 184 | .get_irq = ipic_get_irq, |
---|
187 | 185 | .restart = mpc83xx_restart, |
---|
188 | 186 | .time_init = mpc83xx_time_init, |
---|