]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mtd: rawnand: Move platform_nand_xxx definitions out of rawnand.h
authorBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 6 Sep 2018 22:38:46 +0000 (00:38 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 3 Oct 2018 09:12:25 +0000 (11:12 +0200)
platform_nand_xxx definitions are just used by the plat_nand driver.
Let's move those definitions out of the core/driver-agnostic rawnand.h
header.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
22 files changed:
arch/arm/mach-ep93xx/snappercl15.c
arch/arm/mach-ep93xx/ts72xx.c
arch/arm/mach-imx/mach-qong.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-orion5x/ts78xx-setup.c
arch/arm/mach-pxa/balloon3.c
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/palmtx.c
arch/mips/alchemy/devboards/db1200.c
arch/mips/alchemy/devboards/db1300.c
arch/mips/alchemy/devboards/db1550.c
arch/mips/netlogic/xlr/platform-flash.c
arch/mips/pnx833x/common/platform.c
arch/mips/rb532/devices.c
arch/sh/boards/mach-migor/setup.c
drivers/mtd/nand/raw/plat_nand.c
include/linux/mtd/platnand.h [new file with mode: 0644]
include/linux/mtd/rawnand.h

index 1dad83a0bc5b84bd64ba0c69c15dba11bc876103..cf0cb58b3454009d6d41fbf1c5d0431674dca5e9 100644 (file)
@@ -23,8 +23,7 @@
 #include <linux/i2c.h>
 #include <linux/fb.h>
 
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 
 #include <mach/hardware.h>
 #include <linux/platform_data/video-ep93xx.h>
index 188bf02595c55e29368c0056a32c8e3278546429..c6a533699b003bda6842daacc27a0fa320c63a9f 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
 #include <linux/spi/mmc_spi.h>
index 48972944bb95eac6ca286b48ecc67c2c271ebebd..5c5df8ca38dd92eb179ebad5879506797d5a3b7f 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/memory.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 #include <linux/gpio.h>
 
 #include <asm/mach-types.h>
index 797e7edc71246d649d67d3ee7e091d19775e2f05..57d7df79d8389b8373d1e0c24a3133f26ba70643 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <asm/types.h>
index e9f512a0602e51555885e811969072e40153aab6..4a0a66815ca0059e39183394a1c73b987e5b9650 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/physmap.h>
 #include <linux/input.h>
 #include <linux/smc91x.h>
index d5dd2acd6f7840fb27bb4bd527ca03c3d7c8299e..9d9a6ca15df0d49728bd625518bd6f3862db4d44 100644 (file)
@@ -24,8 +24,7 @@
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/physmap.h>
 #include <linux/input.h>
 #include <linux/mfd/tps65010.h>
index a75856fe4259ecc2cf1df14839f189ddf060695a..cd6e02c5c01a35a1b8235cbcaa8f70c038cd36da 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/workqueue.h>
 #include <linux/i2c.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/input.h>
index c61c7c7520ca8833f539a8a7acc7b74fd11eb9d9..06a584fef5b86ff05e72eae73459aa29cb65d81a 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/physmap.h>
 #include <linux/input.h>
 #include <linux/smc91x.h>
index aac2c6eb35e2f97a81aff36408644fa1fd83ef7c..fda9b75c3a333678518b235b0ff0ddfb888eedec 100644 (file)
@@ -16,8 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/mv643xx_eth.h>
 #include <linux/ata_platform.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/timeriomem-rng.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
index 256e60c38a6de920c2d779842daad6df15a0e0ff..c52c081eb6d9dcbc8db7f49df5ce4f8b59f05b3b 100644 (file)
 #include <linux/ioport.h>
 #include <linux/ucb1400.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/types.h>
 #include <linux/platform_data/pcf857x.h>
 #include <linux/platform_data/i2c-pxa.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/physmap.h>
 #include <linux/regulator/max1586.h>
 
index 3acb945a26281684d1f70460f6a7b7d9c4315e5c..c30d20e1fb7a1ca60c7d58c8fa61feccbd76deac 100644 (file)
@@ -15,8 +15,7 @@
 
 #include <linux/dm9000.h>
 #include <linux/platform_data/rtc-v3020.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/physmap.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
index 36ea32c1bbcc01f9510f4c939a3e32f94a5ac7f2..1d06a8e91d8f9376b4a88a93b8dc4f58c9e4911b 100644 (file)
@@ -28,8 +28,7 @@
 #include <linux/wm97xx.h>
 #include <linux/power_supply.h>
 #include <linux/usb/gpio_vbus.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/physmap.h>
 
index 97dc74f7f41adba4fb5b32076a22e492361d2313..4bf02f96ab7ffd0eceb5b9d2ce28fff5ffe01068 100644 (file)
@@ -29,8 +29,7 @@
 #include <linux/leds.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
 #include <linux/spi/spi.h>
index b813dc1c1682b4482d366d68ae5b14b3ae692323..ad7dd8e89598045986556ce685f21e1439a42a5d 100644 (file)
@@ -19,8 +19,7 @@
 #include <linux/mmc/host.h>
 #include <linux/module.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/platform_device.h>
 #include <linux/smsc911x.h>
 #include <linux/wm97xx.h>
index 65f6b7184fbee1edc9cb4229903cb333ae86ff3f..7700ad0b93b4ce6b9f49fa2aeb496a572e6bc8c1 100644 (file)
@@ -13,8 +13,7 @@
 #include <linux/io.h>
 #include <linux/interrupt.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/spi/spi.h>
index 4f76b85b44c9ab57c1dce6bfcf6e6d9925dac495..cf9162284b0760df2b7b2433cf62987430c5df76 100644 (file)
@@ -19,8 +19,7 @@
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/physmap.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 
 #include <asm/netlogic/haldefs.h>
 #include <asm/netlogic/xlr/iomap.h>
index 33d0f070b33da2c44a13b9f0829d14dc9d2c6cce..dafbf027fad0185ea6af7df7b477313802a9102e 100644 (file)
@@ -30,8 +30,7 @@
 #include <linux/resource.h>
 #include <linux/serial.h>
 #include <linux/serial_pnx8xxx.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 
 #include <irq.h>
 #include <irq-mapping.h>
index 02a9e042fb44d3fddc60b097f2b732df98d38228..2b23ad640f399f31118376a437d22a66621eaf3b 100644 (file)
@@ -20,9 +20,8 @@
 #include <linux/ctype.h>
 #include <linux/string.h>
 #include <linux/platform_device.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
index ebcc4d5a67ceffa32966903a49d81e8a94e1eeaa..f4ad33c6d2aaa9c6e0564b11db724cbc4bdc8f28 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mfd/tmio.h>
-#include <linux/mtd/rawnand.h>
+#include <linux/mtd/platnand.h>
 #include <linux/i2c.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
index 156c9150fec47868dbe860be4d5cab3e7982e1fa..86c536ddaf248d5a99105f89af2d5dd01871a64d 100644 (file)
@@ -15,8 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
+#include <linux/mtd/platnand.h>
 
 struct plat_nand_data {
        struct nand_chip        chip;
diff --git a/include/linux/mtd/platnand.h b/include/linux/mtd/platnand.h
new file mode 100644 (file)
index 0000000..bc11eb6
--- /dev/null
@@ -0,0 +1,74 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ *  Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org>
+ *                       Steven J. Hill <sjhill@realitydiluted.com>
+ *                       Thomas Gleixner <tglx@linutronix.de>
+ *
+ * Contains all platform NAND related definitions.
+ */
+
+#ifndef __LINUX_MTD_PLATNAND_H
+#define __LINUX_MTD_PLATNAND_H
+
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/rawnand.h>
+#include <linux/platform_device.h>
+
+/**
+ * struct platform_nand_chip - chip level device structure
+ * @nr_chips: max. number of chips to scan for
+ * @chip_offset: chip number offset
+ * @nr_partitions: number of partitions pointed to by partitions (or zero)
+ * @partitions: mtd partition list
+ * @chip_delay: R/B delay value in us
+ * @options: Option flags, e.g. 16bit buswidth
+ * @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH
+ * @part_probe_types: NULL-terminated array of probe types
+ */
+struct platform_nand_chip {
+       int nr_chips;
+       int chip_offset;
+       int nr_partitions;
+       struct mtd_partition *partitions;
+       int chip_delay;
+       unsigned int options;
+       unsigned int bbt_options;
+       const char **part_probe_types;
+};
+
+/**
+ * struct platform_nand_ctrl - controller level device structure
+ * @probe: platform specific function to probe/setup hardware
+ * @remove: platform specific function to remove/teardown hardware
+ * @dev_ready: platform specific function to read ready/busy pin
+ * @select_chip: platform specific chip select function
+ * @cmd_ctrl: platform specific function for controlling
+ *           ALE/CLE/nCE. Also used to write command and address
+ * @write_buf: platform specific function for write buffer
+ * @read_buf: platform specific function for read buffer
+ * @priv: private data to transport driver specific settings
+ *
+ * All fields are optional and depend on the hardware driver requirements
+ */
+struct platform_nand_ctrl {
+       int (*probe)(struct platform_device *pdev);
+       void (*remove)(struct platform_device *pdev);
+       int (*dev_ready)(struct nand_chip *chip);
+       void (*select_chip)(struct nand_chip *chip, int cs);
+       void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl);
+       void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len);
+       void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len);
+       void *priv;
+};
+
+/**
+ * struct platform_nand_data - container structure for platform-specific data
+ * @chip: chip level chip structure
+ * @ctrl: controller level device structure
+ */
+struct platform_nand_data {
+       struct platform_nand_chip chip;
+       struct platform_nand_ctrl ctrl;
+};
+
+#endif /* __LINUX_MTD_PLATNAND_H */
index 8aa8b57ca4b136cc3ae6520f474f6223f8751142..04e11a314e9caa27140114ca3e3f84fc6044319a 100644 (file)
@@ -1540,66 +1540,6 @@ int nand_isbad_bbt(struct nand_chip *chip, loff_t offs, int allowbbt);
 int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr,
                    int allowbbt);
 
-/**
- * struct platform_nand_chip - chip level device structure
- * @nr_chips:          max. number of chips to scan for
- * @chip_offset:       chip number offset
- * @nr_partitions:     number of partitions pointed to by partitions (or zero)
- * @partitions:                mtd partition list
- * @chip_delay:                R/B delay value in us
- * @options:           Option flags, e.g. 16bit buswidth
- * @bbt_options:       BBT option flags, e.g. NAND_BBT_USE_FLASH
- * @part_probe_types:  NULL-terminated array of probe types
- */
-struct platform_nand_chip {
-       int nr_chips;
-       int chip_offset;
-       int nr_partitions;
-       struct mtd_partition *partitions;
-       int chip_delay;
-       unsigned int options;
-       unsigned int bbt_options;
-       const char **part_probe_types;
-};
-
-/* Keep gcc happy */
-struct platform_device;
-
-/**
- * struct platform_nand_ctrl - controller level device structure
- * @probe:             platform specific function to probe/setup hardware
- * @remove:            platform specific function to remove/teardown hardware
- * @dev_ready:         platform specific function to read ready/busy pin
- * @select_chip:       platform specific chip select function
- * @cmd_ctrl:          platform specific function for controlling
- *                     ALE/CLE/nCE. Also used to write command and address
- * @write_buf:         platform specific function for write buffer
- * @read_buf:          platform specific function for read buffer
- * @priv:              private data to transport driver specific settings
- *
- * All fields are optional and depend on the hardware driver requirements
- */
-struct platform_nand_ctrl {
-       int (*probe)(struct platform_device *pdev);
-       void (*remove)(struct platform_device *pdev);
-       int (*dev_ready)(struct nand_chip *chip);
-       void (*select_chip)(struct nand_chip *chip, int cs);
-       void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl);
-       void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len);
-       void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len);
-       void *priv;
-};
-
-/**
- * struct platform_nand_data - container structure for platform-specific data
- * @chip:              chip level chip structure
- * @ctrl:              controller level device structure
- */
-struct platform_nand_data {
-       struct platform_nand_chip chip;
-       struct platform_nand_ctrl ctrl;
-};
-
 /* return the supported asynchronous timing mode. */
 static inline int onfi_get_async_timing_mode(struct nand_chip *chip)
 {