preliminaryDataProcessing.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* include/asm-m68knommu/MC68328.h: '328 control registers
  2. *
  3. * Copyright (C) 1999 Vladimir Gurevich <vgurevic@cisco.com>
  4. * Bear & Hare Software, Inc.
  5. *
  6. * Based on include/asm-m68knommu/MC68332.h
  7. * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>,
  8. *
  9. */
  10. #ifndef _MC68328_H_
  11. #define _MC68328_H_
  12. #define BYTE_REF(addr) (*((volatile unsigned char*)addr))
  13. #define WORD_REF(addr) (*((volatile unsigned short*)addr))
  14. #define LONG_REF(addr) (*((volatile unsigned long*)addr))
  15. #define PUT_FIELD(field, val) (((val) << field##_SHIFT) & field##_MASK)
  16. #define GET_FIELD(reg, field) (((reg) & field##_MASK) >> field##_SHIFT)
  17. /**********
  18. *
  19. * 0xFFFFF0xx -- System Control
  20. *
  21. **********/
  22. /*
  23. * System Control Register (SCR)
  24. */
  25. #define SCR_ADDR 0xfffff000
  26. #define SCR BYTE_REF(SCR_ADDR)
  27. #define SCR_WDTH8 0x01 /* 8-Bit Width Select */
  28. #define SCR_DMAP 0x04 /* Double Map */
  29. #define SCR_SO 0x08 /* Supervisor Only */
  30. #define SCR_BETEN 0x10 /* Bus-Error Time-Out Enable */
  31. #define SCR_PRV 0x20 /* Privilege Violation */
  32. #define SCR_WPV 0x40 /* Write Protect Violation */
  33. #define SCR_BETO 0x80 /* Bus-Error TimeOut */
  34. /*
  35. * Mask Revision Register
  36. */
  37. #define MRR_ADDR 0xfffff004
  38. #define MRR LONG_REF(MRR_ADDR)
  39. /**********
  40. *
  41. * 0xFFFFF1xx -- Chip-Select logic
  42. *
  43. **********/
  44. /**********
  45. *
  46. * 0xFFFFF2xx -- Phase Locked Loop (PLL) & Power Control
  47. *
  48. **********/
  49. /*
  50. * Group Base Address Registers
  51. */
  52. #define GRPBASEA_ADDR 0xfffff100
  53. #define GRPBASEB_ADDR 0xfffff102
  54. #define GRPBASEC_ADDR 0xfffff104
  55. #define GRPBASED_ADDR 0xfffff106
  56. #define GRPBASEA WORD_REF(GRPBASEA_ADDR)
  57. #define GRPBASEB WORD_REF(GRPBASEB_ADDR)
  58. #define GRPBASEC WORD_REF(GRPBASEC_ADDR)
  59. #define GRPBASED WORD_REF(GRPBASED_ADDR)
  60. #define GRPBASE_V 0x0001 /* Valid */
  61. #define GRPBASE_GBA_MASK 0xfff0 /* Group Base Address (bits 31-20) */
  62. /*
  63. * Group Base Address Mask Registers
  64. */
  65. #define GRPMASKA_ADDR 0xfffff108
  66. #define GRPMASKB_ADDR 0xfffff10a
  67. #define GRPMASKC_ADDR 0xfffff10c
  68. #define GRPMASKD_ADDR 0xfffff10e
  69. #define GRPMASKA WORD_REF(GRPMASKA_ADDR)
  70. #define GRPMASKB WORD_REF(GRPMASKB_ADDR)
  71. #define GRPMASKC WORD_REF(GRPMASKC_ADDR)
  72. #define GRPMASKD WORD_REF(GRPMASKD_ADDR)
  73. #define GRMMASK_GMA_MASK 0xfffff0 /* Group Base Mask (bits 31-20) */