piix4.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Carsten Langgaard, carstenl@mips.com
  3. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  4. * Copyright (C) 2013 Imagination Technologies Ltd.
  5. *
  6. * This program is free software; you can distribute it and/or modify it
  7. * under the terms of the GNU General Public License (Version 2) as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  13. * for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  18. *
  19. * Register definitions for Intel PIIX4 South Bridge Device.
  20. */
  21. #ifndef __ASM_MIPS_BOARDS_PIIX4_H
  22. #define __ASM_MIPS_BOARDS_PIIX4_H
  23. /* PIRQX Route Control */
  24. #define PIIX4_FUNC0_PIRQRC 0x60
  25. #define PIIX4_FUNC0_PIRQRC_IRQ_ROUTING_DISABLE (1 << 7)
  26. #define PIIX4_FUNC0_PIRQRC_IRQ_ROUTING_MASK 0xf
  27. #define PIIX4_FUNC0_PIRQRC_IRQ_ROUTING_MAX 16
  28. /* Top Of Memory */
  29. #define PIIX4_FUNC0_TOM 0x69
  30. #define PIIX4_FUNC0_TOM_TOP_OF_MEMORY_MASK 0xf0
  31. /* Deterministic Latency Control */
  32. #define PIIX4_FUNC0_DLC 0x82
  33. #define PIIX4_FUNC0_DLC_USBPR_EN (1 << 2)
  34. #define PIIX4_FUNC0_DLC_PASSIVE_RELEASE_EN (1 << 1)
  35. #define PIIX4_FUNC0_DLC_DELAYED_TRANSACTION_EN (1 << 0)
  36. /* IDE Timing */
  37. #define PIIX4_FUNC1_IDETIM_PRIMARY_LO 0x40
  38. #define PIIX4_FUNC1_IDETIM_PRIMARY_HI 0x41
  39. #define PIIX4_FUNC1_IDETIM_PRIMARY_HI_IDE_DECODE_EN (1 << 7)
  40. #define PIIX4_FUNC1_IDETIM_SECONDARY_LO 0x42
  41. #define PIIX4_FUNC1_IDETIM_SECONDARY_HI 0x43
  42. #define PIIX4_FUNC1_IDETIM_SECONDARY_HI_IDE_DECODE_EN (1 << 7)
  43. /************************************************************************
  44. * IO register offsets
  45. ************************************************************************/
  46. #define PIIX4_ICTLR1_ICW1 0x20
  47. #define PIIX4_ICTLR1_ICW2 0x21
  48. #define PIIX4_ICTLR1_ICW3 0x21
  49. #define PIIX4_ICTLR1_ICW4 0x21
  50. #define PIIX4_ICTLR2_ICW1 0xa0
  51. #define PIIX4_ICTLR2_ICW2 0xa1
  52. #define PIIX4_ICTLR2_ICW3 0xa1
  53. #define PIIX4_ICTLR2_ICW4 0xa1
  54. #define PIIX4_ICTLR1_OCW1 0x21
  55. #define PIIX4_ICTLR1_OCW2 0x20
  56. #define PIIX4_ICTLR1_OCW3 0x20
  57. #define PIIX4_ICTLR1_OCW4 0x20
  58. #define PIIX4_ICTLR2_OCW1 0xa1
  59. #define PIIX4_ICTLR2_OCW2 0xa0
  60. #define PIIX4_ICTLR2_OCW3 0xa0
  61. #define PIIX4_ICTLR2_OCW4 0xa0
  62. /************************************************************************
  63. * Register encodings.
  64. ************************************************************************/
  65. #define PIIX4_OCW2_NSEOI (0x1 << 5)
  66. #define PIIX4_OCW2_SEOI (0x3 << 5)
  67. #define PIIX4_OCW2_RNSEOI (0x5 << 5)
  68. #define PIIX4_OCW2_RAEOIS (0x4 << 5)
  69. #define PIIX4_OCW2_RAEOIC (0x0 << 5)
  70. #define PIIX4_OCW2_RSEOI (0x7 << 5)
  71. #define PIIX4_OCW2_SP (0x6 << 5)
  72. #define PIIX4_OCW2_NOP (0x2 << 5)
  73. #define PIIX4_OCW2_SEL (0x0 << 3)
  74. #define PIIX4_OCW2_ILS_0 0
  75. #define PIIX4_OCW2_ILS_1 1
  76. #define PIIX4_OCW2_ILS_2 2
  77. #define PIIX4_OCW2_ILS_3 3
  78. #define PIIX4_OCW2_ILS_4 4
  79. #define PIIX4_OCW2_ILS_5 5
  80. #define PIIX4_OCW2_ILS_6 6
  81. #define PIIX4_OCW2_ILS_7 7
  82. #define PIIX4_OCW2_ILS_8 0
  83. #define PIIX4_OCW2_ILS_9 1
  84. #define PIIX4_OCW2_ILS_10 2
  85. #define PIIX4_OCW2_ILS_11 3
  86. #define PIIX4_OCW2_ILS_12 4
  87. #define PIIX4_OCW2_ILS_13 5
  88. #define PIIX4_OCW2_ILS_14 6
  89. #define PIIX4_OCW2_ILS_15 7
  90. #define PIIX4_OCW3_SEL (0x1 << 3)
  91. #define PIIX4_OCW3_IRR 0x2
  92. #define PIIX4_OCW3_ISR 0x3
  93. #endif /* __ASM_MIPS_BOARDS_PIIX4_H */