Skip to contentSkip to conversation

Enable various Renesas drivers on all ARM platforms

PATCH In review Laurent Pinchart 12 participants 42 messages Oct 29, 2013 – Feb 20, 2014 1 message not in the archive

Subsystems (20)
lore
Share & tools
lore
#0 lore raw

v2 cover Enable various Renesas drivers on all ARM platforms

Hello,

This patch series, based on v3.12-rc7, prepares various Renesas drivers for migration to multiplatform kernels by enabling their compilation or otherwise fixing them on all ARM platforms. The patches are pretty straightforward and are described in their commit message.

Changes since v1:

- The drivers can also be selected when COMPILE_TEST is enabled, regardless of the architecture. This should provide a good compromise between wide build test coverage and not clobbering configuration with drivers useless on non-SuperH, non-ARM platforms.

- DMA configuration is now unconditional in patch 08/19

I'd like to get all these patches merged in v3.14. As they will need to go through their respective subsystems' trees, I would appreciate if all maintainers involved could notify me when they merge patches from this series in their tree to help me tracking the merge status. I don't plan to send pull requests individually for these patches, and I will repost patches individually if changes are requested during review.

If you believe the issue should be solved in a different way please reply to the cover letter to let other maintainers chime in.

Cc Chris Ball <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
Cc iommu at lists.linux-foundation.org
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Mark Brown <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Sergei Shtylyov <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Vinod Koul <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Zhang Rui <[email protected]>
Cc dmaengine at vger.kernel.org
Cc linux-fbdev at vger.kernel.org
Cc linux-i2c at vger.kernel.org
Cc linux-input at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc linux-media at vger.kernel.org
Cc linux-mmc at vger.kernel.org
Cc linux-mtd at lists.infradead.org
Cc linux-pm at vger.kernel.org
Cc linux-pwm at vger.kernel.org
Cc linux-serial at vger.kernel.org
Cc linux-spi at vger.kernel.org
Cc netdev at vger.kernel.org

Laurent Pinchart (19):
serial: sh-sci: Enable the driver on all ARM platforms
DMA: shdma: Enable the driver on all ARM platforms
i2c: sh_mobile: Enable the driver on all ARM platforms
input: sh_keysc: Enable the driver on all ARM platforms
iommu: shmobile: Enable the driver on all ARM platforms
i2c: rcar: Enable the driver on all ARM platforms
v4l: sh_vou: Enable the driver on all ARM platforms
mmc: sdhi: Enable the driver on all ARM platforms
mmc: sh_mmcif: Enable the driver on all ARM platforms
mtd: sh_flctl: Enable the driver on all ARM platforms
net: sh_eth: Set receive alignment correctly on all ARM platforms
irda: sh_irda: Enable the driver on all ARM platforms
pinctrl: sh-pfc: Enable the driver on all ARM platforms
pwm: pwm-renesas-tpu: Enable the driver on all ARM platforms
sh: intc: Enable the driver on all ARM platforms
spi: sh_msiof: Enable the driver on all ARM platforms
spi: sh_hspi: Enable the driver on all ARM platforms
thermal: rcar-thermal: Enable the driver on all ARM platforms
fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

 drivers/dma/sh/Kconfig                | 2 +-
 drivers/dma/sh/shdmac.c               | 6 +++---
 drivers/i2c/busses/Kconfig            | 4 ++--
 drivers/input/keyboard/Kconfig        | 2 +-
 drivers/iommu/Kconfig                 | 2 +-
 drivers/media/platform/Kconfig        | 2 +-
 drivers/mmc/host/Kconfig              | 4 ++--
 drivers/mmc/host/tmio_mmc_dma.c       | 4 +---
 drivers/mtd/nand/Kconfig              | 2 +-
 drivers/net/ethernet/renesas/sh_eth.c | 2 +-
 drivers/net/ethernet/renesas/sh_eth.h | 2 +-
 drivers/net/irda/Kconfig              | 2 +-
 drivers/pinctrl/Makefile              | 2 +-
 drivers/pinctrl/sh-pfc/Kconfig        | 2 +-
 drivers/pwm/Kconfig                   | 2 +-
 drivers/sh/intc/Kconfig               | 2 +-
 drivers/spi/Kconfig                   | 4 ++--
 drivers/thermal/Kconfig               | 2 +-
 drivers/tty/serial/Kconfig            | 2 +-
 drivers/video/Kconfig                 | 6 +++---
 20 files changed, 27 insertions(+), 29 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

PATCH v2 1/19 serial: sh-sci: Enable the driver on all ARM platforms

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index febd45c..9a5a8ef 100644
@@ -709,7 +709,7 @@ config SERIAL_IP22_ZILOG_CONSOLE
 
 config SERIAL_SH_SCI
 	tristate "SuperH SCI(F) serial port support"
-	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE)
+	depends on HAVE_CLK && (SUPERH || ARM || COMPILE_TEST)
 	select SERIAL_CORE
 
 config SERIAL_SH_SCI_NR_UARTS
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH v2 1/19 serial: sh-sci: Enable the driver on all ARM platforms

Quoted 18 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Greg Kroah-Hartman <[email protected]>
Cc linux-serial at vger.kernel.org
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +0 -0
index febd45c..9a5a8ef 100644

drivers/tty/serial/Kconfig config SERIAL_IP22_ZILOG_CONSOLE · line 713

Quoted 6 lines
drivers/tty/serial/Kconfig +1 -1
@@ -709,7 +709,7 @@ config SERIAL_IP22_ZILOG_CONSOLE
 
 config SERIAL_SH_SCI
 	tristate "SuperH SCI(F) serial port support"
-	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE)
+	depends on HAVE_CLK && (SUPERH || ARM || COMPILE_TEST)
 	select SERIAL_CORE

This patch is in mainline as d4f9e7b3d12e92ede642f6f4fc7d959f06da8ccc since v3.13-rc1. I wonder if

	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE || COMPILE_TEST)

isn't the better option. (Since bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ARCH_SHMOBILE is enabled for both multi-platform and legacy shmobile configs.) Or do you plan to deprecate ARCH_SHMOBILE?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw

PATCH v2 1/19 serial: sh-sci: Enable the driver on all ARM platforms

Hi Uwe,

Quoted 34 lines · On Wednesday 19 February 2014 21:54:46 Uwe Kleine-K?nig wrote:
Quoted 28 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-serial at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>
---

 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index febd45c..9a5a8ef 100644
@@ -709,7 +709,7 @@ config SERIAL_IP22_ZILOG_CONSOLE
 
 config SERIAL_SH_SCI
 
 	tristate "SuperH SCI(F) serial port support"
 
-	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE)
+	depends on HAVE_CLK && (SUPERH || ARM || COMPILE_TEST)
 
Quoted 1 line

select SERIAL_CORE

This patch is in mainline as d4f9e7b3d12e92ede642f6f4fc7d959f06da8ccc since v3.13-rc1. I wonder if

Quoted 5 lines
	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE || COMPILE_TEST)

isn't the better option. (Since bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ARCH_SHMOBILE is enabled for both multi-platform and legacy shmobile configs.) Or do you plan to deprecate ARCH_SHMOBILE?

We don't plan to deprecate ARCH_SHMOBILE. I've posted a patch to fix this, please see http://www.spinics.net/lists/linux-sh/msg28296.html ("[PATCH 1/2]
serial: sh-sci: Restrict non-COMPILE_TEST compilation").

Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

PATCH v2 1/19 serial: sh-sci: Enable the driver on all ARM platforms

Quoted 39 lines · Laurent Pinchart

Hi Uwe,

Quoted 36 lines · On Wednesday 19 February 2014 21:54:46 Uwe Kleine-K?nig wrote:
Quoted 28 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-serial at vger.kernel.org
Signed-off-by: Laurent Pinchart <[email protected]>
---

 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index febd45c..9a5a8ef 100644
@@ -709,7 +709,7 @@ config SERIAL_IP22_ZILOG_CONSOLE
 
 config SERIAL_SH_SCI
 
 	tristate "SuperH SCI(F) serial port support"
 
-	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE)
+	depends on HAVE_CLK && (SUPERH || ARM || COMPILE_TEST)
 
Quoted 1 line

select SERIAL_CORE

This patch is in mainline as d4f9e7b3d12e92ede642f6f4fc7d959f06da8ccc since v3.13-rc1. I wonder if

	depends on HAVE_CLK && (SUPERH || ARCH_SHMOBILE || COMPILE_TEST)
Quoted 7 lines
Quoted 3 lines

isn't the better option. (Since bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ARCH_SHMOBILE is enabled for both multi-platform and legacy shmobile configs.) Or do you plan to deprecate ARCH_SHMOBILE?

We don't plan to deprecate ARCH_SHMOBILE. I've posted a patch to fix this, please see http://www.spinics.net/lists/linux-sh/msg28296.html ("[PATCH 1/2]
serial: sh-sci: Restrict non-COMPILE_TEST compilation").

Ah, this is equivalent. So you can consider my suggestion as an Ack.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#5 lore raw

PATCH v2 2/19 DMA: shdma: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Guennadi Liakhovetski <[email protected]>
Cc Vinod Koul <[email protected]>
Cc dmaengine at vger.kernel.org
---
 drivers/dma/sh/Kconfig  | 2 +-
 drivers/dma/sh/shdmac.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/dma/sh/Kconfig +1 -1
index dadd9e01..ee0906d 100644
@@ -4,7 +4,7 @@
 
 config SH_DMAE_BASE
 	bool "Renesas SuperH DMA Engine support"
-	depends on (SUPERH && SH_DMA) || (ARM && ARCH_SHMOBILE)
+	depends on (SUPERH && SH_DMA) || ARM || COMPILE_TEST
 	depends on !SH_DMA_API
 	default y
 	select DMA_ENGINE
drivers/dma/sh/shdmac.c +3 -3
index 1069e88..3625078 100644
@@ -787,7 +787,7 @@ static int sh_dmae_probe(struct platform_device *pdev)
 	if (err)
 		goto rst_err;
 
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
 	chanirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
 
 	if (!chanirq_res)
@@ -812,7 +812,7 @@ static int sh_dmae_probe(struct platform_device *pdev)
 
 #else
 	chanirq_res = errirq_res;
-#endif /* CONFIG_CPU_SH4 || CONFIG_ARCH_SHMOBILE */
+#endif /* CONFIG_CPU_SH4 || CONFIG_ARM */
 
 	if (chanirq_res->start == chanirq_res->end &&
 	    !platform_get_resource(pdev, IORESOURCE_IRQ, 1)) {
@@ -879,7 +879,7 @@ edmadevreg:
 chan_probe_err:
 	sh_dmae_chan_remove(shdev);
 
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
 eirq_err:
 #endif
 rst_err:
Signature · 1 line
1.8.1.5
#6 lore raw

PATCH v2 3/19 i2c: sh_mobile: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org
---
 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
index cdcbd83..c50f092 100644
@@ -665,7 +665,7 @@ config I2C_SH7760
 
 config I2C_SH_MOBILE
 	tristate "SuperH Mobile I2C Controller"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM || COMPILE_TEST
 	help
 	  If you say yes to this option, support will be included for the
 	  built-in I2C interface on the Renesas SH-Mobile processor.
Signature · 1 line
1.8.1.5
#7 lore raw

PATCH v2 3/19 i2c: sh_mobile: Enable the driver on all ARM platforms

Quoted 10 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org

Both i2c patches squashed and applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131031/511ade1e/attachment.sig>

#8 lore raw

PATCH v2 4/19 input: sh_keysc: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

---
 drivers/input/keyboard/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/Kconfig +1 -1
index c1edd39..28d75c7 100644
@@ -525,7 +525,7 @@ config KEYBOARD_SUNKBD
 
 config KEYBOARD_SH_KEYSC
 	tristate "SuperH KEYSC keypad support"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM || COMPILE_TEST
 	help
 	  Say Y here if you want to use a keypad attached to the KEYSC block
 	  on SuperH processors such as sh7722 and sh7343.
Signature · 1 line
1.8.1.5
maintainer Applied
#9 lore raw

PATCH v2 4/19 input: sh_keysc: Enable the driver on all ARM platforms

Quoted 9 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Dmitry Torokhov <[email protected]>
Cc linux-input at vger.kernel.org

Applied, thank you.

Quoted 20 lines
---
 drivers/input/keyboard/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/Kconfig +1 -1
index c1edd39..28d75c7 100644
@@ -525,7 +525,7 @@ config KEYBOARD_SUNKBD
 
 config KEYBOARD_SH_KEYSC
 	tristate "SuperH KEYSC keypad support"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM || COMPILE_TEST
 	help
 	  Say Y here if you want to use a keypad attached to the KEYSC block
 	  on SuperH processors such as sh7722 and sh7343.
Signature · 1 line
1.8.1.5
Signature · 1 line
Dmitry
#10 lore raw

PATCH v2 5/19 iommu: shmobile: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Joerg Roedel <[email protected]>
Cc iommu at lists.linux-foundation.org
---
 drivers/iommu/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/Kconfig +1 -1
index c880eba..9fd51e5 100644
@@ -206,7 +206,7 @@ config SHMOBILE_IPMMU_TLB
 config SHMOBILE_IOMMU
 	bool "IOMMU for Renesas IPMMU/IPMMUI"
 	default n
-	depends on (ARM && ARCH_SHMOBILE)
+	depends on ARM || COMPILE_TEST
 	select IOMMU_API
 	select ARM_DMA_USE_IOMMU
 	select SHMOBILE_IPMMU
Signature · 1 line
1.8.1.5
maintainer Applied
#11 lore raw

PATCH v2 5/19 iommu: shmobile: Enable the driver on all ARM platforms

Quoted 9 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Joerg Roedel <[email protected]>
Cc iommu at lists.linux-foundation.org

Applied, thanks.

#12 lore raw

PATCH v2 6/19 i2c: rcar: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Remove the explicit I2C dependency as the configuration option is already unavailable when I2C support is disabled.

Cc Wolfram Sang <[email protected]>
Cc linux-i2c at vger.kernel.org
---
 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
index c50f092..7c4bb071 100644
@@ -768,7 +768,7 @@ config I2C_XLR
 
 config I2C_RCAR
 	tristate "Renesas R-Car I2C Controller"
-	depends on ARCH_SHMOBILE && I2C
+	depends on ARM || COMPILE_TEST
 	help
 	  If you say yes to this option, support will be included for the
 	  R-Car I2C controller.
Signature · 1 line
1.8.1.5
#13 lore raw

PATCH v2 7/19 v4l: sh_vou: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Guennadi Liakhovetski <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
---
 drivers/media/platform/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/Kconfig +1 -1
index c7caf94..399ef1c 100644
@@ -36,7 +36,7 @@ source "drivers/media/platform/blackfin/Kconfig"
 config VIDEO_SH_VOU
 	tristate "SuperH VOU video output driver"
 	depends on MEDIA_CAMERA_SUPPORT
-	depends on VIDEO_DEV && ARCH_SHMOBILE && I2C
+	depends on VIDEO_DEV && (ARM || COMPILE_TEST) && I2C
 	select VIDEOBUF_DMA_CONTIG
 	help
 	  Support for the Video Output Unit (VOU) on SuperH SoCs.
Signature · 1 line
1.8.1.5
#14 lore raw

PATCH v2 8/19 mmc: sdhi: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Whether the CTL_DMA_ENABLE register is part of the standard TMIO controller or is Renesas-specific is unknown and impossible to test as we have no current or planned TMIO DMA users other than SUPERH and ARCH_SHMOBILE. Writing to the register is thus conditionally compiled for SUPERH and ARCH_SHMOBILE only. Adding ARCH_SHMOBILE_MULTI to the list would extend this to multiarch kernels, but would break the driver for non-shmobile platforms if the register is Renesas-specific. We can thus get rid of the conditional compilation completely without introducing any further issue, and let future non-Renesas users deal with the situation if it turns out to be a the problem.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
---
 drivers/mmc/host/Kconfig        | 2 +-
 drivers/mmc/host/tmio_mmc_dma.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..d57effb 100644
@@ -479,7 +479,7 @@ config MMC_TMIO
 
 config MMC_SDHI
 	tristate "SH-Mobile SDHI SD/SDIO controller support"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM || COMPILE_TEST
 	select MMC_TMIO_CORE
 	help
 	  This provides support for the SDHI SD/SDIO controller found in
drivers/mmc/host/tmio_mmc_dma.c +1 -3
index 65edb4a..8a4fd2d 100644
@@ -28,10 +28,8 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
 	if (!host->chan_tx || !host->chan_rx)
 		return;
 
-#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
-	/* Switch DMA mode on or off - SuperH specific? */
+	/* Switch DMA mode on or off. This might be Renesas-specific. */
 	sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
-#endif
 }
 
 void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
Signature · 1 line
1.8.1.5
#15 lore raw

PATCH 1/1 mmc: sdhi: Enable the driver on all ARM platforms

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI and increase build testing coverage.

Don't enable COMPILE_TEST support as the driver doesn't compile on x86 due (possibly among others) to missing readsw/writesw I/O accessors.

Whether the CTL_DMA_ENABLE register is part of the standard TMIO controller or is Renesas-specific is unknown and impossible to test as we have no current or planned TMIO DMA users other than SUPERH and ARCH_SHMOBILE. Writing to the register is thus conditionally compiled for SUPERH and ARCH_SHMOBILE only. Adding ARCH_SHMOBILE_MULTI to the list would extend this to multiarch kernels, but would break the driver for non-shmobile platforms if the register is Renesas-specific. We can thus get rid of the conditional compilation completely without introducing any further issue, and let future non-Renesas users deal with the situation if it turns out to be a the problem.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig        | 2 +-
 drivers/mmc/host/tmio_mmc_dma.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..51957d4 100644
@@ -479,7 +479,7 @@ config MMC_TMIO
 
 config MMC_SDHI
 	tristate "SH-Mobile SDHI SD/SDIO controller support"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM
 	select MMC_TMIO_CORE
 	help
 	  This provides support for the SDHI SD/SDIO controller found in
drivers/mmc/host/tmio_mmc_dma.c +1 -3
index 65edb4a..8a4fd2d 100644
@@ -28,10 +28,8 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
 	if (!host->chan_tx || !host->chan_rx)
 		return;
 
-#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
-	/* Switch DMA mode on or off - SuperH specific? */
+	/* Switch DMA mode on or off. This might be Renesas-specific. */
 	sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
-#endif
 }
 
 void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
Signature · 1 line
1.8.1.5
#16 lore raw

PATCH 1/1 mmc: sdhi: Enable the driver on all ARM platforms

The subject line should have read 'PATCH v3', my bad.

Quoted 58 lines · On Wednesday 30 October 2013 12:23:10 Laurent Pinchart wrote:

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI and increase build testing coverage.

Don't enable COMPILE_TEST support as the driver doesn't compile on x86 due (possibly among others) to missing readsw/writesw I/O accessors.

Whether the CTL_DMA_ENABLE register is part of the standard TMIO controller or is Renesas-specific is unknown and impossible to test as we have no current or planned TMIO DMA users other than SUPERH and ARCH_SHMOBILE. Writing to the register is thus conditionally compiled for SUPERH and ARCH_SHMOBILE only. Adding ARCH_SHMOBILE_MULTI to the list would extend this to multiarch kernels, but would break the driver for non-shmobile platforms if the register is Renesas-specific. We can thus get rid of the conditional compilation completely without introducing any further issue, and let future non-Renesas users deal with the situation if it turns out to be a the problem.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig        | 2 +-
 drivers/mmc/host/tmio_mmc_dma.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..51957d4 100644
@@ -479,7 +479,7 @@ config MMC_TMIO
 
 config MMC_SDHI
 	tristate "SH-Mobile SDHI SD/SDIO controller support"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM
 	select MMC_TMIO_CORE
 	help
 	  This provides support for the SDHI SD/SDIO controller found in
(quoted diff) +0 -0

b/drivers/mmc/host/tmio_mmc_dma.c index 65edb4a..8a4fd2d 100644

drivers/mmc/host/tmio_mmc_dma.c +1 -3
@@ -28,10 +28,8 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool
 enable) if (!host->chan_tx || !host->chan_rx)
 		return;
 
-#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
-	/* Switch DMA mode on or off - SuperH specific? */
+	/* Switch DMA mode on or off. This might be Renesas-specific. */
 	sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
-#endif
 }
 
 void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
Signature · 3 lines
Regards,

Laurent Pinchart
#17 lore raw

PATCH 1/1 mmc: sdhi: Enable the driver on all ARM platforms

In reply to Laurent Pinchart
Quoted 47 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI and increase build testing coverage.

Don't enable COMPILE_TEST support as the driver doesn't compile on x86 due (possibly among others) to missing readsw/writesw I/O accessors.

Whether the CTL_DMA_ENABLE register is part of the standard TMIO controller or is Renesas-specific is unknown and impossible to test as we have no current or planned TMIO DMA users other than SUPERH and ARCH_SHMOBILE. Writing to the register is thus conditionally compiled for SUPERH and ARCH_SHMOBILE only. Adding ARCH_SHMOBILE_MULTI to the list would extend this to multiarch kernels, but would break the driver for non-shmobile platforms if the register is Renesas-specific. We can thus get rid of the conditional compilation completely without introducing any further issue, and let future non-Renesas users deal with the situation if it turns out to be a the problem.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig        | 2 +-
 drivers/mmc/host/tmio_mmc_dma.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..51957d4 100644
@@ -479,7 +479,7 @@ config MMC_TMIO
 
 config MMC_SDHI
        tristate "SH-Mobile SDHI SD/SDIO controller support"
-       depends on SUPERH || ARCH_SHMOBILE
+       depends on SUPERH || ARM
        select MMC_TMIO_CORE
        help
          This provides support for the SDHI SD/SDIO controller found in
drivers/mmc/host/tmio_mmc_dma.c +0 -0
index 65edb4a..8a4fd2d 100644

drivers/mmc/host/tmio_mmc_dma.c void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) · line 34

Quoted 8 lines
drivers/mmc/host/tmio_mmc_dma.c +1 -3
@@ -28,10 +28,8 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
        if (!host->chan_tx || !host->chan_rx)
                return;
 
-#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
-       /* Switch DMA mode on or off - SuperH specific? */
+       /* Switch DMA mode on or off. This might be Renesas-specific. */
        sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
-#endif

Hi Laurent,

Thanks for your efforts. Hate to slow things down, but this last hunk looks wrong to me. I believe the reason for the #ifdef is that non-Renesas IP may be using the tmio_mmc driver, at least they used to. Not sure if anyone is using DMA Engine though. If I were you I would play it safe and simply update the #ifdef with same kind of dependencies that the Kconfig bits have.

Also, it would of course be nice to clean up the driver, perhaps with a feature flag for this special register or why not simply move the code to the sdhi file. But that's not really related to your multiplatform kconfig change, is it? =)

/ magnus

#18 lore raw

PATCH 1/1 mmc: sdhi: Enable the driver on all ARM platforms

Hi Magnus,

Quoted 62 lines · On Thursday 31 October 2013 17:26:30 Magnus Damm wrote:
Quoted 53 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI and increase build testing coverage.

Don't enable COMPILE_TEST support as the driver doesn't compile on x86 due (possibly among others) to missing readsw/writesw I/O accessors.

Whether the CTL_DMA_ENABLE register is part of the standard TMIO controller or is Renesas-specific is unknown and impossible to test as we have no current or planned TMIO DMA users other than SUPERH and ARCH_SHMOBILE. Writing to the register is thus conditionally compiled for SUPERH and ARCH_SHMOBILE only. Adding ARCH_SHMOBILE_MULTI to the list would extend this to multiarch kernels, but would break the driver for non-shmobile platforms if the register is Renesas-specific. We can thus get rid of the conditional compilation completely without introducing any further issue, and let future non-Renesas users deal with the situation if it turns out to be a the problem.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Ian Molton <[email protected]>
Cc: [email protected]
Signed-off-by: Laurent Pinchart
<[email protected]>
---

 drivers/mmc/host/Kconfig        | 2 +-
 drivers/mmc/host/tmio_mmc_dma.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index 7fc5099..51957d4 100644
@@ -479,7 +479,7 @@ config MMC_TMIO
 
 config MMC_SDHI
        tristate "SH-Mobile SDHI SD/SDIO controller support"
-       depends on SUPERH || ARCH_SHMOBILE
+       depends on SUPERH || ARM
        select MMC_TMIO_CORE
        help
          This provides support for the SDHI SD/SDIO controller found in
(quoted diff) +0 -0

b/drivers/mmc/host/tmio_mmc_dma.c index 65edb4a..8a4fd2d 100644

drivers/mmc/host/tmio_mmc_dma.c +0 -0
@@ -28,10 +28,8 @@ void tmio_mmc_enable_dma(struct tmio_mmc_host *host,

bool enable)>

        if (!host->chan_tx || !host->chan_rx)
                return;

drivers/mmc/host/tmio_mmc_dma.c void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) · line 34

Quoted 5 lines
drivers/mmc/host/tmio_mmc_dma.c +1 -3
-#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
-       /* Switch DMA mode on or off - SuperH specific? */
+       /* Switch DMA mode on or off. This might be Renesas-specific. */
        sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0);
-#endif

Hi Laurent,

Quoted 5 lines

Thanks for your efforts. Hate to slow things down, but this last hunk looks wrong to me. I believe the reason for the #ifdef is that non-Renesas IP may be using the tmio_mmc driver, at least they used to. Not sure if anyone is using DMA Engine though. If I were you I would play it safe and simply update the #ifdef with same kind of dependencies that the Kconfig bits have.

There are several points to consider here.

- drivers/mmc/host/tmio_mmc_dma.c is only compiled in when CONFIG_MMC_SDHI is selected. The symbol currently depends on SUPERH || ARCH_SHMOBILE. We thus have no non-Renesas users for TMIO DMA at the moment.

- I don't know whether the CTL_DMA_ENABLE register is specific to Renesas or not. I haven't been able to find a publicly available copy of the TMIO documentation. The Renesas datasheets I have access to don't document the SDHI module. Can you comment on that ?

- Merely adding CONFIG_ARCH_SHMOBILE_MULTI to the CTL_DMA_ENABLE write #if guard will break on multiplatform kernels anyway. If a non-Renesas platform uses TMIO DMA, a kernel that supports both a Renesas SoC and that non-Renesas platform will have the CTL_DMA_ENABLE code compiled in.

For those reasons I have decided to remove the #if and defer the fix (if needed, if CTL_DMA_ENGINE is indeed Renesas-specific) to the first non-Renesas TMIO DMA user.

Quoted 4 lines

Also, it would of course be nice to clean up the driver, perhaps with a feature flag for this special register or why not simply move the code to the sdhi file. But that's not really related to your multiplatform kconfig change, is it? =)

No, it isn't :-) I could try to find time to fix that later, but I don't like adding support for features that are not used. I would first want to be sure that the CTL_DMA_ENABLE register is indeed Renesas-specific, which might be a bit hard to ascertain of no non-Renesas chip implements TMIO DMA :-)

Signature · 3 lines
Regards,

Laurent Pinchart
#19 lore raw

PATCH v2 9/19 mmc: sh_mmcif: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Chris Ball <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index d57effb..dcceeae 100644
@@ -588,7 +588,7 @@ config MMC_DW_PCI
 
 config MMC_SH_MMCIF
 	tristate "SuperH Internal MMCIF support"
-	depends on MMC_BLOCK && (SUPERH || ARCH_SHMOBILE)
+	depends on MMC_BLOCK && (SUPERH || ARM || COMPILE_TEST)
 	help
 	  This selects the MMC Host Interface controller (MMCIF).
 
Signature · 1 line
1.8.1.5
#20 lore raw

PATCH v3 1/3 mmc: sh_mmcif: Factorize DMA channel request and configuration code

From: Laurent Pinchart <[email protected]>

The channel request and configuration code is duplicated for the rx and tx channels. Create a function that requests a single channel and call it twice instead.

---
 drivers/mmc/host/sh_mmcif.c | 100 ++++++++++++++++++++++----------------------
 1 file changed, 51 insertions(+), 49 deletions(-)
drivers/mmc/host/sh_mmcif.c +51 -49
index 36629a0..92b9273 100644
@@ -381,73 +381,75 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host)
 		desc, cookie);
 }
 
-static void sh_mmcif_request_dma(struct sh_mmcif_host *host,
-				 struct sh_mmcif_plat_data *pdata)
+static struct dma_chan *
+sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
+			 struct sh_mmcif_plat_data *pdata,
+			 enum dma_transfer_direction direction)
 {
-	struct resource *res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
 	struct dma_slave_config cfg;
+	struct dma_chan *chan;
+	unsigned int slave_id;
+	struct resource *res;
 	dma_cap_mask_t mask;
 	int ret;
 
-	host->dma_active = false;
-
-	if (pdata) {
-		if (pdata->slave_id_tx <= 0 || pdata->slave_id_rx <= 0)
-			return;
-	} else if (!host->pd->dev.of_node) {
-		return;
-	}
-
-	/* We can only either use DMA for both Tx and Rx or not use it at all */
 	dma_cap_zero(mask);
 	dma_cap_set(DMA_SLAVE, mask);
 
-	host->chan_tx = dma_request_slave_channel_compat(mask, shdma_chan_filter,
-				pdata ? (void *)pdata->slave_id_tx : NULL,
-				&host->pd->dev, "tx");
-	dev_dbg(&host->pd->dev, "%s: TX: got channel %p\n", __func__,
-		host->chan_tx);
+	if (pdata)
+		slave_id = direction == DMA_MEM_TO_DEV
+			 ? pdata->slave_id_tx : pdata->slave_id_rx;
+	else
+		slave_id = 0;
 
-	if (!host->chan_tx)
-		return;
+	chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
+				(void *)slave_id, &host->pd->dev,
+				direction == DMA_MEM_TO_DEV ? "tx" : "rx");
+
+	dev_dbg(&host->pd->dev, "%s: %s: got channel %p\n", __func__,
+		direction == DMA_MEM_TO_DEV ? "TX" : "RX", chan);
+
+	if (!chan)
+		return NULL;
+
+	res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
 
 	/* In the OF case the driver will get the slave ID from the DT */
-	if (pdata)
-		cfg.slave_id = pdata->slave_id_tx;
-	cfg.direction = DMA_MEM_TO_DEV;
+	cfg.slave_id = slave_id;
+	cfg.direction = direction;
 	cfg.dst_addr = res->start + MMCIF_CE_DATA;
 	cfg.src_addr = 0;
-	ret = dmaengine_slave_config(host->chan_tx, &cfg);
-	if (ret < 0)
-		goto ecfgtx;
+	ret = dmaengine_slave_config(chan, &cfg);
+	if (ret < 0) {
+		dma_release_channel(chan);
+		return NULL;
+	}
 
-	host->chan_rx = dma_request_slave_channel_compat(mask, shdma_chan_filter,
-				pdata ? (void *)pdata->slave_id_rx : NULL,
-				&host->pd->dev, "rx");
-	dev_dbg(&host->pd->dev, "%s: RX: got channel %p\n", __func__,
-		host->chan_rx);
+	return chan;
+}
 
-	if (!host->chan_rx)
-		goto erqrx;
+static void sh_mmcif_request_dma(struct sh_mmcif_host *host,
+				 struct sh_mmcif_plat_data *pdata)
+{
+	host->dma_active = false;
 
-	if (pdata)
-		cfg.slave_id = pdata->slave_id_rx;
-	cfg.direction = DMA_DEV_TO_MEM;
-	cfg.dst_addr = 0;
-	cfg.src_addr = res->start + MMCIF_CE_DATA;
-	ret = dmaengine_slave_config(host->chan_rx, &cfg);
-	if (ret < 0)
-		goto ecfgrx;
+	if (pdata) {
+		if (pdata->slave_id_tx <= 0 || pdata->slave_id_rx <= 0)
+			return;
+	} else if (!host->pd->dev.of_node) {
+		return;
+	}
 
-	return;
+	/* We can only either use DMA for both Tx and Rx or not use it at all */
+	host->chan_tx = sh_mmcif_request_dma_one(host, pdata, DMA_MEM_TO_DEV);
+	if (!host->chan_tx)
+		return;
 
-ecfgrx:
-	dma_release_channel(host->chan_rx);
-	host->chan_rx = NULL;
-erqrx:
-ecfgtx:
-	dma_release_channel(host->chan_tx);
-	host->chan_tx = NULL;
+	host->chan_rx = sh_mmcif_request_dma_one(host, pdata, DMA_DEV_TO_MEM);
+	if (!host->chan_rx) {
+		dma_release_channel(host->chan_tx);
+		host->chan_tx = NULL;
+	}
 }
 
 static void sh_mmcif_release_dma(struct sh_mmcif_host *host)
Signature · 1 line
1.8.1.5
#21 lore raw

PATCH v3 2/3 mmc: sh_mmcif: Fix compilation warning on 64-bit platforms

From: Laurent Pinchart <[email protected]>

Casting an integer to a void * generates a "cast to pointer from integer of different size" warning. Cast the integer to an unsigned long first to fix it.

---
 drivers/mmc/host/sh_mmcif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I've kept this change separate from 1/3 to show why 1/3 and 2/3 are required to fix a compilation warning before applying 3/3. Feel free to squash 1/3 and 2/3 if preferred.

drivers/mmc/host/sh_mmcif.c +1 -1
index 92b9273..1f1438f 100644
@@ -403,7 +403,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
 		slave_id = 0;
 
 	chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
-				(void *)slave_id, &host->pd->dev,
+				(void *)(unsigned long)slave_id, &host->pd->dev,
 				direction == DMA_MEM_TO_DEV ? "tx" : "rx");
 
 	dev_dbg(&host->pd->dev, "%s: %s: got channel %p\n", __func__,
Signature · 1 line
1.8.1.5
#22 lore raw

PATCH v3 3/3 mmc: sh_mmcif: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index 51957d4..4ba225f 100644
@@ -588,7 +588,7 @@ config MMC_DW_PCI
 
 config MMC_SH_MMCIF
 	tristate "SuperH Internal MMCIF support"
-	depends on MMC_BLOCK && (SUPERH || ARCH_SHMOBILE)
+	depends on MMC_BLOCK && (SUPERH || ARM || COMPILE_TEST)
 	help
 	  This selects the MMC Host Interface controller (MMCIF).
 
Signature · 1 line
1.8.1.5
#23 lore raw

PATCH v2 10/19 mtd: sh_flctl: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc David Woodhouse <[email protected]>
Cc linux-mtd at lists.infradead.org
---
 drivers/mtd/nand/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/Kconfig +1 -1
index d885298..bc6bf36 100644
@@ -486,7 +486,7 @@ config MTD_NAND_MXC
 
 config MTD_NAND_SH_FLCTL
 	tristate "Support for NAND on Renesas SuperH FLCTL"
-	depends on SUPERH || ARCH_SHMOBILE
+	depends on SUPERH || ARM || COMPILE_TEST
 	help
 	  Several Renesas SuperH CPU has FLCTL. This option enables support
 	  for NAND Flash using FLCTL.
Signature · 1 line
1.8.1.5
Applied
#24 lore raw

PATCH v2 10/19 mtd: sh_flctl: Enable the driver on all ARM platforms

Quoted 9 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc David Woodhouse <[email protected]>
Cc linux-mtd at lists.infradead.org

Applied to l2-mtd.git, branch 'next' (for 3.14). Thanks.

Brian

#25 lore raw

PATCH v2 10/19 mtd: sh_flctl: Enable the driver on all ARM platforms

Hi Brian,

Quoted 7 lines · On Tuesday 12 November 2013 15:10:20 Brian Norris wrote:
Quoted 6 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Quoted 6 lines
Quoted 4 lines

Cc: David Woodhouse <[email protected]>
Cc: linux-mtd at lists.infradead.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Applied to l2-mtd.git, branch 'next' (for 3.14). Thanks.

Thank you, but if it's not too late, can you drop the patch ? :-) We've settled for a different approach that renames Kconfig symbols and doesn't require changes to individual drivers.

Signature · 3 lines
Regards,

Laurent Pinchart
#26 lore raw

PATCH v2 10/19 mtd: sh_flctl: Enable the driver on all ARM platforms

Quoted 13 lines · Laurent Pinchart
Quoted 12 lines · On Tuesday 12 November 2013 15:10:20 Brian Norris wrote:
Quoted 10 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc: David Woodhouse <[email protected]>
Cc: linux-mtd at lists.infradead.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 5 lines
Quoted 1 line

Applied to l2-mtd.git, branch 'next' (for 3.14). Thanks.

Thank you, but if it's not too late, can you drop the patch ? :-) We've settled for a different approach that renames Kconfig symbols and doesn't require changes to individual drivers.

No problem. It's dropped.

I was only paying attention to the cover letter, where that decision apparently didn't show up :)

Brian

#27 lore raw

PATCH v2 10/19 mtd: sh_flctl: Enable the driver on all ARM platforms

Hi Brian,

Quoted 15 lines · On Tuesday 12 November 2013 15:17:19 Brian Norris wrote:
Quoted 14 lines · Laurent Pinchart
Quoted 13 lines · On Tuesday 12 November 2013 15:10:20 Brian Norris wrote:
Quoted 11 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE
and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc: David Woodhouse <[email protected]>
Cc: linux-mtd at lists.infradead.org
Signed-off-by: Laurent Pinchart
<[email protected]>

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Applied to l2-mtd.git, branch 'next' (for 3.14). Thanks.

Thank you, but if it's not too late, can you drop the patch ? :-) We've settled for a different approach that renames Kconfig symbols and doesn't require changes to individual drivers.

No problem. It's dropped.

Thank you.

Quoted 2 lines

I was only paying attention to the cover letter, where that decision apparently didn't show up :)

I'll reply to the cover letter. Sorry about that.

Signature · 3 lines
Regards,

Laurent Pinchart
#28 lore raw

PATCH v2 11/19 net: sh_eth: Set receive alignment correctly on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Configure the receive alignement correctly on all ARM platforms to enable the driver on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI.

Cc "David S. Miller" <[email protected]>
Cc Sergei Shtylyov <[email protected]>
Cc netdev at vger.kernel.org
---
 drivers/net/ethernet/renesas/sh_eth.c | 2 +-
 drivers/net/ethernet/renesas/sh_eth.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/renesas/sh_eth.c +1 -1
index b57c278..990fd5b 100644
@@ -809,7 +809,7 @@ out:
 	return ret;
 }
 
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
 static void sh_eth_set_receive_align(struct sk_buff *skb)
 {
 	int reserve;
drivers/net/ethernet/renesas/sh_eth.h +1 -1
index a0db02c..41509f7 100644
@@ -165,7 +165,7 @@ enum {
 };
 
 /* Driver's parameters */
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARM)
 #define SH4_SKB_RX_ALIGN	32
 #else
 #define SH2_SH3_SKB_RX_ALIGN	2
Signature · 1 line
1.8.1.5
#29 lore raw

PATCH v2 12/19 irda: sh_irda: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Samuel Ortiz <[email protected]>
Cc netdev at vger.kernel.org
---
 drivers/net/irda/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/irda/Kconfig +1 -1
index 2a30193..e04b907 100644
@@ -403,7 +403,7 @@ config MCS_FIR
 
 config SH_IRDA
 	tristate "SuperH IrDA driver"
-	depends on IRDA && ARCH_SHMOBILE
+	depends on IRDA && (ARM || COMPILE_TEST)
 	help
 	  Say Y here if your want to enable SuperH IrDA devices.
 
Signature · 1 line
1.8.1.5
#30 lore raw

PATCH v2 13/19 pinctrl: sh-pfc: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI and increase build testing coverage.

Cc Linus Walleij <[email protected]>
Cc linux-kernel at vger.kernel.org
---
 drivers/pinctrl/Makefile       | 2 +-
 drivers/pinctrl/sh-pfc/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/Makefile +1 -1
index 496d9bf..bef5a9f 100644
@@ -56,7 +56,7 @@ obj-$(CONFIG_PINCTRL_ST) 	+= pinctrl-st.o
 obj-$(CONFIG_PINCTRL_VF610)	+= pinctrl-vf610.o
 
 obj-$(CONFIG_PLAT_ORION)        += mvebu/
-obj-$(CONFIG_ARCH_SHMOBILE)	+= sh-pfc/
+obj-$(CONFIG_ARM)		+= sh-pfc/
 obj-$(CONFIG_SUPERH)		+= sh-pfc/
 obj-$(CONFIG_PLAT_SPEAR)	+= spear/
 obj-$(CONFIG_ARCH_VT8500)	+= vt8500/
drivers/pinctrl/sh-pfc/Kconfig +1 -1
index 636a882..1d6182e 100644
@@ -2,7 +2,7 @@
 # Renesas SH and SH Mobile PINCTRL drivers
 #
 
-if ARCH_SHMOBILE || SUPERH
+if ARM || SUPERH
 
 config PINCTRL_SH_PFC
 	select GPIO_SH_PFC if ARCH_REQUIRE_GPIOLIB
Signature · 1 line
1.8.1.5
#31 lore raw

PATCH v2 14/19 pwm: pwm-renesas-tpu: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Thierry Reding <[email protected]>
Cc linux-pwm at vger.kernel.org
---
 drivers/pwm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pwm/Kconfig +1 -1
index 75840b5..56a4f2f 100644
@@ -130,7 +130,7 @@ config PWM_PXA
 
 config PWM_RENESAS_TPU
 	tristate "Renesas TPU PWM support"
-	depends on ARCH_SHMOBILE
+	depends on ARM || COMPILE_TEST
 	help
 	  This driver exposes the Timer Pulse Unit (TPU) PWM controller found
 	  in Renesas chips through the PWM API.
Signature · 1 line
1.8.1.5
#32 lore raw

PATCH v2 15/19 sh: intc: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

---
 drivers/sh/intc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/sh/intc/Kconfig +1 -1
index a305731..51e106f 100644
@@ -6,7 +6,7 @@ comment "Interrupt controller options"
 
 config INTC_USERIMASK
 	bool "Userspace interrupt masking support"
-	depends on ARCH_SHMOBILE || (SUPERH && CPU_SH4A)
+	depends on ARM || (SUPERH && CPU_SH4A) || COMPILE_TEST
 	help
 	  This enables support for hardware-assisted userspace hardirq
 	  masking.
Signature · 1 line
1.8.1.5
#33 lore raw

PATCH v2 16/19 spi: sh_msiof: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Mark Brown <[email protected]>
Cc linux-spi at vger.kernel.org
---
 drivers/spi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
index b9c53cc..70f5aa3 100644
@@ -406,7 +406,7 @@ config SPI_SC18IS602
 
 config SPI_SH_MSIOF
 	tristate "SuperH MSIOF SPI controller"
-	depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
+	depends on (SUPERH || ARM || COMPILE_TEST) && HAVE_CLK
 	select SPI_BITBANG
 	help
 	  SPI driver for SuperH and SH Mobile MSIOF blocks.
Signature · 1 line
1.8.1.5
#34 lore raw

PATCH v2 17/19 spi: sh_hspi: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI.

Cc Mark Brown <[email protected]>
Cc linux-spi at vger.kernel.org
---
 drivers/spi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/Kconfig +1 -1
index 70f5aa3..43e0a4a 100644
@@ -426,7 +426,7 @@ config SPI_SH_SCI
 
 config SPI_SH_HSPI
 	tristate "SuperH HSPI controller"
-	depends on ARCH_SHMOBILE || COMPILE_TEST
+	depends on ARM || COMPILE_TEST
 	help
 	  SPI driver for SuperH HSPI blocks.
 
Signature · 1 line
1.8.1.5
#35 lore raw

PATCH v2 18/19 thermal: rcar-thermal: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Zhang Rui <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc linux-pm at vger.kernel.org
---
 drivers/thermal/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/Kconfig +1 -1
index dbfc390..bd905ac 100644
@@ -121,7 +121,7 @@ config SPEAR_THERMAL
 
 config RCAR_THERMAL
 	tristate "Renesas R-Car thermal driver"
-	depends on ARCH_SHMOBILE
+	depends on ARM || COMPILE_TEST
 	help
 	  Enable this to plug the R-Car thermal sensor driver into the Linux
 	  thermal framework
Signature · 1 line
1.8.1.5
#36 lore raw

PATCH v2 19/19 fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

In reply to Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
---
 drivers/video/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/Kconfig +3 -3
index 84b685f..32b5c86 100644
@@ -10,7 +10,7 @@ config HAVE_FB_ATMEL
 
 config SH_MIPI_DSI
 	tristate
-	depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
+	depends on (SUPERH || ARM || COMPILE_TEST) && HAVE_CLK
 
 config SH_LCD_MIPI_DSI
 	bool
@@ -1995,7 +1995,7 @@ config FB_W100
 
 config FB_SH_MOBILE_LCDC
 	tristate "SuperH Mobile LCDC framebuffer support"
-	depends on FB && (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
+	depends on FB && (SUPERH || ARM || COMPILE_TEST) && HAVE_CLK
 	select FB_SYS_FILLRECT
 	select FB_SYS_COPYAREA
 	select FB_SYS_IMAGEBLIT
@@ -2482,7 +2482,7 @@ endif
 
 config FB_SH_MOBILE_MERAM
 	tristate "SuperH Mobile MERAM read ahead support"
-	depends on (SUPERH || ARCH_SHMOBILE)
+	depends on (SUPERH || ARM || COMPILE_TEST)
 	select GENERIC_ALLOCATOR
 	---help---
 	  Enable MERAM support for the SuperH controller.
Signature · 1 line
1.8.1.5
#37 lore raw

PATCH v2 19/19 fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

Hi Laurent,

Quoted 11 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

drivers/video/Kconfig +0 -0
index 84b685f..32b5c86 100644

drivers/video/Kconfig endif · line 2488

Quoted 8 lines
drivers/video/Kconfig +1 -1
@@ -2482,7 +2482,7 @@ endif
 
 config FB_SH_MOBILE_MERAM
 	tristate "SuperH Mobile MERAM read ahead support"
-	depends on (SUPERH || ARCH_SHMOBILE)
+	depends on (SUPERH || ARM || COMPILE_TEST)
 	select GENERIC_ALLOCATOR
 	---help---
 	  Enable MERAM support for the SuperH controller.

While the below compiler warnings have been seen with sh-randconfig before, they're more likely to happen with COMPILE_TEST=y. I now see them with e.g. m68k-allmodconfig, so I created a patch.

Quoted 1 line

From 15eb69172457c675cde177a6f742b6f1dabdeb18 Mon Sep 17 00:00:00 2001

From: Geert Uytterhoeven <[email protected]>
Date: Thu, 31 Oct 2013 20:35:14 +0100
Subject: [PATCH] fbdev: sh_mobile_meram: Fix defined but not used compiler
warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If CONFIG_PM_SLEEP resp. CONFIG_PM_RUNTIME are not set:

drivers/video/sh_mobile_meram.c:573: warning: ?sh_mobile_meram_suspend? defined but not used drivers/video/sh_mobile_meram.c:597: warning: ?sh_mobile_meram_resume? defined but not used

---
 drivers/video/sh_mobile_meram.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/video/sh_mobile_meram.c +4 -0
index e0f098562a74..56a8e47ffceb 100644
@@ -569,6 +569,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
  * Power management
  */
 
+#ifdef CONFIG_PM_SLEEP
 static int sh_mobile_meram_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -592,7 +593,9 @@ static int sh_mobile_meram_suspend(struct device *dev)
 	}
 	return 0;
 }
+#endif
 
+#ifdef CONFIG_PM_RUNTIME
 static int sh_mobile_meram_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -611,6 +614,7 @@ static int sh_mobile_meram_resume(struct device *dev)
 		meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
 	return 0;
 }
+#endif
 
 static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
 			    sh_mobile_meram_suspend,
Signature · 12 lines
1.7.9.5

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
#38 lore raw

PATCH v2 19/19 fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

Hi Geert,

Thank you for the patch.

Quoted 72 lines · On Thursday 31 October 2013 20:42:52 Geert Uytterhoeven wrote:
Quoted 19 lines · Laurent Pinchart

Renesas ARM platforms are transitioning from single-platform to multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the driver available on all ARM platforms to enable it on both ARCH_SHMOBILE and ARCH_SHMOBILE_MULTI, and increase build testing coverage with COMPILE_TEST.

drivers/video/Kconfig +1 -1
index 84b685f..32b5c86 100644
@@ -2482,7 +2482,7 @@ endif
 
 config FB_SH_MOBILE_MERAM
 
 	tristate "SuperH Mobile MERAM read ahead support"
 
-	depends on (SUPERH || ARCH_SHMOBILE)
+	depends on (SUPERH || ARM || COMPILE_TEST)
 

drivers/video/Kconfig

Quoted 4 lines
drivers/video/Kconfig +0 -0
 	select GENERIC_ALLOCATOR
 	---help---
 
 	  Enable MERAM support for the SuperH controller.

While the below compiler warnings have been seen with sh-randconfig before, they're more likely to happen with COMPILE_TEST=y. I now see them with e.g. m68k-allmodconfig, so I created a patch.

From 15eb69172457c675cde177a6f742b6f1dabdeb18 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <[email protected]>
Date: Thu, 31 Oct 2013 20:35:14 +0100
Subject: [PATCH] fbdev: sh_mobile_meram: Fix defined but not used compiler
warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If CONFIG_PM_SLEEP resp. CONFIG_PM_RUNTIME are not set:

drivers/video/sh_mobile_meram.c:573: warning: ?sh_mobile_meram_suspend? defined but not used drivers/video/sh_mobile_meram.c:597: warning:
?sh_mobile_meram_resume? defined but not used

---
 drivers/video/sh_mobile_meram.c |    4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/drivers/video/sh_mobile_meram.c index e0f098562a74..56a8e47ffceb 100644

drivers/video/sh_mobile_meram.c +3 -0
@@ -569,6 +569,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
  * Power management
  */
 
+#ifdef CONFIG_PM_SLEEP
 static int sh_mobile_meram_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -592,7 +593,9 @@ static int sh_mobile_meram_suspend(struct device *dev)
 	}
 	return 0;
 }
+#endif
 
+#ifdef CONFIG_PM_RUNTIME
 static int sh_mobile_meram_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);

drivers/video/sh_mobile_meram.c static int sh_mobile_meram_resume(struct device *dev) · line 620

Quoted 7 lines
drivers/video/sh_mobile_meram.c +1 -0
@@ -611,6 +614,7 @@ static int sh_mobile_meram_resume(struct device *dev)
 		meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
 	return 0;
 }
+#endif
 
 static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
 			    sh_mobile_meram_suspend,

I'm a bit surprised, looking at the definition of UNIVERSAL_DEV_PM_OPS, I would have thought that both functions would be used when either CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined. I would thus have guarded both functions with #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME).

Signature · 3 lines
Regards,

Laurent Pinchart
#39 lore raw

PATCH v2 19/19 fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

Quoted 20 lines · Laurent Pinchart
Quoted 20 lines
drivers/video/sh_mobile_meram.c +4 -0
+#ifdef CONFIG_PM_SLEEP
 static int sh_mobile_meram_suspend(struct device *dev)
 {
      struct platform_device *pdev = to_platform_device(dev);
@@ -592,7 +593,9 @@ static int sh_mobile_meram_suspend(struct device *dev)
      }
      return 0;
 }
+#endif
 
+#ifdef CONFIG_PM_RUNTIME
 static int sh_mobile_meram_resume(struct device *dev)
 {
      struct platform_device *pdev = to_platform_device(dev);
@@ -611,6 +614,7 @@ static int sh_mobile_meram_resume(struct device *dev)
              meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
      return 0;
 }
+#endif
 
Quoted 8 lines

drivers/video/sh_mobile_meram.c static int sh_mobile_meram_resume(struct device *dev) · line 620

Quoted 2 lines
drivers/video/sh_mobile_meram.c +0 -0
 static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
                          sh_mobile_meram_suspend,

I'm a bit surprised, looking at the definition of UNIVERSAL_DEV_PM_OPS, I would have thought that both functions would be used when either CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined. I would thus have guarded both functions with #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME).

You're right. I missed that both function pointers are passed to both macros.

Will send v2.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Acked-by on the v2 series
#40 lore raw
In reply to Laurent Pinchart
Quoted 23 lines · Laurent Pinchart

Hello,

This patch series, based on v3.12-rc7, prepares various Renesas drivers for migration to multiplatform kernels by enabling their compilation or otherwise fixing them on all ARM platforms. The patches are pretty straightforward and are described in their commit message.

Changes since v1:

- The drivers can also be selected when COMPILE_TEST is enabled, regardless of the architecture. This should provide a good compromise between wide build test coverage and not clobbering configuration with drivers useless on non-SuperH, non-ARM platforms.

- DMA configuration is now unconditional in patch 08/19

I'd like to get all these patches merged in v3.14. As they will need to go through their respective subsystems' trees, I would appreciate if all maintainers involved could notify me when they merge patches from this series in their tree to help me tracking the merge status. I don't plan to send pull requests individually for these patches, and I will repost patches individually if changes are requested during review.

Quoted 2 lines

If you believe the issue should be solved in a different way please reply to the cover letter to let other maintainers chime in.

All patches, including the v3 ones present in the thread at this time:

Quoted 90 lines
Cc Chris Ball <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Eduardo Valentin <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Guennadi Liakhovetski <[email protected]>
Cc Ian Molton <[email protected]>
Cc iommu at lists.linux-foundation.org
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Magnus Damm <[email protected]>
Cc Mark Brown <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Sergei Shtylyov <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Vinod Koul <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Zhang Rui <[email protected]>
Cc dmaengine at vger.kernel.org
Cc linux-fbdev at vger.kernel.org
Cc linux-i2c at vger.kernel.org
Cc linux-input at vger.kernel.org
Cc linux-kernel at vger.kernel.org
Cc linux-media at vger.kernel.org
Cc linux-mmc at vger.kernel.org
Cc linux-mtd at lists.infradead.org
Cc linux-pm at vger.kernel.org
Cc linux-pwm at vger.kernel.org
Cc linux-serial at vger.kernel.org
Cc linux-spi at vger.kernel.org
Cc netdev at vger.kernel.org

Laurent Pinchart (19):
serial: sh-sci: Enable the driver on all ARM platforms
DMA: shdma: Enable the driver on all ARM platforms
i2c: sh_mobile: Enable the driver on all ARM platforms
input: sh_keysc: Enable the driver on all ARM platforms
iommu: shmobile: Enable the driver on all ARM platforms
i2c: rcar: Enable the driver on all ARM platforms
v4l: sh_vou: Enable the driver on all ARM platforms
mmc: sdhi: Enable the driver on all ARM platforms
mmc: sh_mmcif: Enable the driver on all ARM platforms
mtd: sh_flctl: Enable the driver on all ARM platforms
net: sh_eth: Set receive alignment correctly on all ARM platforms
irda: sh_irda: Enable the driver on all ARM platforms
pinctrl: sh-pfc: Enable the driver on all ARM platforms
pwm: pwm-renesas-tpu: Enable the driver on all ARM platforms
sh: intc: Enable the driver on all ARM platforms
spi: sh_msiof: Enable the driver on all ARM platforms
spi: sh_hspi: Enable the driver on all ARM platforms
thermal: rcar-thermal: Enable the driver on all ARM platforms
fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

 drivers/dma/sh/Kconfig                | 2 +-
 drivers/dma/sh/shdmac.c               | 6 +++---
 drivers/i2c/busses/Kconfig            | 4 ++--
 drivers/input/keyboard/Kconfig        | 2 +-
 drivers/iommu/Kconfig                 | 2 +-
 drivers/media/platform/Kconfig        | 2 +-
 drivers/mmc/host/Kconfig              | 4 ++--
 drivers/mmc/host/tmio_mmc_dma.c       | 4 +---
 drivers/mtd/nand/Kconfig              | 2 +-
 drivers/net/ethernet/renesas/sh_eth.c | 2 +-
 drivers/net/ethernet/renesas/sh_eth.h | 2 +-
 drivers/net/irda/Kconfig              | 2 +-
 drivers/pinctrl/Makefile              | 2 +-
 drivers/pinctrl/sh-pfc/Kconfig        | 2 +-
 drivers/pwm/Kconfig                   | 2 +-
 drivers/sh/intc/Kconfig               | 2 +-
 drivers/spi/Kconfig                   | 4 ++--
 drivers/thermal/Kconfig               | 2 +-
 drivers/tty/serial/Kconfig            | 2 +-
 drivers/video/Kconfig                 | 6 +++---
 20 files changed, 27 insertions(+), 29 deletions(-)
Signature · 9 lines
Regards,

Laurent Pinchart


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

A message that is not in the archive (sent off-list or not yet received): 1383086274-11049-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/[email protected]

#42 lore raw

Hello,

Quoted 23 lines · On Tuesday 29 October 2013 23:37:35 Laurent Pinchart wrote:

Hello,

This patch series, based on v3.12-rc7, prepares various Renesas drivers for migration to multiplatform kernels by enabling their compilation or otherwise fixing them on all ARM platforms. The patches are pretty straightforward and are described in their commit message.

Changes since v1:

- The drivers can also be selected when COMPILE_TEST is enabled, regardless of the architecture. This should provide a good compromise between wide build test coverage and not clobbering configuration with drivers useless on non-SuperH, non-ARM platforms.

- DMA configuration is now unconditional in patch 08/19

I'd like to get all these patches merged in v3.14. As they will need to go through their respective subsystems' trees, I would appreciate if all maintainers involved could notify me when they merge patches from this series in their tree to help me tracking the merge status. I don't plan to send pull requests individually for these patches, and I will repost patches individually if changes are requested during review.

Quoted 2 lines

If you believe the issue should be solved in a different way please reply to the cover letter to let other maintainers chime in.

This patch series was a prerequisite for a larger rework of Renesas platforms. However, we've decided to go with an alternative approach that renames Kconfig symbols to avoid touching all the drivers. There is thus no urgency to apply this series anymore.

I still plan to enable COMPILE_TEST on Renesas drivers. I will send a v3 of these patches based on the feedback received on v2. Patches from v2 that have already been applied can be dropped, but there's no need to revert them rebase trees as they're not invalid per-se. I will make sure to address the situation in v3. I'm sorry for the inconvenience.

Signature · 3 lines
Regards,

Laurent Pinchart