2016-04-26 11:43:38 +00:00
|
|
|
From addd0678f84712ac6f70b8e6cda84e11c5d348f4 Mon Sep 17 00:00:00 2001
|
2016-03-22 21:14:51 +00:00
|
|
|
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
|
|
|
|
Date: Tue, 1 Dec 2015 12:03:06 +0100
|
2016-04-27 08:58:15 +00:00
|
|
|
Subject: [PATCH 55/90] mtd: nand: embed an mtd_info structure into nand_chip
|
2016-03-22 21:14:51 +00:00
|
|
|
|
|
|
|
Currently all NAND controller drivers are providing both the mtd_info and
|
|
|
|
nand_chip struct and then let the NAND subsystem to initialize a few
|
|
|
|
things before registering the mtd instance to the MTD layer.
|
|
|
|
Embed an mtd_info field into nand_chip to add some consistency to all NAND
|
|
|
|
controller drivers.
|
|
|
|
This change will also help factorizing boilerplate code copied in all NAND
|
|
|
|
drivers.
|
|
|
|
|
|
|
|
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
|
|
|
|
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
|
|
---
|
|
|
|
include/linux/mtd/nand.h | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
2016-04-26 11:43:38 +00:00
|
|
|
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
|
|
|
|
index 345f864..1ded588 100644
|
2016-03-22 21:14:51 +00:00
|
|
|
--- a/include/linux/mtd/nand.h
|
|
|
|
+++ b/include/linux/mtd/nand.h
|
|
|
|
@@ -540,6 +540,7 @@ struct nand_buffers {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct nand_chip - NAND Private Flash Chip Data
|
|
|
|
+ * @mtd: MTD device registered to the MTD framework
|
|
|
|
* @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the
|
|
|
|
* flash device
|
|
|
|
* @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the
|
|
|
|
@@ -640,6 +641,7 @@ struct nand_buffers {
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nand_chip {
|
|
|
|
+ struct mtd_info mtd;
|
|
|
|
void __iomem *IO_ADDR_R;
|
|
|
|
void __iomem *IO_ADDR_W;
|
|
|
|
|
2016-04-26 11:43:38 +00:00
|
|
|
--
|
|
|
|
1.7.10.4
|
|
|
|
|