Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: rawnand: Move platform_nand_xxx definitions out of rawnand.h

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>

authored by

Boris Brezillon and committed by
Miquel Raynal
c7921bb3 4114f97c

+94 -95
+1 -2
arch/arm/mach-ep93xx/snappercl15.c
··· 23 23 #include <linux/i2c.h> 24 24 #include <linux/fb.h> 25 25 26 - #include <linux/mtd/partitions.h> 27 - #include <linux/mtd/rawnand.h> 26 + #include <linux/mtd/platnand.h> 28 27 29 28 #include <mach/hardware.h> 30 29 #include <linux/platform_data/video-ep93xx.h>
+1 -2
arch/arm/mach-ep93xx/ts72xx.c
··· 16 16 #include <linux/init.h> 17 17 #include <linux/platform_device.h> 18 18 #include <linux/io.h> 19 - #include <linux/mtd/rawnand.h> 20 - #include <linux/mtd/partitions.h> 19 + #include <linux/mtd/platnand.h> 21 20 #include <linux/spi/spi.h> 22 21 #include <linux/spi/flash.h> 23 22 #include <linux/spi/mmc_spi.h>
+1 -1
arch/arm/mach-imx/mach-qong.c
··· 18 18 #include <linux/memory.h> 19 19 #include <linux/platform_device.h> 20 20 #include <linux/mtd/physmap.h> 21 - #include <linux/mtd/rawnand.h> 21 + #include <linux/mtd/platnand.h> 22 22 #include <linux/gpio.h> 23 23 24 24 #include <asm/mach-types.h>
+1
arch/arm/mach-ixp4xx/ixdp425-setup.c
··· 20 20 #include <linux/mtd/mtd.h> 21 21 #include <linux/mtd/rawnand.h> 22 22 #include <linux/mtd/partitions.h> 23 + #include <linux/mtd/platnand.h> 23 24 #include <linux/delay.h> 24 25 #include <linux/gpio.h> 25 26 #include <asm/types.h>
+1 -2
arch/arm/mach-omap1/board-fsample.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/delay.h> 18 18 #include <linux/mtd/mtd.h> 19 - #include <linux/mtd/rawnand.h> 20 - #include <linux/mtd/partitions.h> 19 + #include <linux/mtd/platnand.h> 21 20 #include <linux/mtd/physmap.h> 22 21 #include <linux/input.h> 23 22 #include <linux/smc91x.h>
+1 -2
arch/arm/mach-omap1/board-h2.c
··· 24 24 #include <linux/delay.h> 25 25 #include <linux/i2c.h> 26 26 #include <linux/mtd/mtd.h> 27 - #include <linux/mtd/rawnand.h> 28 - #include <linux/mtd/partitions.h> 27 + #include <linux/mtd/platnand.h> 29 28 #include <linux/mtd/physmap.h> 30 29 #include <linux/input.h> 31 30 #include <linux/mfd/tps65010.h>
+1 -1
arch/arm/mach-omap1/board-h3.c
··· 23 23 #include <linux/workqueue.h> 24 24 #include <linux/i2c.h> 25 25 #include <linux/mtd/mtd.h> 26 - #include <linux/mtd/rawnand.h> 26 + #include <linux/mtd/platnand.h> 27 27 #include <linux/mtd/partitions.h> 28 28 #include <linux/mtd/physmap.h> 29 29 #include <linux/input.h>
+1 -2
arch/arm/mach-omap1/board-perseus2.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/delay.h> 18 18 #include <linux/mtd/mtd.h> 19 - #include <linux/mtd/rawnand.h> 20 - #include <linux/mtd/partitions.h> 19 + #include <linux/mtd/platnand.h> 21 20 #include <linux/mtd/physmap.h> 22 21 #include <linux/input.h> 23 22 #include <linux/smc91x.h>
+1 -2
arch/arm/mach-orion5x/ts78xx-setup.c
··· 16 16 #include <linux/platform_device.h> 17 17 #include <linux/mv643xx_eth.h> 18 18 #include <linux/ata_platform.h> 19 - #include <linux/mtd/rawnand.h> 20 - #include <linux/mtd/partitions.h> 19 + #include <linux/mtd/platnand.h> 21 20 #include <linux/timeriomem-rng.h> 22 21 #include <asm/mach-types.h> 23 22 #include <asm/mach/arch.h>
+1 -2
arch/arm/mach-pxa/balloon3.c
··· 25 25 #include <linux/ioport.h> 26 26 #include <linux/ucb1400.h> 27 27 #include <linux/mtd/mtd.h> 28 - #include <linux/mtd/partitions.h> 29 28 #include <linux/types.h> 30 29 #include <linux/platform_data/pcf857x.h> 31 30 #include <linux/platform_data/i2c-pxa.h> 32 - #include <linux/mtd/rawnand.h> 31 + #include <linux/mtd/platnand.h> 33 32 #include <linux/mtd/physmap.h> 34 33 #include <linux/regulator/max1586.h> 35 34
+1 -2
arch/arm/mach-pxa/em-x270.c
··· 15 15 16 16 #include <linux/dm9000.h> 17 17 #include <linux/platform_data/rtc-v3020.h> 18 - #include <linux/mtd/rawnand.h> 19 - #include <linux/mtd/partitions.h> 18 + #include <linux/mtd/platnand.h> 20 19 #include <linux/mtd/physmap.h> 21 20 #include <linux/input.h> 22 21 #include <linux/gpio_keys.h>
+1 -2
arch/arm/mach-pxa/palmtx.c
··· 28 28 #include <linux/wm97xx.h> 29 29 #include <linux/power_supply.h> 30 30 #include <linux/usb/gpio_vbus.h> 31 - #include <linux/mtd/rawnand.h> 32 - #include <linux/mtd/partitions.h> 31 + #include <linux/mtd/platnand.h> 33 32 #include <linux/mtd/mtd.h> 34 33 #include <linux/mtd/physmap.h> 35 34
+1 -2
arch/mips/alchemy/devboards/db1200.c
··· 29 29 #include <linux/leds.h> 30 30 #include <linux/mmc/host.h> 31 31 #include <linux/mtd/mtd.h> 32 - #include <linux/mtd/rawnand.h> 33 - #include <linux/mtd/partitions.h> 32 + #include <linux/mtd/platnand.h> 34 33 #include <linux/platform_device.h> 35 34 #include <linux/serial_8250.h> 36 35 #include <linux/spi/spi.h>
+1 -2
arch/mips/alchemy/devboards/db1300.c
··· 19 19 #include <linux/mmc/host.h> 20 20 #include <linux/module.h> 21 21 #include <linux/mtd/mtd.h> 22 - #include <linux/mtd/rawnand.h> 23 - #include <linux/mtd/partitions.h> 22 + #include <linux/mtd/platnand.h> 24 23 #include <linux/platform_device.h> 25 24 #include <linux/smsc911x.h> 26 25 #include <linux/wm97xx.h>
+1 -2
arch/mips/alchemy/devboards/db1550.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/interrupt.h> 15 15 #include <linux/mtd/mtd.h> 16 - #include <linux/mtd/rawnand.h> 17 - #include <linux/mtd/partitions.h> 16 + #include <linux/mtd/platnand.h> 18 17 #include <linux/platform_device.h> 19 18 #include <linux/pm.h> 20 19 #include <linux/spi/spi.h>
+1 -2
arch/mips/netlogic/xlr/platform-flash.c
··· 19 19 20 20 #include <linux/mtd/mtd.h> 21 21 #include <linux/mtd/physmap.h> 22 - #include <linux/mtd/rawnand.h> 23 - #include <linux/mtd/partitions.h> 22 + #include <linux/mtd/platnand.h> 24 23 25 24 #include <asm/netlogic/haldefs.h> 26 25 #include <asm/netlogic/xlr/iomap.h>
+1 -2
arch/mips/pnx833x/common/platform.c
··· 30 30 #include <linux/resource.h> 31 31 #include <linux/serial.h> 32 32 #include <linux/serial_pnx8xxx.h> 33 - #include <linux/mtd/rawnand.h> 34 - #include <linux/mtd/partitions.h> 33 + #include <linux/mtd/platnand.h> 35 34 36 35 #include <irq.h> 37 36 #include <irq-mapping.h>
+1 -2
arch/mips/rb532/devices.c
··· 20 20 #include <linux/ctype.h> 21 21 #include <linux/string.h> 22 22 #include <linux/platform_device.h> 23 - #include <linux/mtd/rawnand.h> 23 + #include <linux/mtd/platnand.h> 24 24 #include <linux/mtd/mtd.h> 25 - #include <linux/mtd/partitions.h> 26 25 #include <linux/gpio.h> 27 26 #include <linux/gpio_keys.h> 28 27 #include <linux/input.h>
+1 -1
arch/sh/boards/mach-migor/setup.c
··· 14 14 #include <linux/mmc/host.h> 15 15 #include <linux/mtd/physmap.h> 16 16 #include <linux/mfd/tmio.h> 17 - #include <linux/mtd/rawnand.h> 17 + #include <linux/mtd/platnand.h> 18 18 #include <linux/i2c.h> 19 19 #include <linux/regulator/fixed.h> 20 20 #include <linux/regulator/machine.h>
+1 -2
drivers/mtd/nand/raw/plat_nand.c
··· 15 15 #include <linux/platform_device.h> 16 16 #include <linux/slab.h> 17 17 #include <linux/mtd/mtd.h> 18 - #include <linux/mtd/rawnand.h> 19 - #include <linux/mtd/partitions.h> 18 + #include <linux/mtd/platnand.h> 20 19 21 20 struct plat_nand_data { 22 21 struct nand_chip chip;
+74
include/linux/mtd/platnand.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 4 + * Steven J. Hill <sjhill@realitydiluted.com> 5 + * Thomas Gleixner <tglx@linutronix.de> 6 + * 7 + * Contains all platform NAND related definitions. 8 + */ 9 + 10 + #ifndef __LINUX_MTD_PLATNAND_H 11 + #define __LINUX_MTD_PLATNAND_H 12 + 13 + #include <linux/mtd/partitions.h> 14 + #include <linux/mtd/rawnand.h> 15 + #include <linux/platform_device.h> 16 + 17 + /** 18 + * struct platform_nand_chip - chip level device structure 19 + * @nr_chips: max. number of chips to scan for 20 + * @chip_offset: chip number offset 21 + * @nr_partitions: number of partitions pointed to by partitions (or zero) 22 + * @partitions: mtd partition list 23 + * @chip_delay: R/B delay value in us 24 + * @options: Option flags, e.g. 16bit buswidth 25 + * @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH 26 + * @part_probe_types: NULL-terminated array of probe types 27 + */ 28 + struct platform_nand_chip { 29 + int nr_chips; 30 + int chip_offset; 31 + int nr_partitions; 32 + struct mtd_partition *partitions; 33 + int chip_delay; 34 + unsigned int options; 35 + unsigned int bbt_options; 36 + const char **part_probe_types; 37 + }; 38 + 39 + /** 40 + * struct platform_nand_ctrl - controller level device structure 41 + * @probe: platform specific function to probe/setup hardware 42 + * @remove: platform specific function to remove/teardown hardware 43 + * @dev_ready: platform specific function to read ready/busy pin 44 + * @select_chip: platform specific chip select function 45 + * @cmd_ctrl: platform specific function for controlling 46 + * ALE/CLE/nCE. Also used to write command and address 47 + * @write_buf: platform specific function for write buffer 48 + * @read_buf: platform specific function for read buffer 49 + * @priv: private data to transport driver specific settings 50 + * 51 + * All fields are optional and depend on the hardware driver requirements 52 + */ 53 + struct platform_nand_ctrl { 54 + int (*probe)(struct platform_device *pdev); 55 + void (*remove)(struct platform_device *pdev); 56 + int (*dev_ready)(struct nand_chip *chip); 57 + void (*select_chip)(struct nand_chip *chip, int cs); 58 + void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl); 59 + void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len); 60 + void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len); 61 + void *priv; 62 + }; 63 + 64 + /** 65 + * struct platform_nand_data - container structure for platform-specific data 66 + * @chip: chip level chip structure 67 + * @ctrl: controller level device structure 68 + */ 69 + struct platform_nand_data { 70 + struct platform_nand_chip chip; 71 + struct platform_nand_ctrl ctrl; 72 + }; 73 + 74 + #endif /* __LINUX_MTD_PLATNAND_H */
-60
include/linux/mtd/rawnand.h
··· 1540 1540 int nand_erase_nand(struct nand_chip *chip, struct erase_info *instr, 1541 1541 int allowbbt); 1542 1542 1543 - /** 1544 - * struct platform_nand_chip - chip level device structure 1545 - * @nr_chips: max. number of chips to scan for 1546 - * @chip_offset: chip number offset 1547 - * @nr_partitions: number of partitions pointed to by partitions (or zero) 1548 - * @partitions: mtd partition list 1549 - * @chip_delay: R/B delay value in us 1550 - * @options: Option flags, e.g. 16bit buswidth 1551 - * @bbt_options: BBT option flags, e.g. NAND_BBT_USE_FLASH 1552 - * @part_probe_types: NULL-terminated array of probe types 1553 - */ 1554 - struct platform_nand_chip { 1555 - int nr_chips; 1556 - int chip_offset; 1557 - int nr_partitions; 1558 - struct mtd_partition *partitions; 1559 - int chip_delay; 1560 - unsigned int options; 1561 - unsigned int bbt_options; 1562 - const char **part_probe_types; 1563 - }; 1564 - 1565 - /* Keep gcc happy */ 1566 - struct platform_device; 1567 - 1568 - /** 1569 - * struct platform_nand_ctrl - controller level device structure 1570 - * @probe: platform specific function to probe/setup hardware 1571 - * @remove: platform specific function to remove/teardown hardware 1572 - * @dev_ready: platform specific function to read ready/busy pin 1573 - * @select_chip: platform specific chip select function 1574 - * @cmd_ctrl: platform specific function for controlling 1575 - * ALE/CLE/nCE. Also used to write command and address 1576 - * @write_buf: platform specific function for write buffer 1577 - * @read_buf: platform specific function for read buffer 1578 - * @priv: private data to transport driver specific settings 1579 - * 1580 - * All fields are optional and depend on the hardware driver requirements 1581 - */ 1582 - struct platform_nand_ctrl { 1583 - int (*probe)(struct platform_device *pdev); 1584 - void (*remove)(struct platform_device *pdev); 1585 - int (*dev_ready)(struct nand_chip *chip); 1586 - void (*select_chip)(struct nand_chip *chip, int cs); 1587 - void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl); 1588 - void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len); 1589 - void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len); 1590 - void *priv; 1591 - }; 1592 - 1593 - /** 1594 - * struct platform_nand_data - container structure for platform-specific data 1595 - * @chip: chip level chip structure 1596 - * @ctrl: controller level device structure 1597 - */ 1598 - struct platform_nand_data { 1599 - struct platform_nand_chip chip; 1600 - struct platform_nand_ctrl ctrl; 1601 - }; 1602 - 1603 1543 /* return the supported asynchronous timing mode. */ 1604 1544 static inline int onfi_get_async_timing_mode(struct nand_chip *chip) 1605 1545 {