1 The common CFI driver provides this weak default implementation for
4 static void __flash_cmd_reset(flash_info_t *info)
7 * We do not yet know what kind of commandset to use, so we issue
8 * the reset command in both Intel and AMD variants, in the hope
9 * that AMD flash roms ignore the Intel command.
11 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
13 flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
15 void flash_cmd_reset(flash_info_t *info)
16 __attribute__((weak,alias("__flash_cmd_reset")));
18 Some flash chips seem to have trouble with this reset sequence.
19 In this case, board-specific code can override this weak default
20 version with a board-specific function.
22 At the time of writing, there are two boards that define their own
25 First, the digsy_mtc board equipped with the M29W128GH from Numonyx
26 needs this version to function properly:
28 void flash_cmd_reset(flash_info_t *info)
30 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
33 In addition, the t3corp board defines the routine thusly:
35 void flash_cmd_reset(flash_info_t *info)
38 * FLASH at address CONFIG_SYS_FLASH_BASE is a Spansion chip and
39 * needs the Spansion type reset commands. The other flash chip
40 * is located behind a FPGA (Xilinx DS617) and needs the Intel type
43 if (info->start[0] == CONFIG_SYS_FLASH_BASE)
44 flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
46 flash_write_cmd(info, 0, 0, FLASH_CMD_RESET);
50 http://www.mail-archive.com/u-boot@lists.denx.de/msg24368.html
55 CONFIG_SYS_MAX_FLASH_SECT: Number of sectors available on Flash device
57 CONFIG_SYS_FLASH_CFI_WIDTH: Data-width of the flash device
59 CONFIG_CMD_FLASH: Enables Flash command library
61 CONFIG_FLASH_CFI_DRIVER: Enables CFI Flash driver
63 CONFIG_FLASH_CFI_MTD: Enables MTD frame work for NOR Flash devices