regs-gpmi.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * stmp378x: GPMI register definitions
  3. *
  4. * Copyright (c) 2008 Freescale Semiconductor
  5. * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (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, MA 02111-1307 USA
  20. */
  21. #define REGS_GPMI_BASE (STMP3XXX_REGS_BASE + 0xC000)
  22. #define REGS_GPMI_PHYS 0x8000C000
  23. #define REGS_GPMI_SIZE 0x2000
  24. #define HW_GPMI_CTRL0 0x0
  25. #define BM_GPMI_CTRL0_XFER_COUNT 0x0000FFFF
  26. #define BP_GPMI_CTRL0_XFER_COUNT 0
  27. #define BM_GPMI_CTRL0_CS 0x00300000
  28. #define BP_GPMI_CTRL0_CS 20
  29. #define BM_GPMI_CTRL0_LOCK_CS 0x00400000
  30. #define BM_GPMI_CTRL0_WORD_LENGTH 0x00800000
  31. #define BM_GPMI_CTRL0_ADDRESS 0x000E0000
  32. #define BP_GPMI_CTRL0_ADDRESS 17
  33. #define BV_GPMI_CTRL0_ADDRESS__NAND_DATA 0x0
  34. #define BV_GPMI_CTRL0_ADDRESS__NAND_CLE 0x1
  35. #define BV_GPMI_CTRL0_ADDRESS__NAND_ALE 0x2
  36. #define BM_GPMI_CTRL0_ADDRESS_INCREMENT 0x00010000
  37. #define BM_GPMI_CTRL0_COMMAND_MODE 0x03000000
  38. #define BP_GPMI_CTRL0_COMMAND_MODE 24
  39. #define BV_GPMI_CTRL0_COMMAND_MODE__WRITE 0x0
  40. #define BV_GPMI_CTRL0_COMMAND_MODE__READ 0x1
  41. #define BV_GPMI_CTRL0_COMMAND_MODE__READ_AND_COMPARE 0x2
  42. #define BV_GPMI_CTRL0_COMMAND_MODE__WAIT_FOR_READY 0x3
  43. #define BM_GPMI_CTRL0_RUN 0x20000000
  44. #define BM_GPMI_CTRL0_CLKGATE 0x40000000
  45. #define BM_GPMI_CTRL0_SFTRST 0x80000000
  46. #define BM_GPMI_ECCCTRL_BUFFER_MASK 0x000001FF
  47. #define BP_GPMI_ECCCTRL_BUFFER_MASK 0
  48. #define BM_GPMI_ECCCTRL_ENABLE_ECC 0x00001000
  49. #define BM_GPMI_ECCCTRL_ECC_CMD 0x00006000
  50. #define BP_GPMI_ECCCTRL_ECC_CMD 13
  51. #define BV_GPMI_ECCCTRL_ECC_CMD__DECODE_4_BIT 0
  52. #define BV_GPMI_ECCCTRL_ECC_CMD__ENCODE_4_BIT 1
  53. #define BV_GPMI_ECCCTRL_ECC_CMD__DECODE_8_BIT 2
  54. #define BV_GPMI_ECCCTRL_ECC_CMD__ENCODE_8_BIT 3
  55. #define HW_GPMI_CTRL1 0x60
  56. #define BM_GPMI_CTRL1_GPMI_MODE 0x00000001
  57. #define BP_GPMI_CTRL1_GPMI_MODE 0
  58. #define BM_GPMI_CTRL1_ATA_IRQRDY_POLARITY 0x00000004
  59. #define BM_GPMI_CTRL1_DEV_RESET 0x00000008
  60. #define BM_GPMI_CTRL1_TIMEOUT_IRQ 0x00000200
  61. #define BM_GPMI_CTRL1_DEV_IRQ 0x00000400
  62. #define BM_GPMI_CTRL1_RDN_DELAY 0x0000F000
  63. #define BP_GPMI_CTRL1_RDN_DELAY 12
  64. #define BM_GPMI_CTRL1_BCH_MODE 0x00040000
  65. #define HW_GPMI_TIMING0 0x70
  66. #define BM_GPMI_TIMING0_DATA_SETUP 0x000000FF
  67. #define BP_GPMI_TIMING0_DATA_SETUP 0
  68. #define BM_GPMI_TIMING0_DATA_HOLD 0x0000FF00
  69. #define BP_GPMI_TIMING0_DATA_HOLD 8
  70. #define BM_GPMI_TIMING0_ADDRESS_SETUP 0x00FF0000
  71. #define BP_GPMI_TIMING0_ADDRESS_SETUP 16
  72. #define HW_GPMI_TIMING1 0x80
  73. #define BM_GPMI_TIMING1_DEVICE_BUSY_TIMEOUT 0xFFFF0000
  74. #define BP_GPMI_TIMING1_DEVICE_BUSY_TIMEOUT 16