README.cfi 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. The common CFI driver provides this weak default implementation for
  2. flash_cmd_reset():
  3. void __flash_cmd_reset(flash_info_t *info)
  4. {
  5. /*
  6. * We do not yet know what kind of commandset to use, so we issue
  7. * the reset command in both Intel and AMD variants, in the hope
  8. * that AMD flash roms ignore the Intel command.
  9. */
  10. flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
  11. flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
  12. }
  13. void flash_cmd_reset(flash_info_t *info)
  14. __attribute__((weak,alias("__flash_cmd_reset")));
  15. Some flash chips seems to have trouble with this reset sequence. In this case
  16. the board specific code can override this weak default version with a board
  17. specific function. For example the digsy_mtc board equipped with the M29W128GH
  18. from Numonyx needs this version to function properly:
  19. void flash_cmd_reset(flash_info_t *info)
  20. {
  21. flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
  22. }
  23. see also:
  24. http://www.mail-archive.com/u-boot@lists.denx.de/msg24368.html
  25. Config Option
  26. CONFIG_SYS_MAX_FLASH_SECT: Number of sectors available on Flash device
  27. CONFIG_SYS_FLASH_CFI_WIDTH: Data-width of the flash device
  28. CONFIG_CMD_FLASH: Enables Flash command library
  29. CONFIG_FLASH_CFI_DRIVER: Enables CFI Flash driver
  30. CONFIG_FLASH_CFI_MTD: Enables MTD frame work for NOR Flash devices