pl093.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* linux/amba/pl093.h
  2. *
  3. * Copyright (c) 2008 Simtec Electronics
  4. * http://armlinux.simtec.co.uk/
  5. * Ben Dooks <ben@simtec.co.uk>
  6. *
  7. * AMBA PL093 SSMC (synchronous static memory controller)
  8. * See DDI0236.pdf (r0p4) for more details
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #define SMB_BANK(x) ((x) * 0x20) /* each bank control set is 0x20 apart */
  15. /* Offsets for SMBxxxxRy registers */
  16. #define SMBIDCYR (0x00)
  17. #define SMBWSTRDR (0x04)
  18. #define SMBWSTWRR (0x08)
  19. #define SMBWSTOENR (0x0C)
  20. #define SMBWSTWENR (0x10)
  21. #define SMBCR (0x14)
  22. #define SMBSR (0x18)
  23. #define SMBWSTBRDR (0x1C)
  24. /* Masks for SMB registers */
  25. #define IDCY_MASK (0xf)
  26. #define WSTRD_MASK (0xf)
  27. #define WSTWR_MASK (0xf)
  28. #define WSTOEN_MASK (0xf)
  29. #define WSTWEN_MASK (0xf)
  30. /* Notes from datasheet:
  31. * WSTOEN <= WSTRD
  32. * WSTWEN <= WSTWR
  33. *
  34. * WSTOEN is not used with nWAIT
  35. */
  36. /* SMBCR bit definitions */
  37. #define SMBCR_BIWRITEEN (1 << 21)
  38. #define SMBCR_ADDRVALIDWRITEEN (1 << 20)
  39. #define SMBCR_SYNCWRITE (1 << 17)
  40. #define SMBCR_BMWRITE (1 << 16)
  41. #define SMBCR_WRAPREAD (1 << 14)
  42. #define SMBCR_BIREADEN (1 << 13)
  43. #define SMBCR_ADDRVALIDREADEN (1 << 12)
  44. #define SMBCR_SYNCREAD (1 << 9)
  45. #define SMBCR_BMREAD (1 << 8)
  46. #define SMBCR_SMBLSPOL (1 << 6)
  47. #define SMBCR_WP (1 << 3)
  48. #define SMBCR_WAITEN (1 << 2)
  49. #define SMBCR_WAITPOL (1 << 1)
  50. #define SMBCR_RBLE (1 << 0)
  51. #define SMBCR_BURSTLENWRITE_MASK (3 << 18)
  52. #define SMBCR_BURSTLENWRITE_4 (0 << 18)
  53. #define SMBCR_BURSTLENWRITE_8 (1 << 18)
  54. #define SMBCR_BURSTLENWRITE_RESERVED (2 << 18)
  55. #define SMBCR_BURSTLENWRITE_CONTINUOUS (3 << 18)
  56. #define SMBCR_BURSTLENREAD_MASK (3 << 10)
  57. #define SMBCR_BURSTLENREAD_4 (0 << 10)
  58. #define SMBCR_BURSTLENREAD_8 (1 << 10)
  59. #define SMBCR_BURSTLENREAD_16 (2 << 10)
  60. #define SMBCR_BURSTLENREAD_CONTINUOUS (3 << 10)
  61. #define SMBCR_MW_MASK (3 << 4)
  62. #define SMBCR_MW_8BIT (0 << 4)
  63. #define SMBCR_MW_16BIT (1 << 4)
  64. #define SMBCR_MW_M32BIT (2 << 4)
  65. /* SSMC status registers */
  66. #define SSMCCSR (0x200)
  67. #define SSMCCR (0x204)
  68. #define SSMCITCR (0x208)
  69. #define SSMCITIP (0x20C)
  70. #define SSMCITIOP (0x210)