omap3-regs.h 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * (c) 2011 Comelit Group SpA, Luca Ceresoli <luca.ceresoli@comelit.it>
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef _OMAP3_REGS_H
  23. #define _OMAP3_REGS_H
  24. /*
  25. * Register definitions for OMAP3 processors.
  26. */
  27. /*
  28. * GPMC_CONFIG1 - GPMC_CONFIG7
  29. */
  30. /* Values for GPMC_CONFIG1 - signal control parameters */
  31. #define WRAPBURST (1 << 31)
  32. #define READMULTIPLE (1 << 30)
  33. #define READTYPE (1 << 29)
  34. #define WRITEMULTIPLE (1 << 28)
  35. #define WRITETYPE (1 << 27)
  36. #define CLKACTIVATIONTIME(x) (((x) & 3) << 25)
  37. #define ATTACHEDDEVICEPAGELENGTH(x) (((x) & 3) << 23)
  38. #define WAITREADMONITORING (1 << 22)
  39. #define WAITWRITEMONITORING (1 << 21)
  40. #define WAITMONITORINGTIME(x) (((x) & 3) << 18)
  41. #define WAITPINSELECT(x) (((x) & 3) << 16)
  42. #define DEVICESIZE(x) (((x) & 3) << 12)
  43. #define DEVICESIZE_8BIT DEVICESIZE(0)
  44. #define DEVICESIZE_16BIT DEVICESIZE(1)
  45. #define DEVICETYPE(x) (((x) & 3) << 10)
  46. #define DEVICETYPE_NOR DEVICETYPE(0)
  47. #define DEVICETYPE_NAND DEVICETYPE(2)
  48. #define MUXADDDATA (1 << 9)
  49. #define TIMEPARAGRANULARITY (1 << 4)
  50. #define GPMCFCLKDIVIDER(x) (((x) & 3) << 0)
  51. /* Values for GPMC_CONFIG2 - CS timing */
  52. #define CSWROFFTIME(x) (((x) & 0x1f) << 16)
  53. #define CSRDOFFTIME(x) (((x) & 0x1f) << 8)
  54. #define CSEXTRADELAY (1 << 7)
  55. #define CSONTIME(x) (((x) & 0xf) << 0)
  56. /* Values for GPMC_CONFIG3 - nADV timing */
  57. #define ADVWROFFTIME(x) (((x) & 0x1f) << 16)
  58. #define ADVRDOFFTIME(x) (((x) & 0x1f) << 8)
  59. #define ADVEXTRADELAY (1 << 7)
  60. #define ADVONTIME(x) (((x) & 0xf) << 0)
  61. /* Values for GPMC_CONFIG4 - nWE and nOE timing */
  62. #define WEOFFTIME(x) (((x) & 0x1f) << 24)
  63. #define WEEXTRADELAY (1 << 23)
  64. #define WEONTIME(x) (((x) & 0xf) << 16)
  65. #define OEOFFTIME(x) (((x) & 0x1f) << 8)
  66. #define OEEXTRADELAY (1 << 7)
  67. #define OEONTIME(x) (((x) & 0xf) << 0)
  68. /* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
  69. #define PAGEBURSTACCESSTIME(x) (((x) & 0xf) << 24)
  70. #define RDACCESSTIME(x) (((x) & 0x1f) << 16)
  71. #define WRCYCLETIME(x) (((x) & 0x1f) << 8)
  72. #define RDCYCLETIME(x) (((x) & 0x1f) << 0)
  73. /* Values for GPMC_CONFIG6 - misc timings */
  74. #define WRACCESSTIME(x) (((x) & 0x1f) << 24)
  75. #define WRDATAONADMUXBUS(x) (((x) & 0xf) << 16)
  76. #define CYCLE2CYCLEDELAY(x) (((x) & 0xf) << 8)
  77. #define CYCLE2CYCLESAMECSEN (1 << 7)
  78. #define CYCLE2CYCLEDIFFCSEN (1 << 6)
  79. #define BUSTURNAROUND(x) (((x) & 0xf) << 0)
  80. /* Values for GPMC_CONFIG7 - CS address mapping configuration */
  81. #define MASKADDRESS(x) (((x) & 0xf) << 8)
  82. #define CSVALID (1 << 6)
  83. #define BASEADDRESS(x) (((x) & 0x3f) << 0)
  84. #endif /* _OMAP3_REGS_H */