mem.h 1.7 KB

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