mfd: tmio: Move header to platform_data
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 13 Feb 2024 22:02:25 +0000 (23:02 +0100)
committerLee Jones <lee@kernel.org>
Tue, 9 Jul 2024 09:40:29 +0000 (10:40 +0100)
All the MFD components are gone from the header meanwhile. Only the MMC
relevant data is left which makes it a platform_data for the MMC
controller. Move the header to the now fitting directory.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-14-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
14 files changed:
MAINTAINERS
arch/sh/boards/board-sh7757lcr.c
arch/sh/boards/mach-ap325rxa/setup.c
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-kfr2r09/setup.c
arch/sh/boards/mach-migor/setup.c
arch/sh/boards/mach-se/7724/setup.c
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mmc/host/renesas_sdhi_sys_dmac.c
drivers/mmc/host/tmio_mmc_core.c
drivers/mmc/host/uniphier-sd.c
include/linux/mfd/tmio.h [deleted file]
include/linux/platform_data/tmio.h [new file with mode: 0644]

index 17af347464d29b6b18d59ae78f390825eddede53..5d13fe1a9187919109276e931d77d6b75e9efe85 100644 (file)
@@ -22685,7 +22685,7 @@ L:      linux-renesas-soc@vger.kernel.org
 S:     Supported
 F:     drivers/mmc/host/renesas_sdhi*
 F:     drivers/mmc/host/tmio_mmc*
-F:     include/linux/mfd/tmio.h
+F:     include/linux/platform_data/tmio.h
 
 TMP513 HARDWARE MONITOR DRIVER
 M:     Eric Tremblay <etremblay@distech-controls.com>
index 689ea14a66781b15872218e47b57d030c6997739..bca54e489e11678e1e02b85dfa84dffd094f180f 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
 #include <linux/io.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_data/sh_mmcif.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/sh_eth.h>
 #include <linux/sh_intc.h>
 #include <linux/usb/renesas_usbhs.h>
index 645cccf3da88eccf69e769ec4cd07c2056deb5ef..bb5004a8ac0250036d2aed2a7e37daa74453e47c 100644 (file)
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/memblock.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/sh_flctl.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
index 30d117f9ad7eeafbc43bcaf921b94c941bb1cd8c..6f13557eecd6bb218bcc165b8f74360d19f4a705 100644 (file)
 #include <linux/input/sh_keysc.h>
 #include <linux/interrupt.h>
 #include <linux/memblock.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_data/sh_mmcif.h>
 #include <linux/mtd/physmap.h>
 #include <linux/gpio.h>
 #include <linux/gpio/machine.h>
 #include <linux/platform_data/gpio_backlight.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_data/tsc2007.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/fixed.h>
index 6b775eae85c021bf0a7d02f64523f31a801dde61..70236859919dbf7045cf8a8b6ebcf05721b052f8 100644 (file)
 #include <linux/input/sh_keysc.h>
 #include <linux/interrupt.h>
 #include <linux/memblock.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_data/lv5207lp.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
index 773ee767d0c4e0299484c6b4910b0d40d8b7d2e9..1853e6319a660fc732ad34c20b4d734e7a329daa 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/clkdev.h>
 #include <linux/dma-map-ops.h>
 #include <linux/init.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
@@ -14,7 +15,6 @@
 #include <linux/memblock.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mtd/platnand.h>
 #include <linux/i2c.h>
 #include <linux/regulator/fixed.h>
index 787ddd3c627a1d6667a604a6fb212caac5e18699..e500feb91053930fc2e5b00bacc4540317d06c47 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/input/sh_keysc.h>
 #include <linux/interrupt.h>
 #include <linux/memblock.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mtd/physmap.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
index 12f4faaaf4ee498eb9c0b73f6ed507dfe1f61837..d9503f9f6e969b7f304d64baaeb8bf22fa1d5cdb 100644 (file)
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/mmc.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/pinctrl/pinctrl-state.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/regulator/consumer.h>
index e8c3fb0fb5c2be2a71b524360609d9681dc84c0c..4a02ef7fde4dbb65b7f27ad9f7ecf04487cf2899 100644 (file)
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/io-64-nonatomic-hi-lo.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/pagemap.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/scatterlist.h>
index c18581897f8a6dd0ba5573888326f9b31670ea1b..68e31c37cce65678c2e74f92dd7a9a33a342f59d 100644 (file)
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/pagemap.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/scatterlist.h>
index 73b0bd692fe03a0157df06f44a52d5066cf2cd0c..592506d83e2c1d147345aad5c9882781d7bdf27e 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/irq.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/mmc.h>
@@ -39,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/pagemap.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/pm_qos.h>
 #include <linux/pm_runtime.h>
index 1404989e6151a468b4160e8c53c152bdd9fd4a29..bd231dbe90ba30509e0a999cad4440c49b78e7ea 100644 (file)
@@ -9,11 +9,11 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/mfd/syscon.h>
-#include <linux/mfd/tmio.h>
 #include <linux/mmc/host.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/platform_data/tmio.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
deleted file mode 100644 (file)
index 1cf4186..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef MFD_TMIO_H
-#define MFD_TMIO_H
-
-#include <linux/platform_device.h>
-#include <linux/types.h>
-
-/* TMIO MMC platform flags */
-
-/*
- * Some controllers can support a 2-byte block size when the bus width is
- * configured in 4-bit mode.
- */
-#define TMIO_MMC_BLKSZ_2BYTES          BIT(1)
-
-/* Some controllers can support SDIO IRQ signalling */
-#define TMIO_MMC_SDIO_IRQ              BIT(2)
-
-/* Some features are only available or tested on R-Car Gen2 or later */
-#define TMIO_MMC_MIN_RCAR2             BIT(3)
-
-/*
- * Some controllers require waiting for the SD bus to become idle before
- * writing to some registers.
- */
-#define TMIO_MMC_HAS_IDLE_WAIT         BIT(4)
-
-/*
- * Use the busy timeout feature. Probably all TMIO versions support it. Yet,
- * we don't have documentation for old variants, so we enable only known good
- * variants with this flag. Can be removed once all variants are known good.
- */
-#define TMIO_MMC_USE_BUSY_TIMEOUT      BIT(5)
-
-/* Some controllers have CMD12 automatically issue/non-issue register */
-#define TMIO_MMC_HAVE_CMD12_CTRL       BIT(7)
-
-/* Controller has some SDIO status bits which must be 1 */
-#define TMIO_MMC_SDIO_STATUS_SETBITS   BIT(8)
-
-/* Some controllers have a 32-bit wide data port register */
-#define TMIO_MMC_32BIT_DATA_PORT       BIT(9)
-
-/* Some controllers allows to set SDx actual clock */
-#define TMIO_MMC_CLK_ACTUAL            BIT(10)
-
-/* Some controllers have a CBSY bit */
-#define TMIO_MMC_HAVE_CBSY             BIT(11)
-
-struct tmio_mmc_data {
-       void                            *chan_priv_tx;
-       void                            *chan_priv_rx;
-       unsigned int                    hclk;
-       unsigned long                   capabilities;
-       unsigned long                   capabilities2;
-       unsigned long                   flags;
-       u32                             ocr_mask;       /* available voltages */
-       dma_addr_t                      dma_rx_offset;
-       unsigned int                    max_blk_count;
-       unsigned short                  max_segs;
-       void (*set_pwr)(struct platform_device *host, int state);
-       void (*set_clk_div)(struct platform_device *host, int state);
-};
-#endif
diff --git a/include/linux/platform_data/tmio.h b/include/linux/platform_data/tmio.h
new file mode 100644 (file)
index 0000000..1cf4186
--- /dev/null
@@ -0,0 +1,64 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef MFD_TMIO_H
+#define MFD_TMIO_H
+
+#include <linux/platform_device.h>
+#include <linux/types.h>
+
+/* TMIO MMC platform flags */
+
+/*
+ * Some controllers can support a 2-byte block size when the bus width is
+ * configured in 4-bit mode.
+ */
+#define TMIO_MMC_BLKSZ_2BYTES          BIT(1)
+
+/* Some controllers can support SDIO IRQ signalling */
+#define TMIO_MMC_SDIO_IRQ              BIT(2)
+
+/* Some features are only available or tested on R-Car Gen2 or later */
+#define TMIO_MMC_MIN_RCAR2             BIT(3)
+
+/*
+ * Some controllers require waiting for the SD bus to become idle before
+ * writing to some registers.
+ */
+#define TMIO_MMC_HAS_IDLE_WAIT         BIT(4)
+
+/*
+ * Use the busy timeout feature. Probably all TMIO versions support it. Yet,
+ * we don't have documentation for old variants, so we enable only known good
+ * variants with this flag. Can be removed once all variants are known good.
+ */
+#define TMIO_MMC_USE_BUSY_TIMEOUT      BIT(5)
+
+/* Some controllers have CMD12 automatically issue/non-issue register */
+#define TMIO_MMC_HAVE_CMD12_CTRL       BIT(7)
+
+/* Controller has some SDIO status bits which must be 1 */
+#define TMIO_MMC_SDIO_STATUS_SETBITS   BIT(8)
+
+/* Some controllers have a 32-bit wide data port register */
+#define TMIO_MMC_32BIT_DATA_PORT       BIT(9)
+
+/* Some controllers allows to set SDx actual clock */
+#define TMIO_MMC_CLK_ACTUAL            BIT(10)
+
+/* Some controllers have a CBSY bit */
+#define TMIO_MMC_HAVE_CBSY             BIT(11)
+
+struct tmio_mmc_data {
+       void                            *chan_priv_tx;
+       void                            *chan_priv_rx;
+       unsigned int                    hclk;
+       unsigned long                   capabilities;
+       unsigned long                   capabilities2;
+       unsigned long                   flags;
+       u32                             ocr_mask;       /* available voltages */
+       dma_addr_t                      dma_rx_offset;
+       unsigned int                    max_blk_count;
+       unsigned short                  max_segs;
+       void (*set_pwr)(struct platform_device *host, int state);
+       void (*set_clk_div)(struct platform_device *host, int state);
+};
+#endif