All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Omap fixes for 2.6.31
@ 2009-06-22 11:36 Tony Lindgren
  2009-06-22 11:38 ` [PATCH 01/12] OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c Tony Lindgren
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:36 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

Hi,

Here are some omap fixes for 2.6.31 for review.

Regards,

Tony


---

Adrian Hunter (2):
      OMAP3: RX51: Use OneNAND sync read / write
      OMAP2/3: gpmc-onenand: correct use of async timings

Andrew de Quincey (1):
      OMAP1: Fix N770 MMC support

Fernando Guzman Lugo (1):
      OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry

Grazvydas Ignotas (1):
      OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power

Huang Weiyi (1):
      OMAP1: remove duplicated #include

Jonathan McDowell (1):
      OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c

Kalle Jokiniemi (1):
      OMAP3: DMA: Enable idlemodes for DMA OCP

Kevin Hilman (1):
      OMAP2/3: Add omap_type() for determining GP/EMU/HS

Roel Kluin (1):
      OMAP2/3: omap mailbox: platform_get_irq() error ignored

Tero Kristo (1):
      OMAP3: SRAM size fix for HS/EMU devices

janboe (1):
      OMAP2/3: Initialize gpio debounce register


 arch/arm/mach-omap1/board-nokia770.c         |    3 ++-
 arch/arm/mach-omap1/mailbox.c                |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 +
 arch/arm/mach-omap2/gpmc-onenand.c           |   21 +++++++++++++++++++--
 arch/arm/mach-omap2/id.c                     |   22 ++++++++++++++++++++++
 arch/arm/mach-omap2/mailbox.c                |    6 +++---
 arch/arm/mach-omap2/mmc-twl4030.c            |   13 ++++++++++++-
 arch/arm/plat-omap/dma.c                     |   13 +++++++++++++
 arch/arm/plat-omap/gpio.c                    |    1 +
 arch/arm/plat-omap/include/mach/cpu.h        |   22 +++++++++++-----------
 arch/arm/plat-omap/include/mach/dma.h        |   15 +++++++++++++++
 arch/arm/plat-omap/iommu.c                   |    2 +-
 arch/arm/plat-omap/sram.c                    |    7 ++++++-
 13 files changed, 107 insertions(+), 21 deletions(-)

-- 
Signature

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

* [PATCH 01/12] OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
@ 2009-06-22 11:38 ` Tony Lindgren
  2009-06-22 11:39 ` [PATCH 02/12] OMAP1: Fix N770 MMC support Tony Lindgren
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:38 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Hiroshi DOYU, Jonathan McDowell

From: Jonathan McDowell <noodles@earth.li>

This fixes the positioning of " in MODULE_AUTHOR, which is currently
causing a build failure on latest git with CONFIG_OMAP_MBOX_FWK=m; the
original breakage appears to date from the end of last year in
a5abbbe52b7e89a7633319c5417bd4331f7ac8ed

Signed-Off-By: Jonathan McDowell <noodles@earth.li>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index 0af4d6c..6810b4a 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -203,5 +203,5 @@ module_exit(omap1_mbox_exit);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
-MODULE_AUTHOR("Hiroshi DOYU" <Hiroshi.DOYU@nokia.com>);
+MODULE_AUTHOR("Hiroshi DOYU <Hiroshi.DOYU@nokia.com>");
 MODULE_ALIAS("platform:omap1-mailbox");


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

* [PATCH 02/12] OMAP1: Fix N770 MMC support
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
  2009-06-22 11:38 ` [PATCH 01/12] OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c Tony Lindgren
@ 2009-06-22 11:39 ` Tony Lindgren
  2009-06-22 11:41 ` [PATCH 03/12] OMAP1: remove duplicated #include Tony Lindgren
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:39 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Andrew de Quincey

From: Andrew de Quincey <adq_dvb@lidskialf.net>

Some of the N770's MMC configuration options seem to have been
dropped. This patch adds them back in again.

Note that only the .ocr_mask change was /critical/, but I've added the
.max_freq setting back as well, as the original sources had it. Can
anyone confirm if this is unnecessary?

Secondly, there is support in the original code for a 4wire/higher
speed mode. As I don't have the requisite N770 hardware (I think it
was a rev2 N770?) to test this, I can't really add it back.

Signed-off-by: Andrew de Quincey <adq@lidskialf.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/board-nokia770.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index e70fc7c..d9ebba0 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -205,9 +205,11 @@ static int nokia770_mmc_get_cover_state(struct device *dev, int slot)
 static struct omap_mmc_platform_data nokia770_mmc2_data = {
 	.nr_slots                       = 1,
 	.dma_mask			= 0xffffffff,
+	.max_freq                       = 12000000,
 	.slots[0]       = {
 		.set_power		= nokia770_mmc_set_power,
 		.get_cover_state	= nokia770_mmc_get_cover_state,
+		.ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
 		.name                   = "mmcblk",
 	},
 };


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

* [PATCH 03/12] OMAP1: remove duplicated #include
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
  2009-06-22 11:38 ` [PATCH 01/12] OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c Tony Lindgren
  2009-06-22 11:39 ` [PATCH 02/12] OMAP1: Fix N770 MMC support Tony Lindgren
@ 2009-06-22 11:41 ` Tony Lindgren
  2009-06-22 11:42 ` [PATCH 04/12] OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power Tony Lindgren
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:41 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Huang Weiyi

From: Huang Weiyi <weiyi.huang@gmail.com>

Remove duplicated #include in arch/arm/mach-omap1/board-nokia770.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/board-nokia770.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index d9ebba0..ed2a48a 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -36,7 +36,6 @@
 #include <mach/hwa742.h>
 #include <mach/lcd_mipid.h>
 #include <mach/mmc.h>
-#include <mach/usb.h>
 #include <mach/clock.h>
 
 #define ADS7846_PENDOWN_GPIO	15


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

* [PATCH 04/12] OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (2 preceding siblings ...)
  2009-06-22 11:41 ` [PATCH 03/12] OMAP1: remove duplicated #include Tony Lindgren
@ 2009-06-22 11:42 ` Tony Lindgren
  2009-06-22 11:43 ` [PATCH 05/12] OMAP2/3: omap mailbox: platform_get_irq() error ignored Tony Lindgren
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:42 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: David Brownell, linux-omap, Grazvydas Ignotas

From: Grazvydas Ignotas <notasas@gmail.com>

twl_mmc23_set_power() has MMC2 twl_mmc_controller hardcoded in it, which
breaks MMC3. Find the right controller to use instead.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/mmc-twl4030.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 9756a87..1541fd4 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -263,8 +263,19 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
 static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int vdd)
 {
 	int ret = 0;
-	struct twl_mmc_controller *c = &hsmmc[1];
+	struct twl_mmc_controller *c = NULL;
 	struct omap_mmc_platform_data *mmc = dev->platform_data;
+	int i;
+
+	for (i = 1; i < ARRAY_SIZE(hsmmc); i++) {
+		if (mmc == hsmmc[i].mmc) {
+			c = &hsmmc[i];
+			break;
+		}
+	}
+
+	if (c == NULL)
+		return -ENODEV;
 
 	/* If we don't see a Vcc regulator, assume it's a fixed
 	 * voltage always-on regulator.


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

* [PATCH 05/12] OMAP2/3: omap mailbox: platform_get_irq() error ignored
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (3 preceding siblings ...)
  2009-06-22 11:42 ` [PATCH 04/12] OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power Tony Lindgren
@ 2009-06-22 11:43 ` Tony Lindgren
  2009-06-22 11:45 ` [PATCH 06/12] OMAP2/3: Add omap_type() for determining GP/EMU/HS Tony Lindgren
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:43 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Hiroshi DOYU, linux-omap, Roel Kluin

From: Roel Kluin <roel.kluin@gmail.com>

platform_get_irq may return -ENXIO. but struct omap_mbox mbox_dsp_info.irq
is unsigned, so the error was not noticed.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/mailbox.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index fd5b8a5..6f71f37 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -282,12 +282,12 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	/* DSP or IVA2 IRQ */
-	mbox_dsp_info.irq = platform_get_irq(pdev, 0);
-	if (mbox_dsp_info.irq < 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0) {
 		dev_err(&pdev->dev, "invalid irq resource\n");
-		ret = -ENODEV;
 		goto err_dsp;
 	}
+	mbox_dsp_info.irq = ret;
 
 	ret = omap_mbox_register(&pdev->dev, &mbox_dsp_info);
 	if (ret)


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

* [PATCH 06/12] OMAP2/3: Add omap_type() for determining GP/EMU/HS
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (4 preceding siblings ...)
  2009-06-22 11:43 ` [PATCH 05/12] OMAP2/3: omap mailbox: platform_get_irq() error ignored Tony Lindgren
@ 2009-06-22 11:45 ` Tony Lindgren
  2009-06-22 11:46 ` [PATCH 07/12] OMAP3: SRAM size fix for HS/EMU devices Tony Lindgren
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:45 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Kevin Hilman

From: Kevin Hilman <khilman@deeprootsystems.com>

The omap_type() function is added and returns the DEVICETYPE field of
the CONTROL_STATUS register.  The result can be used for conditional
code based on whether device is GP (general purpose), EMU or
HS (high security). Also move the type defines so omap1 code
compile does not require ifdefs for sections using these defines.

This code is needed for the following fix to set the SRAM
size correctly for HS omaps.  Also at least PM and watchdog
code will need this function.

Signed-off-by: Kevin Hilman <khilman@ti.deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/id.c              |   22 ++++++++++++++++++++++
 arch/arm/plat-omap/include/mach/cpu.h |   22 +++++++++++-----------
 2 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 458990e..a98201c 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -48,6 +48,28 @@ int omap_chip_is(struct omap_chip_id oci)
 }
 EXPORT_SYMBOL(omap_chip_is);
 
+int omap_type(void)
+{
+	u32 val = 0;
+
+	if (cpu_is_omap24xx())
+		val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
+	else if (cpu_is_omap34xx())
+		val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
+	else {
+		pr_err("Cannot detect omap type!\n");
+		goto out;
+	}
+
+	val &= OMAP2_DEVICETYPE_MASK;
+	val >>= 8;
+
+out:
+	return val;
+}
+EXPORT_SYMBOL(omap_type);
+
+
 /*----------------------------------------------------------------------------*/
 
 #define OMAP_TAP_IDCODE		0x0204
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
index fc60c4e..285eaa3 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -30,6 +30,17 @@
 #ifndef __ASM_ARCH_OMAP_CPU_H
 #define __ASM_ARCH_OMAP_CPU_H
 
+/*
+ * Omap device type i.e. EMU/HS/TST/GP/BAD
+ */
+#define OMAP2_DEVICE_TYPE_TEST		0
+#define OMAP2_DEVICE_TYPE_EMU		1
+#define OMAP2_DEVICE_TYPE_SEC		2
+#define OMAP2_DEVICE_TYPE_GP		3
+#define OMAP2_DEVICE_TYPE_BAD		4
+
+int omap_type(void);
+
 struct omap_chip_id {
 	u8 oc;
 	u8 type;
@@ -424,17 +435,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-int omap_type(void);
-
-/*
- * Macro to detect device type i.e. EMU/HS/TST/GP/BAD
- */
-#define OMAP2_DEVICE_TYPE_TEST		0
-#define OMAP2_DEVICE_TYPE_EMU		1
-#define OMAP2_DEVICE_TYPE_SEC		2
-#define OMAP2_DEVICE_TYPE_GP		3
-#define OMAP2_DEVICE_TYPE_BAD		4
-
 void omap2_check_revision(void);
 
 #endif    /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */


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

* [PATCH 07/12] OMAP3: SRAM size fix for HS/EMU devices
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (5 preceding siblings ...)
  2009-06-22 11:45 ` [PATCH 06/12] OMAP2/3: Add omap_type() for determining GP/EMU/HS Tony Lindgren
@ 2009-06-22 11:46 ` Tony Lindgren
  2009-06-22 11:47 ` [PATCH 08/12] OMAP3: DMA: Enable idlemodes for DMA OCP Tony Lindgren
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:46 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Tero Kristo, Kevin Hilman, linux-omap

From: Tero Kristo <tero.kristo@nokia.com>

SRAM size fix for HS/EMU devices

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/sram.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index a5b9bcd..1c18de9 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -133,7 +133,12 @@ void __init omap_detect_sram(void)
 			if (cpu_is_omap34xx()) {
 				omap_sram_base = OMAP3_SRAM_PUB_VA;
 				omap_sram_start = OMAP3_SRAM_PUB_PA;
-				omap_sram_size = 0x8000; /* 32K */
+				if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) ||
+				    (omap_type() == OMAP2_DEVICE_TYPE_SEC)) {
+					omap_sram_size = 0x7000; /* 28K */
+				} else {
+					omap_sram_size = 0x8000; /* 32K */
+				}
 			} else {
 				omap_sram_base = OMAP2_SRAM_PUB_VA;
 				omap_sram_start = OMAP2_SRAM_PUB_PA;


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

* [PATCH 08/12] OMAP3: DMA: Enable idlemodes for DMA OCP
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (6 preceding siblings ...)
  2009-06-22 11:46 ` [PATCH 07/12] OMAP3: SRAM size fix for HS/EMU devices Tony Lindgren
@ 2009-06-22 11:47 ` Tony Lindgren
  2009-06-22 11:49 ` [PATCH 09/12] OMAP2/3: gpmc-onenand: correct use of async timings Tony Lindgren
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:47 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Kevin Hilman, Kalle Jokiniemi

From: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>

This patch enables MStandby smart-idle mode, autoidle smartidle mode,
and the autoidle bit for DMA4_OCP_SYSCONFIG.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.deeprootsystems.com>
---
 arch/arm/plat-omap/dma.c              |   13 +++++++++++++
 arch/arm/plat-omap/include/mach/dma.h |   15 +++++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index def14ec..7677a4a 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2457,6 +2457,19 @@ static int __init omap_init_dma(void)
 		setup_irq(irq, &omap24xx_dma_irq);
 	}
 
+	/* Enable smartidle idlemodes and autoidle */
+	if (cpu_is_omap34xx()) {
+		u32 v = dma_read(OCP_SYSCONFIG);
+		v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK |
+				DMA_SYSCONFIG_SIDLEMODE_MASK |
+				DMA_SYSCONFIG_AUTOIDLE);
+		v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) |
+			DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) |
+			DMA_SYSCONFIG_AUTOIDLE);
+		dma_write(v , OCP_SYSCONFIG);
+	}
+
+
 	/* FIXME: Update LCD DMA to work on 24xx */
 	if (cpu_class_is_omap1()) {
 		r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h
index 8c1eae8..7b939cc 100644
--- a/arch/arm/plat-omap/include/mach/dma.h
+++ b/arch/arm/plat-omap/include/mach/dma.h
@@ -389,6 +389,21 @@
 #define DMA_THREAD_FIFO_25		(0x02 << 14)
 #define DMA_THREAD_FIFO_50		(0x03 << 14)
 
+/* DMA4_OCP_SYSCONFIG bits */
+#define DMA_SYSCONFIG_MIDLEMODE_MASK		(3 << 12)
+#define DMA_SYSCONFIG_CLOCKACTIVITY_MASK	(3 << 8)
+#define DMA_SYSCONFIG_EMUFREE			(1 << 5)
+#define DMA_SYSCONFIG_SIDLEMODE_MASK		(3 << 3)
+#define DMA_SYSCONFIG_SOFTRESET			(1 << 2)
+#define DMA_SYSCONFIG_AUTOIDLE			(1 << 0)
+
+#define DMA_SYSCONFIG_MIDLEMODE(n)		((n) << 12)
+#define DMA_SYSCONFIG_SIDLEMODE(n)		((n) << 3)
+
+#define DMA_IDLEMODE_SMARTIDLE			0x2
+#define DMA_IDLEMODE_NO_IDLE			0x1
+#define DMA_IDLEMODE_FORCE_IDLE			0x0
+
 /* Chaining modes*/
 #ifndef CONFIG_ARCH_OMAP1
 #define OMAP_DMA_STATIC_CHAIN		0x1


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

* [PATCH 09/12] OMAP2/3: gpmc-onenand: correct use of async timings
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (7 preceding siblings ...)
  2009-06-22 11:47 ` [PATCH 08/12] OMAP3: DMA: Enable idlemodes for DMA OCP Tony Lindgren
@ 2009-06-22 11:49 ` Tony Lindgren
  2009-06-22 11:50 ` [PATCH 10/12] OMAP3: RX51: Use OneNAND sync read / write Tony Lindgren
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:49 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Adrian Hunter

From: Adrian Hunter <adrian.hunter@nokia.com>

Use async timings when sync timings are not requested.

Also ensure that OneNAND is in async mode when async
timings are used.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/gpmc-onenand.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 2fd22f9..54fec53 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -31,6 +31,8 @@ static struct platform_device gpmc_onenand_device = {
 static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
 {
 	struct gpmc_timings t;
+	u32 reg;
+	int err;
 
 	const int t_cer = 15;
 	const int t_avdp = 12;
@@ -43,6 +45,11 @@ static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
 	const int t_wpl = 40;
 	const int t_wph = 30;
 
+	/* Ensure sync read and sync write are disabled */
+	reg = readw(onenand_base + ONENAND_REG_SYS_CFG1);
+	reg &= ~ONENAND_SYS_CFG1_SYNC_READ & ~ONENAND_SYS_CFG1_SYNC_WRITE;
+	writew(reg, onenand_base + ONENAND_REG_SYS_CFG1);
+
 	memset(&t, 0, sizeof(t));
 	t.sync_clk = 0;
 	t.cs_on = 0;
@@ -74,7 +81,16 @@ static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
 			  GPMC_CONFIG1_DEVICESIZE_16 |
 			  GPMC_CONFIG1_MUXADDDATA);
 
-	return gpmc_cs_set_timings(cs, &t);
+	err = gpmc_cs_set_timings(cs, &t);
+	if (err)
+		return err;
+
+	/* Ensure sync read and sync write are disabled */
+	reg = readw(onenand_base + ONENAND_REG_SYS_CFG1);
+	reg &= ~ONENAND_SYS_CFG1_SYNC_READ & ~ONENAND_SYS_CFG1_SYNC_WRITE;
+	writew(reg, onenand_base + ONENAND_REG_SYS_CFG1);
+
+	return 0;
 }
 
 static void set_onenand_cfg(void __iomem *onenand_base, int latency,
@@ -124,7 +140,8 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
 	} else if (cfg->flags & ONENAND_SYNC_READWRITE) {
 		sync_read = 1;
 		sync_write = 1;
-	}
+	} else
+		return omap2_onenand_set_async_mode(cs, onenand_base);
 
 	if (!freq) {
 		/* Very first call freq is not known */


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

* [PATCH 10/12] OMAP3: RX51: Use OneNAND sync read / write
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (8 preceding siblings ...)
  2009-06-22 11:49 ` [PATCH 09/12] OMAP2/3: gpmc-onenand: correct use of async timings Tony Lindgren
@ 2009-06-22 11:50 ` Tony Lindgren
  2009-06-22 11:51 ` [PATCH 11/12] OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry Tony Lindgren
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:50 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Adrian Hunter

From: Adrian Hunter <adrian.hunter@nokia.com>

Use OneNAND sync read / write

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index da93b86..9a0bf67 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -362,6 +362,7 @@ static struct omap_onenand_platform_data board_onenand_data = {
 	.gpio_irq	= 65,
 	.parts		= onenand_partitions,
 	.nr_parts	= ARRAY_SIZE(onenand_partitions),
+	.flags		= ONENAND_SYNC_READWRITE,
 };
 
 static void __init board_onenand_init(void)


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

* [PATCH 11/12] OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (9 preceding siblings ...)
  2009-06-22 11:50 ` [PATCH 10/12] OMAP3: RX51: Use OneNAND sync read / write Tony Lindgren
@ 2009-06-22 11:51 ` Tony Lindgren
  2009-06-22 11:53 ` [PATCH 12/12] OMAP2/3: Initialize gpio debounce register Tony Lindgren
  2009-06-25 12:27 ` [PATCH 00/12] Omap fixes for 2.6.31 Russell King - ARM Linux
  12 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:51 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Fernando Guzman Lugo, linux-omap, Hiroshi DOYU

From: Fernando Guzman Lugo <x0095840@ti.com>

The function flush_iotlb_page is not loading the CAM register with
the correct entry to be flushed, so it is flushing other entry

Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 4cf449f..4a03013 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -298,7 +298,7 @@ void flush_iotlb_page(struct iommu *obj, u32 da)
 		if ((start <= da) && (da < start + bytes)) {
 			dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n",
 				__func__, start, da, bytes);
-
+			iotlb_load_cr(obj, &cr);
 			iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY);
 		}
 	}


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

* [PATCH 12/12] OMAP2/3: Initialize gpio debounce register
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (10 preceding siblings ...)
  2009-06-22 11:51 ` [PATCH 11/12] OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry Tony Lindgren
@ 2009-06-22 11:53 ` Tony Lindgren
  2009-06-23 13:57   ` [PATCH 13/12] OMAP: Fix IOMEM macro for assembly Tony Lindgren
  2009-06-25 12:27 ` [PATCH 00/12] Omap fixes for 2.6.31 Russell King - ARM Linux
  12 siblings, 1 reply; 16+ messages in thread
From: Tony Lindgren @ 2009-06-22 11:53 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Kevin Hilman, linux-omap, janboe

From: janboe <janboe.ye@gmail.com>

Some bootloader may initialize debounce register and this will make
dbclk not consist with the debounce register after linux kernel boot
up.

Signed-off-by: janboe <janboe.ye@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/gpio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 7fd89ba..26b387c 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1585,6 +1585,7 @@ static int __init _omap_gpio_init(void)
 			__raw_writel(0x00000000, bank->base + OMAP24XX_GPIO_IRQENABLE1);
 			__raw_writel(0xffffffff, bank->base + OMAP24XX_GPIO_IRQSTATUS1);
 			__raw_writew(0x0015, bank->base + OMAP24XX_GPIO_SYSCONFIG);
+			__raw_writel(0x00000000, bank->base + OMAP24XX_GPIO_DEBOUNCE_EN);
 
 			/* Initialize interface clock ungated, module enabled */
 			__raw_writel(0, bank->base + OMAP24XX_GPIO_CTRL);


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

* [PATCH 13/12] OMAP: Fix IOMEM macro for assembly
  2009-06-22 11:53 ` [PATCH 12/12] OMAP2/3: Initialize gpio debounce register Tony Lindgren
@ 2009-06-23 13:57   ` Tony Lindgren
  0 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-23 13:57 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

Here's one more fix.

Tony

[-- Attachment #2: iomem-braces.patch --]
[-- Type: text/x-diff, Size: 702 bytes --]

>From 503dcbeba50fd3545283594bc391b4a400fa6c48 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 23 Jun 2009 16:55:30 +0300
Subject: [PATCH] OMAP: Fix IOMEM macro for assembly

Otherwise IOMEM calculations can fail.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h
index 3b28147..73f483d 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -201,7 +201,7 @@
 #define OMAP2_IO_ADDRESS(pa)	IOMEM(__OMAP2_IO_ADDRESS(pa))
 
 #ifdef __ASSEMBLER__
-#define IOMEM(x)		x
+#define IOMEM(x)		(x)
 #else
 #define IOMEM(x)		((void __force __iomem *)(x))
 

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

* Re: [PATCH 00/12] Omap fixes for 2.6.31
  2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
                   ` (11 preceding siblings ...)
  2009-06-22 11:53 ` [PATCH 12/12] OMAP2/3: Initialize gpio debounce register Tony Lindgren
@ 2009-06-25 12:27 ` Russell King - ARM Linux
  2009-06-25 12:35   ` Git pull request for omap-fixes for 2.6.31 (Re: [PATCH 00/12] Omap fixes for 2.6.31) Tony Lindgren
  12 siblings, 1 reply; 16+ messages in thread
From: Russell King - ARM Linux @ 2009-06-25 12:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap

On Mon, Jun 22, 2009 at 02:36:53PM +0300, Tony Lindgren wrote:
> Here are some omap fixes for 2.6.31 for review.

All look fine.

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

* Git pull request for omap-fixes for 2.6.31 (Re: [PATCH 00/12] Omap fixes for 2.6.31)
  2009-06-25 12:27 ` [PATCH 00/12] Omap fixes for 2.6.31 Russell King - ARM Linux
@ 2009-06-25 12:35   ` Tony Lindgren
  0 siblings, 0 replies; 16+ messages in thread
From: Tony Lindgren @ 2009-06-25 12:35 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap

* Russell King - ARM Linux <linux@arm.linux.org.uk> [090625 15:27]:
> On Mon, Jun 22, 2009 at 02:36:53PM +0300, Tony Lindgren wrote:
> > Here are some omap fixes for 2.6.31 for review.
> 
> All look fine.

The following changes since commit d888a4c76c51092993643f8992bf55b3c28da483:
  Linus Torvalds (1):
        Merge branch 'for-linus' of git://git.kernel.org/.../vapier/blackfin

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-fixes

Adrian Hunter (2):
      OMAP2/3: gpmc-onenand: correct use of async timings
      OMAP3: RX51: Use OneNAND sync read / write

Andrew de Quincey (1):
      OMAP1: Fix N770 MMC support

Fernando Guzman Lugo (1):
      OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry

Grazvydas Ignotas (1):
      OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power

Huang Weiyi (1):
      OMAP1: remove duplicated #include

Jonathan McDowell (1):
      OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c

Kalle Jokiniemi (1):
      OMAP3: DMA: Enable idlemodes for DMA OCP

Kevin Hilman (1):
      OMAP2/3: Add omap_type() for determining GP/EMU/HS

Roel Kluin (1):
      OMAP2/3: omap mailbox: platform_get_irq() error ignored

Tero Kristo (1):
      OMAP3: SRAM size fix for HS/EMU devices

Tony Lindgren (1):
      OMAP: Fix IOMEM macro for assembly

janboe (1):
      OMAP2/3: Initialize gpio debounce register

 arch/arm/mach-omap1/board-nokia770.c         |    3 ++-
 arch/arm/mach-omap1/mailbox.c                |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 +
 arch/arm/mach-omap2/gpmc-onenand.c           |   21 +++++++++++++++++++--
 arch/arm/mach-omap2/id.c                     |   22 ++++++++++++++++++++++
 arch/arm/mach-omap2/mailbox.c                |    6 +++---
 arch/arm/mach-omap2/mmc-twl4030.c            |   13 ++++++++++++-
 arch/arm/plat-omap/dma.c                     |   13 +++++++++++++
 arch/arm/plat-omap/gpio.c                    |    1 +
 arch/arm/plat-omap/include/mach/cpu.h        |   22 +++++++++++-----------
 arch/arm/plat-omap/include/mach/dma.h        |   15 +++++++++++++++
 arch/arm/plat-omap/include/mach/io.h         |    2 +-
 arch/arm/plat-omap/iommu.c                   |    2 +-
 arch/arm/plat-omap/sram.c                    |    7 ++++++-
 14 files changed, 108 insertions(+), 22 deletions(-)

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

end of thread, other threads:[~2009-06-25 12:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 11:36 [PATCH 00/12] Omap fixes for 2.6.31 Tony Lindgren
2009-06-22 11:38 ` [PATCH 01/12] OMAP1: Fix compilation of arch/arm/mach-omap1/mailbox.c Tony Lindgren
2009-06-22 11:39 ` [PATCH 02/12] OMAP1: Fix N770 MMC support Tony Lindgren
2009-06-22 11:41 ` [PATCH 03/12] OMAP1: remove duplicated #include Tony Lindgren
2009-06-22 11:42 ` [PATCH 04/12] OMAP2/3: mmc-twl4030: use correct controller in twl_mmc23_set_power Tony Lindgren
2009-06-22 11:43 ` [PATCH 05/12] OMAP2/3: omap mailbox: platform_get_irq() error ignored Tony Lindgren
2009-06-22 11:45 ` [PATCH 06/12] OMAP2/3: Add omap_type() for determining GP/EMU/HS Tony Lindgren
2009-06-22 11:46 ` [PATCH 07/12] OMAP3: SRAM size fix for HS/EMU devices Tony Lindgren
2009-06-22 11:47 ` [PATCH 08/12] OMAP3: DMA: Enable idlemodes for DMA OCP Tony Lindgren
2009-06-22 11:49 ` [PATCH 09/12] OMAP2/3: gpmc-onenand: correct use of async timings Tony Lindgren
2009-06-22 11:50 ` [PATCH 10/12] OMAP3: RX51: Use OneNAND sync read / write Tony Lindgren
2009-06-22 11:51 ` [PATCH 11/12] OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry Tony Lindgren
2009-06-22 11:53 ` [PATCH 12/12] OMAP2/3: Initialize gpio debounce register Tony Lindgren
2009-06-23 13:57   ` [PATCH 13/12] OMAP: Fix IOMEM macro for assembly Tony Lindgren
2009-06-25 12:27 ` [PATCH 00/12] Omap fixes for 2.6.31 Russell King - ARM Linux
2009-06-25 12:35   ` Git pull request for omap-fixes for 2.6.31 (Re: [PATCH 00/12] Omap fixes for 2.6.31) Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.