mode_ctrl00.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef __MODE_CTRL00_H
  2. #define __MODE_CTRL00_H
  3. /*
  4. * Register definitions for the reset and mode control
  5. */
  6. /*
  7. * Copyright (C) 2001 Altera Corporation
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23. #define BOOT_CR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR ))
  24. #define BOOT_CR_BF_MSK (0x1)
  25. #define BOOT_CR_BF_OFST (0)
  26. #define BOOT_CR_HM_MSK (0x2)
  27. #define BOOT_CR_HM_OFST (1)
  28. #define BOOT_CR_RE_MSK (0x4)
  29. #define BOOT_CR_RE_OFST (2)
  30. #define RESET_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x4 ))
  31. #define RESET_SR_WR_MSK (0x1)
  32. #define RESET_SR_WR_OFST (0)
  33. #define RESET_SR_CR_MSK (0x2)
  34. #define RESET_SR_CR_OFST (1)
  35. #define RESET_SR_JT_MSK (0x4)
  36. #define RESET_SR_JT_OFST (2)
  37. #define RESET_SR_ER_MSK (0x8)
  38. #define RESET_SR_ER_OFST (3)
  39. #define ID_CODE(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x08 ))
  40. #define SRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x20 ))
  41. #define SRAM0_SR_SIZE_MSK (0xFFFFF000)
  42. #define SRAM0_SR_SIZE_OFST (12)
  43. #define SRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x24 ))
  44. #define SRAM1_SR_SIZE_MSK (0xFFFFF000)
  45. #define SRAM1_SR_SIZE_OFST (12)
  46. #define DPSRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x30 ))
  47. #define DPSRAM0_SR_MODE_MSK (0xF)
  48. #define DPSRAM0_SR_MODE_OFST (0)
  49. #define DPSRAM0_SR_GLBL_MSK (0x30)
  50. #define DPSRAM0_SR_SIZE_MSK (0xFFFFF000)
  51. #define DPSRAM0_SR_SIZE_OFST (12)
  52. #define DPSRAM0_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x34 ))
  53. #define DPSRAM0_LCR_LCKADDR_MSK (0x1FFE0)
  54. #define DPSRAM0_LCR_LCKADDR_OFST (4)
  55. #define DPSRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x38 ))
  56. #define DPSRAM1_SR_MODE_MSK (0xF)
  57. #define DPSRAM1_SR_MODE_OFST (0)
  58. #define DPSRAM1_SR_GLBL_MSK (0x30)
  59. #define DPSRAM1_SR_GLBL_OFST (4)
  60. #define DPSRAM1_SR_SIZE_MSK (0xFFFFF000)
  61. #define DPSRAM1_SR_SIZE_OFST (12)
  62. #define DPSRAM1_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x3C ))
  63. #define DPSRAM1_LCR_LCKADDR_MSK (0x1FFE0)
  64. #define DPSRAM1_LCR_LCKADDR_OFST (4)
  65. #endif /* __MODE_CTRL00_H */