1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2013, Google Inc.
4 *
5 * Copyright (C) 2011
6 * Corscience GmbH & Co. KG - Simon Schwarz <schwarz@corscience.de>
7 */
8#ifndef ARM_BOOTM_H
9#define ARM_BOOTM_H
10
11extern void udc_disconnect(void);
12
13#ifdef CONFIG_SUPPORT_PASSING_ATAGS
14# define BOOTM_ENABLE_TAGS		1
15#else
16# define BOOTM_ENABLE_TAGS		0
17#endif
18
19#ifdef CONFIG_SETUP_MEMORY_TAGS
20# define BOOTM_ENABLE_MEMORY_TAGS	1
21#else
22# define BOOTM_ENABLE_MEMORY_TAGS	0
23#endif
24
25#ifdef CONFIG_CMDLINE_TAG
26 #define BOOTM_ENABLE_CMDLINE_TAG	1
27#else
28 #define BOOTM_ENABLE_CMDLINE_TAG	0
29#endif
30
31#ifdef CONFIG_INITRD_TAG
32 #define BOOTM_ENABLE_INITRD_TAG	1
33#else
34 #define BOOTM_ENABLE_INITRD_TAG	0
35#endif
36
37struct tag_serialnr;
38#ifdef CONFIG_SERIAL_TAG
39 #define BOOTM_ENABLE_SERIAL_TAG	1
40#else
41 #define BOOTM_ENABLE_SERIAL_TAG	0
42#endif
43#if defined(CONFIG_SERIAL_TAG) || defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
44void get_board_serial(struct tag_serialnr *serialnr);
45#else
46static inline void get_board_serial(struct tag_serialnr *serialnr)
47{
48}
49#endif
50
51#ifdef CONFIG_REVISION_TAG
52 #define BOOTM_ENABLE_REVISION_TAG	1
53u32 get_board_rev(void);
54#else
55 #define BOOTM_ENABLE_REVISION_TAG	0
56static inline u32 get_board_rev(void)
57{
58	return 0;
59}
60#endif
61
62#endif
63