hardware.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * linux/include/asm-arm/arch-arc/hardware.h
  3. *
  4. * Copyright (C) 1996-1999 Russell King.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This file contains the hardware definitions of the
  11. * Acorn Archimedes/A5000 machines.
  12. *
  13. * Modifications:
  14. * 04-04-1998 PJB/RMK Merged arc and a5k versions
  15. */
  16. #ifndef __ASM_HARDWARE_H
  17. #define __ASM_HARDWARE_H
  18. /*
  19. * What hardware must be present - these can be tested by the kernel
  20. * source.
  21. */
  22. #define HAS_IOC
  23. #define HAS_MEMC
  24. #define HAS_VIDC
  25. #define VDMA_ALIGNMENT PAGE_SIZE
  26. #define VDMA_XFERSIZE 16
  27. #define VDMA_INIT 0
  28. #define VDMA_START 1
  29. #define VDMA_END 2
  30. #ifndef __ASSEMBLY__
  31. extern void memc_write(unsigned int reg, unsigned long val);
  32. #define video_set_dma(start,end,offset) \
  33. do { \
  34. memc_write (VDMA_START, (start >> 2)); \
  35. memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2); \
  36. memc_write (VDMA_INIT, (offset >> 2)); \
  37. } while (0)
  38. #endif
  39. /* Hardware addresses of major areas.
  40. * *_START is the physical address
  41. * *_SIZE is the size of the region
  42. * *_BASE is the virtual address
  43. */
  44. #define IO_START 0x03000000
  45. #define IO_SIZE 0x01000000
  46. #define IO_BASE 0x03000000
  47. /*
  48. * Screen mapping information
  49. */
  50. #define SCREEN_START 0x02000000
  51. #define SCREEN_END 0x02078000
  52. #define SCREEN_SIZE 0x00078000
  53. #define SCREEN_BASE 0x02000000
  54. #define EXPMASK_BASE 0x03360000
  55. #define IOEB_BASE 0x03350000
  56. #define VIDC_BASE 0x03400000
  57. #define LATCHA_BASE 0x03250040
  58. #define LATCHB_BASE 0x03250018
  59. #define IOC_BASE 0x03200000
  60. #define FLOPPYDMA_BASE 0x0302a000
  61. #define PCIO_BASE 0x03010000
  62. // FIXME - are the below correct?
  63. #define PODSLOT_IOC0_BASE 0x03240000
  64. #define PODSLOT_IOC_SIZE (1 << 14)
  65. #define PODSLOT_MEMC_BASE 0x03000000
  66. #define PODSLOT_MEMC_SIZE (1 << 14)
  67. #define vidc_writel(val) __raw_writel(val, VIDC_BASE)
  68. #ifndef __ASSEMBLY__
  69. /*
  70. * for use with inb/outb
  71. */
  72. #define IOEB_VID_CTL (IOEB_BASE + 0x48)
  73. #define IOEB_PRESENT (IOEB_BASE + 0x50)
  74. #define IOEB_PSCLR (IOEB_BASE + 0x58)
  75. #define IOEB_MONTYPE (IOEB_BASE + 0x70)
  76. //FIXME - These adresses are weird - ISTR some weirdo address shifting stuff was going on here...
  77. #define IO_EC_IOC_BASE 0x80090000
  78. #define IO_EC_MEMC_BASE 0x80000000
  79. #ifdef CONFIG_ARCH_ARC
  80. /* A680 hardware */
  81. #define WD1973_BASE 0x03290000
  82. #define WD1973_LATCH 0x03350000
  83. #define Z8530_BASE 0x032b0008
  84. #define SCSI_BASE 0x03100000
  85. #endif
  86. #endif
  87. #define EXPMASK_STATUS (EXPMASK_BASE + 0x00)
  88. #define EXPMASK_ENABLE (EXPMASK_BASE + 0x04)
  89. #endif