Skip to contentSkip to conversation

Omap fixes for 2.6.30-rc1

PATCH In review Tony Lindgren 4 participants 21 messages Apr 14, 2009 – May 21, 2009

Subsystems (8)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover Omap fixes for 2.6.30-rc1

Hi all,

Here are some omap fixes for review.

Regards,

Tony

---

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (1):
ARM: OMAP2/3: GPIO: do not attempt to wake-enable

Ladislav Michl (3):
ARM: OMAP1: Fix mmc_set_power GPIO usage
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP: MMC: Remove unused power_pin

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Clean up spurious interrupt check logic
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Tony Lindgren (1):
ARM: OMAP: Remove old dead gpio expander code

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +--
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 -
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 -
 arch/arm/mach-omap2/board-h4.c                 |   95 -----------------------
 arch/arm/mach-omap2/board-rx51.c               |    1 
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 -
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 
 arch/arm/plat-omap/dma.c                       |   13 +--
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/eac.h          |  100 ------------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 
 drivers/mmc/host/omap.c                        |    2 
 16 files changed, 24 insertions(+), 413 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/11 ARM: OMAP: Fix for possible race condition in omap_free_dma()

From: Santosh Shilimkar <[email protected]>

Fix the possible race condition in omap_free_dma(). Function omap_free_dma() sets the dev_id = -1 and then accesses the channel afterwards to clear it. But setting the dev_id=-1 makes the channel available for allocation again. So it is possible someone else can grab it and results are unpredictable. To avod this DMA channle is cleared first and then the dev_id = -1 is set.

Thanks to McNeil, Sean <[email protected]> for ointing out this issue.

---
 arch/arm/plat-omap/dma.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
arch/arm/plat-omap/dma.c +6 -7
index 21cc014..7fc8c04 100644
@@ -760,19 +760,12 @@ void omap_free_dma(int lch)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(&dma_chan_lock, flags);
 	if (dma_chan[lch].dev_id == -1) {
 		pr_err("omap_dma: trying to free unallocated DMA channel %d\n",
 		       lch);
-		spin_unlock_irqrestore(&dma_chan_lock, flags);
 		return;
 	}
 
-	dma_chan[lch].dev_id = -1;
-	dma_chan[lch].next_lch = -1;
-	dma_chan[lch].callback = NULL;
-	spin_unlock_irqrestore(&dma_chan_lock, flags);
-
 	if (cpu_class_is_omap1()) {
 		/* Disable all DMA interrupts for the channel. */
 		dma_write(0, CICR(lch));
@@ -798,6 +791,12 @@ void omap_free_dma(int lch)
 		dma_write(0, CCR(lch));
 		omap_clear_dma(lch);
 	}
+
+	spin_lock_irqsave(&dma_chan_lock, flags);
+	dma_chan[lch].dev_id = -1;
+	dma_chan[lch].next_lch = -1;
+	dma_chan[lch].callback = NULL;
+	spin_unlock_irqrestore(&dma_chan_lock, flags);
 }
 EXPORT_SYMBOL(omap_free_dma);
 
author maintainer
#2 lore raw

PATCH 2/11 ARM: OMAP: Remove old dead gpio expander code

In reply to Tony Lindgren

This should be done with GPIO calls. Patches against the mainline tree welcome to add the necessary working functionality back.

---
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap2/board-h4.c                 |   95 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 4 files changed, 0 insertions(+), 235 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
arch/arm/mach-omap1/board-h3.c +0 -101
index 4695965..f597968 100644
@@ -39,12 +39,10 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 
-#include <mach/gpioexpander.h>
 #include <mach/irqs.h>
 #include <mach/mux.h>
 #include <mach/tc.h>
 #include <mach/nand.h>
-#include <mach/irda.h>
 #include <mach/usb.h>
 #include <mach/keypad.h>
 #include <mach/dma.h>
@@ -276,104 +274,6 @@ static struct platform_device h3_kp_device = {
 	.resource	= h3_kp_resources,
 };
 
-
-/* Select between the IrDA and aGPS module
- */
-static int h3_select_irda(struct device *dev, int state)
-{
-	unsigned char expa;
-	int err = 0;
-
-	if ((err = read_gpio_expa(&expa, 0x26))) {
-		printk(KERN_ERR "Error reading from I/O EXPANDER \n");
-		return err;
-	}
-
-	/* 'P6' enable/disable IRDA_TX and IRDA_RX */
-	if (state & IR_SEL) { /* IrDA */
-		if ((err = write_gpio_expa(expa | 0x40, 0x26))) {
-			printk(KERN_ERR "Error writing to I/O EXPANDER \n");
-			return err;
-		}
-	} else {
-		if ((err = write_gpio_expa(expa & ~0x40, 0x26))) {
-			printk(KERN_ERR "Error writing to I/O EXPANDER \n");
-			return err;
-		}
-	}
-	return err;
-}
-
-static void set_trans_mode(struct work_struct *work)
-{
-	struct omap_irda_config *irda_config =
-		container_of(work, struct omap_irda_config, gpio_expa.work);
-	int mode = irda_config->mode;
-	unsigned char expa;
-	int err = 0;
-
-	if ((err = read_gpio_expa(&expa, 0x27)) != 0) {
-		printk(KERN_ERR "Error reading from I/O expander\n");
-	}
-
-	expa &= ~0x03;
-
-	if (mode & IR_SIRMODE) {
-		expa |= 0x01;
-	} else { /* MIR/FIR */
-		expa |= 0x03;
-	}
-
-	if ((err = write_gpio_expa(expa, 0x27)) != 0) {
-		printk(KERN_ERR "Error writing to I/O expander\n");
-	}
-}
-
-static int h3_transceiver_mode(struct device *dev, int mode)
-{
-	struct omap_irda_config *irda_config = dev->platform_data;
-
-	irda_config->mode = mode;
-	cancel_delayed_work(&irda_config->gpio_expa);
-	PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
-	schedule_delayed_work(&irda_config->gpio_expa, 0);
-
-	return 0;
-}
-
-static struct omap_irda_config h3_irda_data = {
-	.transceiver_cap	= IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
-	.transceiver_mode	= h3_transceiver_mode,
-	.select_irda	 	= h3_select_irda,
-	.rx_channel		= OMAP_DMA_UART3_RX,
-	.tx_channel		= OMAP_DMA_UART3_TX,
-	.dest_start		= UART3_THR,
-	.src_start		= UART3_RHR,
-	.tx_trigger		= 0,
-	.rx_trigger		= 0,
-};
-
-static struct resource h3_irda_resources[] = {
-	[0] = {
-		.start	= INT_UART3,
-		.end	= INT_UART3,
-		.flags	= IORESOURCE_IRQ,
-	},
-};
-
-static u64 irda_dmamask = 0xffffffff;
-
-static struct platform_device h3_irda_device = {
-	.name		= "omapirda",
-	.id		= 0,
-	.dev		= {
-		.platform_data	= &h3_irda_data,
-		.dma_mask	= &irda_dmamask,
-	},
-	.num_resources	= ARRAY_SIZE(h3_irda_resources),
-	.resource	= h3_irda_resources,
-};
-
 static struct platform_device h3_lcd_device = {
 	.name		= "lcd_h3",
 	.id		= -1,
@@ -395,7 +295,6 @@ static struct platform_device *devices[] __initdata = {
 	&nand_device,
         &smc91x_device,
 	&intlat_device,
-	&h3_irda_device,
 	&h3_kp_device,
 	&h3_lcd_device,
 };
arch/arm/mach-omap2/board-h4.c +0 -95

115 lines not on this page · raw message

arch/arm/plat-omap/include/mach/gpioexpander.h deleted +0 -35
deleted file mode 100644
index 90444a0..0000000
@@ -1,35 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/gpioexpander.h
- *
- *
- * Copyright (C) 2004 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef __ASM_ARCH_OMAP_GPIOEXPANDER_H
-#define __ASM_ARCH_OMAP_GPIOEXPANDER_H
-
-/* Function Prototypes for GPIO Expander functions */
-
-#ifdef CONFIG_GPIOEXPANDER_OMAP
-int read_gpio_expa(u8 *, int);
-int write_gpio_expa(u8 , int);
-#else
-static inline int read_gpio_expa(u8 *val, int addr)
-{
-	return 0;
-}
-static inline int write_gpio_expa(u8 val, int addr)
-{
-	return 0;
-}
-#endif
-
-#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
arch/arm/plat-omap/include/mach/irda.h +0 -4
index 8372a00..40f6033 100644
@@ -21,10 +21,6 @@ struct omap_irda_config {
 	int transceiver_cap;
 	int (*transceiver_mode)(struct device *dev, int mode);
 	int (*select_irda)(struct device *dev, int state);
-	/* Very specific to the needs of some platforms (h3,h4)
-	 * having calls which can sleep in irda_set_speed.
-	 */
-	struct delayed_work gpio_expa;
 	int rx_channel;
 	int tx_channel;
 	unsigned long dest_start;
author maintainer
#3 lore raw

PATCH 3/11 ARM: OMAP: MMC: Remove unused power_pin

In reply to Tony Lindgren

From: Ladislav Michl <[email protected]>

Remove unused power_pin

---
 arch/arm/plat-omap/include/mach/mmc.h |    1 -
 drivers/mmc/host/omap.c               |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/mach/mmc.h +0 -1
index 4435bd4..81d5b36 100644
@@ -79,7 +79,6 @@ struct omap_mmc_platform_data {
 
 		/* use the internal clock */
 		unsigned internal_clock:1;
-		s16 power_pin;
 
 		int switch_pin;			/* gpio (card detect) */
 		int gpio_wp;			/* gpio (write protect) */
drivers/mmc/host/omap.c +0 -2
index 5570849..bfa25c0 100644
@@ -157,8 +157,6 @@ struct mmc_omap_host {
 	struct timer_list	dma_timer;
 	unsigned		dma_len;
 
-	short			power_pin;
-
 	struct mmc_omap_slot    *slots[OMAP_MMC_MAX_SLOTS];
 	struct mmc_omap_slot    *current_slot;
 	spinlock_t              slot_lock;
author maintainer
#4 lore raw

PATCH 4/11 ARM: OMAP1: Simplify board-h2 MMC setup

In reply to Tony Lindgren

From: Ladislav Michl <[email protected]>

Simplify board-h2 MMC setup

---
 arch/arm/mach-omap1/board-h2-mmc.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/mach-omap1/board-h2-mmc.c +4 -10
index 44d4a96..46098f5 100644
@@ -26,19 +26,13 @@
 static int mmc_set_power(struct device *dev, int slot, int power_on,
 				int vdd)
 {
-	if (power_on)
-		gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 1);
-	else
-		gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0);
-
+	gpio_set_value(H2_TPS_GPIO_MMC_PWR_EN, power_on);
 	return 0;
 }
 
 static int mmc_late_init(struct device *dev)
 {
-	int ret;
-
-	ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power");
+	int ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power");
 	if (ret < 0)
 		return ret;
 
@@ -47,7 +41,7 @@ static int mmc_late_init(struct device *dev)
 	return ret;
 }
 
-static void mmc_shutdown(struct device *dev)
+static void mmc_cleanup(struct device *dev)
 {
 	gpio_free(H2_TPS_GPIO_MMC_PWR_EN);
 }
@@ -60,7 +54,7 @@ static void mmc_shutdown(struct device *dev)
 static struct omap_mmc_platform_data mmc1_data = {
 	.nr_slots                       = 1,
 	.init				= mmc_late_init,
-	.shutdown			= mmc_shutdown,
+	.cleanup			= mmc_cleanup,
 	.dma_mask			= 0xffffffff,
 	.slots[0]       = {
 		.set_power              = mmc_set_power,
author maintainer
#5 lore raw

PATCH 5/11 ARM: OMAP1: Fix mmc_set_power GPIO usage

In reply to Tony Lindgren

From: Ladislav Michl <[email protected]>

Simple simplification...

---
 arch/arm/mach-omap1/board-h3-mmc.c   |    6 +-----
 arch/arm/mach-omap1/board-nokia770.c |    6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
arch/arm/mach-omap1/board-h3-mmc.c +1 -5
index 0d8a3c1..5e8877c 100644
@@ -26,11 +26,7 @@
 static int mmc_set_power(struct device *dev, int slot, int power_on,
 				int vdd)
 {
-	if (power_on)
-		gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 1);
-	else
-		gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 0);
-
+	gpio_set_value(H3_TPS_GPIO_MMC_PWR_EN, power_on);
 	return 0;
 }
 
arch/arm/mach-omap1/board-nokia770.c +1 -5
index 7bc7a3c..d1ed136 100644
@@ -181,11 +181,7 @@ static struct omap_usb_config nokia770_usb_config __initdata = {
 static int nokia770_mmc_set_power(struct device *dev, int slot, int power_on,
 				int vdd)
 {
-	if (power_on)
-		gpio_set_value(NOKIA770_GPIO_MMC_POWER, 1);
-	else
-		gpio_set_value(NOKIA770_GPIO_MMC_POWER, 0);
-
+	gpio_set_value(NOKIA770_GPIO_MMC_POWER, power_on);
 	return 0;
 }
 
author maintainer
#6 lore raw

PATCH 6/11 ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

In reply to Tony Lindgren

From: Jarkko Nikula <[email protected]>

There is no anymore legacy driver for OMAP24XX Enhanced Audio Controller in linux-omap and it was newer in mainline so cleanup these unneeded defines and initialization code.

---
 arch/arm/mach-omap2/devices.c         |   33 -----------
 arch/arm/plat-omap/include/mach/eac.h |  100 ---------------------------------
 2 files changed, 0 insertions(+), 133 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
arch/arm/mach-omap2/devices.c +0 -33
index d6b4b2f..496983a 100644
@@ -25,7 +25,6 @@
 #include <mach/board.h>
 #include <mach/mux.h>
 #include <mach/gpio.h>
-#include <mach/eac.h>
 #include <mach/mmc.h>
 
 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
@@ -366,38 +365,6 @@ static void omap_init_mcspi(void)
 static inline void omap_init_mcspi(void) {}
 #endif
 
-#ifdef CONFIG_SND_OMAP24XX_EAC
-
-#define OMAP2_EAC_BASE			0x48090000
-
-static struct resource omap2_eac_resources[] = {
-	{
-		.start		= OMAP2_EAC_BASE,
-		.end		= OMAP2_EAC_BASE + 0x109,
-		.flags		= IORESOURCE_MEM,
-	},
-};
-
-static struct platform_device omap2_eac_device = {
-	.name		= "omap24xx-eac",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(omap2_eac_resources),
-	.resource	= omap2_eac_resources,
-	.dev = {
-		.platform_data = NULL,
-	},
-};
-
-void omap_init_eac(struct eac_platform_data *pdata)
-{
-	omap2_eac_device.dev.platform_data = pdata;
-	platform_device_register(&omap2_eac_device);
-}
-
-#else
-void omap_init_eac(struct eac_platform_data *pdata) {}
-#endif
-
 #ifdef CONFIG_OMAP_SHA1_MD5
 static struct resource sha1_md5_resources[] = {
 	{
arch/arm/plat-omap/include/mach/eac.h deleted +0 -100

100 lines not on this page · raw message

author maintainer
#7 lore raw

PATCH 7/11 ARM: OMAP2: possible division by 0

In reply to Tony Lindgren

From: Roel Kluin <[email protected]>

In linus' git tree the functions can be found at:
vi arch/arm/mach-omap2/usb-tusb6010.c +200 - tusb6010_platform_retime()
vi arch/arm/mach-omap2/gpmc.c +94 - gpmc_get_fclk_period()
vi arch/arm/mach-omap2/usb-tusb6010.c +53 - tusb_set_async_mode()
vi arch/arm/mach-omap2/usb-tusb6010.c +111 - tusb_set_sync_mode()

is -ENODEV appropriate when sysclk_ps == 0?

This was found by code analysis, please review. ------------------------------>8-------------8<--------------------------------- gpmc_get_fclk_period() may return 0 when gpmc_l3_clk is not enabled. This is not checked in tusb6010_platform_retime() nor in tusb_set_async_mode() it seems. In tusb_set_sync_mode() this may result in a division by zero.

---
 arch/arm/mach-omap2/usb-tusb6010.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/usb-tusb6010.c +1 -1
index 15e5090..8df55f4 100644
@@ -187,7 +187,7 @@ int tusb6010_platform_retime(unsigned is_refclk)
 	unsigned	sysclk_ps;
 	int		status;
 
-	if (!refclk_psec)
+	if (!refclk_psec || sysclk_ps == 0)
 		return -ENODEV;
 
 	sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
author maintainer
#8 lore raw

PATCH 8/11 ARM: OMAP2/3: GPIO: do not attempt to wake-enable

In reply to Tony Lindgren

From: Kevin Hilman <[email protected]>

The GPIO IRQ enable/disable path attempts to also enable IRQ wake support for the parent GPIO bank IRQ as well. However, since there is no 'set_wake' hook for the bank IRQs, these calls will always fail. Also, since the enable will fail on the suspend path, the disable on the resume path will trigger unbalanced enable/disable warnings.

This was discovered in the suspend/resume path on OMAP3/Beagle using the gpio-keys driver which disables/re-enables GPIO IRQ wakeups in the suspend/resume path.

---
 arch/arm/plat-omap/gpio.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/plat-omap/gpio.c +4 -10
index d3fa41e..210a1c0 100644
@@ -921,13 +921,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
 	case METHOD_MPUIO:
 	case METHOD_GPIO_1610:
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;
 #endif
@@ -940,13 +937,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
 			return -EINVAL;
 		}
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;
 #endif
author maintainer
#11 lore raw

PATCH 9/11 ARM: OMAP3: remove duplicated #include

In reply to Tony Lindgren

From: Huang Weiyi <[email protected]>

Removed duplicated #include in arch/arm/mach-omap2/board-rx51.c.

---
 arch/arm/mach-omap2/board-rx51.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-rx51.c +0 -1
index 3a0daac..374ff63 100644
@@ -15,7 +15,6 @@
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/io.h>
-#include <linux/delay.h>
 #include <linux/gpio.h>
 
 #include <mach/hardware.h>
author maintainer
#12 lore raw

PATCH 10/11 ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts

In reply to Tony Lindgren

From: Roger Quadros <[email protected]>

Flush posted write to IRQSTATUS register in GPIO IRQ handler. This eliminates the below error for all peripherals that use GPIO interrupts.

<4>Spurious irq 95: 0xffffffdf, please flush posted write for irq 31

---
 arch/arm/plat-omap/gpio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
arch/arm/plat-omap/gpio.c +5 -1
index 210a1c0..17d7afe 100644
@@ -758,8 +758,12 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask)
 
 	/* Workaround for clearing DSP GPIO interrupts to allow retention */
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
+	reg = bank->base + OMAP24XX_GPIO_IRQSTATUS2;
 	if (cpu_is_omap24xx() || cpu_is_omap34xx())
-		__raw_writel(gpio_mask, bank->base + OMAP24XX_GPIO_IRQSTATUS2);
+		__raw_writel(gpio_mask, reg);
+
+	/* Flush posted write for the irq status to avoid spurious interrupts */
+	__raw_readl(reg);
 #endif
 }
 
author maintainer
#13 lore raw

PATCH 11/11 ARM: OMAP3: Clean up spurious interrupt check logic

In reply to Tony Lindgren

From: Roger Quadros <[email protected]>

SPURIOUSIRQ is contained in bits 31:7 of INTC_SIR, so INTC_SIR must be right shifted by 7, not 6.

No change in logic, only changes for better readability. Refer to register definition of INTCPS_SIR_IRQ in OMAP3 Manual.

---
 arch/arm/mach-omap2/irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +2 -2
index 9ba20d9..998c5c4 100644
@@ -73,9 +73,9 @@ static int omap_check_spurious(unsigned int irq)
 	u32 sir, spurious;
 
 	sir = intc_bank_read_reg(&irq_banks[0], INTC_SIR);
-	spurious = sir >> 6;
+	spurious = sir >> 7;
 
-	if (spurious > 1) {
+	if (spurious) {
 		printk(KERN_WARNING "Spurious irq %i: 0x%08x, please flush "
 					"posted write for irq %i\n",
 					irq, sir, previous_irq);
author maintainer
#14 lore raw

git pull request for omap fixes (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

In reply to Tony Lindgren
Quoted 3 lines · Tony Lindgren

Hi all,

Here are some omap fixes for review.

Also merged in Paul's clock fixes posted here earlier.

Russell, here's the pull request for you.

Regards,

Tony

The following changes since commit 0882e8dd3aad33eca41696d463bb896e6c8817eb:
Linus Torvalds (1):

        Linux 2.6.30-rc2

are available in the git repository at:

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

Arun KS (1):
OMAP1: clock: Typo fix for clock in omap1

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (2):
OMAP: dmtimer: enable all timers to be wakeup events
ARM: OMAP2/3: GPIO: do not attempt to wake-enable

Ladislav Michl (3):
ARM: OMAP: MMC: Remove unused power_pin
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP1: Fix mmc_set_power GPIO usage

Paul Walmsley (4):
OMAP2xxx clock: init osc_ck, sys_ck internal lists early OMAP2xxx clock: fix broken cpu_mask code
OMAP3 GPTIMER: fix GPTIMER12 IRQ
OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts
ARM: OMAP3: Clean up spurious interrupt check logic

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Sergio Aguirre (1):
OMAP3: clock: Camera module doesn't have IDLEST bit

Tony Lindgren (2):
ARM: OMAP: Remove old dead gpio expander code
Merge branch 'omap-clock-fixes' of git://git.pwsan.com/linux-2.6 into omap-fixes

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +---
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 +-
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 +-
 arch/arm/mach-omap1/mcbsp.c                    |    4 +-
 arch/arm/mach-omap2/board-h4.c                 |   95 ----------------------
 arch/arm/mach-omap2/board-omap3beagle.c        |    4 +
 arch/arm/mach-omap2/board-rx51.c               |    1 -
 arch/arm/mach-omap2/clock24xx.c                |   15 ++--
 arch/arm/mach-omap2/clock24xx.h                |   10 ++-
 arch/arm/mach-omap2/clock34xx.h                |    7 +-
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 +-
 arch/arm/mach-omap2/timer-gp.c                 |   48 +++++++++++-
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 +-
 arch/arm/plat-omap/dma.c                       |   13 ++--
 arch/arm/plat-omap/dmtimer.c                   |   28 ++++---
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/dmtimer.h      |    2 +-
 arch/arm/plat-omap/include/mach/eac.h          |  100 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 -
 arch/arm/plat-omap/include/mach/timer-gp.h     |   17 ++++
 drivers/mmc/host/omap.c                        |    2 -
 25 files changed, 128 insertions(+), 444 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
 create mode 100644 arch/arm/plat-omap/include/mach/timer-gp.h
author maintainer
#15 lore raw

Re: git pull request for omap fixes, v2 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 8 lines · Tony Lindgren
Quoted 3 lines · Tony Lindgren

Hi all,

Here are some omap fixes for review.

Also merged in Paul's clock fixes posted here earlier.

Russell, here's the pull request for you.

I merged in Paul's updated patch "OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files".

The diff to earlier series and the updated pull request are attached.

Cheers,

Tony

arch/arm/mach-omap2/clock24xx.h +2 -2
Index: linux-omap-2.6/arch/arm/mach-omap2/clock24xx.h
===================================================================
@@ -625,8 +625,8 @@ static struct clk func_32k_ck = {
 	.clkdm_name	= "wkup_clkdm",
 };
 
-static struct clk secure_32k_fck = {
-	.name		= "secure_32k_fck",
+static struct clk secure_32k_ck = {
+	.name		= "secure_32k_ck",
 	.ops		= &clkops_null,
 	.rate		= 32768,
 	.flags		= RATE_FIXED,

The following changes since commit 0882e8dd3aad33eca41696d463bb896e6c8817eb:
Linus Torvalds (1):

        Linux 2.6.30-rc2

are available in the git repository at:

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

Arun KS (1):
OMAP1: clock: Typo fix for clock in omap1

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (2):
ARM: OMAP2/3: GPIO: do not attempt to wake-enable
OMAP: dmtimer: enable all timers to be wakeup events

Ladislav Michl (3):
ARM: OMAP: MMC: Remove unused power_pin
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP1: Fix mmc_set_power GPIO usage

Paul Walmsley (4):
OMAP2xxx clock: init osc_ck, sys_ck internal lists early OMAP2xxx clock: fix broken cpu_mask code
OMAP3 GPTIMER: fix GPTIMER12 IRQ
OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts
ARM: OMAP3: Clean up spurious interrupt check logic

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Sergio Aguirre (1):
OMAP3: clock: Camera module doesn't have IDLEST bit

Tony Lindgren (2):
ARM: OMAP: Remove old dead gpio expander code Merge branch 'omap-clock-fixes' into omap-fixes

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +---
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 +-
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 +-
 arch/arm/mach-omap1/mcbsp.c                    |    4 +-
 arch/arm/mach-omap2/board-h4.c                 |   95 ----------------------
 arch/arm/mach-omap2/board-omap3beagle.c        |    4 +
 arch/arm/mach-omap2/board-rx51.c               |    1 -
 arch/arm/mach-omap2/clock24xx.c                |   15 ++--
 arch/arm/mach-omap2/clock24xx.h                |   10 ++-
 arch/arm/mach-omap2/clock34xx.h                |    7 +-
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 +-
 arch/arm/mach-omap2/timer-gp.c                 |   48 +++++++++++-
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 +-
 arch/arm/plat-omap/dma.c                       |   13 ++--
 arch/arm/plat-omap/dmtimer.c                   |   28 ++++---
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/dmtimer.h      |    2 +-
 arch/arm/plat-omap/include/mach/eac.h          |  100 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 -
 arch/arm/plat-omap/include/mach/timer-gp.h     |   17 ++++
 drivers/mmc/host/omap.c                        |    2 -
 25 files changed, 128 insertions(+), 444 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
 create mode 100644 arch/arm/plat-omap/include/mach/timer-gp.h
author maintainer
#16 lore raw

Re: git pull request for omap fixes, v2 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 6 lines · Tony Lindgren
Quoted 5 lines · Tony Lindgren
Quoted 3 lines · Tony Lindgren

Hi all,

Here are some omap fixes for review.

Quoted 8 lines
Quoted 3 lines

Also merged in Paul's clock fixes posted here earlier.

Russell, here's the pull request for you.

I merged in Paul's updated patch "OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files".

The diff to earlier series and the updated pull request are attached.

FYI, there's also a compile fix for omap3 boards coming via the USB list:

http://marc.info/?l=linux-usb&m=124024994725512&w=2

Quoted 100 lines

Cheers,

Tony

Index: linux-omap-2.6/arch/arm/mach-omap2/clock24xx.h
===================================================================

arch/arm/mach-omap2/clock24xx.h +2 -2
@@ -625,8 +625,8 @@ static struct clk func_32k_ck = {
 	.clkdm_name	= "wkup_clkdm",
 };
 
-static struct clk secure_32k_fck = {
-	.name		= "secure_32k_fck",
+static struct clk secure_32k_ck = {
+	.name		= "secure_32k_ck",
 	.ops		= &clkops_null,
 	.rate		= 32768,
 	.flags		= RATE_FIXED,

The following changes since commit 0882e8dd3aad33eca41696d463bb896e6c8817eb:
Linus Torvalds (1):

        Linux 2.6.30-rc2

are available in the git repository at:

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

Arun KS (1):
OMAP1: clock: Typo fix for clock in omap1

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (2):
ARM: OMAP2/3: GPIO: do not attempt to wake-enable
OMAP: dmtimer: enable all timers to be wakeup events

Ladislav Michl (3):
ARM: OMAP: MMC: Remove unused power_pin
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP1: Fix mmc_set_power GPIO usage

Paul Walmsley (4):
OMAP2xxx clock: init osc_ck, sys_ck internal lists early OMAP2xxx clock: fix broken cpu_mask code
OMAP3 GPTIMER: fix GPTIMER12 IRQ
OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts
ARM: OMAP3: Clean up spurious interrupt check logic

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Sergio Aguirre (1):
OMAP3: clock: Camera module doesn't have IDLEST bit

Tony Lindgren (2):
ARM: OMAP: Remove old dead gpio expander code Merge branch 'omap-clock-fixes' into omap-fixes

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +---
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 +-
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 +-
 arch/arm/mach-omap1/mcbsp.c                    |    4 +-
 arch/arm/mach-omap2/board-h4.c                 |   95 ----------------------
 arch/arm/mach-omap2/board-omap3beagle.c        |    4 +
 arch/arm/mach-omap2/board-rx51.c               |    1 -
 arch/arm/mach-omap2/clock24xx.c                |   15 ++--
 arch/arm/mach-omap2/clock24xx.h                |   10 ++-
 arch/arm/mach-omap2/clock34xx.h                |    7 +-
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 +-
 arch/arm/mach-omap2/timer-gp.c                 |   48 +++++++++++-
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 +-
 arch/arm/plat-omap/dma.c                       |   13 ++--
 arch/arm/plat-omap/dmtimer.c                   |   28 ++++---
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/dmtimer.h      |    2 +-
 arch/arm/plat-omap/include/mach/eac.h          |  100 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 -
 arch/arm/plat-omap/include/mach/timer-gp.h     |   17 ++++
 drivers/mmc/host/omap.c                        |    2 -
 25 files changed, 128 insertions(+), 444 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
 create mode 100644 arch/arm/plat-omap/include/mach/timer-gp.h
author maintainer
#17 lore raw

Re: git pull request for omap fixes, v3 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Tony Lindgren
Quoted 5 lines · Tony Lindgren
Quoted 3 lines · Tony Lindgren

Hi all,

Here are some omap fixes for review.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Also merged in Paul's clock fixes posted here earlier.

Russell, here's the pull request for you.

I merged in Paul's updated patch "OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files".

The diff to earlier series and the updated pull request are attached.

I've updated the omap-fixes branch again with Paul's change to "OMAP2xxx clock: pre-initialize struct clks early" patch as posted on this mailing list.

Updated pull request below.

Tony

Quoted 3 lines

FYI, there's also a compile fix for omap3 boards coming via the USB list:

http://marc.info/?l=linux-usb&m=124024994725512&w=2

The following changes since commit 091069740304c979f957ceacec39c461d0192158:
Linus Torvalds (1):

        Linux 2.6.30-rc3

are available in the git repository at:

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

Arun KS (1):
OMAP1: clock: Typo fix for clock in omap1

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (2):
OMAP: dmtimer: enable all timers to be wakeup events
ARM: OMAP2/3: GPIO: do not attempt to wake-enable

Ladislav Michl (3):
ARM: OMAP: MMC: Remove unused power_pin
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP1: Fix mmc_set_power GPIO usage

Paul Walmsley (4):
OMAP2xxx clock: pre-initialize struct clks early
OMAP2xxx clock: fix broken cpu_mask code
OMAP3 GPTIMER: fix GPTIMER12 IRQ
OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts
ARM: OMAP3: Clean up spurious interrupt check logic

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Sergio Aguirre (1):
OMAP3: clock: Camera module doesn't have IDLEST bit

Tony Lindgren (2):
ARM: OMAP: Remove old dead gpio expander code Merge branch 'omap-clock-fixes' into omap-fixes

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +---
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 +-
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 +-
 arch/arm/mach-omap1/clock.c                    |    2 +-
 arch/arm/mach-omap1/mcbsp.c                    |    4 +-
 arch/arm/mach-omap2/board-h4.c                 |   95 ----------------------
 arch/arm/mach-omap2/board-omap3beagle.c        |    4 +
 arch/arm/mach-omap2/board-rx51.c               |    1 -
 arch/arm/mach-omap2/clock24xx.c                |   19 ++---
 arch/arm/mach-omap2/clock24xx.h                |   10 ++-
 arch/arm/mach-omap2/clock34xx.c                |    2 +-
 arch/arm/mach-omap2/clock34xx.h                |    7 +-
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 +-
 arch/arm/mach-omap2/timer-gp.c                 |   48 +++++++++++-
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 +-
 arch/arm/plat-omap/clock.c                     |    9 ++-
 arch/arm/plat-omap/dma.c                       |   13 ++--
 arch/arm/plat-omap/dmtimer.c                   |   28 ++++---
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/clock.h        |    2 +-
 arch/arm/plat-omap/include/mach/dmtimer.h      |    2 +-
 arch/arm/plat-omap/include/mach/eac.h          |  100 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 -
 arch/arm/plat-omap/include/mach/timer-gp.h     |   17 ++++
 drivers/mmc/host/omap.c                        |    2 -
 29 files changed, 140 insertions(+), 451 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
 create mode 100644 arch/arm/plat-omap/include/mach/timer-gp.h
author maintainer
#18 lore raw

Re: git pull request for omap fixes, v4 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 15 lines · Tony Lindgren
Quoted 14 lines · Tony Lindgren
Quoted 13 lines · Tony Lindgren
Quoted 8 lines · Tony Lindgren
Quoted 3 lines · Tony Lindgren

Hi all,

Here are some omap fixes for review.

Also merged in Paul's clock fixes posted here earlier.

Russell, here's the pull request for you.

I merged in Paul's updated patch "OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files".

Quoted 7 lines
Quoted 1 line
Quoted 1 line

The diff to earlier series and the updated pull request are attached.

I've updated the omap-fixes branch again with Paul's change to "OMAP2xxx clock: pre-initialize struct clks early" patch as posted on this mailing list.

Updated pull request below.

Updated the same patch again. Updated pull request below.

Tony

The following changes since commit 091069740304c979f957ceacec39c461d0192158:
Linus Torvalds (1):

        Linux 2.6.30-rc3

are available in the git repository at:

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

Arun KS (1):
OMAP1: clock: Typo fix for clock in omap1

Huang Weiyi (1):
ARM: OMAP3: remove duplicated #include

Jarkko Nikula (1):
ARM: OMAP2: Remove defines and resource init for OMAP24XX EAC

Kevin Hilman (2):
ARM: OMAP2/3: GPIO: do not attempt to wake-enable
OMAP: dmtimer: enable all timers to be wakeup events

Ladislav Michl (3):
ARM: OMAP: MMC: Remove unused power_pin
ARM: OMAP1: Simplify board-h2 MMC setup
ARM: OMAP1: Fix mmc_set_power GPIO usage

Paul Walmsley (4):
OMAP2xxx clock: pre-initialize struct clks early
OMAP2xxx clock: fix broken cpu_mask code
OMAP3 GPTIMER: fix GPTIMER12 IRQ
OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files

Roel Kluin (1):
ARM: OMAP2: possible division by 0

Roger Quadros (2):
ARM: OMAP3: Fixed spurious IRQ issue for GPIO interrupts
ARM: OMAP3: Clean up spurious interrupt check logic

Santosh Shilimkar (1):
ARM: OMAP: Fix for possible race condition in omap_free_dma()

Sergio Aguirre (1):
OMAP3: clock: Camera module doesn't have IDLEST bit

Tony Lindgren (2):
ARM: OMAP: Remove old dead gpio expander code Merge branch 'omap-clock-fixes' into omap-fixes

 arch/arm/mach-omap1/board-h2-mmc.c             |   14 +---
 arch/arm/mach-omap1/board-h3-mmc.c             |    6 +-
 arch/arm/mach-omap1/board-h3.c                 |  101 ------------------------
 arch/arm/mach-omap1/board-nokia770.c           |    6 +-
 arch/arm/mach-omap1/mcbsp.c                    |    4 +-
 arch/arm/mach-omap2/board-h4.c                 |   95 ----------------------
 arch/arm/mach-omap2/board-omap3beagle.c        |    4 +
 arch/arm/mach-omap2/board-rx51.c               |    1 -
 arch/arm/mach-omap2/clock24xx.c                |   19 ++---
 arch/arm/mach-omap2/clock24xx.h                |   10 ++-
 arch/arm/mach-omap2/clock34xx.h                |    7 +-
 arch/arm/mach-omap2/devices.c                  |   33 --------
 arch/arm/mach-omap2/irq.c                      |    4 +-
 arch/arm/mach-omap2/timer-gp.c                 |   48 +++++++++++-
 arch/arm/mach-omap2/usb-tusb6010.c             |    2 +-
 arch/arm/plat-omap/clock.c                     |    7 ++
 arch/arm/plat-omap/dma.c                       |   13 ++--
 arch/arm/plat-omap/dmtimer.c                   |   28 ++++---
 arch/arm/plat-omap/gpio.c                      |   20 ++---
 arch/arm/plat-omap/include/mach/dmtimer.h      |    2 +-
 arch/arm/plat-omap/include/mach/eac.h          |  100 -----------------------
 arch/arm/plat-omap/include/mach/gpioexpander.h |   35 --------
 arch/arm/plat-omap/include/mach/irda.h         |    4 -
 arch/arm/plat-omap/include/mach/mmc.h          |    1 -
 arch/arm/plat-omap/include/mach/timer-gp.h     |   17 ++++
 drivers/mmc/host/omap.c                        |    2 -
 26 files changed, 136 insertions(+), 447 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/eac.h
 delete mode 100644 arch/arm/plat-omap/include/mach/gpioexpander.h
 create mode 100644 arch/arm/plat-omap/include/mach/timer-gp.h
#19 lore raw

Re: git pull request for omap fixes, v4 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 1 line · Tony Lindgren

Updated the same patch again. Updated pull request below.

Pulled. Will probably go upstream in about 6 days time.

author maintainer
#20 lore raw

Re: git pull request for omap fixes, v4 (Re: [PATCH 00/11] Omap fixes for 2.6.30-rc1)

Quoted 4 lines · Russell King - ARM Linux
Quoted 1 line · Tony Lindgren

Updated the same patch again. Updated pull request below.

Pulled. Will probably go upstream in about 6 days time.

OK & thanks.

Tony

#9 lore raw

RE: [PATCH 08/11] ARM: OMAP2/3: GPIO: do not attempt to wake-enable

In reply to Tony Lindgren

Hi Kevin,

Quoted 43 lines
---
 arch/arm/plat-omap/gpio.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/plat-omap/gpio.c +2 -5
index d3fa41e..210a1c0 100644
@@ -921,13 +921,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank,
 int gpio, int enable)
 	case METHOD_MPUIO:
 	case METHOD_GPIO_1610:
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;

#endif

arch/arm/plat-omap/gpio.c +2 -5
@@ -940,13 +937,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank,
 int gpio, int enable)
 			return -EINVAL;
 		}
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;
Quoted 1 line

#endif

I have been looking into an issue that appears to be related to this. I have the following questions with regard to this patch.

1). Although, I agree with the above change was there any reason why we did not add some code to set/clear the appropriate bit in the WKUENA register in this function? If this function is called via a call to set_irq_wake it will not modify the WKUENA register. Therefore, we were thinking of something along the lines of:

arch/arm/plat-omap/gpio.c +5 -2
index 17d7afe..895c548 100644
@@ -941,10 +941,13 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
                        return -EINVAL;
                }
                spin_lock_irqsave(&bank->lock, flags);
-               if (enable)
+               if (enable) {
                        bank->suspend_wakeup |= (1 << gpio);
-               else
+                       __raw_writel(1 << gpio, bank->base + OMAP24XX_GPIO_SETWKUENA);
+               } else {
+                       __raw_writel(1 << gpio, bank->base + OMAP24XX_GPIO_CLEARWKUENA);
                        bank->suspend_wakeup &= ~(1 << gpio);
+               }
                spin_unlock_irqrestore(&bank->lock, flags);
                return 0;
 #endif

2). We have found that a call to request_irq results in a call to the function "set_24xx_gpio_triggering()" (for OMAP3430). In addition to configuring the triggering for a given GPIO, this function is also programming the WKUENA register. Hence, the wake-up enable is enabled for GPIO without calling set_irq_wake().

I am not sure if this is the intended behaviour or if drivers should explicitly be calling set_irq_wake to enable/disable the wake-up.

The other problem with this is that once request_irq is called for a gpio, then even if we call disable_irq the wake-up event is not cleared. So this means that a gpio event will still wake-up the device without the gpio being enabled and because the gpio is disabled the event will never be cleared and hence will prevent retention.

So should the wake-up event only be enabled/disabled by a call to set_irq_wake() or should we make sure that calling disable_irq in turn calls gpio_mask_irq and make sure this clears the wake-up event?

Cheers
Jon

#10 lore raw

Re: [PATCH 08/11] ARM: OMAP2/3: GPIO: do not attempt to wake-enable

Quoted 62 lines · Jon

Hi Kevin,

Quoted 43 lines
---
 arch/arm/plat-omap/gpio.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/plat-omap/gpio.c +2 -5
index d3fa41e..210a1c0 100644
@@ -921,13 +921,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank,
 int gpio, int enable)
 	case METHOD_MPUIO:
 	case METHOD_GPIO_1610:
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;

#endif

arch/arm/plat-omap/gpio.c +2 -5
@@ -940,13 +937,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank,
 int gpio, int enable)
 			return -EINVAL;
 		}
 		spin_lock_irqsave(&bank->lock, flags);
-		if (enable) {
+		if (enable)
 			bank->suspend_wakeup |= (1 << gpio);
-			enable_irq_wake(bank->irq);
-		} else {
-			disable_irq_wake(bank->irq);
+		else
 			bank->suspend_wakeup &= ~(1 << gpio);
-		}
 		spin_unlock_irqrestore(&bank->lock, flags);
 		return 0;
Quoted 1 line

#endif

I have been looking into an issue that appears to be related to this. I have the following questions with regard to this patch.

1). Although, I agree with the above change was there any reason why we did not add some code to set/clear the appropriate bit in the WKUENA register in this function? If this function is called via a call to set_irq_wake it will not modify the WKUENA register. Therefore, we were thinking of something along the lines of:

arch/arm/plat-omap/gpio.c +1 -1
index 17d7afe..895c548 100644
@@ -941,10 +941,13 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
                        return -EINVAL;
                }
                spin_lock_irqsave(&bank->lock, flags);
-               if (enable)
+               if (enable) {

arch/arm/plat-omap/gpio.c static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) · line 953

Quoted 10 lines
arch/arm/plat-omap/gpio.c +4 -1
                        bank->suspend_wakeup |= (1 << gpio);
-               else
+                       __raw_writel(1 << gpio, bank->base + OMAP24XX_GPIO_SETWKUENA);
+               } else {
+                       __raw_writel(1 << gpio, bank->base + OMAP24XX_GPIO_CLEARWKUENA);
                        bank->suspend_wakeup &= ~(1 << gpio);
+               }
                spin_unlock_irqrestore(&bank->lock, flags);
                return 0;
 #endif

You're right, ti doesn't enable the wakeup here, but it does eventually get enabled in the suspend hook. See the handling of the bank->suspend_wakeup mask in the suspend hook.

This brings up an interesting point though that GPIO IRQs that are configured as wakeups will cannot bring the system out of idle, but can only bring the system out of suspend.

Quoted 4 lines

2). We have found that a call to request_irq results in a call to the function "set_24xx_gpio_triggering()" (for OMAP3430). In addition to configuring the triggering for a given GPIO, this function is also programming the WKUENA register. Hence, the wake-up enable is enabled for GPIO without calling set_irq_wake().

I am not sure if this is the intended behaviour or if drivers should explicitly be calling set_irq_wake to enable/disable the wake-up.

If a driver calls request_irq with one of the IRQF_TRIGGER* flags (other than _NONE, see <linux/interrupt.h>), then the triggering code should be called as internally, request_irq handles this.

If no IRQF_TRIGGER* flag is handed to request_irq() and the triggering is still being enbabled, this is a bug.

Quoted 11 lines

The other problem with this is that once request_irq is called for a gpio, then even if we call disable_irq the wake-up event is not cleared. So this means that a gpio event will still wake-up the device without the gpio being enabled and because the gpio is disabled the event will never be cleared and hence will prevent retention.

So should the wake-up event only be enabled/disabled by a call to set_irq_wake() or should we make sure that calling disable_irq in turn calls gpio_mask_irq and make sure this clears the wake-up event?

IMHO, it should only be enabled/disabled by a call to *_irq_wake(), or a request_irq with (flags & IRQF_TRIGGER_MASK) != 0

Kevin