| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * RouterBoard 500 specific prom routines |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Copyright (C) 2007, Gabor Juhos <juhosg@openwrt.org> |
|---|
| 7 | 8 | * Felix Fietkau <nbd@openwrt.org> |
|---|
| 8 | 9 | * 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 | | - * |
|---|
| 25 | 10 | */ |
|---|
| 26 | 11 | |
|---|
| 27 | 12 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 29 | 14 | #include <linux/export.h> |
|---|
| 30 | 15 | #include <linux/string.h> |
|---|
| 31 | 16 | #include <linux/console.h> |
|---|
| 32 | | -#include <linux/bootmem.h> |
|---|
| 17 | +#include <linux/memblock.h> |
|---|
| 33 | 18 | #include <linux/ioport.h> |
|---|
| 34 | 19 | #include <linux/blkdev.h> |
|---|
| 35 | 20 | |
|---|
| .. | .. |
|---|
| 125 | 110 | phys_addr_t memsize; |
|---|
| 126 | 111 | phys_addr_t ddrbase; |
|---|
| 127 | 112 | |
|---|
| 128 | | - ddr = ioremap_nocache(ddr_reg[0].start, |
|---|
| 113 | + ddr = ioremap(ddr_reg[0].start, |
|---|
| 129 | 114 | ddr_reg[0].end - ddr_reg[0].start); |
|---|
| 130 | 115 | |
|---|
| 131 | 116 | if (!ddr) { |
|---|
| .. | .. |
|---|
| 141 | 126 | |
|---|
| 142 | 127 | /* give all RAM to boot allocator, |
|---|
| 143 | 128 | * 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); |
|---|
| 145 | 130 | } |
|---|