ppc4xx-isram.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * SPDX-License-Identifier: GPL-2.0+
  3. */
  4. #ifndef _PPC4xx_ISRAM_H_
  5. #define _PPC4xx_ISRAM_H_
  6. /*
  7. * Internal SRAM
  8. */
  9. #if defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
  10. defined(CONFIG_APM821XX)
  11. #define ISRAM0_DCR_BASE 0x380
  12. #else
  13. #define ISRAM0_DCR_BASE 0x020
  14. #endif
  15. #define ISRAM0_SB0CR (ISRAM0_DCR_BASE+0x00) /* SRAM bank config 0*/
  16. #define ISRAM0_SB1CR (ISRAM0_DCR_BASE+0x01) /* SRAM bank config 1*/
  17. #define ISRAM0_SB2CR (ISRAM0_DCR_BASE+0x02) /* SRAM bank config 2*/
  18. #define ISRAM0_SB3CR (ISRAM0_DCR_BASE+0x03) /* SRAM bank config 3*/
  19. #define ISRAM0_BEAR (ISRAM0_DCR_BASE+0x04) /* SRAM bus error addr reg */
  20. #define ISRAM0_BESR0 (ISRAM0_DCR_BASE+0x05) /* SRAM bus error status reg 0 */
  21. #define ISRAM0_BESR1 (ISRAM0_DCR_BASE+0x06) /* SRAM bus error status reg 1 */
  22. #define ISRAM0_PMEG (ISRAM0_DCR_BASE+0x07) /* SRAM power management */
  23. #define ISRAM0_CID (ISRAM0_DCR_BASE+0x08) /* SRAM bus core id reg */
  24. #define ISRAM0_REVID (ISRAM0_DCR_BASE+0x09) /* SRAM bus revision id reg */
  25. #define ISRAM0_DPC (ISRAM0_DCR_BASE+0x0a) /* SRAM data parity check reg */
  26. #if defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
  27. defined(CONFIG_APM821XX)
  28. #define ISRAM1_DCR_BASE 0x0B0
  29. #define ISRAM1_SB0CR (ISRAM1_DCR_BASE+0x00) /* SRAM1 bank config 0*/
  30. #define ISRAM1_BEAR (ISRAM1_DCR_BASE+0x04) /* SRAM1 bus error addr reg */
  31. #define ISRAM1_BESR0 (ISRAM1_DCR_BASE+0x05) /* SRAM1 bus error status reg 0 */
  32. #define ISRAM1_BESR1 (ISRAM1_DCR_BASE+0x06) /* SRAM1 bus error status reg 1 */
  33. #define ISRAM1_PMEG (ISRAM1_DCR_BASE+0x07) /* SRAM1 power management */
  34. #define ISRAM1_CID (ISRAM1_DCR_BASE+0x08) /* SRAM1 bus core id reg */
  35. #define ISRAM1_REVID (ISRAM1_DCR_BASE+0x09) /* SRAM1 bus revision id reg */
  36. #define ISRAM1_DPC (ISRAM1_DCR_BASE+0x0a) /* SRAM1 data parity check reg */
  37. #endif /* CONFIG_460EX || CONFIG_460GT */
  38. #if defined(CONFIG_460EX) || defined(CONFIG_460GT)
  39. #define ISRAM1_SIZE 0x0984 /* OCM size 64k */
  40. #elif defined(CONFIG_APM821XX)
  41. #define ISRAM1_SIZE 0x0784 /* OCM size 32k */
  42. #endif
  43. /*
  44. * L2 Cache
  45. */
  46. #if defined (CONFIG_440GX) || \
  47. defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
  48. defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
  49. defined(CONFIG_460SX) || defined(CONFIG_APM821XX)
  50. #define L2_CACHE_BASE 0x030
  51. #define L2_CACHE_CFG (L2_CACHE_BASE+0x00) /* L2 Cache Config */
  52. #define L2_CACHE_CMD (L2_CACHE_BASE+0x01) /* L2 Cache Command */
  53. #define L2_CACHE_ADDR (L2_CACHE_BASE+0x02) /* L2 Cache Address */
  54. #define L2_CACHE_DATA (L2_CACHE_BASE+0x03) /* L2 Cache Data */
  55. #define L2_CACHE_STAT (L2_CACHE_BASE+0x04) /* L2 Cache Status */
  56. #define L2_CACHE_CVER (L2_CACHE_BASE+0x05) /* L2 Cache Revision ID */
  57. #define L2_CACHE_SNP0 (L2_CACHE_BASE+0x06) /* L2 Cache Snoop reg 0 */
  58. #define L2_CACHE_SNP1 (L2_CACHE_BASE+0x07) /* L2 Cache Snoop reg 1 */
  59. #endif /* CONFIG_440GX */
  60. #endif /* _PPC4xx_ISRAM_H_ */