2024-02-09 01:59:20

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

The MFD parts of the TMIO have been removed by Arnd, so that only the
SD/MMC related functionality is left. Remove the outdated remains in the
public header file and then move it to platform_data as the data is now
specific for the SD/MMC part.

Based on 6.8-rc3, build bot is happy. Branch is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification

I'd suggest this goes via the MFD tree, so the series would need acks
from the MMC and SH maintainers. Is that okay with everyone?

All the best!

Wolfram


Wolfram Sang (6):
mfd: tmio: remove obsolete platform_data
mfd: tmio: remove obsolete io accessors
mmc: tmio/sdhi: fix includes
mfd: tmio: update include files
mfd: tmio: sanitize comments
mfd: tmio: move header to platform_data

MAINTAINERS | 2 +-
arch/sh/boards/board-sh7757lcr.c | 2 +-
arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
arch/sh/boards/mach-ecovec24/setup.c | 2 +-
arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
arch/sh/boards/mach-migor/setup.c | 2 +-
arch/sh/boards/mach-se/7724/setup.c | 2 +-
drivers/mmc/host/renesas_sdhi_core.c | 2 +-
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 +-
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 +-
drivers/mmc/host/tmio_mmc_core.c | 3 +-
drivers/mmc/host/uniphier-sd.c | 2 +-
include/linux/mfd/tmio.h | 133 ------------------
include/linux/platform_data/tmio.h | 64 +++++++++
14 files changed, 81 insertions(+), 147 deletions(-)
delete mode 100644 include/linux/mfd/tmio.h
create mode 100644 include/linux/platform_data/tmio.h

--
2.43.0



2024-02-09 01:59:41

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 4/6] mfd: tmio: update include files

Remove meanwhile unneeded includes, only add types.h for dma_addr_t.
Also, remove an obsolete forward declaration while here.

Signed-off-by: Wolfram Sang <[email protected]>
---
include/linux/mfd/tmio.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 4223315d2b2a..f71d4e507dcb 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -2,13 +2,8 @@
#ifndef MFD_TMIO_H
#define MFD_TMIO_H

-#include <linux/device.h>
-#include <linux/fb.h>
-#include <linux/io.h>
-#include <linux/jiffies.h>
-#include <linux/mmc/card.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
+#include <linux/types.h>

/* tmio MMC platform flags */
/*
@@ -59,8 +54,6 @@
/* Some controllers have a CBSY bit */
#define TMIO_MMC_HAVE_CBSY BIT(11)

-struct dma_chan;
-
/*
* data for the MMC controller
*/
--
2.43.0


2024-02-09 01:59:58

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 2/6] mfd: tmio: remove obsolete io accessors

Since commit 568494db6809 ("mtd: remove tmio_nand driver") and commit
aceae7848624 ("fbdev: remove tmiofb driver"), these accessors have no
users anymore. Remove them.

Signed-off-by: Wolfram Sang <[email protected]>
---
include/linux/mfd/tmio.h | 25 -------------------------
1 file changed, 25 deletions(-)

diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index bc53323293a3..4223315d2b2a 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -10,31 +10,6 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

-#define tmio_ioread8(addr) readb(addr)
-#define tmio_ioread16(addr) readw(addr)
-#define tmio_ioread16_rep(r, b, l) readsw(r, b, l)
-#define tmio_ioread32(addr) \
- (((u32)readw((addr))) | (((u32)readw((addr) + 2)) << 16))
-
-#define tmio_iowrite8(val, addr) writeb((val), (addr))
-#define tmio_iowrite16(val, addr) writew((val), (addr))
-#define tmio_iowrite16_rep(r, b, l) writesw(r, b, l)
-#define tmio_iowrite32(val, addr) \
- do { \
- writew((val), (addr)); \
- writew((val) >> 16, (addr) + 2); \
- } while (0)
-
-#define sd_config_write8(base, shift, reg, val) \
- tmio_iowrite8((val), (base) + ((reg) << (shift)))
-#define sd_config_write16(base, shift, reg, val) \
- tmio_iowrite16((val), (base) + ((reg) << (shift)))
-#define sd_config_write32(base, shift, reg, val) \
- do { \
- tmio_iowrite16((val), (base) + ((reg) << (shift))); \
- tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \
- } while (0)
-
/* tmio MMC platform flags */
/*
* Some controllers can support a 2-byte block size when the bus width
--
2.43.0


2024-02-09 02:00:34

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 5/6] mfd: tmio: sanitize comments

Reformat the comments to utilize the maximum line length and use single
line comments where appropriate. Remove superfluous comments, too.

Signed-off-by: Wolfram Sang <[email protected]>
---
include/linux/mfd/tmio.h | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index f71d4e507dcb..1cf418643da9 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -5,23 +5,23 @@
#include <linux/platform_device.h>
#include <linux/types.h>

-/* tmio MMC platform flags */
+/* TMIO MMC platform flags */
+
/*
- * Some controllers can support a 2-byte block size when the bus width
- * is configured in 4-bit mode.
+ * 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.
- */
+
+/* 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.
+ * Some controllers require waiting for the SD bus to become idle before
+ * writing to some registers.
*/
#define TMIO_MMC_HAS_IDLE_WAIT BIT(4)

@@ -32,31 +32,21 @@
*/
#define TMIO_MMC_USE_BUSY_TIMEOUT BIT(5)

-/*
- * Some controllers have CMD12 automatically
- * issue/non-issue register
- */
+/* 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
- */
+/* 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
- */
+/* 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)

-/*
- * data for the MMC controller
- */
struct tmio_mmc_data {
void *chan_priv_tx;
void *chan_priv_rx;
--
2.43.0


2024-02-09 02:00:47

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 6/6] mfd: tmio: move header to platform_data

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 <[email protected]>
---
MAINTAINERS | 2 +-
arch/sh/boards/board-sh7757lcr.c | 2 +-
arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
arch/sh/boards/mach-ecovec24/setup.c | 2 +-
arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
arch/sh/boards/mach-migor/setup.c | 2 +-
arch/sh/boards/mach-se/7724/setup.c | 2 +-
drivers/mmc/host/renesas_sdhi_core.c | 2 +-
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +-
drivers/mmc/host/tmio_mmc_core.c | 2 +-
drivers/mmc/host/uniphier-sd.c | 2 +-
include/linux/{mfd => platform_data}/tmio.h | 0
13 files changed, 12 insertions(+), 12 deletions(-)
rename include/linux/{mfd => platform_data}/tmio.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 960512bec428..c4e20abd177b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22154,7 +22154,7 @@ L: [email protected]
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

TMP401 HARDWARE MONITOR DRIVER
M: Guenter Roeck <[email protected]>
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index f39c8196efdf..4014c042d2a5 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -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>
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index 645cccf3da88..bb5004a8ac02 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -24,10 +24,10 @@
#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>
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 30d117f9ad7e..6f13557eecd6 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -17,13 +17,13 @@
#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>
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 6b775eae85c0..70236859919d 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -22,10 +22,10 @@
#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>
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 773ee767d0c4..1853e6319a66 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -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>
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index 787ddd3c627a..e500feb91053 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -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>
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index c675dec587ef..f84f60139bcf 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -22,13 +22,13 @@
#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>
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 24e1c17908d7..97cd55fec0bf 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -11,12 +11,12 @@
#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>
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index c18581897f8a..68e31c37cce6 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -11,12 +11,12 @@
#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>
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index c39141a5bd23..0c4397b3cffd 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -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>
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 1404989e6151..bd231dbe90ba 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -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/platform_data/tmio.h
similarity index 100%
rename from include/linux/mfd/tmio.h
rename to include/linux/platform_data/tmio.h
--
2.43.0


2024-02-09 02:03:33

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 3/6] mmc: tmio/sdhi: fix includes

TMIO uses an of_* function, and SDHI uses pm_runtime functions. Add the
includes directly, so we can clean up another header properly. Sort the
pagemap include while we are here.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Wolfram Sang <[email protected]>
---
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 3 ++-
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
drivers/mmc/host/tmio_mmc_core.c | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 53d34c3eddce..24e1c17908d7 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -16,8 +16,9 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/platform_device.h>
#include <linux/pagemap.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <linux/sys_soc.h>

diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index 9cf7f9feab72..c18581897f8a 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -16,8 +16,9 @@
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/platform_device.h>
#include <linux/pagemap.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <linux/sys_soc.h>

diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index be7f18fd4836..c39141a5bd23 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -37,6 +37,7 @@
#include <linux/mmc/mmc.h>
#include <linux/mmc/slot-gpio.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/pagemap.h>
#include <linux/platform_device.h>
#include <linux/pm_qos.h>
--
2.43.0


2024-02-09 07:55:01

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/6] mfd: tmio: remove obsolete io accessors

On Fri, 09 Feb 2024, Wolfram Sang wrote:

> Since commit 568494db6809 ("mtd: remove tmio_nand driver") and commit
> aceae7848624 ("fbdev: remove tmiofb driver"), these accessors have no
> users anymore. Remove them.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> include/linux/mfd/tmio.h | 25 -------------------------
> 1 file changed, 25 deletions(-)

Acked-by: Lee Jones <[email protected]>

> diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> index bc53323293a3..4223315d2b2a 100644
> --- a/include/linux/mfd/tmio.h
> +++ b/include/linux/mfd/tmio.h
> @@ -10,31 +10,6 @@
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
>
> -#define tmio_ioread8(addr) readb(addr)
> -#define tmio_ioread16(addr) readw(addr)
> -#define tmio_ioread16_rep(r, b, l) readsw(r, b, l)
> -#define tmio_ioread32(addr) \
> - (((u32)readw((addr))) | (((u32)readw((addr) + 2)) << 16))
> -
> -#define tmio_iowrite8(val, addr) writeb((val), (addr))
> -#define tmio_iowrite16(val, addr) writew((val), (addr))
> -#define tmio_iowrite16_rep(r, b, l) writesw(r, b, l)
> -#define tmio_iowrite32(val, addr) \
> - do { \
> - writew((val), (addr)); \
> - writew((val) >> 16, (addr) + 2); \
> - } while (0)
> -
> -#define sd_config_write8(base, shift, reg, val) \
> - tmio_iowrite8((val), (base) + ((reg) << (shift)))
> -#define sd_config_write16(base, shift, reg, val) \
> - tmio_iowrite16((val), (base) + ((reg) << (shift)))
> -#define sd_config_write32(base, shift, reg, val) \
> - do { \
> - tmio_iowrite16((val), (base) + ((reg) << (shift))); \
> - tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \
> - } while (0)
> -
> /* tmio MMC platform flags */
> /*
> * Some controllers can support a 2-byte block size when the bus width
> --
> 2.43.0
>

--
Lee Jones [李琼斯]

2024-02-09 07:55:34

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 4/6] mfd: tmio: update include files

On Fri, 09 Feb 2024, Wolfram Sang wrote:

> Remove meanwhile unneeded includes, only add types.h for dma_addr_t.
> Also, remove an obsolete forward declaration while here.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> include/linux/mfd/tmio.h | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)

Acked-by: Lee Jones <[email protected]>

> diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> index 4223315d2b2a..f71d4e507dcb 100644
> --- a/include/linux/mfd/tmio.h
> +++ b/include/linux/mfd/tmio.h
> @@ -2,13 +2,8 @@
> #ifndef MFD_TMIO_H
> #define MFD_TMIO_H
>
> -#include <linux/device.h>
> -#include <linux/fb.h>
> -#include <linux/io.h>
> -#include <linux/jiffies.h>
> -#include <linux/mmc/card.h>
> #include <linux/platform_device.h>
> -#include <linux/pm_runtime.h>
> +#include <linux/types.h>
>
> /* tmio MMC platform flags */
> /*
> @@ -59,8 +54,6 @@
> /* Some controllers have a CBSY bit */
> #define TMIO_MMC_HAVE_CBSY BIT(11)
>
> -struct dma_chan;
> -
> /*
> * data for the MMC controller
> */
> --
> 2.43.0
>

--
Lee Jones [李琼斯]

2024-02-09 07:56:49

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 6/6] mfd: tmio: move header to platform_data

On Fri, 09 Feb 2024, Wolfram Sang wrote:

> 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 <[email protected]>
> ---
> MAINTAINERS | 2 +-
> arch/sh/boards/board-sh7757lcr.c | 2 +-
> arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
> arch/sh/boards/mach-ecovec24/setup.c | 2 +-
> arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
> arch/sh/boards/mach-migor/setup.c | 2 +-
> arch/sh/boards/mach-se/7724/setup.c | 2 +-
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +-
> drivers/mmc/host/tmio_mmc_core.c | 2 +-
> drivers/mmc/host/uniphier-sd.c | 2 +-
> include/linux/{mfd => platform_data}/tmio.h | 0
> 13 files changed, 12 insertions(+), 12 deletions(-)
> rename include/linux/{mfd => platform_data}/tmio.h (100%)

Acked-by: Lee Jones <[email protected]>

> diff --git a/MAINTAINERS b/MAINTAINERS
> index 960512bec428..c4e20abd177b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -22154,7 +22154,7 @@ L: [email protected]
> 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
>
> TMP401 HARDWARE MONITOR DRIVER
> M: Guenter Roeck <[email protected]>
> diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> index f39c8196efdf..4014c042d2a5 100644
> --- a/arch/sh/boards/board-sh7757lcr.c
> +++ b/arch/sh/boards/board-sh7757lcr.c
> @@ -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>
> diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> index 645cccf3da88..bb5004a8ac02 100644
> --- a/arch/sh/boards/mach-ap325rxa/setup.c
> +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> @@ -24,10 +24,10 @@
> #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>
> diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> index 30d117f9ad7e..6f13557eecd6 100644
> --- a/arch/sh/boards/mach-ecovec24/setup.c
> +++ b/arch/sh/boards/mach-ecovec24/setup.c
> @@ -17,13 +17,13 @@
> #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>
> diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> index 6b775eae85c0..70236859919d 100644
> --- a/arch/sh/boards/mach-kfr2r09/setup.c
> +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> @@ -22,10 +22,10 @@
> #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>
> diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> index 773ee767d0c4..1853e6319a66 100644
> --- a/arch/sh/boards/mach-migor/setup.c
> +++ b/arch/sh/boards/mach-migor/setup.c
> @@ -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>
> diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> index 787ddd3c627a..e500feb91053 100644
> --- a/arch/sh/boards/mach-se/7724/setup.c
> +++ b/arch/sh/boards/mach-se/7724/setup.c
> @@ -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>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index c675dec587ef..f84f60139bcf 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -22,13 +22,13 @@
> #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>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 24e1c17908d7..97cd55fec0bf 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -11,12 +11,12 @@
> #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>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index c18581897f8a..68e31c37cce6 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -11,12 +11,12 @@
> #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>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index c39141a5bd23..0c4397b3cffd 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -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>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 1404989e6151..bd231dbe90ba 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -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/platform_data/tmio.h
> similarity index 100%
> rename from include/linux/mfd/tmio.h
> rename to include/linux/platform_data/tmio.h
> --
> 2.43.0
>

--
Lee Jones [李琼斯]

2024-02-09 07:57:03

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 5/6] mfd: tmio: sanitize comments

On Fri, 09 Feb 2024, Wolfram Sang wrote:

> Reformat the comments to utilize the maximum line length and use single
> line comments where appropriate. Remove superfluous comments, too.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> include/linux/mfd/tmio.h | 32 +++++++++++---------------------
> 1 file changed, 11 insertions(+), 21 deletions(-)

Acked-by: Lee Jones <[email protected]>

> diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> index f71d4e507dcb..1cf418643da9 100644
> --- a/include/linux/mfd/tmio.h
> +++ b/include/linux/mfd/tmio.h
> @@ -5,23 +5,23 @@
> #include <linux/platform_device.h>
> #include <linux/types.h>
>
> -/* tmio MMC platform flags */
> +/* TMIO MMC platform flags */
> +
> /*
> - * Some controllers can support a 2-byte block size when the bus width
> - * is configured in 4-bit mode.
> + * 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.
> - */
> +
> +/* 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.
> + * Some controllers require waiting for the SD bus to become idle before
> + * writing to some registers.
> */
> #define TMIO_MMC_HAS_IDLE_WAIT BIT(4)
>
> @@ -32,31 +32,21 @@
> */
> #define TMIO_MMC_USE_BUSY_TIMEOUT BIT(5)
>
> -/*
> - * Some controllers have CMD12 automatically
> - * issue/non-issue register
> - */
> +/* 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
> - */
> +/* 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
> - */
> +/* 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)
>
> -/*
> - * data for the MMC controller
> - */
> struct tmio_mmc_data {
> void *chan_priv_tx;
> void *chan_priv_rx;
> --
> 2.43.0
>

--
Lee Jones [李琼斯]

2024-02-09 08:00:56

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

On Fri, 09 Feb 2024, Wolfram Sang wrote:

> The MFD parts of the TMIO have been removed by Arnd, so that only the
> SD/MMC related functionality is left. Remove the outdated remains in the
> public header file and then move it to platform_data as the data is now
> specific for the SD/MMC part.
>
> Based on 6.8-rc3, build bot is happy. Branch is here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification
>
> I'd suggest this goes via the MFD tree, so the series would need acks
> from the MMC and SH maintainers. Is that okay with everyone?
>
> All the best!
>
> Wolfram

Could you please change all of the subject lines with "mfd" in them
i.e. all of the commits which touch include/linux/mfd and ensure the
description starts with an upper case char?

I like all commits that touch drivers/mfd and include/linux/mfd to have
the same formatting structure.

Thanks.

> Wolfram Sang (6):
> mfd: tmio: remove obsolete platform_data
> mfd: tmio: remove obsolete io accessors
> mmc: tmio/sdhi: fix includes
> mfd: tmio: update include files
> mfd: tmio: sanitize comments
> mfd: tmio: move header to platform_data
>
> MAINTAINERS | 2 +-
> arch/sh/boards/board-sh7757lcr.c | 2 +-
> arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
> arch/sh/boards/mach-ecovec24/setup.c | 2 +-
> arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
> arch/sh/boards/mach-migor/setup.c | 2 +-
> arch/sh/boards/mach-se/7724/setup.c | 2 +-
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 +-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 +-
> drivers/mmc/host/tmio_mmc_core.c | 3 +-
> drivers/mmc/host/uniphier-sd.c | 2 +-
> include/linux/mfd/tmio.h | 133 ------------------
> include/linux/platform_data/tmio.h | 64 +++++++++
> 14 files changed, 81 insertions(+), 147 deletions(-)
> delete mode 100644 include/linux/mfd/tmio.h
> create mode 100644 include/linux/platform_data/tmio.h
>
> --
> 2.43.0
>

--
Lee Jones [李琼斯]

2024-02-09 10:02:56

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

On Fri, Feb 09, 2024 at 07:58:39AM +0000, Lee Jones wrote:
> On Fri, 09 Feb 2024, Wolfram Sang wrote:
>
> > The MFD parts of the TMIO have been removed by Arnd, so that only the
> > SD/MMC related functionality is left. Remove the outdated remains in the
> > public header file and then move it to platform_data as the data is now
> > specific for the SD/MMC part.
> >
> > Based on 6.8-rc3, build bot is happy. Branch is here:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification
> >
> > I'd suggest this goes via the MFD tree, so the series would need acks
> > from the MMC and SH maintainers. Is that okay with everyone?
> >
> > All the best!
> >
> > Wolfram
>
> Could you please change all of the subject lines with "mfd" in them
> i.e. all of the commits which touch include/linux/mfd and ensure the
> description starts with an upper case char?
>
> I like all commits that touch drivers/mfd and include/linux/mfd to have
> the same formatting structure.

Sure, I'll just wait one day for other review comments. Thanks for your
review!


Attachments:
(No filename) (1.10 kB)
signature.asc (849.00 B)
Download all attachments

2024-02-09 11:34:51

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

On Fri, 9 Feb 2024 at 02:59, Wolfram Sang
<[email protected]> wrote:
>
> The MFD parts of the TMIO have been removed by Arnd, so that only the
> SD/MMC related functionality is left. Remove the outdated remains in the
> public header file and then move it to platform_data as the data is now
> specific for the SD/MMC part.
>
> Based on 6.8-rc3, build bot is happy. Branch is here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification
>
> I'd suggest this goes via the MFD tree, so the series would need acks
> from the MMC and SH maintainers. Is that okay with everyone?

Wouldn't it be better to funnel this via the mmc tree? In that way, we
can easily avoid conflicts with additional renesas-mmc driver changes
that we have in pipe.

Or perhaps there are other changes that make the mfd tree preferred?

Kind regards
Uffe

>
> All the best!
>
> Wolfram
>
>
> Wolfram Sang (6):
> mfd: tmio: remove obsolete platform_data
> mfd: tmio: remove obsolete io accessors
> mmc: tmio/sdhi: fix includes
> mfd: tmio: update include files
> mfd: tmio: sanitize comments
> mfd: tmio: move header to platform_data
>
> MAINTAINERS | 2 +-
> arch/sh/boards/board-sh7757lcr.c | 2 +-
> arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
> arch/sh/boards/mach-ecovec24/setup.c | 2 +-
> arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
> arch/sh/boards/mach-migor/setup.c | 2 +-
> arch/sh/boards/mach-se/7724/setup.c | 2 +-
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 +-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 +-
> drivers/mmc/host/tmio_mmc_core.c | 3 +-
> drivers/mmc/host/uniphier-sd.c | 2 +-
> include/linux/mfd/tmio.h | 133 ------------------
> include/linux/platform_data/tmio.h | 64 +++++++++
> 14 files changed, 81 insertions(+), 147 deletions(-)
> delete mode 100644 include/linux/mfd/tmio.h
> create mode 100644 include/linux/platform_data/tmio.h
>
> --
> 2.43.0
>
>

2024-02-09 13:36:57

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

On Fri, 09 Feb 2024, Ulf Hansson wrote:

> On Fri, 9 Feb 2024 at 02:59, Wolfram Sang
> <[email protected]> wrote:
> >
> > The MFD parts of the TMIO have been removed by Arnd, so that only the
> > SD/MMC related functionality is left. Remove the outdated remains in the
> > public header file and then move it to platform_data as the data is now
> > specific for the SD/MMC part.
> >
> > Based on 6.8-rc3, build bot is happy. Branch is here:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification
> >
> > I'd suggest this goes via the MFD tree, so the series would need acks
> > from the MMC and SH maintainers. Is that okay with everyone?
>
> Wouldn't it be better to funnel this via the mmc tree? In that way, we
> can easily avoid conflicts with additional renesas-mmc driver changes
> that we have in pipe.

You could say the same about changes SH, MFD and Platform Data have in
the pipe.

> Or perhaps there are other changes that make the mfd tree preferred?

MFD is usually preferred since the parent device usually lives there and
we are well accustomed to merging multi-subsystem related sets.

It doesn't really matter how this is merged. The only stipulation is
that whoever applies the set does so on a succinct, immutable, tagged
branch and sends out a pull-request for everyone else to pull from.

If you want to do that, there are no complains from me.

> > All the best!
> >
> > Wolfram
> >
> >
> > Wolfram Sang (6):
> > mfd: tmio: remove obsolete platform_data
> > mfd: tmio: remove obsolete io accessors
> > mmc: tmio/sdhi: fix includes
> > mfd: tmio: update include files
> > mfd: tmio: sanitize comments
> > mfd: tmio: move header to platform_data
> >
> > MAINTAINERS | 2 +-
> > arch/sh/boards/board-sh7757lcr.c | 2 +-
> > arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
> > arch/sh/boards/mach-ecovec24/setup.c | 2 +-
> > arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
> > arch/sh/boards/mach-migor/setup.c | 2 +-
> > arch/sh/boards/mach-se/7724/setup.c | 2 +-
> > drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> > drivers/mmc/host/renesas_sdhi_internal_dmac.c | 5 +-
> > drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 +-
> > drivers/mmc/host/tmio_mmc_core.c | 3 +-
> > drivers/mmc/host/uniphier-sd.c | 2 +-
> > include/linux/mfd/tmio.h | 133 ------------------
> > include/linux/platform_data/tmio.h | 64 +++++++++
> > 14 files changed, 81 insertions(+), 147 deletions(-)
> > delete mode 100644 include/linux/mfd/tmio.h
> > create mode 100644 include/linux/platform_data/tmio.h
> >
> > --
> > 2.43.0
> >
> >

--
Lee Jones [李琼斯]

2024-02-12 11:39:47

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

On Fri, 9 Feb 2024 at 14:28, Lee Jones <[email protected]> wrote:
>
> On Fri, 09 Feb 2024, Ulf Hansson wrote:
>
> > On Fri, 9 Feb 2024 at 02:59, Wolfram Sang
> > <[email protected]> wrote:
> > >
> > > The MFD parts of the TMIO have been removed by Arnd, so that only the
> > > SD/MMC related functionality is left. Remove the outdated remains in the
> > > public header file and then move it to platform_data as the data is now
> > > specific for the SD/MMC part.
> > >
> > > Based on 6.8-rc3, build bot is happy. Branch is here:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/tmio-simplification
> > >
> > > I'd suggest this goes via the MFD tree, so the series would need acks
> > > from the MMC and SH maintainers. Is that okay with everyone?
> >
> > Wouldn't it be better to funnel this via the mmc tree? In that way, we
> > can easily avoid conflicts with additional renesas-mmc driver changes
> > that we have in pipe.
>
> You could say the same about changes SH, MFD and Platform Data have in
> the pipe.
>
> > Or perhaps there are other changes that make the mfd tree preferred?
>
> MFD is usually preferred since the parent device usually lives there and
> we are well accustomed to merging multi-subsystem related sets.
>
> It doesn't really matter how this is merged. The only stipulation is
> that whoever applies the set does so on a succinct, immutable, tagged
> branch and sends out a pull-request for everyone else to pull from.

You are right.

Although, in this particular case I thought it could make better sense
to use the mmc tree, because 1) we are only removing a header file
from mfd and 2) I know we have other renesas-mmc changes in the pipe
for the next release. The point is, I wanted us to avoid the need for
using an immutable branch. But nevermind.

>
> If you want to do that, there are no complains from me.

Well, it sounds like we may need the flexibility with the immutable
branch, so I suggest we do the usual thing with the mfd tree.

Please add my ack for the mmc related changes.

[...]

Kind regards
Uffe

2024-02-12 12:44:38

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 0/6] mfd: tmio: simplify header and move to platform_data

Hi Lee, Ulf,

> Please add my ack for the mmc related changes.

I prepared v2 of the series: rebased to rc4, acks added, capitalized
first letter... waiting for buildbot now before resending.

Thanks,

Wolfram


Attachments:
(No filename) (225.00 B)
signature.asc (849.00 B)
Download all attachments
Subject: Re: [PATCH 6/6] mfd: tmio: move header to platform_data

On Fri, 2024-02-09 at 02:58 +0100, Wolfram Sang wrote:
> 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 <[email protected]>
> ---
> MAINTAINERS | 2 +-
> arch/sh/boards/board-sh7757lcr.c | 2 +-
> arch/sh/boards/mach-ap325rxa/setup.c | 2 +-
> arch/sh/boards/mach-ecovec24/setup.c | 2 +-
> arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
> arch/sh/boards/mach-migor/setup.c | 2 +-
> arch/sh/boards/mach-se/7724/setup.c | 2 +-
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +-
> drivers/mmc/host/tmio_mmc_core.c | 2 +-
> drivers/mmc/host/uniphier-sd.c | 2 +-
> include/linux/{mfd => platform_data}/tmio.h | 0
> 13 files changed, 12 insertions(+), 12 deletions(-)
> rename include/linux/{mfd => platform_data}/tmio.h (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 960512bec428..c4e20abd177b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -22154,7 +22154,7 @@ L: [email protected]
> 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
>
> TMP401 HARDWARE MONITOR DRIVER
> M: Guenter Roeck <[email protected]>
> diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
> index f39c8196efdf..4014c042d2a5 100644
> --- a/arch/sh/boards/board-sh7757lcr.c
> +++ b/arch/sh/boards/board-sh7757lcr.c
> @@ -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>
> diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
> index 645cccf3da88..bb5004a8ac02 100644
> --- a/arch/sh/boards/mach-ap325rxa/setup.c
> +++ b/arch/sh/boards/mach-ap325rxa/setup.c
> @@ -24,10 +24,10 @@
> #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>
> diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> index 30d117f9ad7e..6f13557eecd6 100644
> --- a/arch/sh/boards/mach-ecovec24/setup.c
> +++ b/arch/sh/boards/mach-ecovec24/setup.c
> @@ -17,13 +17,13 @@
> #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>
> diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
> index 6b775eae85c0..70236859919d 100644
> --- a/arch/sh/boards/mach-kfr2r09/setup.c
> +++ b/arch/sh/boards/mach-kfr2r09/setup.c
> @@ -22,10 +22,10 @@
> #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>
> diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
> index 773ee767d0c4..1853e6319a66 100644
> --- a/arch/sh/boards/mach-migor/setup.c
> +++ b/arch/sh/boards/mach-migor/setup.c
> @@ -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>
> diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
> index 787ddd3c627a..e500feb91053 100644
> --- a/arch/sh/boards/mach-se/7724/setup.c
> +++ b/arch/sh/boards/mach-se/7724/setup.c
> @@ -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>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index c675dec587ef..f84f60139bcf 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -22,13 +22,13 @@
> #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>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 24e1c17908d7..97cd55fec0bf 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -11,12 +11,12 @@
> #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>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index c18581897f8a..68e31c37cce6 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -11,12 +11,12 @@
> #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>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index c39141a5bd23..0c4397b3cffd 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -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>
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 1404989e6151..bd231dbe90ba 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -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/platform_data/tmio.h
> similarity index 100%
> rename from include/linux/mfd/tmio.h
> rename to include/linux/platform_data/tmio.h

Acked-by: John Paul Adrian Glaubitz <[email protected]>

--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913