Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
0004  */
0005 #ifndef __ASM_ARC_SETUP_H
0006 #define __ASM_ARC_SETUP_H
0007 
0008 
0009 #include <linux/types.h>
0010 #include <uapi/asm/setup.h>
0011 
0012 #define COMMAND_LINE_SIZE 256
0013 
0014 /*
0015  * Data structure to map a ID to string
0016  * Used a lot for bootup reporting of hardware diversity
0017  */
0018 struct id_to_str {
0019     int id;
0020     const char *str;
0021 };
0022 
0023 extern int root_mountflags, end_mem;
0024 
0025 void setup_processor(void);
0026 void __init setup_arch_memory(void);
0027 long __init arc_get_mem_sz(void);
0028 
0029 /* Helpers used in arc_*_mumbojumbo routines */
0030 #define IS_AVAIL1(v, s)     ((v) ? s : "")
0031 #define IS_DISABLED_RUN(v)  ((v) ? "" : "(disabled) ")
0032 #define IS_USED_RUN(v)      ((v) ? "" : "(not used) ")
0033 #define IS_USED_CFG(cfg)    IS_USED_RUN(IS_ENABLED(cfg))
0034 #define IS_AVAIL2(v, s, cfg)    IS_AVAIL1(v, s), IS_AVAIL1(v, IS_USED_CFG(cfg))
0035 #define IS_AVAIL3(v, v2, s) IS_AVAIL1(v, s), IS_AVAIL1(v, IS_DISABLED_RUN(v2))
0036 
0037 extern void arc_mmu_init(void);
0038 extern char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len);
0039 extern void read_decode_mmu_bcr(void);
0040 
0041 extern void arc_cache_init(void);
0042 extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
0043 extern void read_decode_cache_bcr(void);
0044 
0045 #endif /* __ASMARC_SETUP_H */