hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/rb532/prom.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * RouterBoard 500 specific prom routines
34 *
....@@ -6,22 +7,6 @@
67 * Copyright (C) 2007, Gabor Juhos <juhosg@openwrt.org>
78 * Felix Fietkau <nbd@openwrt.org>
89 * Florian Fainelli <florian@openwrt.org>
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License
12
- * as published by the Free Software Foundation; either version 2
13
- * of the License, or (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the
22
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23
- * Boston, MA 02110-1301, USA.
24
- *
2510 */
2611
2712 #include <linux/init.h>
....@@ -29,7 +14,7 @@
2914 #include <linux/export.h>
3015 #include <linux/string.h>
3116 #include <linux/console.h>
32
-#include <linux/bootmem.h>
17
+#include <linux/memblock.h>
3318 #include <linux/ioport.h>
3419 #include <linux/blkdev.h>
3520
....@@ -125,7 +110,7 @@
125110 phys_addr_t memsize;
126111 phys_addr_t ddrbase;
127112
128
- ddr = ioremap_nocache(ddr_reg[0].start,
113
+ ddr = ioremap(ddr_reg[0].start,
129114 ddr_reg[0].end - ddr_reg[0].start);
130115
131116 if (!ddr) {
....@@ -141,5 +126,5 @@
141126
142127 /* give all RAM to boot allocator,
143128 * except for the first 0x400 and the last 0x200 bytes */
144
- add_memory_region(ddrbase + 0x400, memsize - 0x600, BOOT_MEM_RAM);
129
+ memblock_add(ddrbase + 0x400, memsize - 0x600);
145130 }