malta.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Carsten Langgaard, carstenl@mips.com
  3. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  4. *
  5. * This program is free software; you can distribute it and/or modify it
  6. * under the terms of the GNU General Public License (Version 2) as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. * for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  17. *
  18. * Defines of the Malta board specific address-MAP, registers, etc.
  19. */
  20. #ifndef __ASM_MIPS_BOARDS_MALTA_H
  21. #define __ASM_MIPS_BOARDS_MALTA_H
  22. #include <asm/addrspace.h>
  23. #include <asm/io.h>
  24. #include <asm/mips-boards/msc01_pci.h>
  25. #include <asm/gt64120.h>
  26. /* Mips interrupt controller found in SOCit variations */
  27. #define MIPS_MSC01_IC_REG_BASE 0x1bc40000
  28. #define MIPS_SOCITSC_IC_REG_BASE 0x1ffa0000
  29. /*
  30. * Malta I/O ports base address for the Galileo GT64120 and Algorithmics
  31. * Bonito system controllers.
  32. */
  33. #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS)
  34. #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000))
  35. #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL)
  36. static inline unsigned long get_gt_port_base(unsigned long reg)
  37. {
  38. unsigned long addr;
  39. addr = GT_READ(reg);
  40. return (unsigned long) ioremap (((addr & 0xffff) << 21), 0x10000);
  41. }
  42. static inline unsigned long get_msc_port_base(unsigned long reg)
  43. {
  44. unsigned long addr;
  45. MSC_READ(reg, addr);
  46. return (unsigned long) ioremap(addr, 0x10000);
  47. }
  48. /*
  49. * GCMP Specific definitions
  50. */
  51. #define GCMP_BASE_ADDR 0x1fbf8000
  52. #define GCMP_ADDRSPACE_SZ (256 * 1024)
  53. /*
  54. * GIC Specific definitions
  55. */
  56. #define GIC_BASE_ADDR 0x1bdc0000
  57. #define GIC_ADDRSPACE_SZ (128 * 1024)
  58. /*
  59. * MSC01 BIU Specific definitions
  60. * FIXME : These should be elsewhere ?
  61. */
  62. #define MSC01_BIU_REG_BASE 0x1bc80000
  63. #define MSC01_BIU_ADDRSPACE_SZ (256 * 1024)
  64. #define MSC01_SC_CFG_OFS 0x0110
  65. #define MSC01_SC_CFG_GICPRES_MSK 0x00000004
  66. #define MSC01_SC_CFG_GICPRES_SHF 2
  67. #define MSC01_SC_CFG_GICENA_SHF 3
  68. /*
  69. * Malta RTC-device indirect register access.
  70. */
  71. #define MALTA_RTC_ADR_REG 0x70
  72. #define MALTA_RTC_DAT_REG 0x71
  73. /*
  74. * Malta SMSC FDC37M817 Super I/O Controller register.
  75. */
  76. #define SMSC_CONFIG_REG 0x3f0
  77. #define SMSC_DATA_REG 0x3f1
  78. #define SMSC_CONFIG_DEVNUM 0x7
  79. #define SMSC_CONFIG_ACTIVATE 0x30
  80. #define SMSC_CONFIG_ENTER 0x55
  81. #define SMSC_CONFIG_EXIT 0xaa
  82. #define SMSC_CONFIG_DEVNUM_FLOPPY 0
  83. #define SMSC_CONFIG_ACTIVATE_ENABLE 1
  84. #define SMSC_WRITE(x, a) outb(x, a)
  85. #define MALTA_JMPRS_REG 0x1f000210
  86. #endif /* __ASM_MIPS_BOARDS_MALTA_H */