linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing
@ 2016-09-16  8:33 Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs Peter Ujfalusi
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

Hi,

The following series will enable unconditional COMPILE_TEST coverage for the
following drivers: omap-dma, edma and ti-dma-crossbar

The series includes fixes noticed when compiling the drivers for x86_64 and
aarch64.

Replaces the patch Vinod sent to enable partial compile testing for omap-dma:
http://www.spinics.net/lists/dmaengine/msg11025.html

Regards,
Peter
---
Peter Ujfalusi (9):
  dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id
    structs
  dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC)
  dmaengine: edma: Use correct type for of_find_property() third
    parameter
  dmaengine: edma: enable COMPILE_TEST
  dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP
    configs
  dmaengine: omap-dma: enable COMPILE_TEST
  dmaengine: ti-dma-crossbar: Correct type for of_find_property() third
    parameter
  dmaengine: ti-dma-crossbar: Use enum for crossbar type
  dmaengine: ti-dma-crossbar: enable COMPILE_TEST

 drivers/dma/Kconfig           |  8 ++++----
 drivers/dma/edma.c            | 15 ++++++++++-----
 drivers/dma/ti-dma-crossbar.c | 12 +++++++-----
 include/linux/omap-dma.h      | 19 +++++++++++++++++++
 4 files changed, 40 insertions(+), 14 deletions(-)

--
2.10.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 2/9] dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC) Peter Ujfalusi
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

The MODULE_DEVICE_TABLE() were missing from the driver for the of_device_id
structures.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/edma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 3d277fa76c1a..c2098a4b4dcf 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -274,11 +274,13 @@ static const struct of_device_id edma_of_ids[] = {
 	},
 	{}
 };
+MODULE_DEVICE_TABLE(of, edma_of_ids);
 
 static const struct of_device_id edma_tptc_of_ids[] = {
 	{ .compatible = "ti,edma3-tptc", },
 	{}
 };
+MODULE_DEVICE_TABLE(of, edma_tptc_of_ids);
 
 static inline unsigned int edma_read(struct edma_cc *ecc, int offset)
 {
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/9] dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC)
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 3/9] dmaengine: edma: Use correct type for of_find_property() third parameter Peter Ujfalusi
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

Fixes the following warning when compiling the driver for 64bit
architectures (x86_64 for example):
drivers/dma/edma.c:2185:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   if (match && (u32)match->data == EDMA_BINDING_TPCC)
                ^

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/edma.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index c2098a4b4dcf..4c8818278fcc 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -261,8 +261,11 @@ static const struct edmacc_param dummy_paramset = {
 	.ccnt = 1,
 };
 
-#define EDMA_BINDING_LEGACY	0
-#define EDMA_BINDING_TPCC	1
+enum edma_binding_type {
+	EDMA_BINDING_LEGACY = 0,
+	EDMA_BINDING_TPCC,
+};
+
 static const struct of_device_id edma_of_ids[] = {
 	{
 		.compatible = "ti,edma3",
@@ -2184,7 +2187,8 @@ static int edma_probe(struct platform_device *pdev)
 		const struct of_device_id *match;
 
 		match = of_match_node(edma_of_ids, node);
-		if (match && (u32)match->data == EDMA_BINDING_TPCC)
+		if (match &&
+		    (enum edma_binding_type)match->data == EDMA_BINDING_TPCC)
 			legacy_mode = false;
 
 		info = edma_setup_info_from_dt(dev, legacy_mode);
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/9] dmaengine: edma: Use correct type for of_find_property() third parameter
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 2/9] dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC) Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 4/9] dmaengine: edma: enable COMPILE_TEST Peter Ujfalusi
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

The correct type is int and not for the third parameter of
of_find_property().
Fixes compilation for 64bit architectures (x86_64, aarch64).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/edma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 4c8818278fcc..16c0bb92fa4d 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -2024,8 +2024,7 @@ static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
 {
 	struct edma_soc_info *info;
 	struct property *prop;
-	size_t sz;
-	int ret;
+	int sz, ret;
 
 	info = devm_kzalloc(dev, sizeof(struct edma_soc_info), GFP_KERNEL);
 	if (!info)
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/9] dmaengine: edma: enable COMPILE_TEST
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (2 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 3/9] dmaengine: edma: Use correct type for of_find_property() third parameter Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs Peter Ujfalusi
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

To get more coverage, enable COMPILE_TEST for this driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index fe2dbb811e19..4348249b943a 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -515,7 +515,7 @@ config TI_DMA_CROSSBAR
 
 config TI_EDMA
 	bool "TI EDMA support"
-	depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE
+	depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	select TI_DMA_CROSSBAR if ARCH_OMAP
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (3 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 4/9] dmaengine: edma: enable COMPILE_TEST Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-21  3:51   ` Vinod Koul
  2016-09-16  8:33 ` [PATCH 6/9] dmaengine: omap-dma: enable COMPILE_TEST Peter Ujfalusi
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

The DMAengine driver for omap-dma use three function calls from the
plat-omap legacy driver. When the DMAengine driver is built when ARCH_OMAP
is not set, the compilation will fail due to missing symbols.
Add empty inline functions to allow the DMAengine driver to be compiled
with COMPILE_TEST.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 include/linux/omap-dma.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 1d99b61adc65..290081620b3e 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -297,6 +297,7 @@ struct omap_system_dma_plat_info {
 #define dma_omap15xx()	__dma_omap15xx(d)
 #define dma_omap16xx()	__dma_omap16xx(d)
 
+#if defined(CONFIG_ARCH_OMAP)
 extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
 
 extern void omap_set_dma_priority(int lch, int dst_port, int priority);
@@ -355,4 +356,22 @@ static inline int omap_lcd_dma_running(void)
 }
 #endif
 
+#else /* CONFIG_ARCH_OMAP */
+
+static inline struct omap_system_dma_plat_info *omap_get_plat_info(void)
+{
+	return NULL;
+}
+
+static inline int omap_request_dma(int dev_id, const char *dev_name,
+			void (*callback)(int lch, u16 ch_status, void *data),
+			void *data, int *dma_ch)
+{
+	return -ENODEV;
+}
+
+static inline void omap_free_dma(int ch) { }
+
+#endif /* CONFIG_ARCH_OMAP */
+
 #endif /* __LINUX_OMAP_DMA_H */
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/9] dmaengine: omap-dma: enable COMPILE_TEST
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (4 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 7/9] dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter Peter Ujfalusi
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

To get more coverage, enable COMPILE_TEST for this driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 4348249b943a..84647d6cb2f4 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -130,7 +130,7 @@ config DMA_JZ4780
 
 config DMA_OMAP
 	tristate "OMAP DMA support"
-	depends on ARCH_OMAP
+	depends on ARCH_OMAP || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	select TI_DMA_CROSSBAR if SOC_DRA7XX
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 7/9] dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (5 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 6/9] dmaengine: omap-dma: enable COMPILE_TEST Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type Peter Ujfalusi
  2016-09-16  8:33 ` [PATCH 9/9] dmaengine: ti-dma-crossbar: enable COMPILE_TEST Peter Ujfalusi
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

The correct type is int and not for the third parameter of
of_find_property().
Fixes compilation for 64bit architectures (x86_64, aarch64).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/ti-dma-crossbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index 5ae294b256a7..e4f3bd1ae264 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/drivers/dma/ti-dma-crossbar.c
@@ -311,7 +311,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
 	struct property *prop;
 	struct resource *res;
 	u32 safe_val;
-	size_t sz;
+	int sz;
 	void __iomem *iomem;
 	int i, ret;
 
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (6 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 7/9] dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  2016-09-21  3:52   ` Vinod Koul
  2016-09-16  8:33 ` [PATCH 9/9] dmaengine: ti-dma-crossbar: enable COMPILE_TEST Peter Ujfalusi
  8 siblings, 1 reply; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

Fixes compiler warning on 64bit architectures.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/ti-dma-crossbar.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index e4f3bd1ae264..876e4ccaf033 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/drivers/dma/ti-dma-crossbar.c
@@ -16,8 +16,10 @@
 #include <linux/of_device.h>
 #include <linux/of_dma.h>
 
-#define TI_XBAR_DRA7		0
-#define TI_XBAR_AM335X		1
+enum ti_xbar_type {
+	TI_XBAR_DRA7 = 0,
+	TI_XBAR_AM335X,
+};
 
 static const struct of_device_id ti_dma_xbar_match[] = {
 	{
@@ -395,7 +397,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
 
 	xbar->dmarouter.dev = &pdev->dev;
 	xbar->dmarouter.route_free = ti_dra7_xbar_free;
-	xbar->dma_offset = (u32)match->data;
+	xbar->dma_offset = (enum ti_xbar_type)match->data;
 
 	mutex_init(&xbar->mutex);
 	platform_set_drvdata(pdev, xbar);
@@ -428,7 +430,7 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
 	if (unlikely(!match))
 		return -EINVAL;
 
-	switch ((u32)match->data) {
+	switch ((enum ti_xbar_type)match->data) {
 	case TI_XBAR_DRA7:
 		ret = ti_dra7_xbar_probe(pdev);
 		break;
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 9/9] dmaengine: ti-dma-crossbar: enable COMPILE_TEST
  2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
                   ` (7 preceding siblings ...)
  2016-09-16  8:33 ` [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type Peter Ujfalusi
@ 2016-09-16  8:33 ` Peter Ujfalusi
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-16  8:33 UTC (permalink / raw)
  To: vinod.koul, dan.j.williams
  Cc: arnd, dmaengine, linux-kernel, linux-omap, linux-arm-kernel, tony

To get more coverage, enable COMPILE_TEST for this driver.
When compile testing eDMA or omap-dma, select also the ti-dma-crossbar so
it is also covered by the compile testing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 84647d6cb2f4..1c11628062ad 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -133,7 +133,7 @@ config DMA_OMAP
 	depends on ARCH_OMAP || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
-	select TI_DMA_CROSSBAR if SOC_DRA7XX
+	select TI_DMA_CROSSBAR if (SOC_DRA7XX || COMPILE_TEST)
 
 config DMA_SA11X0
 	tristate "SA-11x0 DMA support"
@@ -518,7 +518,7 @@ config TI_EDMA
 	depends on ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
-	select TI_DMA_CROSSBAR if ARCH_OMAP
+	select TI_DMA_CROSSBAR if (ARCH_OMAP || COMPILE_TEST)
 	default n
 	help
 	  Enable support for the TI EDMA controller. This DMA
-- 
2.10.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  2016-09-16  8:33 ` [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs Peter Ujfalusi
@ 2016-09-21  3:51   ` Vinod Koul
  2016-09-21  3:53     ` Vinod Koul
  0 siblings, 1 reply; 15+ messages in thread
From: Vinod Koul @ 2016-09-21  3:51 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: dan.j.williams, arnd, dmaengine, linux-kernel, linux-omap,
	linux-arm-kernel, tony

On Fri, Sep 16, 2016 at 11:33:20AM +0300, Peter Ujfalusi wrote:
> The DMAengine driver for omap-dma use three function calls from the
> plat-omap legacy driver. When the DMAengine driver is built when ARCH_OMAP
> is not set, the compilation will fail due to missing symbols.
> Add empty inline functions to allow the DMAengine driver to be compiled
> with COMPILE_TEST.

Peter,

This should be before you enable COMPILE_TEST otherwise build will break!

> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  include/linux/omap-dma.h | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 1d99b61adc65..290081620b3e 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -297,6 +297,7 @@ struct omap_system_dma_plat_info {
>  #define dma_omap15xx()	__dma_omap15xx(d)
>  #define dma_omap16xx()	__dma_omap16xx(d)
>  
> +#if defined(CONFIG_ARCH_OMAP)
>  extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
>  
>  extern void omap_set_dma_priority(int lch, int dst_port, int priority);
> @@ -355,4 +356,22 @@ static inline int omap_lcd_dma_running(void)
>  }
>  #endif
>  
> +#else /* CONFIG_ARCH_OMAP */
> +
> +static inline struct omap_system_dma_plat_info *omap_get_plat_info(void)
> +{
> +	return NULL;
> +}
> +
> +static inline int omap_request_dma(int dev_id, const char *dev_name,
> +			void (*callback)(int lch, u16 ch_status, void *data),
> +			void *data, int *dma_ch)
> +{
> +	return -ENODEV;
> +}
> +
> +static inline void omap_free_dma(int ch) { }
> +
> +#endif /* CONFIG_ARCH_OMAP */
> +
>  #endif /* __LINUX_OMAP_DMA_H */
> -- 
> 2.10.0
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type
  2016-09-16  8:33 ` [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type Peter Ujfalusi
@ 2016-09-21  3:52   ` Vinod Koul
  2016-09-21  7:31     ` Peter Ujfalusi
  0 siblings, 1 reply; 15+ messages in thread
From: Vinod Koul @ 2016-09-21  3:52 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: dan.j.williams, arnd, dmaengine, linux-kernel, linux-omap,
	linux-arm-kernel, tony

On Fri, Sep 16, 2016 at 11:33:23AM +0300, Peter Ujfalusi wrote:
> Fixes compiler warning on 64bit architectures.

Would be good to give the warning message here

> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  drivers/dma/ti-dma-crossbar.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
> index e4f3bd1ae264..876e4ccaf033 100644
> --- a/drivers/dma/ti-dma-crossbar.c
> +++ b/drivers/dma/ti-dma-crossbar.c
> @@ -16,8 +16,10 @@
>  #include <linux/of_device.h>
>  #include <linux/of_dma.h>
>  
> -#define TI_XBAR_DRA7		0
> -#define TI_XBAR_AM335X		1
> +enum ti_xbar_type {
> +	TI_XBAR_DRA7 = 0,
> +	TI_XBAR_AM335X,
> +};
>  
>  static const struct of_device_id ti_dma_xbar_match[] = {
>  	{
> @@ -395,7 +397,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
>  
>  	xbar->dmarouter.dev = &pdev->dev;
>  	xbar->dmarouter.route_free = ti_dra7_xbar_free;
> -	xbar->dma_offset = (u32)match->data;
> +	xbar->dma_offset = (enum ti_xbar_type)match->data;
>  
>  	mutex_init(&xbar->mutex);
>  	platform_set_drvdata(pdev, xbar);
> @@ -428,7 +430,7 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
>  	if (unlikely(!match))
>  		return -EINVAL;
>  
> -	switch ((u32)match->data) {
> +	switch ((enum ti_xbar_type)match->data) {
>  	case TI_XBAR_DRA7:
>  		ret = ti_dra7_xbar_probe(pdev);
>  		break;
> -- 
> 2.10.0
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  2016-09-21  3:51   ` Vinod Koul
@ 2016-09-21  3:53     ` Vinod Koul
  2016-09-21  7:34       ` Peter Ujfalusi
  0 siblings, 1 reply; 15+ messages in thread
From: Vinod Koul @ 2016-09-21  3:53 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: dan.j.williams, arnd, dmaengine, linux-kernel, linux-omap,
	linux-arm-kernel, tony

On Wed, Sep 21, 2016 at 09:21:32AM +0530, Vinod Koul wrote:
> On Fri, Sep 16, 2016 at 11:33:20AM +0300, Peter Ujfalusi wrote:
> > The DMAengine driver for omap-dma use three function calls from the
> > plat-omap legacy driver. When the DMAengine driver is built when ARCH_OMAP
> > is not set, the compilation will fail due to missing symbols.
> > Add empty inline functions to allow the DMAengine driver to be compiled
> > with COMPILE_TEST.
> 
> Peter,
> 
> This should be before you enable COMPILE_TEST otherwise build will break!

Ah never mind, you have three drivers in this series so I think this is fine
before the omap one :)

-- 
~Vinod

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type
  2016-09-21  3:52   ` Vinod Koul
@ 2016-09-21  7:31     ` Peter Ujfalusi
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-21  7:31 UTC (permalink / raw)
  To: Vinod Koul
  Cc: dan.j.williams, arnd, dmaengine, linux-kernel, linux-omap,
	linux-arm-kernel, tony

On 09/21/16 06:52, Vinod Koul wrote:
> On Fri, Sep 16, 2016 at 11:33:23AM +0300, Peter Ujfalusi wrote:
>> Fixes compiler warning on 64bit architectures.
> 
> Would be good to give the warning message here

Let me revert this patch and patch #2 for the eDMA to get the warnings.

I will repost v2 with the updated commit messages.

> 
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>  drivers/dma/ti-dma-crossbar.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
>> index e4f3bd1ae264..876e4ccaf033 100644
>> --- a/drivers/dma/ti-dma-crossbar.c
>> +++ b/drivers/dma/ti-dma-crossbar.c
>> @@ -16,8 +16,10 @@
>>  #include <linux/of_device.h>
>>  #include <linux/of_dma.h>
>>  
>> -#define TI_XBAR_DRA7		0
>> -#define TI_XBAR_AM335X		1
>> +enum ti_xbar_type {
>> +	TI_XBAR_DRA7 = 0,
>> +	TI_XBAR_AM335X,
>> +};
>>  
>>  static const struct of_device_id ti_dma_xbar_match[] = {
>>  	{
>> @@ -395,7 +397,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
>>  
>>  	xbar->dmarouter.dev = &pdev->dev;
>>  	xbar->dmarouter.route_free = ti_dra7_xbar_free;
>> -	xbar->dma_offset = (u32)match->data;
>> +	xbar->dma_offset = (enum ti_xbar_type)match->data;
>>  
>>  	mutex_init(&xbar->mutex);
>>  	platform_set_drvdata(pdev, xbar);
>> @@ -428,7 +430,7 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
>>  	if (unlikely(!match))
>>  		return -EINVAL;
>>  
>> -	switch ((u32)match->data) {
>> +	switch ((enum ti_xbar_type)match->data) {
>>  	case TI_XBAR_DRA7:
>>  		ret = ti_dra7_xbar_probe(pdev);
>>  		break;
>> -- 
>> 2.10.0
>>
> 


-- 
Péter

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  2016-09-21  3:53     ` Vinod Koul
@ 2016-09-21  7:34       ` Peter Ujfalusi
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Ujfalusi @ 2016-09-21  7:34 UTC (permalink / raw)
  To: Vinod Koul
  Cc: dan.j.williams, arnd, dmaengine, linux-kernel, linux-omap,
	linux-arm-kernel, tony

On 09/21/16 06:53, Vinod Koul wrote:
> On Wed, Sep 21, 2016 at 09:21:32AM +0530, Vinod Koul wrote:
>> On Fri, Sep 16, 2016 at 11:33:20AM +0300, Peter Ujfalusi wrote:
>>> The DMAengine driver for omap-dma use three function calls from the
>>> plat-omap legacy driver. When the DMAengine driver is built when ARCH_OMAP
>>> is not set, the compilation will fail due to missing symbols.
>>> Add empty inline functions to allow the DMAengine driver to be compiled
>>> with COMPILE_TEST.
>>
>> Peter,
>>
>> This should be before you enable COMPILE_TEST otherwise build will break!
> 
> Ah never mind, you have three drivers in this series so I think this is fine
> before the omap one :)

Yep, patch 1-4 is for eDMA, patch 5-6 is for omap-dma and the remaining is for
ti-dma-crossbar.

I wanted to have them separate (including when I enable the COMPILE_TEST) so
we can revert easily if needed.

If I move the 'enable COMPILE_TEST' patches at the end of the series, I think
I will still have them as separate as they are enabling the test for three
different driver.

-- 
Péter

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-09-21  7:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16  8:33 [PATCH 0/9] dmaengine: ti drivers: enable COMPILE_TESTing Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 1/9] dmaengine: edma: Add missing MODULE_DEVICE_TABLE() for of_device_id structs Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 2/9] dmaengine: edma: Use enum for eDMA binding type (legacy vs TPCC) Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 3/9] dmaengine: edma: Use correct type for of_find_property() third parameter Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 4/9] dmaengine: edma: enable COMPILE_TEST Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 5/9] dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs Peter Ujfalusi
2016-09-21  3:51   ` Vinod Koul
2016-09-21  3:53     ` Vinod Koul
2016-09-21  7:34       ` Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 6/9] dmaengine: omap-dma: enable COMPILE_TEST Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 7/9] dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 8/9] dmaengine: ti-dma-crossbar: Use enum for crossbar type Peter Ujfalusi
2016-09-21  3:52   ` Vinod Koul
2016-09-21  7:31     ` Peter Ujfalusi
2016-09-16  8:33 ` [PATCH 9/9] dmaengine: ti-dma-crossbar: enable COMPILE_TEST Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).