]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[MTD] [NOR] Add qry_mode_on()/qry_omde_off() to deal with odd chips
authorAlexey Korolev <akorolev@infradead.org>
Tue, 5 Aug 2008 15:39:42 +0000 (16:39 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 6 Aug 2008 08:43:58 +0000 (09:43 +0100)
commit2e489e077a6ad118c4f247faedf330117b107cce
treeb40cbd8863ce2faf98d7c2717891d0a2b11b6557
parenta0e7229edbfef9495e73bc8baea2131a7e69e365
[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
drivers/mtd/chips/cfi_util.c
include/linux/mtd/cfi.h