xref: /openbmc/linux/arch/loongarch/include/asm/dmi.h (revision aac28965)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4  */
5 #ifndef _ASM_DMI_H
6 #define _ASM_DMI_H
7 
8 #include <linux/io.h>
9 #include <linux/memblock.h>
10 
11 #define dmi_early_remap(x, l)	dmi_remap(x, l)
12 #define dmi_early_unmap(x, l)	dmi_unmap(x)
13 #define dmi_alloc(l)		memblock_alloc(l, PAGE_SIZE)
14 
15 static inline void *dmi_remap(u64 phys_addr, unsigned long size)
16 {
17 	return ((void *)TO_CACHE(phys_addr));
18 }
19 
20 static inline void dmi_unmap(void *addr)
21 {
22 }
23 
24 #endif /* _ASM_DMI_H */
25