glb.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. *
  3. * BRIEF MODULE DESCRIPTION
  4. * PNX8550 global definitions
  5. *
  6. * Author: source@mvista.com
  7. *
  8. * This program is free software; you can distribute it and/or modify it
  9. * under the terms of the GNU General Public License (Version 2) as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  15. * for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, write to the Free Software Foundation, Inc.,
  19. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  20. */
  21. #ifndef __PNX8550_GLB_H
  22. #define __PNX8550_GLB_H
  23. #define PNX8550_GLB1_BASE 0xBBE63000
  24. #define PNX8550_GLB2_BASE 0xBBE4d000
  25. #define PNX8550_RESET_BASE 0xBBE60000
  26. /* PCI Inta Output Enable Registers */
  27. #define PNX8550_GLB2_ENAB_INTA_O *(volatile unsigned long *)(PNX8550_GLB2_BASE + 0x050)
  28. /* Bit 1:Enable DAC Powerdown
  29. 0:DACs are enabled and are working normally
  30. 1:DACs are powerdown
  31. */
  32. #define PNX8550_GLB_DAC_PD 0x2
  33. /* Bit 0:Enable of PCI inta output
  34. 0 = Disable PCI inta output
  35. 1 = Enable PCI inta output
  36. */
  37. #define PNX8550_GLB_ENABLE_INTA_O 0x1
  38. /* PCI Direct Mappings */
  39. #define PNX8550_PCIMEM 0x12000000
  40. #define PNX8550_PCIMEM_SIZE 0x08000000
  41. #define PNX8550_PCIIO 0x1c000000
  42. #define PNX8550_PCIIO_SIZE 0x02000000 /* 32M */
  43. #define PNX8550_PORT_BASE KSEG1
  44. // GPIO def
  45. #define PNX8550_GPIO_BASE 0x1Be00000
  46. #define PNX8550_GPIO_DIRQ0 (PNX8550_GPIO_BASE + 0x104500)
  47. #define PNX8550_GPIO_MC1 (PNX8550_GPIO_BASE + 0x104004)
  48. #define PNX8550_GPIO_MC_31_BIT 30
  49. #define PNX8550_GPIO_MC_30_BIT 28
  50. #define PNX8550_GPIO_MC_29_BIT 26
  51. #define PNX8550_GPIO_MC_28_BIT 24
  52. #define PNX8550_GPIO_MC_27_BIT 22
  53. #define PNX8550_GPIO_MC_26_BIT 20
  54. #define PNX8550_GPIO_MC_25_BIT 18
  55. #define PNX8550_GPIO_MC_24_BIT 16
  56. #define PNX8550_GPIO_MC_23_BIT 14
  57. #define PNX8550_GPIO_MC_22_BIT 12
  58. #define PNX8550_GPIO_MC_21_BIT 10
  59. #define PNX8550_GPIO_MC_20_BIT 8
  60. #define PNX8550_GPIO_MC_19_BIT 6
  61. #define PNX8550_GPIO_MC_18_BIT 4
  62. #define PNX8550_GPIO_MC_17_BIT 2
  63. #define PNX8550_GPIO_MC_16_BIT 0
  64. #define PNX8550_GPIO_MODE_PRIMOP 0x1
  65. #define PNX8550_GPIO_MODE_NO_OPENDR 0x2
  66. #define PNX8550_GPIO_MODE_OPENDR 0x3
  67. // RESET module
  68. #define PNX8550_RST_CTL *(volatile unsigned long *)(PNX8550_RESET_BASE + 0x0)
  69. #define PNX8550_RST_CAUSE *(volatile unsigned long *)(PNX8550_RESET_BASE + 0x4)
  70. #define PNX8550_RST_EN_WATCHDOG *(volatile unsigned long *)(PNX8550_RESET_BASE + 0x8)
  71. #define PNX8550_RST_REL_MIPS_RST_N 0x8
  72. #define PNX8550_RST_DO_SW_RST 0x4
  73. #define PNX8550_RST_REL_SYS_RST_OUT 0x2
  74. #define PNX8550_RST_ASSERT_SYS_RST_OUT 0x1
  75. #endif