mem.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * (C) Copyright 2006-2008
  3. * Texas Instruments, <www.ti.com>
  4. *
  5. * Author
  6. * Mansoor Ahamed <mansoor.ahamed@ti.com>
  7. *
  8. * Initial Code from:
  9. * Richard Woodruff <r-woodruff2@ti.com>
  10. *
  11. * SPDX-License-Identifier: GPL-2.0+
  12. */
  13. #ifndef _MEM_H_
  14. #define _MEM_H_
  15. /*
  16. * GPMC settings -
  17. * Definitions is as per the following format
  18. * #define <PART>_GPMC_CONFIG<x> <value>
  19. * Where:
  20. * PART is the part name e.g. STNOR - Intel Strata Flash
  21. * x is GPMC config registers from 1 to 6 (there will be 6 macros)
  22. * Value is corresponding value
  23. *
  24. * For every valid PRCM configuration there should be only one definition of
  25. * the same. if values are independent of the board, this definition will be
  26. * present in this file if values are dependent on the board, then this should
  27. * go into corresponding mem-boardName.h file
  28. *
  29. * Currently valid part Names are (PART):
  30. * M_NAND - Micron NAND
  31. * STNOR - STMicrolelctronics M29W128GL
  32. */
  33. #define GPMC_SIZE_256M 0x0
  34. #define GPMC_SIZE_128M 0x8
  35. #define GPMC_SIZE_64M 0xC
  36. #define GPMC_SIZE_32M 0xE
  37. #define GPMC_SIZE_16M 0xF
  38. #define M_NAND_GPMC_CONFIG1 0x00000800
  39. #define M_NAND_GPMC_CONFIG2 0x001e1e00
  40. #define M_NAND_GPMC_CONFIG3 0x001e1e00
  41. #define M_NAND_GPMC_CONFIG4 0x16051807
  42. #define M_NAND_GPMC_CONFIG5 0x00151e1e
  43. #define M_NAND_GPMC_CONFIG6 0x16000f80
  44. #define M_NAND_GPMC_CONFIG7 0x00000008
  45. #define STNOR_GPMC_CONFIG1 0x00001000
  46. #define STNOR_GPMC_CONFIG2 0x001f1f00
  47. #define STNOR_GPMC_CONFIG3 0x001f1f01
  48. #define STNOR_GPMC_CONFIG4 0x1f011f01
  49. #define STNOR_GPMC_CONFIG5 0x001d1f1f
  50. #define STNOR_GPMC_CONFIG6 0x08070280
  51. #define STNOR_GPMC_CONFIG7 0x00000048
  52. /* max number of GPMC Chip Selects */
  53. #define GPMC_MAX_CS 8
  54. /* max number of GPMC regs */
  55. #define GPMC_MAX_REG 7
  56. #endif /* endif _MEM_H_ */