.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * misc setup functions for MPC83xx |
---|
3 | 4 | * |
---|
4 | 5 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License as published by the |
---|
8 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
9 | | - * option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <linux/stddef.h> |
---|
.. | .. |
---|
18 | 14 | #include <asm/io.h> |
---|
19 | 15 | #include <asm/hw_irq.h> |
---|
20 | 16 | #include <asm/ipic.h> |
---|
21 | | -#include <soc/fsl/qe/qe_ic.h> |
---|
22 | 17 | #include <sysdev/fsl_soc.h> |
---|
23 | 18 | #include <sysdev/fsl_pci.h> |
---|
| 19 | + |
---|
| 20 | +#include <mm/mmu_decl.h> |
---|
24 | 21 | |
---|
25 | 22 | #include "mpc83xx.h" |
---|
26 | 23 | |
---|
.. | .. |
---|
93 | 90 | ipic_set_default_priority(); |
---|
94 | 91 | } |
---|
95 | 92 | |
---|
96 | | -#ifdef CONFIG_QUICC_ENGINE |
---|
97 | | -void __init mpc83xx_qe_init_IRQ(void) |
---|
98 | | -{ |
---|
99 | | - struct device_node *np; |
---|
100 | | - |
---|
101 | | - np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); |
---|
102 | | - if (!np) { |
---|
103 | | - np = of_find_node_by_type(NULL, "qeic"); |
---|
104 | | - if (!np) |
---|
105 | | - return; |
---|
106 | | - } |
---|
107 | | - qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); |
---|
108 | | - of_node_put(np); |
---|
109 | | -} |
---|
110 | | - |
---|
111 | | -void __init mpc83xx_ipic_and_qe_init_IRQ(void) |
---|
112 | | -{ |
---|
113 | | - mpc83xx_ipic_init_IRQ(); |
---|
114 | | - mpc83xx_qe_init_IRQ(); |
---|
115 | | -} |
---|
116 | | -#endif /* CONFIG_QUICC_ENGINE */ |
---|
117 | | - |
---|
118 | 93 | static const struct of_device_id of_bus_ids[] __initconst = { |
---|
119 | 94 | { .type = "soc", }, |
---|
120 | 95 | { .compatible = "soc", }, |
---|
.. | .. |
---|
149 | 124 | if (ppc_md.progress) |
---|
150 | 125 | ppc_md.progress("mpc83xx_setup_arch()", 0); |
---|
151 | 126 | |
---|
| 127 | + if (!__map_without_bats) { |
---|
| 128 | + phys_addr_t immrbase = get_immrbase(); |
---|
| 129 | + int immrsize = IS_ALIGNED(immrbase, SZ_2M) ? SZ_2M : SZ_1M; |
---|
| 130 | + unsigned long va = fix_to_virt(FIX_IMMR_BASE); |
---|
| 131 | + |
---|
| 132 | + setbat(-1, va, immrbase, immrsize, PAGE_KERNEL_NCG); |
---|
| 133 | + update_bats(); |
---|
| 134 | + } |
---|
| 135 | + |
---|
152 | 136 | mpc83xx_setup_pci(); |
---|
153 | 137 | } |
---|
154 | 138 | |
---|