[PATCH v2 2/2] mtd: rawnand: fsl_ifc: use bit-wise majority to recover the contents of ONFI parameter

Wan, Jane (Nokia - US/Sunnyvale) jane.wan at nokia.com
Mon May 7 09:47:18 PDT 2018


Hi,

I've sent v3 of this patch through git send-email.  Please also see the inline answer.

Thanks.
Jane

> -----Original Message-----
> From: kbuild test robot [mailto:lkp at intel.com]
> Sent: Saturday, May 05, 2018 1:59 AM
> To: Wan, Jane (Nokia - US/Sunnyvale) <jane.wan at nokia.com>
> Cc: kbuild-all at 01.org; Boris.Brezillon at bootlin.com;
> miquel.raynal at bootlin.com; dwmw2 at infradead.org;
> computersforpeace at gmail.com; richard at nod.at; marek.vasut at gmail.com;
> yamada.masahiro at socionext.com; prabhakar.kushwaha at nxp.com;
> shawnguo at kernel.org; jagdish.gediya at nxp.com;
> shreeya.patel23498 at gmail.com; linux-mtd at lists.infradead.org; linux-
> kernel at vger.kernel.org; Bos, Ties (Nokia - US/Sunnyvale)
> <ties.bos at nokia.com>; Wan, Jane (Nokia - US/Sunnyvale)
> <jane.wan at nokia.com>
> Subject: Re: [PATCH v2 2/2] mtd: rawnand: fsl_ifc: use bit-wise majority to
> recover the contents of ONFI parameter
> 
> Hi Jane,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on mtd/nand/next] [also build test WARNING on
> v4.17-rc3 next-20180504] [if your patch is applied to the wrong git tree, please
> drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Jane-Wan/mtd-rawnand-
> fsl_ifc-fix-FSL-NAND-driver-to-read-all-ONFI-parameter-pages/20180505-
> 163132
> base:   git://git.infradead.org/linux-mtd.git nand/next
> config: x86_64-randconfig-x015-201817 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
> 
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/mtd/nand/raw/nand_base.c: In function 'nand_scan_ident':
> >> drivers/mtd/nand/raw/nand_base.c:5247:2: warning: 'p' may be used
> >> uninitialized in this function [-Wmaybe-uninitialized]
>      kfree(p);
>      ^~~~~~~~
>    drivers/mtd/nand/raw/nand_base.c:5097:27: note: 'p' was declared here
>      struct nand_onfi_params *p;
>                               ^

 [Jane] the kfree() is fixed in v3 patch.  Thanks.
 
> 
> vim +/p +5247 drivers/mtd/nand/raw/nand_base.c
> 
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5090
> d1e1f4e42 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-08-30  5091
> /*
> 8b6e50c9e drivers/mtd/nand/nand_base.c     Brian Norris     2011-05-25  5092   *
> Check if the NAND chip is ONFI compliant, returns 1 if it is, 0 otherwise.
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5093
> */
> 29a198a15 drivers/mtd/nand/nand_base.c     Boris Brezillon  2016-05-24  5094
> static int nand_flash_detect_onfi(struct nand_chip *chip)
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5095  {
> cbe435a18 drivers/mtd/nand/nand_base.c     Boris Brezillon  2016-05-24  5096
> 	struct mtd_info *mtd = nand_to_mtd(chip);
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5097  	struct nand_onfi_params *p;
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5098
> 	char id[4];
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5099
> 	int i, ret, val, pagesize;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5100
> 	u8 *buf;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5101
> 7854d3f74 drivers/mtd/nand/nand_base.c     Brian Norris     2011-06-23  5102
> 	/* Try ONFI for unknown chip or LP */
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5103
> 	ret = nand_readid_op(chip, 0x20, id, sizeof(id));
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5104
> 	if (ret || strncmp(id, "ONFI", 4))
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5105
> 		return 0;
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5106
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5107  	/* ONFI chip: allocate a buffer to hold its parameter page */
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5108
> 	pagesize = sizeof(*p);
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5109
> 	buf = kzalloc((pagesize * 3), GFP_KERNEL);
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5110
> 	if (!buf)
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5111  		return -ENOMEM;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5112
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5113
> 	ret = nand_read_param_page_op(chip, 0, NULL, 0);
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5114  	if (ret) {
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5115  		ret = 0;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5116  		goto free_onfi_param_page;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5117  	}
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5118
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5119
> 	for (i = 0; i < 3; i++) {
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5120
> 		p = (struct nand_onfi_params *)&buf[i*pagesize];
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5121
> 		ret = nand_read_data_op(chip, p, pagesize, true);
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5122  		if (ret) {
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5123  			ret = 0;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5124  			goto free_onfi_param_page;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5125  		}
> 97d90da8a drivers/mtd/nand/nand_base.c     Boris Brezillon  2017-11-30  5126
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5127
> 		if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) ==
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5128
> 				le16_to_cpu(p->crc)) {
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5129
> 			break;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5130
> 		}
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5131
> 	}
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5132
> c7f23a706 drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-13  5133
> 	if (i == 3) {
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5134
> 		int j, k, l;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5135
> 		u8 v, m;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5136
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5137
> 		pr_err("Could not find valid ONFI parameter page\n");
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5138
> 		pr_info("Recover ONFI params with bit-wise majority\n");
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5139
> 		for (j = 0; j < pagesize; j++) {
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5140
> 			v = 0;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5141
> 			for (k = 0; k < 8; k++) {
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5142
> 				m = 0;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5143
> 				for (l = 0; l < 3; l++)
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5144
> 					m += GET_BIT(k, buf[l*pagesize + j]);
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5145
> 				if (m > 1)
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5146
> 					v |= BIT(k);
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5147
> 			}
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5148
> 			((u8 *)p)[j] = v;
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5149
> 		}
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5150
> 		if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) !=
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5151
> 				le16_to_cpu(p->crc)) {
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5152
> 			pr_err("ONFI parameter recovery failed, aborting\n");
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5153  			goto free_onfi_param_page;
> c7f23a706 drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-13  5154
> 		}
> 2c5f4f892 drivers/mtd/nand/raw/nand_base.c Jane Wan         2018-05-04  5155
> 	}
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5156
> 8b6e50c9e drivers/mtd/nand/nand_base.c     Brian Norris     2011-05-25  5157
> 	/* Check version */
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5158
> 	val = le16_to_cpu(p->revision);
> b7b1a29d9 drivers/mtd/nand/nand_base.c     Brian Norris     2010-12-12  5159
> 	if (val & (1 << 5))
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5160  		chip->parameters.onfi.version = 23;
> b7b1a29d9 drivers/mtd/nand/nand_base.c     Brian Norris     2010-12-12  5161
> 	else if (val & (1 << 4))
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5162  		chip->parameters.onfi.version = 22;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5163
> 	else if (val & (1 << 3))
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5164  		chip->parameters.onfi.version = 21;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5165
> 	else if (val & (1 << 2))
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5166  		chip->parameters.onfi.version = 20;
> b7b1a29d9 drivers/mtd/nand/nand_base.c     Brian Norris     2010-12-12  5167
> 	else if (val & (1 << 1))
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5168  		chip->parameters.onfi.version = 10;
> b7b1a29d9 drivers/mtd/nand/nand_base.c     Brian Norris     2010-12-12  5169
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5170  	if (!chip->parameters.onfi.version) {
> 20171642e drivers/mtd/nand/nand_base.c     Ezequiel Garcia  2013-11-25  5171
> 		pr_info("unsupported ONFI version: %d\n", val);
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5172  		goto free_onfi_param_page;
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5173  	} else {
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5174  		ret = 1;
> b7b1a29d9 drivers/mtd/nand/nand_base.c     Brian Norris     2010-12-12  5175
> 	}
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5176
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5177
> 	sanitize_string(p->manufacturer, sizeof(p->manufacturer));
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5178
> 	sanitize_string(p->model, sizeof(p->model));
> f4531b2b1 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5179  	strncpy(chip->parameters.model, p->model,
> f4531b2b1 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5180  		sizeof(chip->parameters.model) - 1);
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5181
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5182
> 	mtd->writesize = le32_to_cpu(p->byte_per_page);
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5183
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5184
> 	/*
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5185
> 	 * pages_per_block and blocks_per_lun may not be a power-of-2 size
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5186
> 	 * (don't ask me who thought of this...). MTD assumes that these
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5187
> 	 * dimensions will be power-of-2, so just truncate the remaining area.
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5188
> 	 */
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5189
> 	mtd->erasesize = 1 << (fls(le32_to_cpu(p->pages_per_block)) - 1);
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5190
> 	mtd->erasesize *= mtd->writesize;
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5191
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5192
> 	mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page);
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5193
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5194
> 	/* See erasesize comment */
> 4355b70cf drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-27  5195
> 	chip->chipsize = 1 << (fls(le32_to_cpu(p->blocks_per_lun)) - 1);
> 637957551 drivers/mtd/nand/nand_base.c     Matthieu CASTET  2012-03-19
> 5196  	chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count;
> 13fbd1794 drivers/mtd/nand/nand_base.c     Huang Shijie     2013-09-25  5197
> 	chip->bits_per_cell = p->bits_per_cell;
> e2985fc1d drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5198
> 34da5f5f3 drivers/mtd/nand/nand_base.c     Zach Brown       2017-01-10  5199
> 	chip->max_bb_per_die = le16_to_cpu(p->bb_per_lun);
> 34da5f5f3 drivers/mtd/nand/nand_base.c     Zach Brown       2017-01-10  5200
> 	chip->blocks_per_die = le32_to_cpu(p->blocks_per_lun);
> 34da5f5f3 drivers/mtd/nand/nand_base.c     Zach Brown       2017-01-10  5201
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5202  	if (le16_to_cpu(p->features) & ONFI_FEATURE_16_BIT_BUS)
> 29a198a15 drivers/mtd/nand/nand_base.c     Boris Brezillon  2016-05-24  5203
> 		chip->options |= NAND_BUSWIDTH_16;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5204
> 10c86babf drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5205
> 	if (p->ecc_bits != 0xff) {
> 10c86babf drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5206
> 		chip->ecc_strength_ds = p->ecc_bits;
> 10c86babf drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5207
> 		chip->ecc_step_ds = 512;
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5208  	} else if (chip->parameters.onfi.version >= 21 &&
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5209  		(le16_to_cpu(p->features) &
> ONFI_FEATURE_EXT_PARAM_PAGE)) {
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5210
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5211
> 		/*
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5212
> 		 * The nand_flash_detect_ext_param_page() uses the
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5213
> 		 * Change Read Column command which maybe not supported
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5214
> 		 * by the chip->cmdfunc. So try to update the chip->cmdfunc
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5215
> 		 * now. We do not replace user supplied command function.
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5216
> 		 */
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5217
> 		if (mtd->writesize > 512 && chip->cmdfunc == nand_command)
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5218
> 			chip->cmdfunc = nand_command_lp;
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5219
> 6dcbe0cdd drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-22  5220
> 		/* The Extended Parameter Page is supported since ONFI 2.1. */
> cbe435a18 drivers/mtd/nand/nand_base.c     Boris Brezillon  2016-05-24  5221
> 		if (nand_flash_detect_ext_param_page(chip, p))
> c7f23a706 drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-13  5222
> 			pr_warn("Failed to detect ONFI extended param
> page\n");
> c7f23a706 drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-13  5223
> 	} else {
> c7f23a706 drivers/mtd/nand/nand_base.c     Brian Norris     2013-08-13  5224
> 		pr_warn("Could not retrieve ONFI ECC requirements\n");
> 10c86babf drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5225
> 	}
> 10c86babf drivers/mtd/nand/nand_base.c     Huang Shijie     2013-05-17  5226
> f4531b2b1 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5227  	/* Save some parameters from the parameter page for future use */
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5228  	if (le16_to_cpu(p->opt_cmd) & ONFI_OPT_CMD_SET_GET_FEATURES) {
> f4531b2b1 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5229  		chip->parameters.supports_set_get_features = true;
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5230  		bitmap_set(chip->parameters.get_feature_list,
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5231  			   ONFI_FEATURE_ADDR_TIMING_MODE, 1);
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5232  		bitmap_set(chip->parameters.set_feature_list,
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5233  			   ONFI_FEATURE_ADDR_TIMING_MODE, 1);
> 789157e41 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5234  	}
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5235  	chip->parameters.onfi.tPROG = le16_to_cpu(p->t_prog);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5236  	chip->parameters.onfi.tBERS = le16_to_cpu(p->t_bers);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5237  	chip->parameters.onfi.tR = le16_to_cpu(p->t_r);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5238  	chip->parameters.onfi.tCCS = le16_to_cpu(p->t_ccs);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5239  	chip->parameters.onfi.async_timing_mode =
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5240  		le16_to_cpu(p->async_timing_mode);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5241  	chip->parameters.onfi.vendor_revision =
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5242  		le16_to_cpu(p->vendor_revision);
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5243  	memcpy(chip->parameters.onfi.vendor, p->vendor,
> a97421c75 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5244  	       sizeof(p->vendor));
> f4531b2b1 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5245
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5246  free_onfi_param_page:
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> @5247  	kfree(p);
> bd0b64340 drivers/mtd/nand/raw/nand_base.c Miquel Raynal    2018-03-19
> 5248  	return ret;
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5249  }
> 6fb277ba8 drivers/mtd/nand/nand_base.c     Florian Fainelli 2010-09-01  5250
> 
> :::::: The code at line 5247 was first introduced by commit
> :::::: bd0b64340c2d66c0fe1aa99b0b23159d7e0c21f2 mtd: rawnand: get rid of
> the ONFI parameter page in nand_chip
> 
> :::::: TO: Miquel Raynal <miquel.raynal at bootlin.com>
> :::::: CC: Boris Brezillon <boris.brezillon at bootlin.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



More information about the linux-mtd mailing list