[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200109202922.744a6739@collabora.com>
Date: Thu, 9 Jan 2020 20:29:22 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Chuanhong Guo <gch981213@...il.com>
Cc: linux-mtd@...ts.infradead.org,
Boris Brezillon <bbrezillon@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: nand: spi: rework detect procedure for different
read id op
On Thu, 9 Jan 2020 15:54:00 +0800
Chuanhong Guo <gch981213@...il.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;
> };
Powered by blists - more mailing lists