blob: 61a97fe70b8653e961f05357fdb5ad4817bb27cb [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Vineet Guptac121c502013-01-18 15:12:20 +05302/*
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
Vineet Guptac121c502013-01-18 15:12:20 +05304 */
Vineet Guptac121c502013-01-18 15:12:20 +05305#ifndef __ASMARC_SETUP_H
6#define __ASMARC_SETUP_H
7
Vineet Gupta8c2f4a82013-02-11 19:55:33 +05308
Vineet Guptac121c502013-01-18 15:12:20 +05309#include <linux/types.h>
Vineet Gupta8c2f4a82013-02-11 19:55:33 +053010#include <uapi/asm/setup.h>
Vineet Guptac121c502013-01-18 15:12:20 +053011
Noam Camus085572f2015-05-29 11:40:02 +030012#ifdef CONFIG_ARC_PLAT_EZNPS
13#define COMMAND_LINE_SIZE 2048
14#else
Vineet Guptac121c502013-01-18 15:12:20 +053015#define COMMAND_LINE_SIZE 256
Noam Camus085572f2015-05-29 11:40:02 +030016#endif
Vineet Guptac121c502013-01-18 15:12:20 +053017
Vineet Guptaaf617422013-01-18 15:12:24 +053018/*
19 * Data structure to map a ID to string
20 * Used a lot for bootup reporting of hardware diversity
21 */
22struct id_to_str {
23 int id;
24 const char *str;
25};
26
Vineet Guptac121c502013-01-18 15:12:20 +053027extern int root_mountflags, end_mem;
Vineet Guptac121c502013-01-18 15:12:20 +053028
Chen Gangef3a6612013-10-23 10:12:05 +080029void setup_processor(void);
Vineet Guptac121c502013-01-18 15:12:20 +053030void __init setup_arch_memory(void);
Vineet Guptae497c8e2017-01-18 12:59:21 -080031long __init arc_get_mem_sz(void);
Vineet Guptac121c502013-01-18 15:12:20 +053032
Vineet Gupta964cf282015-10-02 19:20:27 +053033/* Helpers used in arc_*_mumbojumbo routines */
34#define IS_AVAIL1(v, s) ((v) ? s : "")
35#define IS_DISABLED_RUN(v) ((v) ? "" : "(disabled) ")
36#define IS_USED_RUN(v) ((v) ? "" : "(not used) ")
37#define IS_USED_CFG(cfg) IS_USED_RUN(IS_ENABLED(cfg))
38#define IS_AVAIL2(v, s, cfg) IS_AVAIL1(v, s), IS_AVAIL1(v, IS_USED_CFG(cfg))
Vineet Gupta711c1f22016-10-13 15:53:02 -070039#define IS_AVAIL3(v, v2, s) IS_AVAIL1(v, s), IS_AVAIL1(v, IS_DISABLED_RUN(v2))
Vineet Gupta964cf282015-10-02 19:20:27 +053040
Vineet Guptac121c502013-01-18 15:12:20 +053041#endif /* __ASMARC_SETUP_H */