All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Few more omap fixes for 2.6.31
@ 2009-08-05 14:11 Tony Lindgren
  2009-08-05 14:13 ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs Tony Lindgren
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

Hi all,

Here are few more fixes for omap for review.

Regards,

Tony

---

Janboe Ye (1):
      OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size

Roger Quadros (2):
      OMAP3: RX51: Define TWL4030 USB transceiver in board file
      OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs

Sergio Aguirre (1):
      OMAP3: Overo: Fix smsc911x platform device resource value

Vikram Pandita (1):
      OMAP2/3: DMA errata correction


 arch/arm/mach-omap2/board-overo.c            |    2 -
 arch/arm/mach-omap2/board-rx51-peripherals.c |    5 ++
 arch/arm/plat-omap/dma.c                     |    4 +-
 arch/arm/plat-omap/gpio.c                    |   68 ++++++++++++++++++++++++--
 arch/arm/plat-omap/sram.c                    |    4 +-
 5 files changed, 75 insertions(+), 8 deletions(-)

-- 
Signature

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

* [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
@ 2009-08-05 14:13 ` Tony Lindgren
  2009-08-10 13:01   ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs, v3 Tony Lindgren
  2009-08-05 14:14 ` [PATCH 2/5] OMAP2/3: DMA errata correction Tony Lindgren
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:13 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Roger Quadros

From: Roger Quadros <ext-roger.quadros@nokia.com>

gpio_get() should return DATAIN register value when the GPIO
is configured as input whereas it should return DATAOUT register
value when the GPIO is configured as output.
Now /sys/kernel/debug/gpio shows proper values for output GPIOs

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/gpio.c |   68 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 64 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 26b387c..e702b88 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -476,14 +476,12 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
 	__raw_writel(l, reg);
 }
 
-static int __omap_get_gpio_datain(int gpio)
+static int _get_gpio_datain(struct gpio_bank *bank, int gpio)
 {
-	struct gpio_bank *bank;
 	void __iomem *reg;
 
 	if (check_gpio(gpio) < 0)
 		return -EINVAL;
-	bank = get_gpio_bank(gpio);
 	reg = bank->base;
 	switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP1
@@ -524,6 +522,53 @@ static int __omap_get_gpio_datain(int gpio)
 			& (1 << get_gpio_index(gpio))) != 0;
 }
 
+static int _get_gpio_dataout(struct gpio_bank *bank, int gpio)
+{
+	void __iomem *reg;
+
+	if (check_gpio(gpio) < 0)
+		return -EINVAL;
+	reg = bank->base;
+
+	switch (bank->method) {
+#ifdef CONFIG_ARCH_OMAP1
+	case METHOD_MPUIO:
+		reg += OMAP_MPUIO_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP15XX
+	case METHOD_GPIO_1510:
+		reg += OMAP1510_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP16XX
+	case METHOD_GPIO_1610:
+		reg += OMAP1610_GPIO_DATAOUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP730
+	case METHOD_GPIO_730:
+		reg += OMAP730_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP850
+	case METHOD_GPIO_850:
+		reg += OMAP850_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \
+		defined(CONFIG_ARCH_OMAP4)
+	case METHOD_GPIO_24XX:
+		reg += OMAP24XX_GPIO_DATAOUT;
+		break;
+#endif
+	default:
+		return -EINVAL;
+	}
+
+	return (__raw_readl(reg) & (1 << get_gpio_index(gpio))) != 0;
+}
+
 #define MOD_REG_BIT(reg, bit_mask, set)	\
 do {	\
 	int l = __raw_readl(base + reg); \
@@ -1350,9 +1395,24 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset)
 	return 0;
 }
 
+static int gpio_is_input(struct gpio_bank *bank, int mask);
+
 static int gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-	return __omap_get_gpio_datain(chip->base + offset);
+	struct gpio_bank *bank;
+	void __iomem *reg;
+	int gpio;
+	u32 mask;
+
+	gpio = chip->base + offset;
+	bank = get_gpio_bank(gpio);
+	reg = bank->base;
+	mask = 1 << get_gpio_index(gpio);
+
+	if (gpio_is_input(bank, mask))
+		return _get_gpio_datain(bank, gpio);
+	else
+		return _get_gpio_dataout(bank, gpio);
 }
 
 static int gpio_output(struct gpio_chip *chip, unsigned offset, int value)


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

* [PATCH 2/5] OMAP2/3: DMA errata correction
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
  2009-08-05 14:13 ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs Tony Lindgren
@ 2009-08-05 14:14 ` Tony Lindgren
  2009-08-10 11:52   ` [PATCH 1.5/5] OMAP: Fix testing of cpu defines for mach-omap1 Tony Lindgren
  2009-08-05 14:15 ` [PATCH 3/5] OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size Tony Lindgren
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:14 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Nishant Kamat, Vikram Pandita, linux-omap

From: Vikram Pandita <vikram.pandita@ti.com>

This errata is valid for:
OMAP2420 Errata 1.85 Impacts all 2420 ES rev
OMAP2430 Errata 1.10 Impacts only ES1.0
Description: DMA may hang when several channels are used in parallel
OMAP3430: Not impacted, so remove the errata fix for omap3

Fixed issue reported on cpu_is_omap24xx check reported by Nishant Kamat

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Reviewed-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/dma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 7677a4a..e3ac94f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -946,7 +946,9 @@ void omap_start_dma(int lch)
 
 			cur_lch = next_lch;
 		} while (next_lch != -1);
-	} else if (cpu_class_is_omap2()) {
+	} else if (cpu_is_omap242x() ||
+		(cpu_is_omap243x() &&  omap_type() <= OMAP2430_REV_ES1_0)) {
+
 		/* Errata: Need to write lch even if not using chaining */
 		dma_write(lch, CLNK_CTRL(lch));
 	}


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

* [PATCH 3/5] OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
  2009-08-05 14:13 ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs Tony Lindgren
  2009-08-05 14:14 ` [PATCH 2/5] OMAP2/3: DMA errata correction Tony Lindgren
@ 2009-08-05 14:15 ` Tony Lindgren
  2009-08-05 14:17 ` [PATCH 4/5] OMAP3: Overo: Fix smsc911x platform device resource value Tony Lindgren
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:15 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Paul Walmsley, linux-omap, Janboe Ye, Li Hong Mei

From: Janboe Ye <yuan-bo.ye@motorola.com>

commit e85c205ac1427f2405021a36f083280ff0d0a35e increase vmalloc size.
vmalloc space will overlap with OMAP3 sram virtual address.

Signed-off-by: Li Hong Mei <hong-mei.li@motorola.com>
Signed-off-by: Janboe Ye <yuan-bo.ye@motorola.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/plat-omap/sram.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 4ea7380..2890b11 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -44,9 +44,9 @@
 #define OMAP2_SRAM_VA		0xe3000000
 #define OMAP2_SRAM_PUB_VA	(OMAP2_SRAM_VA + 0x800)
 #define OMAP3_SRAM_PA           0x40200000
-#define OMAP3_SRAM_VA           0xd7000000
+#define OMAP3_SRAM_VA           0xe3000000
 #define OMAP3_SRAM_PUB_PA       0x40208000
-#define OMAP3_SRAM_PUB_VA       0xd7008000
+#define OMAP3_SRAM_PUB_VA       (OMAP3_SRAM_VA + 0x8000)
 #define OMAP4_SRAM_PA		0x40200000		/*0x402f0000*/
 #define OMAP4_SRAM_VA		0xd7000000		/*0xd70f0000*/
 


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

* [PATCH 4/5] OMAP3: Overo: Fix smsc911x platform device resource value
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
                   ` (2 preceding siblings ...)
  2009-08-05 14:15 ` [PATCH 3/5] OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size Tony Lindgren
@ 2009-08-05 14:17 ` Tony Lindgren
  2009-08-05 14:18 ` [PATCH 5/5] OMAP3: RX51: Define TWL4030 USB transceiver in board file Tony Lindgren
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:17 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Sergio Aguirre, linux-omap

From: Sergio Aguirre <saaguirre@ti.com>

Fixes a wrong setting of resource parameter list in
SMSC911x platform driver data structure for Overo case.

This fixes folowing warning when compiling for Overo board:

	warning: initialization from incompatible pointer type

Introduced since commit id:
	commit 172ef275444efa12d834fb9d1b1acdac92db47f7
	Author: Steve Sakoman <sakoman@gmail.com>
	Date:   Mon Feb 2 06:27:49 2009 +0000

	    ARM: Add SMSC911X support to Overo platform (V2)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-overo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index dff5528..fec1bb1 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -146,7 +146,7 @@ static struct platform_device overo_smsc911x_device = {
 	.name		= "smsc911x",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(overo_smsc911x_resources),
-	.resource	= &overo_smsc911x_resources,
+	.resource	= overo_smsc911x_resources,
 	.dev		= {
 		.platform_data = &overo_smsc911x_config,
 	},


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

* [PATCH 5/5] OMAP3: RX51: Define TWL4030 USB transceiver in board file
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
                   ` (3 preceding siblings ...)
  2009-08-05 14:17 ` [PATCH 4/5] OMAP3: Overo: Fix smsc911x platform device resource value Tony Lindgren
@ 2009-08-05 14:18 ` Tony Lindgren
  2009-08-06  6:52 ` [PATCH 5/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up Tony Lindgren
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-05 14:18 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Felipe Balbi, linux-omap, Roger Quadros

From: Roger Quadros <ext-roger.quadros@nokia.com>

Add OTG transceiver to RX51 platform data to prevent kernel NULL pointer
dereference during MUSB initialisation.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 9a0bf67..56d931a 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -278,6 +278,10 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = {
 	.setup			= rx51_twlgpio_setup,
 };
 
+static struct twl4030_usb_data rx51_usb_data = {
+	.usb_mode		= T2_USB_MODE_ULPI,
+};
+
 static struct twl4030_platform_data rx51_twldata = {
 	.irq_base		= TWL4030_IRQ_BASE,
 	.irq_end		= TWL4030_IRQ_END,
@@ -286,6 +290,7 @@ static struct twl4030_platform_data rx51_twldata = {
 	.gpio			= &rx51_gpio_data,
 	.keypad			= &rx51_kp_data,
 	.madc			= &rx51_madc_data,
+	.usb			= &rx51_usb_data,
 
 	.vaux1			= &rx51_vaux1,
 	.vaux2			= &rx51_vaux2,


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

* [PATCH 5/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
                   ` (4 preceding siblings ...)
  2009-08-05 14:18 ` [PATCH 5/5] OMAP3: RX51: Define TWL4030 USB transceiver in board file Tony Lindgren
@ 2009-08-06  6:52 ` Tony Lindgren
  2009-08-06  6:54   ` [PATCH 6/5] " Tony Lindgren
  2009-08-06  8:12 ` [PATCH 7/5] OMAP3: RX51: Updated rx51_defconfig Tony Lindgren
  2009-08-07  9:01 ` Git pull request for omap fixes for 2.6.31 Tony Lindgren
  7 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2009-08-06  6:52 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

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

One more patch I missed below.

Tony

[-- Attachment #2: mmc-free-regulators.patch --]
[-- Type: text/x-diff, Size: 1350 bytes --]

>From 8b28d125dcfa4a250a897baa2425d1f30dd56219 Mon Sep 17 00:00:00 2001
From: Roger Quadros <ext-roger.quadros@nokia.com>
Date: Thu, 6 Aug 2009 09:49:18 +0300
Subject: [PATCH] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up

twl_mmc_cleanup() must free up the regulators that were
allocated by twl_mmc_late_init().
This eliminates the below error when 'omap_hsmmc' module is
repeatedly loaded and unloaded.

"sysfs: cannot create duplicate filename '/devices/platform
 /mmci-omap-hs.0/microamps_requested_vmmc'"

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 1541fd4..3c04c2f 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -119,6 +119,7 @@ static int twl_mmc_late_init(struct device *dev)
 				if (i != 0)
 					break;
 				ret = PTR_ERR(reg);
+				hsmmc[i].vcc = NULL;
 				goto err;
 			}
 			hsmmc[i].vcc = reg;
@@ -165,8 +166,13 @@ done:
 static void twl_mmc_cleanup(struct device *dev)
 {
 	struct omap_mmc_platform_data *mmc = dev->platform_data;
+	int i;
 
 	gpio_free(mmc->slots[0].switch_pin);
+	for(i = 0; i < ARRAY_SIZE(hsmmc); i++) {
+		regulator_put(hsmmc[i].vcc);
+		regulator_put(hsmmc[i].vcc_aux);
+	}
 }
 
 #ifdef CONFIG_PM

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

* Re: [PATCH 6/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
  2009-08-06  6:52 ` [PATCH 5/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up Tony Lindgren
@ 2009-08-06  6:54   ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-06  6:54 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

* Tony Lindgren <tony@atomide.com> [090806 09:53]:
> One more patch I missed below.

And it should be numbered 6/5, not 5/5.

Tony

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

* [PATCH 7/5] OMAP3: RX51: Updated rx51_defconfig
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
                   ` (5 preceding siblings ...)
  2009-08-06  6:52 ` [PATCH 5/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up Tony Lindgren
@ 2009-08-06  8:12 ` Tony Lindgren
  2009-08-07  9:01 ` Git pull request for omap fixes for 2.6.31 Tony Lindgren
  7 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-06  8:12 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap

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

Just one more..

Tony

[-- Attachment #2: rx51-boots.patch --]
[-- Type: text/x-diff, Size: 1652 bytes --]

>From a46c20070f08759cfbd42c05fe7debb178d896cb Mon Sep 17 00:00:00 2001
From: Roger Quadros <ext-roger.quadros@nokia.com>
Date: Thu, 6 Aug 2009 11:07:46 +0300
Subject: [PATCH] OMAP3: RX51: Updated rx51_defconfig

Added REGULATOR, MMC and updated default CMDLINE so RX51 now boots.

Note that the regulator code should be moved from mmc-twl4030.c
to omap_hsmmc.c so it can be a module.

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/configs/rx51_defconfig b/arch/arm/configs/rx51_defconfig
index eb2cb31..f238df6 100644
--- a/arch/arm/configs/rx51_defconfig
+++ b/arch/arm/configs/rx51_defconfig
@@ -282,7 +282,7 @@ CONFIG_ALIGNMENT_TRAP=y
 #
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0"
+CONFIG_CMDLINE="init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0 console=ttyS2,115200n8"
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
 
@@ -1354,7 +1354,7 @@ CONFIG_USB_OTG_UTILS=y
 # CONFIG_USB_GPIO_VBUS is not set
 # CONFIG_ISP1301_OMAP is not set
 CONFIG_TWL4030_USB=y
-CONFIG_MMC=m
+CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
@@ -1449,7 +1449,8 @@ CONFIG_RTC_DRV_TWL4030=m
 # on-CPU RTC drivers
 #
 # CONFIG_DMADEVICES is not set
-# CONFIG_REGULATOR is not set
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_TWL4030=y
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 

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

* Git pull request for omap fixes for 2.6.31
  2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
                   ` (6 preceding siblings ...)
  2009-08-06  8:12 ` [PATCH 7/5] OMAP3: RX51: Updated rx51_defconfig Tony Lindgren
@ 2009-08-07  9:01 ` Tony Lindgren
  2009-08-07  9:06   ` Russell King - ARM Linux
  7 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2009-08-07  9:01 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-omap

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

Hi Russell,

Here's the pull request for you.

Tony

[-- Attachment #2: pull.txt --]
[-- Type: text/plain, Size: 1234 bytes --]

The following changes since commit ed680c4ad478d0fee9740f7d029087f181346564:
  Linus Torvalds (1):
        Linux 2.6.31-rc5

are available in the git repository at:

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

Janboe Ye (1):
      OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size

Roger Quadros (4):
      OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs
      OMAP3: RX51: Define TWL4030 USB transceiver in board file
      OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
      OMAP3: RX51: Updated rx51_defconfig

Sergio Aguirre (1):
      OMAP3: Overo: Fix smsc911x platform device resource value

Vikram Pandita (1):
      OMAP2/3: DMA errata correction

 arch/arm/configs/rx51_defconfig              |    7 ++-
 arch/arm/mach-omap2/board-overo.c            |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    5 ++
 arch/arm/mach-omap2/mmc-twl4030.c            |    6 ++
 arch/arm/plat-omap/dma.c                     |    4 +-
 arch/arm/plat-omap/gpio.c                    |   68 ++++++++++++++++++++++++--
 arch/arm/plat-omap/sram.c                    |    4 +-
 7 files changed, 85 insertions(+), 11 deletions(-)

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

* Re: Git pull request for omap fixes for 2.6.31
  2009-08-07  9:01 ` Git pull request for omap fixes for 2.6.31 Tony Lindgren
@ 2009-08-07  9:06   ` Russell King - ARM Linux
  2009-08-07  9:13     ` Tony Lindgren
  0 siblings, 1 reply; 15+ messages in thread
From: Russell King - ARM Linux @ 2009-08-07  9:06 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap

On Fri, Aug 07, 2009 at 12:01:48PM +0300, Tony Lindgren wrote:
> Here's the pull request for you.

I'll hold off merging this for a bit - I've sent Linus two pull requests
over the last couple of weeks, both of which so far haven't produced a
reaction. It would be unfair for me to merge more stuff onto that branch
until Linus has pulled.

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

* Re: Git pull request for omap fixes for 2.6.31
  2009-08-07  9:06   ` Russell King - ARM Linux
@ 2009-08-07  9:13     ` Tony Lindgren
  2009-08-10 13:18       ` Git pull request for omap fixes for 2.6.31, v2 Tony Lindgren
  0 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2009-08-07  9:13 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap

* Russell King - ARM Linux <linux@arm.linux.org.uk> [090807 12:06]:
> On Fri, Aug 07, 2009 at 12:01:48PM +0300, Tony Lindgren wrote:
> > Here's the pull request for you.
> 
> I'll hold off merging this for a bit - I've sent Linus two pull requests
> over the last couple of weeks, both of which so far haven't produced a
> reaction. It would be unfair for me to merge more stuff onto that branch
> until Linus has pulled.

OK thanks.

Tony

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

* [PATCH 1.5/5] OMAP: Fix testing of cpu defines for mach-omap1
  2009-08-05 14:14 ` [PATCH 2/5] OMAP2/3: DMA errata correction Tony Lindgren
@ 2009-08-10 11:52   ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-10 11:52 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Nishant Kamat, Vikram Pandita, linux-omap

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

Looks like this is needed before the 2/5 patch for DMA workaround patch to
keep compile working on mach-omap1 machines.

Regards,

Tony

[-- Attachment #2: cpu-remove-ifdef.patch --]
[-- Type: text/x-diff, Size: 1246 bytes --]

>From f60e4730feab2b3d0101d059534123e04fc26862 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 10 Aug 2009 14:04:15 +0300
Subject: [PATCH] OMAP: Fix testing of cpu defines for mach-omap1

There's no need to keep these defines limited in the ifdef block
for mach-omap2. It will just cause problems testing for the CPU
revision in the common code, like the next patch does for the DMA
errata.

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

diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
index 285eaa3..11e73d9 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -378,9 +378,6 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_class_is_omap2()	(cpu_is_omap24xx() || cpu_is_omap34xx() || \
 				cpu_is_omap44xx())
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
-			defined(CONFIG_ARCH_OMAP4)
-
 /* Various silicon revisions for omap2 */
 #define OMAP242X_CLASS		0x24200024
 #define OMAP2420_REV_ES1_0	0x24200024
@@ -436,5 +433,3 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
-
-#endif    /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */

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

* Re: [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs, v3
  2009-08-05 14:13 ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs Tony Lindgren
@ 2009-08-10 13:01   ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-10 13:01 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Roger Quadros

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

Here's an update from Roger for this one that builds without
CONFIG_DEBUG_FS.

Tony

[-- Attachment #2: gpio-data-v3.patch --]
[-- Type: text/x-diff, Size: 4331 bytes --]

>From b37c45b8c27c049dc44673e40fd63820fd9a9d91 Mon Sep 17 00:00:00 2001
From: Roger Quadros <ext-roger.quadros@nokia.com>
Date: Wed, 5 Aug 2009 16:53:24 +0300
Subject: [PATCH] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs

gpio_get() should return DATAIN register value when the GPIO
is configured as input whereas it should return DATAOUT register
value when the GPIO is configured as output.
Now /sys/kernel/debug/gpio shows proper values for output GPIOs

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 26b387c..9c16ca8 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -476,14 +476,12 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
 	__raw_writel(l, reg);
 }
 
-static int __omap_get_gpio_datain(int gpio)
+static int _get_gpio_datain(struct gpio_bank *bank, int gpio)
 {
-	struct gpio_bank *bank;
 	void __iomem *reg;
 
 	if (check_gpio(gpio) < 0)
 		return -EINVAL;
-	bank = get_gpio_bank(gpio);
 	reg = bank->base;
 	switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP1
@@ -524,6 +522,53 @@ static int __omap_get_gpio_datain(int gpio)
 			& (1 << get_gpio_index(gpio))) != 0;
 }
 
+static int _get_gpio_dataout(struct gpio_bank *bank, int gpio)
+{
+	void __iomem *reg;
+
+	if (check_gpio(gpio) < 0)
+		return -EINVAL;
+	reg = bank->base;
+
+	switch (bank->method) {
+#ifdef CONFIG_ARCH_OMAP1
+	case METHOD_MPUIO:
+		reg += OMAP_MPUIO_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP15XX
+	case METHOD_GPIO_1510:
+		reg += OMAP1510_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP16XX
+	case METHOD_GPIO_1610:
+		reg += OMAP1610_GPIO_DATAOUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP730
+	case METHOD_GPIO_730:
+		reg += OMAP730_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#ifdef CONFIG_ARCH_OMAP850
+	case METHOD_GPIO_850:
+		reg += OMAP850_GPIO_DATA_OUTPUT;
+		break;
+#endif
+#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \
+		defined(CONFIG_ARCH_OMAP4)
+	case METHOD_GPIO_24XX:
+		reg += OMAP24XX_GPIO_DATAOUT;
+		break;
+#endif
+	default:
+		return -EINVAL;
+	}
+
+	return (__raw_readl(reg) & (1 << get_gpio_index(gpio))) != 0;
+}
+
 #define MOD_REG_BIT(reg, bit_mask, set)	\
 do {	\
 	int l = __raw_readl(base + reg); \
@@ -1350,9 +1395,49 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset)
 	return 0;
 }
 
+static int gpio_is_input(struct gpio_bank *bank, int mask)
+{
+	void __iomem *reg = bank->base;
+
+	switch (bank->method) {
+	case METHOD_MPUIO:
+		reg += OMAP_MPUIO_IO_CNTL;
+		break;
+	case METHOD_GPIO_1510:
+		reg += OMAP1510_GPIO_DIR_CONTROL;
+		break;
+	case METHOD_GPIO_1610:
+		reg += OMAP1610_GPIO_DIRECTION;
+		break;
+	case METHOD_GPIO_730:
+		reg += OMAP730_GPIO_DIR_CONTROL;
+		break;
+	case METHOD_GPIO_850:
+		reg += OMAP850_GPIO_DIR_CONTROL;
+		break;
+	case METHOD_GPIO_24XX:
+		reg += OMAP24XX_GPIO_OE;
+		break;
+	}
+	return __raw_readl(reg) & mask;
+}
+
 static int gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-	return __omap_get_gpio_datain(chip->base + offset);
+	struct gpio_bank *bank;
+	void __iomem *reg;
+	int gpio;
+	u32 mask;
+
+	gpio = chip->base + offset;
+	bank = get_gpio_bank(gpio);
+	reg = bank->base;
+	mask = 1 << get_gpio_index(gpio);
+
+	if (gpio_is_input(bank, mask))
+		return _get_gpio_datain(bank, gpio);
+	else
+		return _get_gpio_dataout(bank, gpio);
 }
 
 static int gpio_output(struct gpio_chip *chip, unsigned offset, int value)
@@ -1886,34 +1971,6 @@ arch_initcall(omap_gpio_sysinit);
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 
-static int gpio_is_input(struct gpio_bank *bank, int mask)
-{
-	void __iomem *reg = bank->base;
-
-	switch (bank->method) {
-	case METHOD_MPUIO:
-		reg += OMAP_MPUIO_IO_CNTL;
-		break;
-	case METHOD_GPIO_1510:
-		reg += OMAP1510_GPIO_DIR_CONTROL;
-		break;
-	case METHOD_GPIO_1610:
-		reg += OMAP1610_GPIO_DIRECTION;
-		break;
-	case METHOD_GPIO_730:
-		reg += OMAP730_GPIO_DIR_CONTROL;
-		break;
-	case METHOD_GPIO_850:
-		reg += OMAP850_GPIO_DIR_CONTROL;
-		break;
-	case METHOD_GPIO_24XX:
-		reg += OMAP24XX_GPIO_OE;
-		break;
-	}
-	return __raw_readl(reg) & mask;
-}
-
-
 static int dbg_gpio_show(struct seq_file *s, void *unused)
 {
 	unsigned	i, j, gpio;

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

* Git pull request for omap fixes for 2.6.31, v2
  2009-08-07  9:13     ` Tony Lindgren
@ 2009-08-10 13:18       ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2009-08-10 13:18 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap

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

* Tony Lindgren <tony@atomide.com> [090807 12:14]:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [090807 12:06]:
> > On Fri, Aug 07, 2009 at 12:01:48PM +0300, Tony Lindgren wrote:
> > > Here's the pull request for you.
> > 
> > I'll hold off merging this for a bit - I've sent Linus two pull requests
> > over the last couple of weeks, both of which so far haven't produced a
> > reaction. It would be unfair for me to merge more stuff onto that branch
> > until Linus has pulled.
> 
> OK thanks.

Looks like I did not test this series enough.. I've updated it now for the
two patches as posted here earlier today. Updated pull request below.

Regards,

Tony


[-- Attachment #2: pull.txt --]
[-- Type: text/plain, Size: 1362 bytes --]

The following changes since commit ed680c4ad478d0fee9740f7d029087f181346564:
  Linus Torvalds (1):
        Linux 2.6.31-rc5

are available in the git repository at:

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

Janboe Ye (1):
      OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size

Roger Quadros (4):
      OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs
      OMAP3: RX51: Define TWL4030 USB transceiver in board file
      OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up
      OMAP3: RX51: Updated rx51_defconfig

Sergio Aguirre (1):
      OMAP3: Overo: Fix smsc911x platform device resource value

Tony Lindgren (1):
      OMAP: Fix testing of cpu defines for mach-omap1

Vikram Pandita (1):
      OMAP2/3: DMA errata correction

 arch/arm/configs/rx51_defconfig              |    7 +-
 arch/arm/mach-omap2/board-overo.c            |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    5 +
 arch/arm/mach-omap2/mmc-twl4030.c            |    6 ++
 arch/arm/plat-omap/dma.c                     |    4 +-
 arch/arm/plat-omap/gpio.c                    |  121 +++++++++++++++++++-------
 arch/arm/plat-omap/include/mach/cpu.h        |    5 -
 arch/arm/plat-omap/sram.c                    |    4 +-
 8 files changed, 110 insertions(+), 44 deletions(-)

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

end of thread, other threads:[~2009-08-10 13:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05 14:11 [PATCH 0/5] Few more omap fixes for 2.6.31 Tony Lindgren
2009-08-05 14:13 ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs Tony Lindgren
2009-08-10 13:01   ` [PATCH 1/5] OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs, v3 Tony Lindgren
2009-08-05 14:14 ` [PATCH 2/5] OMAP2/3: DMA errata correction Tony Lindgren
2009-08-10 11:52   ` [PATCH 1.5/5] OMAP: Fix testing of cpu defines for mach-omap1 Tony Lindgren
2009-08-05 14:15 ` [PATCH 3/5] OMAP3: Fix omap3 sram virtual addres overlap vmalloc space after increasing vmalloc size Tony Lindgren
2009-08-05 14:17 ` [PATCH 4/5] OMAP3: Overo: Fix smsc911x platform device resource value Tony Lindgren
2009-08-05 14:18 ` [PATCH 5/5] OMAP3: RX51: Define TWL4030 USB transceiver in board file Tony Lindgren
2009-08-06  6:52 ` [PATCH 5/5] OMAP2/3: mmc-twl4030: Free up MMC regulators while cleaning up Tony Lindgren
2009-08-06  6:54   ` [PATCH 6/5] " Tony Lindgren
2009-08-06  8:12 ` [PATCH 7/5] OMAP3: RX51: Updated rx51_defconfig Tony Lindgren
2009-08-07  9:01 ` Git pull request for omap fixes for 2.6.31 Tony Lindgren
2009-08-07  9:06   ` Russell King - ARM Linux
2009-08-07  9:13     ` Tony Lindgren
2009-08-10 13:18       ` Git pull request for omap fixes for 2.6.31, v2 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.