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