memoryCall.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _M32700UT_M32700UT_PLD_H
  2. #define _M32700UT_M32700UT_PLD_H
  3. /*
  4. * include/asm-m32r/m32700ut/m32700ut_pld.h
  5. *
  6. * Definitions for Programmable Logic Device(PLD) on M32700UT 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. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV)
  15. #define PLD_PLAT_BASE 0x04c00000
  16. #else
  17. #error "no platform configuration"
  18. #endif
  19. #ifndef __ASSEMBLY__
  20. /*
  21. * C functions use non-cache address.
  22. */
  23. #define PLD_BASE (PLD_PLAT_BASE /* + NONCACHE_OFFSET */)
  24. #define __reg8 (volatile unsigned char *)
  25. #define __reg16 (volatile unsigned short *)
  26. #define __reg32 (volatile unsigned int *)
  27. #else
  28. #define PLD_BASE (PLD_PLAT_BASE + NONCACHE_OFFSET)
  29. #define __reg8
  30. #define __reg16
  31. #define __reg32
  32. #endif /* __ASSEMBLY__ */
  33. /* CFC */
  34. #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
  35. #define PLD_CFSTS __reg16(PLD_BASE + 0x0002)
  36. #define PLD_CFIMASK __reg16(PLD_BASE + 0x0004)
  37. #define PLD_CFBUFCR __reg16(PLD_BASE + 0x0006)
  38. #define PLD_CFVENCR __reg16(PLD_BASE + 0x0008)
  39. #define PLD_CFCR0 __reg16(PLD_BASE + 0x000a)
  40. #define PLD_CFCR1 __reg16(PLD_BASE + 0x000c)
  41. #define PLD_IDERSTCR __reg16(PLD_BASE + 0x0010)
  42. /* MMC */
  43. #define PLD_MMCCR __reg16(PLD_BASE + 0x4000)
  44. #define PLD_MMCMOD __reg16(PLD_BASE + 0x4002)
  45. #define PLD_MMCSTS __reg16(PLD_BASE + 0x4006)
  46. #define PLD_MMCBAUR __reg16(PLD_BASE + 0x400a)
  47. #define PLD_MMCCMDBCUT __reg16(PLD_BASE + 0x400c)
  48. #define PLD_MMCCDTBCUT __reg16(PLD_BASE + 0x400e)
  49. #define PLD_MMCDET __reg16(PLD_BASE + 0x4010)
  50. #define PLD_MMCWP __reg16(PLD_BASE + 0x4012)
  51. #define PLD_MMCWDATA __reg16(PLD_BASE + 0x5000)
  52. #define PLD_MMCRDATA __reg16(PLD_BASE + 0x6000)
  53. #define PLD_MMCCMDDATA __reg16(PLD_BASE + 0x7000)
  54. #define PLD_MMCRSPDATA __reg16(PLD_BASE + 0x7006)