malta.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Carsten Langgaard, [email protected]
  4. * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  5. *
  6. * Defines of the Malta board specific address-MAP, registers, etc.
  7. */
  8. #ifndef __ASM_MIPS_BOARDS_MALTA_H
  9. #define __ASM_MIPS_BOARDS_MALTA_H
  10. #include <asm/addrspace.h>
  11. #include <asm/io.h>
  12. #include <asm/mips-boards/msc01_pci.h>
  13. #include <asm/gt64120.h>
  14. /* Mips interrupt controller found in SOCit variations */
  15. #define MIPS_MSC01_IC_REG_BASE 0x1bc40000
  16. #define MIPS_SOCITSC_IC_REG_BASE 0x1ffa0000
  17. /*
  18. * Malta I/O ports base address for the Galileo GT64120 and Algorithmics
  19. * Bonito system controllers.
  20. */
  21. #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS)
  22. #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000))
  23. #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL)
  24. static inline unsigned long get_gt_port_base(unsigned long reg)
  25. {
  26. unsigned long addr;
  27. addr = GT_READ(reg);
  28. return (unsigned long) ioremap (((addr & 0xffff) << 21), 0x10000);
  29. }
  30. static inline unsigned long get_msc_port_base(unsigned long reg)
  31. {
  32. unsigned long addr;
  33. MSC_READ(reg, addr);
  34. return (unsigned long) ioremap(addr, 0x10000);
  35. }
  36. /*
  37. * GCMP Specific definitions
  38. */
  39. #define GCMP_BASE_ADDR 0x1fbf8000
  40. #define GCMP_ADDRSPACE_SZ (256 * 1024)
  41. /*
  42. * GIC Specific definitions
  43. */
  44. #define GIC_BASE_ADDR 0x1bdc0000
  45. #define GIC_ADDRSPACE_SZ (128 * 1024)
  46. /*
  47. * CPC Specific definitions
  48. */
  49. #define CPC_BASE_ADDR 0x1bde0000
  50. /*
  51. * MSC01 BIU Specific definitions
  52. * FIXME : These should be elsewhere ?
  53. */
  54. #define MSC01_BIU_REG_BASE 0x1bc80000
  55. #define MSC01_BIU_ADDRSPACE_SZ (256 * 1024)
  56. #define MSC01_SC_CFG_OFS 0x0110
  57. #define MSC01_SC_CFG_GICPRES_MSK 0x00000004
  58. #define MSC01_SC_CFG_GICPRES_SHF 2
  59. #define MSC01_SC_CFG_GICENA_SHF 3
  60. /*
  61. * Malta RTC-device indirect register access.
  62. */
  63. #define MALTA_RTC_ADR_REG 0x70
  64. #define MALTA_RTC_DAT_REG 0x71
  65. /*
  66. * Malta SMSC FDC37M817 Super I/O Controller register.
  67. */
  68. #define SMSC_CONFIG_REG 0x3f0
  69. #define SMSC_DATA_REG 0x3f1
  70. #define SMSC_CONFIG_DEVNUM 0x7
  71. #define SMSC_CONFIG_ACTIVATE 0x30
  72. #define SMSC_CONFIG_ENTER 0x55
  73. #define SMSC_CONFIG_EXIT 0xaa
  74. #define SMSC_CONFIG_DEVNUM_FLOPPY 0
  75. #define SMSC_CONFIG_ACTIVATE_ENABLE 1
  76. #define SMSC_WRITE(x, a) outb(x, a)
  77. #define MALTA_JMPRS_REG 0x1f000210
  78. extern void __init *malta_dt_shim(void *fdt);
  79. #endif /* __ASM_MIPS_BOARDS_MALTA_H */