lkml.org 
[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: nand: spi: rework detect procedure for different read id op
On Thu,  9 Jan 2020 15:54:00 +0800
Chuanhong Guo <gch981213@gmail.com> wrote:

> @@ -215,15 +204,22 @@ struct spinand_manufacturer_ops {
> * struct spinand_manufacturer - SPI NAND manufacturer instance
> * @id: manufacturer ID
> * @name: manufacturer name
> + * @devid_len: number of bytes in device ID
> + * @spinand_table: array with info for spi nands under current manufacturer
> + * @nchips: number of chips available in spinand_table
> * @ops: manufacturer operations
> */
> struct spinand_manufacturer {
> u8 id;
> char *name;
> + u8 devid_len;

IIRC, some manufacturers support more than one scheme which means you
can't really take this decision at the manufacturer level. How about
adding a readid_method field to spinand_info?

enum spinand_readid_method {
SPINAND_READID_METHOD_OPCODE,
SPINAND_READID_METHOD_OPCODE_ADDR,
SPINAND_READID_METHOD_OPCODE_DUMMY,
};

> + const struct spinand_info *spinand_table;

s/spinand_table/chips/

> + size_t nchips;
> const struct spinand_manufacturer_ops *ops;
> };

\
 
 \ /
  Last update: 2020-01-09 20:30    [W:0.049 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site