Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 4 | */ |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 5 | #ifndef __ASMARC_SETUP_H |
| 6 | #define __ASMARC_SETUP_H |
| 7 | |
Vineet Gupta | 8c2f4a8 | 2013-02-11 19:55:33 +0530 | [diff] [blame] | 8 | |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 9 | #include <linux/types.h> |
Vineet Gupta | 8c2f4a8 | 2013-02-11 19:55:33 +0530 | [diff] [blame] | 10 | #include <uapi/asm/setup.h> |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 11 | |
Noam Camus | 085572f | 2015-05-29 11:40:02 +0300 | [diff] [blame] | 12 | #ifdef CONFIG_ARC_PLAT_EZNPS |
| 13 | #define COMMAND_LINE_SIZE 2048 |
| 14 | #else |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 15 | #define COMMAND_LINE_SIZE 256 |
Noam Camus | 085572f | 2015-05-29 11:40:02 +0300 | [diff] [blame] | 16 | #endif |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 17 | |
Vineet Gupta | af61742 | 2013-01-18 15:12:24 +0530 | [diff] [blame] | 18 | /* |
| 19 | * Data structure to map a ID to string |
| 20 | * Used a lot for bootup reporting of hardware diversity |
| 21 | */ |
| 22 | struct id_to_str { |
| 23 | int id; |
| 24 | const char *str; |
| 25 | }; |
| 26 | |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 27 | extern int root_mountflags, end_mem; |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 28 | |
Chen Gang | ef3a661 | 2013-10-23 10:12:05 +0800 | [diff] [blame] | 29 | void setup_processor(void); |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 30 | void __init setup_arch_memory(void); |
Vineet Gupta | e497c8e | 2017-01-18 12:59:21 -0800 | [diff] [blame] | 31 | long __init arc_get_mem_sz(void); |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 32 | |
Vineet Gupta | 964cf28 | 2015-10-02 19:20:27 +0530 | [diff] [blame] | 33 | /* 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 Gupta | 711c1f2 | 2016-10-13 15:53:02 -0700 | [diff] [blame] | 39 | #define IS_AVAIL3(v, v2, s) IS_AVAIL1(v, s), IS_AVAIL1(v, IS_DISABLED_RUN(v2)) |
Vineet Gupta | 964cf28 | 2015-10-02 19:20:27 +0530 | [diff] [blame] | 40 | |
Vineet Gupta | c121c50 | 2013-01-18 15:12:20 +0530 | [diff] [blame] | 41 | #endif /* __ASMARC_SETUP_H */ |