machs.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* Simulator for Analog Devices Blackfin processors.
  2. Copyright (C) 2005-2015 Free Software Foundation, Inc.
  3. Contributed by Analog Devices, Inc.
  4. This file is part of simulators.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef _BFIN_MACHS_H_
  16. #define _BFIN_MACHS_H_
  17. typedef enum model_type {
  18. #define P(n) MODEL_BF##n,
  19. #include "proc_list.def"
  20. #undef P
  21. MODEL_MAX
  22. } MODEL_TYPE;
  23. typedef enum mach_attr {
  24. MACH_BASE,
  25. MACH_BFIN,
  26. MACH_MAX
  27. } MACH_ATTR;
  28. #define CPU_MODEL_NUM(cpu) MODEL_NUM (CPU_MODEL (cpu))
  29. /* XXX: Some of this probably belongs in CPU_MODEL. */
  30. struct bfin_board_data {
  31. unsigned int sirev, sirev_valid;
  32. const char *hw_file;
  33. };
  34. void bfin_model_cpu_init (SIM_DESC, SIM_CPU *);
  35. bu32 bfin_model_get_chipid (SIM_DESC);
  36. bu32 bfin_model_get_dspid (SIM_DESC);
  37. enum {
  38. #define I(insn) BFIN_INSN_##insn,
  39. #include "insn_list.def"
  40. #undef I
  41. BFIN_INSN_MAX
  42. };
  43. #define BFIN_COREMMR_CEC_BASE 0xFFE02100
  44. #define BFIN_COREMMR_CEC_SIZE (4 * 5)
  45. #define BFIN_COREMMR_CTIMER_BASE 0xFFE03000
  46. #define BFIN_COREMMR_CTIMER_SIZE (4 * 4)
  47. #define BFIN_COREMMR_EVT_BASE 0xFFE02000
  48. #define BFIN_COREMMR_EVT_SIZE (4 * 16)
  49. #define BFIN_COREMMR_JTAG_BASE 0xFFE05000
  50. #define BFIN_COREMMR_JTAG_SIZE (4 * 3)
  51. #define BFIN_COREMMR_MMU_BASE 0xFFE00000
  52. #define BFIN_COREMMR_MMU_SIZE 0x2000
  53. #define BFIN_COREMMR_PFMON_BASE 0xFFE08000
  54. #define BFIN_COREMMR_PFMON_SIZE 0x108
  55. #define BFIN_COREMMR_TRACE_BASE 0xFFE06000
  56. #define BFIN_COREMMR_TRACE_SIZE (4 * 65)
  57. #define BFIN_COREMMR_WP_BASE 0xFFE07000
  58. #define BFIN_COREMMR_WP_SIZE 0x204
  59. #define BFIN_MMR_DMA_SIZE (4 * 16)
  60. #define BFIN_MMR_DMAC0_BASE 0xFFC00C00
  61. #define BFIN_MMR_DMAC1_BASE 0xFFC01C00
  62. #define BFIN_MMR_EBIU_AMC_SIZE (4 * 3)
  63. #define BF50X_MMR_EBIU_AMC_SIZE 0x28
  64. #define BF54X_MMR_EBIU_AMC_SIZE (4 * 7)
  65. #define BFIN_MMR_EBIU_DDRC_SIZE 0xb0
  66. #define BFIN_MMR_EBIU_SDC_SIZE (4 * 4)
  67. #define BFIN_MMR_EMAC_BASE 0xFFC03000
  68. #define BFIN_MMR_EMAC_SIZE 0x200
  69. #define BFIN_MMR_EPPI_SIZE 0x40
  70. #define BFIN_MMR_GPIO_SIZE (17 * 4)
  71. #define BFIN_MMR_GPIO2_SIZE (8 * 4)
  72. #define BFIN_MMR_GPTIMER_SIZE (4 * 4)
  73. #define BFIN_MMR_NFC_SIZE 0x50
  74. /* XXX: Not exactly true; it's two sets of 4 regs near each other:
  75. 0xFFC03600 0x10 - Control
  76. 0xFFC03680 0x10 - Data */
  77. #define BFIN_MMR_OTP_SIZE 0xa0
  78. #define BFIN_MMR_PINT_SIZE 0x28
  79. #define BFIN_MMR_PLL_BASE 0xFFC00000
  80. #define BFIN_MMR_PLL_SIZE (4 * 6)
  81. #define BFIN_MMR_PPI_SIZE (4 * 5)
  82. #define BFIN_MMR_RTC_SIZE (4 * 6)
  83. #define BFIN_MMR_SIC_BASE 0xFFC00100
  84. #define BFIN_MMR_SIC_SIZE 0x100
  85. #define BFIN_MMR_SPI_SIZE (4 * 7)
  86. #define BFIN_MMR_TWI_SIZE 0x90
  87. #define BFIN_MMR_WDOG_SIZE (4 * 3)
  88. #define BFIN_MMR_UART_SIZE 0x30
  89. #define BFIN_MMR_UART2_SIZE 0x30
  90. #endif