board.h 877 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020-2021, Renesas Electronics Corporation. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef RZ_G2_BOARD_H
  7. #define RZ_G2_BOARD_H
  8. enum rzg2_board_id {
  9. BOARD_HIHOPE_RZ_G2M = 0,
  10. BOARD_HIHOPE_RZ_G2H,
  11. BOARD_HIHOPE_RZ_G2N,
  12. BOARD_EK874_RZ_G2E,
  13. BOARD_UNKNOWN
  14. };
  15. #define BOARD_REV_UNKNOWN (0xFFU)
  16. extern const char *g_board_tbl[];
  17. /************************************************************************
  18. * Revisions are expressed in 8 bits.
  19. * The upper 4 bits are major version.
  20. * The lower 4 bits are minor version.
  21. ************************************************************************/
  22. #define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
  23. #define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
  24. #define GET_BOARD_NAME(a) (g_board_tbl[(a)])
  25. void rzg_get_board_type(uint32_t *type, uint32_t *rev);
  26. #endif /* RZ_G2_BOARD_H */