bootm.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. extern void udc_disconnect(void);
  11. #if defined(CONFIG_SETUP_MEMORY_TAGS) || \
  12. defined(CONFIG_CMDLINE_TAG) || \
  13. defined(CONFIG_INITRD_TAG) || \
  14. defined(CONFIG_SERIAL_TAG) || \
  15. defined(CONFIG_REVISION_TAG)
  16. # define BOOTM_ENABLE_TAGS 1
  17. #else
  18. # define BOOTM_ENABLE_TAGS 0
  19. #endif
  20. #ifdef CONFIG_SETUP_MEMORY_TAGS
  21. # define BOOTM_ENABLE_MEMORY_TAGS 1
  22. #else
  23. # define BOOTM_ENABLE_MEMORY_TAGS 0
  24. #endif
  25. #ifdef CONFIG_CMDLINE_TAG
  26. #define BOOTM_ENABLE_CMDLINE_TAG 1
  27. #else
  28. #define BOOTM_ENABLE_CMDLINE_TAG 0
  29. #endif
  30. #ifdef CONFIG_INITRD_TAG
  31. #define BOOTM_ENABLE_INITRD_TAG 1
  32. #else
  33. #define BOOTM_ENABLE_INITRD_TAG 0
  34. #endif
  35. struct tag_serialnr;
  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