1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun #ifndef __ASM_CSKY_FIXMAP_H 5*4882a593Smuzhiyun #define __ASM_CSKY_FIXMAP_H 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #include <asm/page.h> 8*4882a593Smuzhiyun #include <asm/memory.h> 9*4882a593Smuzhiyun #ifdef CONFIG_HIGHMEM 10*4882a593Smuzhiyun #include <linux/threads.h> 11*4882a593Smuzhiyun #include <asm/kmap_types.h> 12*4882a593Smuzhiyun #endif 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun enum fixed_addresses { 15*4882a593Smuzhiyun #ifdef CONFIG_HAVE_TCM 16*4882a593Smuzhiyun FIX_TCM = TCM_NR_PAGES, 17*4882a593Smuzhiyun #endif 18*4882a593Smuzhiyun #ifdef CONFIG_HIGHMEM 19*4882a593Smuzhiyun FIX_KMAP_BEGIN, 20*4882a593Smuzhiyun FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS) - 1, 21*4882a593Smuzhiyun #endif 22*4882a593Smuzhiyun __end_of_fixed_addresses 23*4882a593Smuzhiyun }; 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 26*4882a593Smuzhiyun #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #include <asm-generic/fixmap.h> 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun extern void fixrange_init(unsigned long start, unsigned long end, 31*4882a593Smuzhiyun pgd_t *pgd_base); 32*4882a593Smuzhiyun extern void __init fixaddr_init(void); 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #endif /* __ASM_CSKY_FIXMAP_H */ 35