1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (C) 2020 Loongson Technology Co., Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10 #include <asm/io.h>
11 #include <asm-generic/early_ioremap.h>
12
early_ioremap(u64 phys_addr, unsigned long size)13 void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size)
14 {
15 return ((void __iomem *)TO_CACHE(phys_addr));
16 }
17
early_iounmap(void __iomem *addr, unsigned long size)18 void __init early_iounmap(void __iomem *addr, unsigned long size)
19 {
20
21 }
22
early_memremap_ro(resource_size_t phys_addr, unsigned long size)23 void *early_memremap_ro(resource_size_t phys_addr, unsigned long size)
24 {
25 return early_memremap(phys_addr, size);
26 }
27
early_memremap_prot(resource_size_t phys_addr, unsigned long size, unsigned long prot_val)28 void *early_memremap_prot(resource_size_t phys_addr, unsigned long size,
29 unsigned long prot_val)
30 {
31 return early_memremap(phys_addr, size);
32 }
33