• Alexey Korolev's avatar
    [MTD] [NOR] Add qry_mode_on()/qry_omde_off() to deal with odd chips · 2e489e07
    Alexey Korolev authored
    There are some CFI chips which require non standard procedures to get 
    into QRY mode. The possible way to support them would be trying 
    different modes till QRY will be read. This patch introduce two new 
    functions qry_mode_on qry_mode_off. qry_mode_on tries different commands 
    in order switch chip into QRY mode.
    
    So if we have one more "odd" chip - we just could add several lines to 
    qry_mode_on. Also using these functions remove unnecessary code 
    duplicaton in porbe procedure.
    
    Currently there are two "odd" cases
    1. Some old intel chips which require 0xFF before 0x98
    2. ST M29DW chip which requires 0x98 to be sent at 0x555 (according to
    CFI should be 0x55)
    
    This patch is partialy based on the patch from Uwe
    (see "[PATCH 2/4] [RFC][MTD] cfi_probe: remove Intel chip workaround"
    thread )
    Signed-off-by: default avatarAlexey Korolev <akorolev@infradead.org>
    Signed-off-by: default avatarAlexander Belyakov <abelyako@gmail.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    2e489e07
cfi_util.c 5.64 KB