Skip to contentSkip to conversation

i.MX patches for -rc

PATCH New Sascha Hauer 3 participants 8 messages Nov 4, 2010 – Nov 5, 2010

Subsystems (4)
lore
Share & tools
lore

Sascha Hauer

author maintainer
#0 lore raw

Hi,

The following series contains some fixes for i.MX

Sascha

The following changes since commit c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4:

Linux 2.6.37-rc1 (2010-11-01 07:54:12 -0400)

are available in the git repository at:
git://git.pengutronix.de/git/imx/linux-2.6.git imx-rc-pu

Sascha Hauer (3):
ARM mx3fb: check for DMA engine type
ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED ARM i.MX pcm037 eet: compile fixes

 arch/arm/mach-mx3/mach-pcm037_eet.c          |    3 +--
 arch/arm/plat-mxc/devices/platform-imx-dma.c |    8 --------
 drivers/video/mx3fb.c                        |    4 ++++
 3 files changed, 5 insertions(+), 10 deletions(-)
author maintainer
#1 lore raw

PATCH 1/3 ARM mx3fb: check for DMA engine type

We have two dma engines in MX3 systems: The IPU and the SDMA engine. We have to check if we got a channel from the correct engine before proceeding with a channel.

Cc Guennadi Liakhovetski <[email protected]>
---
 drivers/video/mx3fb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/video/mx3fb.c +4 -0
index 7cfc170..ca0f6be 100644
@@ -27,6 +27,7 @@
 #include <linux/clk.h>
 #include <linux/mutex.h>
 
+#include <mach/dma.h>
 #include <mach/hardware.h>
 #include <mach/ipu.h>
 #include <mach/mx3fb.h>
@@ -1420,6 +1421,9 @@ static bool chan_filter(struct dma_chan *chan, void *arg)
 	struct device *dev;
 	struct mx3fb_platform_data *mx3fb_pdata;
 
+	if (!imx_dma_is_ipu(chan))
+		return false;
+
 	if (!rq)
 		return false;
 
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/3 ARM mx3fb: check for DMA engine type

Quoted 6 lines · Sascha Hauer

We have two dma engines in MX3 systems: The IPU and the SDMA engine. We have to check if we got a channel from the correct engine before proceeding with a channel.

Cc Guennadi Liakhovetski <[email protected]>

Yeah, looks right:

Could you also make a similar one for drivers/media/video/mx3_camera.c?

Thanks
Guennadi

Quoted 30 lines
---
 drivers/video/mx3fb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/video/mx3fb.c +4 -0
index 7cfc170..ca0f6be 100644
@@ -27,6 +27,7 @@
 #include <linux/clk.h>
 #include <linux/mutex.h>
 
+#include <mach/dma.h>
 #include <mach/hardware.h>
 #include <mach/ipu.h>
 #include <mach/mx3fb.h>
@@ -1420,6 +1421,9 @@ static bool chan_filter(struct dma_chan *chan, void *arg)
 	struct device *dev;
 	struct mx3fb_platform_data *mx3fb_pdata;
 
+	if (!imx_dma_is_ipu(chan))
+		return false;
+
 	if (!rq)
 		return false;
 
Signature · 1 line
1.7.2.3

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

author maintainer
#3 lore raw

PATCH 1/3 ARM mx3fb: check for DMA engine type

Hi Guennadi,

Quoted 6 lines · Guennadi Liakhovetski
Quoted 4 lines · Sascha Hauer

We have two dma engines in MX3 systems: The IPU and the SDMA engine. We have to check if we got a channel from the correct engine before proceeding with a channel.

Quoted 8 lines
Quoted 2 lines
Cc Guennadi Liakhovetski <[email protected]>

Yeah, looks right:

Could you also make a similar one for drivers/media/video/mx3_camera.c?

Yes, will do. I missed that.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author maintainer
#4 lore raw

PATCH 2/3 ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED

In reply to Sascha Hauer
---
 arch/arm/plat-mxc/devices/platform-imx-dma.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
arch/arm/plat-mxc/devices/platform-imx-dma.c +0 -8
index 02d9890..3a705c7 100644
@@ -12,15 +12,7 @@
 
 #include <mach/hardware.h>
 #include <mach/devices-common.h>
-#ifdef SDMA_IS_MERGED
 #include <mach/sdma.h>
-#else
-struct sdma_platform_data {
-	int sdma_version;
-	char *cpu_name;
-	int to_version;
-};
-#endif
 
 struct imx_imx_sdma_data {
 	resource_size_t iobase;
Signature · 1 line
1.7.2.3
author maintainer
#6 lore raw

PATCH 3/3 ARM i.MX pcm037 eet: compile fixes

In reply to Sascha Hauer

The pcm037 eet extension currently does not compile if SPI_IMX is enabled. Fix it.

---
 arch/arm/mach-mx3/mach-pcm037_eet.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/arm/mach-mx3/mach-pcm037_eet.c +1 -2
index 99e0894..b93a2d0 100644
@@ -14,6 +14,7 @@
 
 #include <mach/common.h>
 #include <mach/iomux-mx3.h>
+#include <mach/spi.h>
 
 #include <asm/mach-types.h>
 
@@ -59,14 +60,12 @@ static struct spi_board_info pcm037_spi_dev[] = {
 };
 
 /* Platform Data for MXC CSPI */
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
 
 static const struct spi_imx_master pcm037_spi1_pdata __initconst = {
 	.chipselect = pcm037_spi1_cs,
 	.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
 };
-#endif
 
 /* GPIO-keys input device */
 static struct gpio_keys_button pcm037_gpio_keys[] = {
Signature · 1 line
1.7.2.3
#7 lore raw

PATCH 3/3 ARM i.MX pcm037 eet: compile fixes

Quoted 22 lines · Sascha Hauer

The pcm037 eet extension currently does not compile if SPI_IMX is enabled. Fix it.

---
 arch/arm/mach-mx3/mach-pcm037_eet.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/arm/mach-mx3/mach-pcm037_eet.c +1 -0
index 99e0894..b93a2d0 100644
@@ -14,6 +14,7 @@
 
 #include <mach/common.h>
 #include <mach/iomux-mx3.h>
+#include <mach/spi.h>
 
 #include <asm/mach-types.h>
 
@@ -59,14 +60,12 @@ static struct spi_board_info pcm037_spi_dev[] = {
 };

arch/arm/mach-mx3/mach-pcm037_eet.c static struct spi_board_info pcm037_spi_dev[] = { · line 69

Quoted 10 lines
arch/arm/mach-mx3/mach-pcm037_eet.c +0 -2
 
 /* Platform Data for MXC CSPI */
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
 
 static const struct spi_imx_master pcm037_spi1_pdata __initconst = {
 	.chipselect = pcm037_spi1_cs,
 	.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
 };
-#endif

I suggest adding (or squashing in) the following patch:

-------------->8-----------------
From: Uwe Kleine-K?nig <[email protected]>

ARM: mx3: enable SPI_IMX for better compile coverage

Note: SPI_IMX defaults to m for imx machines, so it doesn't occur explicitly in the defconfig.

arch/arm/configs/mx3_defconfig +1 -0
index f0c339f..e648ea3 100644
@@ -84,6 +84,7 @@ CONFIG_SERIAL_IMX_CONSOLE=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_IMX=y
+CONFIG_SPI=y
 CONFIG_W1=y
 CONFIG_W1_MASTER_MXC=y
 CONFIG_W1_SLAVE_THERM=y

Best regards
Uwe

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