k2.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * arch/ppc/platforms/k2.h
  3. *
  4. * Definitions for SBS K2 board support
  5. *
  6. * Author: Matt Porter <mporter@mvista.com>
  7. *
  8. * 2001 (c) MontaVista, Software, Inc. This file is licensed under
  9. * the terms of the GNU General Public License version 2. This program
  10. * is licensed "as is" without any warranty of any kind, whether express
  11. * or implied.
  12. */
  13. #ifndef __PPC_PLATFORMS_K2_H
  14. #define __PPC_PLATFORMS_K2_H
  15. /*
  16. * SBS K2 definitions
  17. */
  18. #define K2_PCI64_BAR 0xff400000
  19. #define K2_PCI32_BAR 0xff500000
  20. #define K2_PCI64_CONFIG_ADDR (K2_PCI64_BAR + 0x000f8000)
  21. #define K2_PCI64_CONFIG_DATA (K2_PCI64_BAR + 0x000f8010)
  22. #define K2_PCI32_CONFIG_ADDR (K2_PCI32_BAR + 0x000f8000)
  23. #define K2_PCI32_CONFIG_DATA (K2_PCI32_BAR + 0x000f8010)
  24. #define K2_PCI64_MEM_BASE 0xd0000000
  25. #define K2_PCI64_IO_BASE 0x80100000
  26. #define K2_PCI32_MEM_BASE 0xc0000000
  27. #define K2_PCI32_IO_BASE 0x80000000
  28. #define K2_PCI32_SYS_MEM_BASE 0x80000000
  29. #define K2_PCI64_SYS_MEM_BASE K2_PCI32_SYS_MEM_BASE
  30. #define K2_PCI32_LOWER_MEM 0x00000000
  31. #define K2_PCI32_UPPER_MEM 0x0fffffff
  32. #define K2_PCI32_LOWER_IO 0x00000000
  33. #define K2_PCI32_UPPER_IO 0x000fffff
  34. #define K2_PCI64_LOWER_MEM 0x10000000
  35. #define K2_PCI64_UPPER_MEM 0x1fffffff
  36. #define K2_PCI64_LOWER_IO 0x00100000
  37. #define K2_PCI64_UPPER_IO 0x001fffff
  38. #define K2_ISA_IO_BASE K2_PCI32_IO_BASE
  39. #define K2_ISA_MEM_BASE K2_PCI32_MEM_BASE
  40. #define K2_BOARD_ID_REG (K2_ISA_IO_BASE + 0x800)
  41. #define K2_MISC_REG (K2_ISA_IO_BASE + 0x804)
  42. #define K2_MSIZ_GEO_REG (K2_ISA_IO_BASE + 0x808)
  43. #define K2_HOT_SWAP_REG (K2_ISA_IO_BASE + 0x80c)
  44. #define K2_PLD2_REG (K2_ISA_IO_BASE + 0x80e)
  45. #define K2_PLD3_REG (K2_ISA_IO_BASE + 0x80f)
  46. #define K2_BUS_SPD(board_id) (board_id >> 2) & 3
  47. #define K2_RTC_BASE_OFFSET 0x90000
  48. #define K2_RTC_BASE_ADDRESS (K2_PCI32_MEM_BASE + K2_RTC_BASE_OFFSET)
  49. #define K2_RTC_SIZE 0x8000
  50. #define K2_MEM_SIZE_MASK 0xe0
  51. #define K2_MEM_SIZE(size_reg) (size_reg & K2_MEM_SIZE_MASK) >> 5
  52. #define K2_MEM_SIZE_1GB 0x40000000
  53. #define K2_MEM_SIZE_512MB 0x20000000
  54. #define K2_MEM_SIZE_256MB 0x10000000
  55. #define K2_MEM_SIZE_128MB 0x08000000
  56. #define K2_L2CACHE_MASK 0x03 /* Mask for 2 L2 Cache bits */
  57. #define K2_L2CACHE_512KB 0x00 /* 512KB */
  58. #define K2_L2CACHE_256KB 0x01 /* 256KB */
  59. #define K2_L2CACHE_1MB 0x02 /* 1MB */
  60. #define K2_L2CACHE_NONE 0x03 /* None */
  61. #define K2_GEO_ADR_MASK 0x1f
  62. #define K2_SYS_SLOT_MASK 0x08
  63. #endif /* __PPC_PLATFORMS_K2_H */