bootm.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. #include <asm/setup.h>
  14. extern void udc_disconnect(void);
  15. #if defined(CONFIG_SETUP_MEMORY_TAGS) || \
  16. defined(CONFIG_CMDLINE_TAG) || \
  17. defined(CONFIG_INITRD_TAG) || \
  18. defined(CONFIG_SERIAL_TAG) || \
  19. defined(CONFIG_REVISION_TAG)
  20. # define BOOTM_ENABLE_TAGS 1
  21. #else
  22. # define BOOTM_ENABLE_TAGS 0
  23. #endif
  24. #ifdef CONFIG_SETUP_MEMORY_TAGS
  25. # define BOOTM_ENABLE_MEMORY_TAGS 1
  26. #else
  27. # define BOOTM_ENABLE_MEMORY_TAGS 0
  28. #endif
  29. #ifdef CONFIG_CMDLINE_TAG
  30. #define BOOTM_ENABLE_CMDLINE_TAG 1
  31. #else
  32. #define BOOTM_ENABLE_CMDLINE_TAG 0
  33. #endif
  34. #ifdef CONFIG_INITRD_TAG
  35. #define BOOTM_ENABLE_INITRD_TAG 1
  36. #else
  37. #define BOOTM_ENABLE_INITRD_TAG 0
  38. #endif
  39. #ifdef CONFIG_SERIAL_TAG
  40. #define BOOTM_ENABLE_SERIAL_TAG 1
  41. void get_board_serial(struct tag_serialnr *serialnr);
  42. #else
  43. #define BOOTM_ENABLE_SERIAL_TAG 0
  44. static inline void get_board_serial(struct tag_serialnr *serialnr)
  45. {
  46. }
  47. #endif
  48. #ifdef CONFIG_REVISION_TAG
  49. #define BOOTM_ENABLE_REVISION_TAG 1
  50. u32 get_board_rev(void);
  51. #else
  52. #define BOOTM_ENABLE_REVISION_TAG 0
  53. static inline u32 get_board_rev(void)
  54. {
  55. return 0;
  56. }
  57. #endif
  58. #endif