memory_settings.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*****************************************************************************
  2. * Copyright 2004 - 2008 Broadcom Corporation. All rights reserved.
  3. *
  4. * Unless you and Broadcom execute a separate written software license
  5. * agreement governing use of this software, this software is licensed to you
  6. * under the terms of the GNU General Public License version 2, available at
  7. * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
  8. *
  9. * Notwithstanding the above, under no circumstances may you combine this
  10. * software in any way with any other Broadcom software provided under a
  11. * license other than the GPL, without Broadcom's express prior written
  12. * consent.
  13. *****************************************************************************/
  14. #ifndef MEMORY_SETTINGS_H
  15. #define MEMORY_SETTINGS_H
  16. /* ---- Include Files ---------------------------------------- */
  17. /* ---- Constants and Types ---------------------------------- */
  18. /* Memory devices */
  19. /* NAND Flash timing for 166 MHz setting */
  20. #define HW_CFG_NAND_tBTA (5 << 16) /* Bus turnaround cycle (n) 0-7 (30 ns) */
  21. #define HW_CFG_NAND_tWP (4 << 11) /* Write pulse width cycle (n+1) 0-31 (25 ns) */
  22. #define HW_CFG_NAND_tWR (1 << 9) /* Write recovery cycle (n+1) 0-3 (10 ns) */
  23. #define HW_CFG_NAND_tAS (0 << 7) /* Write address setup cycle (n+1) 0-3 ( 0 ns) */
  24. #define HW_CFG_NAND_tOE (3 << 5) /* Output enable delay cycle (n) 0-3 (15 ns) */
  25. #define HW_CFG_NAND_tRC (7 << 0) /* Read access cycle (n+2) 0-31 (50 ns) */
  26. #define HW_CFG_NAND_TCR (HW_CFG_NAND_tBTA \
  27. | HW_CFG_NAND_tWP \
  28. | HW_CFG_NAND_tWR \
  29. | HW_CFG_NAND_tAS \
  30. | HW_CFG_NAND_tOE \
  31. | HW_CFG_NAND_tRC)
  32. /* NOR Flash timing for 166 MHz setting */
  33. #define HW_CFG_NOR_TPRC_TWLC (0 << 19) /* Page read access cycle / Burst write latency (n+2 / n+1) (max 25ns) */
  34. #define HW_CFG_NOR_TBTA (0 << 16) /* Bus turnaround cycle (n) (DNA) */
  35. #define HW_CFG_NOR_TWP (6 << 11) /* Write pulse width cycle (n+1) (35ns) */
  36. #define HW_CFG_NOR_TWR (0 << 9) /* Write recovery cycle (n+1) (0ns) */
  37. #define HW_CFG_NOR_TAS (0 << 7) /* Write address setup cycle (n+1) (0ns) */
  38. #define HW_CFG_NOR_TOE (0 << 5) /* Output enable delay cycle (n) (max 25ns) */
  39. #define HW_CFG_NOR_TRC_TLC (0x10 << 0) /* Read access cycle / Burst read latency (n+2 / n+1) (100ns) */
  40. #define HW_CFG_FLASH0_TCR (HW_CFG_NOR_TPRC_TWLC \
  41. | HW_CFG_NOR_TBTA \
  42. | HW_CFG_NOR_TWP \
  43. | HW_CFG_NOR_TWR \
  44. | HW_CFG_NOR_TAS \
  45. | HW_CFG_NOR_TOE \
  46. | HW_CFG_NOR_TRC_TLC)
  47. #define HW_CFG_FLASH1_TCR HW_CFG_FLASH0_TCR
  48. #define HW_CFG_FLASH2_TCR HW_CFG_FLASH0_TCR
  49. /* SDRAM Settings */
  50. /* #define HW_CFG_SDRAM_CAS_LATENCY 5 Default 5, Values [3..6] */
  51. /* #define HW_CFG_SDRAM_CHIP_SELECT_CNT 1 Default 1, Vaules [1..2] */
  52. /* #define HW_CFG_SDRAM_SPEED_GRADE 667 Default 667, Values [400,533,667,800] */
  53. /* #define HW_CFG_SDRAM_WIDTH_BITS 16 Default 16, Vaules [8,16] */
  54. #define HW_CFG_SDRAM_SIZE_BYTES 0x10000000 /* Total memory, not per device size */
  55. /* ---- Variable Externs ------------------------------------- */
  56. /* ---- Function Prototypes ---------------------------------- */
  57. #endif /* MEMORY_SETTINGS_H */