analysisOfLiquidLevelData.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef _OPSPUT_OPSPUT_PLD_H
  2. #define _OPSPUT_OPSPUT_PLD_H
  3. /*
  4. * include/asm-m32r/opsput/opsput_pld.h
  5. *
  6. * Definitions for Programmable Logic Device(PLD) on OPSPUT board.
  7. *
  8. * Copyright (c) 2002 Takeo Takahashi
  9. *
  10. * This file is subject to the terms and conditions of the GNU General
  11. * Public License. See the file "COPYING" in the main directory of
  12. * this archive for more details.
  13. */
  14. #define PLD_PLAT_BASE 0x1cc00000
  15. #ifndef __ASSEMBLY__
  16. /*
  17. * C functions use non-cache address.
  18. */
  19. #define PLD_BASE (PLD_PLAT_BASE /* + NONCACHE_OFFSET */)
  20. #define __reg8 (volatile unsigned char *)
  21. #define __reg16 (volatile unsigned short *)
  22. #define __reg32 (volatile unsigned int *)
  23. #else
  24. #define PLD_BASE (PLD_PLAT_BASE + NONCACHE_OFFSET)
  25. #define __reg8
  26. #define __reg16
  27. #define __reg32
  28. #endif /* __ASSEMBLY__ */
  29. /* CFC */
  30. #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
  31. #define PLD_CFSTS __reg16(PLD_BASE + 0x0002)
  32. #define PLD_CFIMASK __reg16(PLD_BASE + 0x0004)
  33. #define PLD_CFBUFCR __reg16(PLD_BASE + 0x0006)
  34. #define PLD_CFVENCR __reg16(PLD_BASE + 0x0008)
  35. #define PLD_CFCR0 __reg16(PLD_BASE + 0x000a)
  36. #define PLD_CFCR1 __reg16(PLD_BASE + 0x000c)
  37. #define PLD_IDERSTCR __reg16(PLD_BASE + 0x0010)
  38. /* MMC */
  39. #define PLD_MMCCR __reg16(PLD_BASE + 0x4000)
  40. #define PLD_MMCMOD __reg16(PLD_BASE + 0x4002)
  41. #define PLD_MMCSTS __reg16(PLD_BASE + 0x4006)
  42. #define PLD_MMCBAUR __reg16(PLD_BASE + 0x400a)
  43. #define PLD_MMCCMDBCUT __reg16(PLD_BASE + 0x400c)
  44. #define PLD_MMCCDTBCUT __reg16(PLD_BASE + 0x400e)
  45. #define PLD_MMCDET __reg16(PLD_BASE + 0x4010)
  46. #define PLD_MMCWP __reg16(PLD_BASE + 0x4012)
  47. #define PLD_MMCWDATA __reg16(PLD_BASE + 0x5000)
  48. #define PLD_MMCRDATA __reg16(PLD_BASE + 0x6000)
  49. #define PLD_MMCCMDDATA __reg16(PLD_BASE + 0x7000)
  50. #define PLD_MMCRSPDATA __reg16(PLD_BASE + 0x7006)
  51. /* ICU
  52. * ICUISTS: status register
  53. * ICUIREQ0: request register
  54. * ICUIREQ1: request register
  55. * ICUCR3: control register for CFIREQ# interrupt
  56. * ICUCR4: control register for CFC Card insert interrupt
  57. * ICUCR5: control register for CFC Card eject interrupt
  58. * ICUCR6: control register for external interrupt
  59. * ICUCR11: control register for MMC Card insert/eject interrupt
  60. * ICUCR13: control register for SC error interrupt
  61. * ICUCR14: control register for SC receive interrupt
  62. * ICUCR15: control register for SC send interrupt
  63. * ICUCR16: control register for SIO0 receive interrupt
  64. * ICUCR17: control register for SIO0 send interrupt
  65. */
  66. #if !defined(CONFIG_PLAT_USRV)
  67. #define PLD_IRQ_INT0 (OPSPUT_PLD_IRQ_BASE + 0) /* None */
  68. #define PLD_IRQ_INT1 (OPSPUT_PLD_IRQ_BASE + 1) /* reserved */
  69. #define PLD_IRQ_INT2 (OPSPUT_PLD_IRQ_BASE + 2) /* reserved */
  70. #define PLD_IRQ_CFIREQ (OPSPUT_PLD_IRQ_BASE + 3) /* CF IREQ */
  71. #define PLD_IRQ_CFC_INSERT (OPSPUT_PLD_IRQ_BASE + 4) /* CF Insert */
  72. #define PLD_IRQ_CFC_EJECT (OPSPUT_PLD_IRQ_BASE + 5) /* CF Eject */
  73. #define PLD_IRQ_EXINT (OPSPUT_PLD_IRQ_BASE + 6) /* EXINT */
  74. #define PLD_IRQ_INT7 (OPSPUT_PLD_IRQ_BASE + 7) /* reserved */