bootm.h 1.3 KB

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