hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/platforms/83xx/misc.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * misc setup functions for MPC83xx
34 *
45 * 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.
106 */
117
128 #include <linux/stddef.h>
....@@ -18,9 +14,10 @@
1814 #include <asm/io.h>
1915 #include <asm/hw_irq.h>
2016 #include <asm/ipic.h>
21
-#include <soc/fsl/qe/qe_ic.h>
2217 #include <sysdev/fsl_soc.h>
2318 #include <sysdev/fsl_pci.h>
19
+
20
+#include <mm/mmu_decl.h>
2421
2522 #include "mpc83xx.h"
2623
....@@ -93,28 +90,6 @@
9390 ipic_set_default_priority();
9491 }
9592
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
-
11893 static const struct of_device_id of_bus_ids[] __initconst = {
11994 { .type = "soc", },
12095 { .compatible = "soc", },
....@@ -149,6 +124,15 @@
149124 if (ppc_md.progress)
150125 ppc_md.progress("mpc83xx_setup_arch()", 0);
151126
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
+
152136 mpc83xx_setup_pci();
153137 }
154138