[MTD] [NOR] Add qry_mode_on()/qry_omde_off() to deal with odd chips

Previous thread: fs/Kconfig: move CIFS out by Linux Kernel Mailing List on Monday, October 20, 2008 - 10:05 am. (1 message)

Next thread: include/linux/bcd.h: remove comments by Linux Kernel Mailing List on Monday, October 20, 2008 - 10:05 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, October 20, 2008 - 10:06 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e489e...
Commit:     2e489e077a6ad118c4f247faedf330117b107cce
Parent:     a0e7229edbfef9495e73bc8baea2131a7e69e365
Author:     Alexey Korolev <akorolev@infradead.org>
AuthorDate: Tue Aug 5 16:39:42 2008 +0100
Committer:  David Woodhouse <David.Woodhouse@intel.com>
CommitDate: Wed Aug 6 09:43:58 2008 +0100

    [MTD] [NOR] Add qry_mode_on()/qry_omde_off() to deal with odd chips
    
    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: Alexey Korolev <akorolev@infradead.org>
    Signed-off-by: Alexander Belyakov <abelyako@gmail.com>
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
 drivers/mtd/chips/cfi_probe.c |   52 ++++-----------------------------
 drivers/mtd/chips/cfi_util.c  |   62 ++++++++++++++++++++++++++++++++++++++--
 include/linux/mtd/cfi.h       |    9 +++++-
 3 files changed, 73 insertions(+), 50 deletions(-)

diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index c418e92..e706be2 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -44,17 ...
Previous thread: fs/Kconfig: move CIFS out by Linux Kernel Mailing List on Monday, October 20, 2008 - 10:05 am. (1 message)

Next thread: include/linux/bcd.h: remove comments by Linux Kernel Mailing List on Monday, October 20, 2008 - 10:05 am. (1 message)