2005-04-16 15:20:36 -07:00
|
|
|
|
2010-08-08 20:58:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-23 11:50:56 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-23 11:50:56 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-08-04 17:29:10 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-20 23:28:14 +02:00
|
|
|
|
2009-09-20 23:28:04 +02:00
|
|
|
|
2018-07-05 12:27:29 +02:00
|
|
|
|
2018-03-19 14:47:28 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-09-06 14:05:14 +02:00
|
|
|
|
2015-01-23 00:22:27 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-23 23:25:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-23 23:25:53 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-23 23:25:53 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-23 23:25:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-20 20:05:05 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-20 20:05:05 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:14 +02:00
|
|
|
|
2012-09-13 14:57:52 +08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-20 20:05:05 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-05-23 23:25:53 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 09:35:58 +01:00
|
|
|
|
|
|
|
|
|
2005-11-07 11:15:31 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-05-23 12:00:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-18 12:51:47 -07:00
|
|
|
|
2017-04-29 11:06:43 +02:00
|
|
|
|
2006-05-23 12:00:46 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-03-23 11:19:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-24 23:27:22 +02:00
|
|
|
|
2016-03-23 11:19:00 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-01-24 03:07:46 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-12-30 20:32:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 17:04:22 +02:00
|
|
|
|
2015-12-30 20:32:04 +01:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-13 09:51:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-28 15:38:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-22 20:39:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-13 16:35:30 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-02 12:01:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-13 11:05:50 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-03-04 14:56:18 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-08-13 16:35:30 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-02-09 12:20:00 +00:00
|
|
|
|
2011-05-31 16:31:26 -07:00
|
|
|
|
2009-11-02 18:12:33 +00:00
|
|
|
|
2011-05-31 16:31:26 -07:00
|
|
|
|
2012-11-06 11:51:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-26 19:43:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-02 18:12:33 +00:00
|
|
|
|
2016-10-01 10:24:03 +02:00
|
|
|
|
2018-09-07 00:38:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-01 10:24:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-24 23:27:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-23 11:37:03 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-09-28 15:38:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-25 14:58:11 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-06-25 10:44:45 +12:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-17 11:17:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-13 14:57:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-19 14:47:28 +01:00
|
|
|
|
|
|
|
|
|
2012-09-13 14:57:52 +08:00
|
|
|
|
|
|
|
|
|
2013-12-03 15:51:09 -08:00
|
|
|
|
|
|
|
|
|
mtd: nand: add support for Micron on-die ECC
Now that the core NAND subsystem has support for on-die ECC, this commit
brings the necessary code to support on-die ECC on Micron NANDs.
In micron_nand_init(), we detect if the Micron NAND chip supports on-die
ECC mode, by checking a number of conditions:
- It must be an ONFI NAND
- It must be a SLC NAND
- Enabling *and* disabling on-die ECC must work
- The on-die ECC must be correcting 4 bits per 512 bytes of data. Some
Micron NAND chips have an on-die ECC able to correct 8 bits per 512
bytes of data, but they work slightly differently and therefore we
don't support them in this patch.
Then, if the on-die ECC cannot be disabled (some Micron NAND have on-die
ECC forcefully enabled), we bail out, as we don't support such
NANDs. Indeed, the implementation of raw_read()/raw_write() make the
assumption that on-die ECC can be disabled. Support for Micron NANDs
with on-die ECC forcefully enabled can easily be added, but in the
absence of such HW for testing, we preferred to simply bail out.
If the on-die ECC is supported, and requested in the Device Tree, then
it is indeed enabled, by using custom implementations of the
->read_page(), ->read_page_raw(), ->write_page() and ->write_page_raw()
operation to properly handle the on-die ECC.
In the non-raw functions, we need to enable the internal ECC engine
before issuing the NAND_CMD_READ0 or NAND_CMD_SEQIN commands, which is
why we set the NAND_ECC_CUSTOM_PAGE_ACCESS option at initialization
time (it asks the NAND core to let the NAND driver issue those
commands).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-04-29 11:06:45 +02:00
|
|
|
|
|
|
|
|
|
2013-12-03 15:51:09 -08:00
|
|
|
|
2012-09-13 14:57:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-29 15:30:13 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-17 11:17:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-23 11:23:07 +01:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-02 11:12:22 -08:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2015-12-01 11:08:32 -08:00
|
|
|
|
2015-11-23 11:23:07 +01:00
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2013-12-03 12:02:20 -08:00
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
2013-12-05 12:06:54 -08:00
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-17 11:17:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-21 13:39:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-19 14:47:28 +01:00
|
|
|
|
|
|
|
|
|
2018-03-19 14:47:27 +01:00
|
|
|
|
2018-03-19 14:47:26 +01:00
|
|
|
|
|
|
|
|
|
2018-03-19 14:47:27 +01:00
|
|
|
|
2018-07-25 15:31:51 +02:00
|
|
|
|
2018-03-19 14:47:26 +01:00
|
|
|
|
2018-03-19 14:47:28 +01:00
|
|
|
|
|
|
|
|
|
2018-03-19 14:47:27 +01:00
|
|
|
|
|
|
|
|
|
2018-07-25 15:31:52 +02:00
|
|
|
|
2018-03-19 14:47:26 +01:00
|
|
|
|
|
|
|
|
|
2017-06-29 19:08:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-24 19:20:05 +02:00
|
|
|
|
|
|
|
|
|
2017-06-29 19:08:30 +02:00
|
|
|
|
2016-05-24 19:20:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-29 19:08:30 +02:00
|
|
|
|
2016-05-24 19:20:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-19 01:05:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
|
|
|
|
|
2005-11-07 11:15:31 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-19 01:05:46 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-05-31 20:39:20 +01:00
|
|
|
|
2018-07-19 01:05:46 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
2016-07-27 11:23:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-07 20:52:10 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mtd: nand: add a shorthand to generate nand_ecc_caps structure
struct nand_ecc_caps was designed as flexible as possible to support
multiple stepsizes (like sunxi_nand.c).
So, we need to write multiple arrays even for the simplest case.
I guess many controllers support a single stepsize, so here is a
shorthand macro for the case.
It allows to describe like ...
NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15);
... instead of
static const int denali_pci_ecc_strengths[] = {8, 15};
static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = {
.stepsize = 512,
.strengths = denali_pci_ecc_strengths,
.nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths),
};
static const struct nand_ecc_caps denali_pci_ecc_caps = {
.stepinfos = &denali_pci_ecc_stepinfo,
.nstepinfos = 1,
.calc_ecc_bytes = denali_calc_ecc_bytes,
};
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-06-07 20:52:11 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-23 12:00:46 +02:00
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
|
|
|
|
|
2016-03-23 11:19:00 +01:00
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-11 14:21:10 -07:00
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-30 20:32:04 +01:00
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2017-12-05 17:47:16 +09:00
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2006-05-23 12:00:46 +02:00
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2015-12-30 20:32:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 10:46:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2012-09-11 08:59:03 -07:00
|
|
|
|
2017-03-30 15:45:47 +09:00
|
|
|
|
2012-09-11 08:59:03 -07:00
|
|
|
|
|
|
|
|
|
2013-03-15 17:55:53 +05:30
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
2011-08-30 18:45:37 -07:00
|
|
|
|
2011-08-30 18:45:38 -07:00
|
|
|
|
2006-06-28 21:48:27 -07:00
|
|
|
|
|
|
|
|
|
2006-05-23 12:00:46 +02:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2016-03-23 11:19:00 +01:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-11 14:21:10 -07:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
2015-12-30 20:32:04 +01:00
|
|
|
|
2011-03-11 11:05:33 +01:00
|
|
|
|
2017-12-05 17:47:16 +09:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:17 +02:00
|
|
|
|
2018-09-06 14:05:18 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:19 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:20 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:21 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:20 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:21 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
|
|
|
|
|
2016-09-15 10:32:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-01 10:24:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-15 10:32:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-21 18:32:08 -08:00
|
|
|
|
2016-09-15 10:32:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:38 +02:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:39 +02:00
|
|
|
|
2018-09-07 00:38:40 +02:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:41 +02:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:37 +02:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:38 +02:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:39 +02:00
|
|
|
|
2018-09-07 00:38:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:41 +02:00
|
|
|
|
2018-09-07 00:38:34 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-12-01 12:03:06 +01:00
|
|
|
|
2018-09-07 00:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-11-09 14:16:45 +01:00
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:37 +02:00
|
|
|
|
|
|
|
|
|
mtd: nand: add generic READ RETRY support
Modern MLC (and even SLC?) NAND can experience a large number of
bitflips (beyond the recommended correctability capacity) due to drifts
in the voltage threshold (Vt). These bitflips can cause ECC errors to
occur well within the expected lifetime of the flash. To account for
this, some manufacturers provide a mechanism for shifting the Vt
threshold after a corrupted read.
The generic pattern seems to be that a particular flash has N read retry
modes (where N = 0, traditionally), and after an ECC failure, the host
should reconfigure the flash to use the next available mode, then retry
the read operation. This process repeats until all bitfips can be
corrected or until the host has tried all available retry modes.
This patch adds the infrastructure support for a
vendor-specific/flash-specific callback, used for setting the read-retry
mode (i.e., voltage threshold).
For now, this patch always returns the flash to mode 0 (the default
mode) after a successful read-retry, according to the flowchart found in
Micron's datasheets. This may need to change in the future if it is
determined that eventually, mode 0 is insufficient for the majority of
the flash cells (and so for performance reasons, we should leave the
flash in mode 1, 2, etc.).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
2014-01-03 15:13:33 -08:00
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2017-03-30 17:15:05 +09:00
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
|
|
|
|
|
2006-05-23 11:50:56 +02:00
|
|
|
|
2011-08-30 18:45:43 -07:00
|
|
|
|
|
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-31 16:31:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
2012-01-13 18:11:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-25 14:58:11 +08:00
|
|
|
|
2013-05-17 11:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-13 07:40:36 -03:00
|
|
|
|
2013-05-17 11:17:25 +08:00
|
|
|
|
2014-09-22 20:11:50 +02:00
|
|
|
|
2016-09-15 10:32:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-05 17:47:16 +09:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
2012-04-25 12:06:11 -07:00
|
|
|
|
|
|
|
|
|
2006-09-28 15:38:36 +02:00
|
|
|
|
2016-05-24 19:20:05 +02:00
|
|
|
|
2018-03-19 14:47:26 +01:00
|
|
|
|
|
|
|
|
|
2017-01-10 13:30:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-21 18:32:08 -08:00
|
|
|
|
mtd: nand: add generic READ RETRY support
Modern MLC (and even SLC?) NAND can experience a large number of
bitflips (beyond the recommended correctability capacity) due to drifts
in the voltage threshold (Vt). These bitflips can cause ECC errors to
occur well within the expected lifetime of the flash. To account for
this, some manufacturers provide a mechanism for shifting the Vt
threshold after a corrupted read.
The generic pattern seems to be that a particular flash has N read retry
modes (where N = 0, traditionally), and after an ECC failure, the host
should reconfigure the flash to use the next available mode, then retry
the read operation. This process repeats until all bitfips can be
corrected or until the host has tried all available retry modes.
This patch adds the infrastructure support for a
vendor-specific/flash-specific callback, used for setting the read-retry
mode (i.e., voltage threshold).
For now, this patch always returns the flash to mode 0 (the default
mode) after a successful read-retry, according to the flowchart found in
Micron's datasheets. This may need to change in the future if it is
determined that eventually, mode 0 is insufficient for the majority of
the flash cells (and so for performance reasons, we should leave the
flash in mode 1, 2, etc.).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
2014-01-03 15:13:33 -08:00
|
|
|
|
2017-03-16 09:35:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-23 14:12:08 -07:00
|
|
|
|
2010-10-05 12:41:01 +02:00
|
|
|
|
2011-08-23 17:17:35 -07:00
|
|
|
|
2016-06-08 09:32:55 +02:00
|
|
|
|
2018-05-07 06:35:52 -03:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-07 11:15:31 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-12-01 12:03:06 +01:00
|
|
|
|
2018-09-07 00:38:34 +02:00
|
|
|
|
|
|
|
|
|
2005-11-07 11:15:31 +00:00
|
|
|
|
2018-09-06 14:05:24 +02:00
|
|
|
|
2017-11-09 14:16:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:32 +02:00
|
|
|
|
2018-09-06 14:05:33 +02:00
|
|
|
|
2017-03-16 09:35:58 +01:00
|
|
|
|
2016-09-15 10:32:50 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2011-05-31 16:31:21 -07:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-05 17:47:16 +09:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2012-04-25 12:06:11 -07:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2013-09-25 14:58:11 +08:00
|
|
|
|
2013-05-17 11:17:25 +08:00
|
|
|
|
|
|
|
|
|
2014-09-22 20:11:50 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2016-05-24 19:20:05 +02:00
|
|
|
|
2018-03-19 14:47:26 +01:00
|
|
|
|
2017-01-10 13:30:19 -06:00
|
|
|
|
|
|
|
|
|
2010-08-30 18:32:24 +02:00
|
|
|
|
2017-11-30 18:01:31 +01:00
|
|
|
|
2016-09-15 10:32:50 +02:00
|
|
|
|
mtd: nand: add generic READ RETRY support
Modern MLC (and even SLC?) NAND can experience a large number of
bitflips (beyond the recommended correctability capacity) due to drifts
in the voltage threshold (Vt). These bitflips can cause ECC errors to
occur well within the expected lifetime of the flash. To account for
this, some manufacturers provide a mechanism for shifting the Vt
threshold after a corrupted read.
The generic pattern seems to be that a particular flash has N read retry
modes (where N = 0, traditionally), and after an ECC failure, the host
should reconfigure the flash to use the next available mode, then retry
the read operation. This process repeats until all bitfips can be
corrected or until the host has tried all available retry modes.
This patch adds the infrastructure support for a
vendor-specific/flash-specific callback, used for setting the read-retry
mode (i.e., voltage threshold).
For now, this patch always returns the flash to mode 0 (the default
mode) after a successful read-retry, according to the flowchart found in
Micron's datasheets. This may need to change in the future if it is
determined that eventually, mode 0 is insufficient for the majority of
the flash cells (and so for performance reasons, we should leave the
flash in mode 1, 2, etc.).
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
2014-01-03 15:13:33 -08:00
|
|
|
|
|
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
|
|
|
|
|
2017-03-30 17:15:05 +09:00
|
|
|
|
2018-07-17 09:08:02 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2006-05-26 18:52:08 +02:00
|
|
|
|
2010-10-07 21:48:27 +02:00
|
|
|
|
2016-06-08 09:32:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-11-09 14:16:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 19:06:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-30 20:33:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-10 09:00:38 +01:00
|
|
|
|
2015-10-30 20:33:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-10 09:00:38 +01:00
|
|
|
|
2015-10-30 20:33:20 -07:00
|
|
|
|
|
|
|
|
|
2015-11-16 14:37:35 +01:00
|
|
|
|
|
|
|
|
|
2015-12-10 09:00:33 +01:00
|
|
|
|
2015-11-16 14:37:35 +01:00
|
|
|
|
|
|
|
|
|
2015-12-01 12:03:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-10 09:00:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 09:32:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-04 15:39:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-19 10:29:26 +02:00
|
|
|
|
2013-03-04 15:39:18 +02:00
|
|
|
|
2013-03-19 10:29:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-04 15:39:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mtd: nand: provision full ID support
Up until now we identified NAND chips by the 'device ID' part of the full chip
ID array, which is the second full ID array byte. However, the newest flashes
use the same device ID for chips with identical page and eraseblock sizes, but
different OOB sizes. And unfortunately, it is not clear if there is a
"standard" way to fetch the OOB size from chip's full ID array. Here is an
example:
Toshiba TC58NVG2S0F: 0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08
Toshiba TC58NVG3S0F: 0x98, 0xd3, 0x90, 0x26, 0x76, 0x15, 0x02, 0x08
The first one is a 512MiB NAND chip with 4KiB NAND pages, 256KiB eraseblock
size and 224 bytes OOB. The second one is a 1GiB NAND chip with the same page
and eraseblock sizes, but with 232 bytes OOB.
This means that we have to store full ID in our NAND flashes table in order to
distinguish between these 2.
This patch adds the 'id[8]' field to the 'struct nand_flash_dev' structure, and
it makes it to be a part of anonymous union, where the second member is a
structure containing the 'mfr_id' and 'dev_id' bytes. The union makes sure that
'mfr_id' refers the same RAM address as 'id[0]' and 'dev_id' refers the same
RAM address as 'id[1]'. The only motivation for the union is an assumption that
'type->dev_id' is more readable than 'type->id[1]'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-03-04 16:26:56 +02:00
|
|
|
|
|
|
|
|
|
2013-03-04 15:39:18 +02:00
|
|
|
|
|
|
|
|
|
2013-05-17 11:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-03-04 16:05:00 +02:00
|
|
|
|
|
|
|
|
|
mtd: nand: provision full ID support
Up until now we identified NAND chips by the 'device ID' part of the full chip
ID array, which is the second full ID array byte. However, the newest flashes
use the same device ID for chips with identical page and eraseblock sizes, but
different OOB sizes. And unfortunately, it is not clear if there is a
"standard" way to fetch the OOB size from chip's full ID array. Here is an
example:
Toshiba TC58NVG2S0F: 0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08
Toshiba TC58NVG3S0F: 0x98, 0xd3, 0x90, 0x26, 0x76, 0x15, 0x02, 0x08
The first one is a 512MiB NAND chip with 4KiB NAND pages, 256KiB eraseblock
size and 224 bytes OOB. The second one is a 1GiB NAND chip with the same page
and eraseblock sizes, but with 232 bytes OOB.
This means that we have to store full ID in our NAND flashes table in order to
distinguish between these 2.
This patch adds the 'id[8]' field to the 'struct nand_flash_dev' structure, and
it makes it to be a part of anonymous union, where the second member is a
structure containing the 'mfr_id' and 'dev_id' bytes. The union makes sure that
'mfr_id' refers the same RAM address as 'id[0]' and 'dev_id' refers the same
RAM address as 'id[1]'. The only motivation for the union is an assumption that
'type->dev_id' is more readable than 'type->id[1]'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-03-04 16:26:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-04 16:05:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-13 13:45:00 +02:00
|
|
|
|
2013-03-04 16:05:00 +02:00
|
|
|
|
2013-03-15 11:00:59 +08:00
|
|
|
|
|
|
|
|
|
2014-07-27 14:31:53 -07:00
|
|
|
|
2013-05-17 11:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 20:11:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mtd: nand: provision full ID support
Up until now we identified NAND chips by the 'device ID' part of the full chip
ID array, which is the second full ID array byte. However, the newest flashes
use the same device ID for chips with identical page and eraseblock sizes, but
different OOB sizes. And unfortunately, it is not clear if there is a
"standard" way to fetch the OOB size from chip's full ID array. Here is an
example:
Toshiba TC58NVG2S0F: 0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08
Toshiba TC58NVG3S0F: 0x98, 0xd3, 0x90, 0x26, 0x76, 0x15, 0x02, 0x08
The first one is a 512MiB NAND chip with 4KiB NAND pages, 256KiB eraseblock
size and 224 bytes OOB. The second one is a 1GiB NAND chip with the same page
and eraseblock sizes, but with 232 bytes OOB.
This means that we have to store full ID in our NAND flashes table in order to
distinguish between these 2.
This patch adds the 'id[8]' field to the 'struct nand_flash_dev' structure, and
it makes it to be a part of anonymous union, where the second member is a
structure containing the 'mfr_id' and 'dev_id' bytes. The union makes sure that
'mfr_id' refers the same RAM address as 'id[0]' and 'dev_id' refers the same
RAM address as 'id[1]'. The only motivation for the union is an assumption that
'type->dev_id' is more readable than 'type->id[1]'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-03-04 16:26:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 09:57:23 +02:00
|
|
|
|
mtd: nand: provision full ID support
Up until now we identified NAND chips by the 'device ID' part of the full chip
ID array, which is the second full ID array byte. However, the newest flashes
use the same device ID for chips with identical page and eraseblock sizes, but
different OOB sizes. And unfortunately, it is not clear if there is a
"standard" way to fetch the OOB size from chip's full ID array. Here is an
example:
Toshiba TC58NVG2S0F: 0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08
Toshiba TC58NVG3S0F: 0x98, 0xd3, 0x90, 0x26, 0x76, 0x15, 0x02, 0x08
The first one is a 512MiB NAND chip with 4KiB NAND pages, 256KiB eraseblock
size and 224 bytes OOB. The second one is a 1GiB NAND chip with the same page
and eraseblock sizes, but with 232 bytes OOB.
This means that we have to store full ID in our NAND flashes table in order to
distinguish between these 2.
This patch adds the 'id[8]' field to the 'struct nand_flash_dev' structure, and
it makes it to be a part of anonymous union, where the second member is a
structure containing the 'mfr_id' and 'dev_id' bytes. The union makes sure that
'mfr_id' refers the same RAM address as 'id[0]' and 'dev_id' refers the same
RAM address as 'id[1]'. The only motivation for the union is an assumption that
'type->dev_id' is more readable than 'type->id[1]'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-03-04 16:26:56 +02:00
|
|
|
|
2013-03-13 13:45:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-15 11:00:59 +08:00
|
|
|
|
|
|
|
|
|
2013-05-17 11:17:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 20:11:50 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-07-05 12:27:30 +02:00
|
|
|
|
2016-09-15 10:32:48 +02:00
|
|
|
|
2013-09-25 14:58:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-29 12:17:13 +02:00
|
|
|
|
|
|
|
|
|
2013-09-25 14:58:11 +08:00
|
|
|
|
2013-09-25 14:58:10 +08:00
|
|
|
|
mtd: nand: force NAND_CMD_READID onto 8-bit bus
The NAND command helpers tend to automatically shift the column address
for x16 bus devices, since most commands expect a word address, not a
byte address. The Read ID command, however, expects an 8-bit address
(i.e., 0x00, 0x20, or 0x40 should not be translated to 0x00, 0x10, or
0x20).
This fixes the column address for a few drivers which imitate the
nand_base defaults. Note that I don't touch sh_flctl.c, since it already
handles this problem slightly differently (note its comment "READID is
always performed using an 8-bit bus").
I have not tested this patch, as I only have x8 parts up for testing at
this point. Hopefully that can change soon...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-By: Pekon Gupta <pekon@ti.com>
2014-01-29 14:08:12 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-21 16:05:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mtd: nand: force NAND_CMD_READID onto 8-bit bus
The NAND command helpers tend to automatically shift the column address
for x16 bus devices, since most commands expect a word address, not a
byte address. The Read ID command, however, expects an 8-bit address
(i.e., 0x00, 0x20, or 0x40 should not be translated to 0x00, 0x10, or
0x20).
This fixes the column address for a few drivers which imitate the
nand_base defaults. Note that I don't touch sh_flctl.c, since it already
handles this problem slightly differently (note its comment "READID is
always performed using an 8-bit bus").
I have not tested this patch, as I only have x8 parts up for testing at
this point. Hopefully that can change soon...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-By: Pekon Gupta <pekon@ti.com>
2014-01-29 14:08:12 -08:00
|
|
|
|
|
|
|
|
|
2015-09-03 18:03:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-26 16:08:12 +02:00
|
|
|
|
2018-06-20 12:57:28 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-26 16:08:12 +02:00
|
|
|
|
2018-09-06 14:05:21 +02:00
|
|
|
|
2015-08-26 16:08:12 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:20 +02:00
|
|
|
|
2015-08-26 16:08:12 +02:00
|
|
|
|
2017-05-26 17:10:15 +02:00
|
|
|
|
2018-09-06 14:05:31 +02:00
|
|
|
|
|
|
|
|
|
2017-05-26 17:10:15 +02:00
|
|
|
|
2017-04-29 11:06:44 +02:00
|
|
|
|
2018-09-06 14:05:20 +02:00
|
|
|
|
|
|
|
|
|
2017-04-29 11:06:44 +02:00
|
|
|
|
|
|
|
|
|
2018-09-06 14:05:21 +02:00
|
|
|
|
|
|
|
|
|
2017-04-29 11:06:44 +02:00
|
|
|
|
2016-09-15 10:32:45 +02:00
|
|
|
|
2016-10-24 16:46:20 +02:00
|
|
|
|
2016-09-15 10:32:45 +02:00
|
|
|
|
2017-11-30 18:01:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-07 00:38:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-25 15:31:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-21 11:44:41 +02:00
|
|
|
|
2018-07-25 15:31:50 +02:00
|
|
|
|
2018-09-06 14:05:15 +02:00
|
|
|
|
2016-09-21 11:44:41 +02:00
|
|
|
|
2017-11-09 14:16:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-04 17:29:10 +02:00
|
|
|
|