Re: [PATCH 0/0] Add minimal omap34xx support

2008-10-10 Thread Russell King - ARM Linux
On Thu, Oct 09, 2008 at 06:17:25PM +0300, Tony Lindgren wrote:
 Sure, I'll post a minimal LDP patch separately tomorrow. I don't have
 an LDP so I can't verify it boots though.

Unfortunately, Linus has been unpredictable, and released 2.6.27 last
night, rather than the usual one week after -rc9.

What this means is that the merge window is now open, and I shouldn't
be accepting anything else into my kernel tree.

However, if you can get LDP in by this evening, I'll pull it into the
tree.  That will be the final devel code merged into my tree for 2.6.28.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Enable CONFIG_GPIO_TWL4030=y

2008-10-10 Thread Felipe Balbi
On Fri, Oct 10, 2008 at 04:37:06PM +0530, ext Sanjeev Premi wrote:
 Without this option, kernel builds would fail, with
 errors similar to:
 
 hsmmc.c:50: undefined reference to `twl4030_get_gpio_datain'
 hsmmc.c:82: undefined reference to `twl4030_free_gpio'
 hsmmc.c:63: undefined reference to `twl4030_request_gpio'
 hsmmc.c:67: undefined reference to `twl4030_set_gpio_debounce'

Can you 2430sdp defconfig.

 
 Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
 ---
  arch/arm/configs/omap2_evm_defconfig|1 +
  arch/arm/configs/omap3_beagle_defconfig |1 +
  arch/arm/configs/omap3_evm_defconfig|1 +
  arch/arm/configs/omap_3430sdp_defconfig |1 +
  arch/arm/configs/omap_ldp_defconfig |1 +
  5 files changed, 5 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/configs/omap2_evm_defconfig 
 b/arch/arm/configs/omap2_evm_defconfig
 index 61f0965..b52426a 100644
 --- a/arch/arm/configs/omap2_evm_defconfig
 +++ b/arch/arm/configs/omap2_evm_defconfig
 @@ -795,6 +795,7 @@ CONFIG_GPIOLIB=y
  # CONFIG_GPIO_MAX732X is not set
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # PCI GPIO expanders:
 diff --git a/arch/arm/configs/omap3_beagle_defconfig 
 b/arch/arm/configs/omap3_beagle_defconfig
 index 7805995..0d2f770 100644
 --- a/arch/arm/configs/omap3_beagle_defconfig
 +++ b/arch/arm/configs/omap3_beagle_defconfig
 @@ -709,6 +709,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap3_evm_defconfig 
 b/arch/arm/configs/omap3_evm_defconfig
 index ebeaef3..507a689 100644
 --- a/arch/arm/configs/omap3_evm_defconfig
 +++ b/arch/arm/configs/omap3_evm_defconfig
 @@ -779,6 +779,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
 b/arch/arm/configs/omap_3430sdp_defconfig
 index 11c0cf7..bd6006c 100644
 --- a/arch/arm/configs/omap_3430sdp_defconfig
 +++ b/arch/arm/configs/omap_3430sdp_defconfig
 @@ -790,6 +790,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap_ldp_defconfig 
 b/arch/arm/configs/omap_ldp_defconfig
 index 9a90975..fd34367 100644
 --- a/arch/arm/configs/omap_ldp_defconfig
 +++ b/arch/arm/configs/omap_ldp_defconfig
 @@ -549,6 +549,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 -- 
 1.5.6
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc/rft 2.6.27-rc8-omap-git] twl4030-pwrirq simplification, cleanup

2008-10-10 Thread Tony Lindgren
* David Brownell [EMAIL PROTECTED] [081006 11:20]:
 I can't test the pwrbutton stuff, but rtc and musb behave...
 
 With one issue:  the usb transceiver glue misbehaves on
 startup if the device is connected.  (Again.)  I looked at
 this a bit, and I think the issue is probably caused by
 not actually using key USB registers ... IRQ trigger
 mode state transitions are at best a fragile proxy for the
 real state.
 
 (This is similar to the GPIO patch I just sent, but simpler
 except for the impact on the few drivers thinking oddly
 about IRQs.  Those patches cover the key SIH modules, and
 a similar one affects the PIH in twl4030-core.)

Pushing this, looks like we should have the remaining I2C
issues sorted out soon.

Tony

 
 - Dave
 
 
 
 Streamline the power irq code, and some of the mechanisms
 it uses:
 
  - Support IRQ masking, not just unmasking; simpler code.
  - Use the standard handle_edge_irq() handler for these edge IRQs.
  - Use generic_handle_irq() instead of a manual expansion thereof.
  - Provide a missing spinlock for the shared data.
 
 In short, use more of the standard genirq code ... more correctly.
 
 Also, update the drivers using the power IRQ accordingly:
 
  - Don't request IRQF_DISABLED if the handler makes I2C calls;
and defend against lockdep forcing it on us.
 
  - Let the irq_chip handle IRQ mask/unmask; it handles mutual
exclusion between drivers, among other things.
 
  - (Unrelated) remove useless MODULE_ALIAS in pwrbutton.
 
 The USB transceiver driver still places some dodgey games with IRQ
 enable/disable, and IRQ trigger flags.  At least some of them seem
 like they'd be simplified by using USB transceiver registers ...
 notably, startup code, which doesn't seem to check state before
 it enters an irq-driven mode.
 
 For the moment, these drivers still (wrongly) try to configure IRQ
 trigger modes themselves ... again, that's something that an irq_chip
 handles (but not yet, for this one).
 
 NOTE:  tested (MUSB and RTC only) along with the init/retry hack
 to make twl4030-pwrirq work around the i2c-omap timeout problems.
 
 ---
  drivers/i2c/chips/twl4030-pwrbutton.c |   33 --
  drivers/i2c/chips/twl4030-pwrirq.c|   98 ++--
  drivers/i2c/chips/twl4030-usb.c   |   57 --
  drivers/rtc/rtc-twl4030.c |8 ++
  4 files changed, 80 insertions(+), 116 deletions(-)
 
 --- a/drivers/i2c/chips/twl4030-pwrbutton.c
 +++ b/drivers/i2c/chips/twl4030-pwrbutton.c
 @@ -49,6 +49,14 @@ static irqreturn_t powerbutton_irq(int i
   int err;
   u8 value;
  
 +#ifdef CONFIG_LOCKDEP
 + /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
 +  * we don't want and can't tolerate.  Although it might be
 +  * friendlier not to borrow this thread context...
 +  */
 + local_irq_enable();
 +#endif
 +
   err = twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, value,
 STS_HW_CONDITIONS);
   if (!err)  {
 @@ -67,6 +75,7 @@ static int __init twl4030_pwrbutton_init
   int err = 0;
   u8 value;
  
 + /* PWRBTN == PWRON */
   if (request_irq(TWL4030_PWRIRQ_PWRBTN, powerbutton_irq, 0,
   PwrButton, NULL)  0) {
   printk(KERN_ERR Unable to allocate IRQ for power button\n);
 @@ -92,22 +101,9 @@ static int __init twl4030_pwrbutton_init
   goto free_irq_and_out;
   }
  
 - err = twl4030_i2c_read_u8(TWL4030_MODULE_INT, value, PWR_IMR1);
 - if (err) {
 - printk(KERN_WARNING I2C error %d while reading TWL4030
 -  INT PWR_IMR1 register\n, err);
 -
 - goto free_input_dev;
 - }
 -
 - err = twl4030_i2c_write_u8(TWL4030_MODULE_INT,
 -value  (~PWR_PWRON_IRQ), PWR_IMR1);
 - if (err) {
 - printk(KERN_WARNING I2C error %d while writing TWL4030
 -  INT PWR_IMR1 register\n, err);
 - goto free_input_dev;
 - }
 -
 + /* FIXME just pass IRQF_EDGE_FALLING | IRQF_EDGE_RISING
 +  * to request_irq(), once MODULE_INT supports them...
 +  */
   err = twl4030_i2c_read_u8(TWL4030_MODULE_INT, value, PWR_EDR1);
   if (err) {
   printk(KERN_WARNING I2C error %d while reading TWL4030
 @@ -136,19 +132,16 @@ free_irq_and_out:
  out:
   return err;
  }
 +module_init(twl4030_pwrbutton_init);
  
  static void __exit twl4030_pwrbutton_exit(void)
  {
   free_irq(TWL4030_PWRIRQ_PWRBTN, NULL);
   input_unregister_device(powerbutton_dev);
   input_free_device(powerbutton_dev);
 -
  }
 -
 -module_init(twl4030_pwrbutton_init);
  module_exit(twl4030_pwrbutton_exit);
  
 -MODULE_ALIAS(i2c:twl4030-pwrbutton);
  MODULE_DESCRIPTION(Triton2 Power Button);
  MODULE_LICENSE(GPL);
  MODULE_AUTHOR(Peter De Schrijver);
 --- a/drivers/i2c/chips/twl4030-pwrirq.c
 +++ b/drivers/i2c/chips/twl4030-pwrirq.c
 

[PATCH 1/1] Enable CONFIG_GPIO_TWL4030=y

2008-10-10 Thread Sanjeev Premi
Without this option, kernel builds would fail, with
errors similar to:

hsmmc.c:50: undefined reference to `twl4030_get_gpio_datain'
hsmmc.c:82: undefined reference to `twl4030_free_gpio'
hsmmc.c:63: undefined reference to `twl4030_request_gpio'
hsmmc.c:67: undefined reference to `twl4030_set_gpio_debounce'

Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
---
 arch/arm/configs/omap2_evm_defconfig|1 +
 arch/arm/configs/omap3_beagle_defconfig |1 +
 arch/arm/configs/omap3_evm_defconfig|1 +
 arch/arm/configs/omap_2430sdp_defconfig |   22 ++
 arch/arm/configs/omap_3430sdp_defconfig |1 +
 arch/arm/configs/omap_ldp_defconfig |1 +
 6 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/omap2_evm_defconfig 
b/arch/arm/configs/omap2_evm_defconfig
index 61f0965..b52426a 100644
--- a/arch/arm/configs/omap2_evm_defconfig
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -795,6 +795,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
diff --git a/arch/arm/configs/omap3_beagle_defconfig 
b/arch/arm/configs/omap3_beagle_defconfig
index 7805995..0d2f770 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -709,6 +709,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap3_evm_defconfig 
b/arch/arm/configs/omap3_evm_defconfig
index ebeaef3..507a689 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -779,6 +779,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap_2430sdp_defconfig 
b/arch/arm/configs/omap_2430sdp_defconfig
index b0617c0..0a12c36 100644
--- a/arch/arm/configs/omap_2430sdp_defconfig
+++ b/arch/arm/configs/omap_2430sdp_defconfig
@@ -750,6 +750,28 @@ CONFIG_SPI_MASTER=y
 # CONFIG_SPI_TSC2301 is not set
 # CONFIG_SPI_SPIDEV is not set
 # CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
 # CONFIG_W1 is not set
 # CONFIG_HWMON is not set
 CONFIG_MISC_DEVICES=y
diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
b/arch/arm/configs/omap_3430sdp_defconfig
index 11c0cf7..bd6006c 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -790,6 +790,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap_ldp_defconfig 
b/arch/arm/configs/omap_ldp_defconfig
index 9a90975..fd34367 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -549,6 +549,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
-- 
1.5.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] Enable CONFIG_GPIO_TWL4030=y

2008-10-10 Thread Tony Lindgren
* Sanjeev Premi [EMAIL PROTECTED] [081010 15:19]:
 Without this option, kernel builds would fail, with
 errors similar to:
 
 hsmmc.c:50: undefined reference to `twl4030_get_gpio_datain'
 hsmmc.c:82: undefined reference to `twl4030_free_gpio'
 hsmmc.c:63: undefined reference to `twl4030_request_gpio'
 hsmmc.c:67: undefined reference to `twl4030_set_gpio_debounce'

Thanks, pushed.

Tony

 Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
 ---
  arch/arm/configs/omap2_evm_defconfig|1 +
  arch/arm/configs/omap3_beagle_defconfig |1 +
  arch/arm/configs/omap3_evm_defconfig|1 +
  arch/arm/configs/omap_2430sdp_defconfig |   22 ++
  arch/arm/configs/omap_3430sdp_defconfig |1 +
  arch/arm/configs/omap_ldp_defconfig |1 +
  6 files changed, 27 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/configs/omap2_evm_defconfig 
 b/arch/arm/configs/omap2_evm_defconfig
 index 61f0965..b52426a 100644
 --- a/arch/arm/configs/omap2_evm_defconfig
 +++ b/arch/arm/configs/omap2_evm_defconfig
 @@ -795,6 +795,7 @@ CONFIG_GPIOLIB=y
  # CONFIG_GPIO_MAX732X is not set
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # PCI GPIO expanders:
 diff --git a/arch/arm/configs/omap3_beagle_defconfig 
 b/arch/arm/configs/omap3_beagle_defconfig
 index 7805995..0d2f770 100644
 --- a/arch/arm/configs/omap3_beagle_defconfig
 +++ b/arch/arm/configs/omap3_beagle_defconfig
 @@ -709,6 +709,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap3_evm_defconfig 
 b/arch/arm/configs/omap3_evm_defconfig
 index ebeaef3..507a689 100644
 --- a/arch/arm/configs/omap3_evm_defconfig
 +++ b/arch/arm/configs/omap3_evm_defconfig
 @@ -779,6 +779,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap_2430sdp_defconfig 
 b/arch/arm/configs/omap_2430sdp_defconfig
 index b0617c0..0a12c36 100644
 --- a/arch/arm/configs/omap_2430sdp_defconfig
 +++ b/arch/arm/configs/omap_2430sdp_defconfig
 @@ -750,6 +750,28 @@ CONFIG_SPI_MASTER=y
  # CONFIG_SPI_TSC2301 is not set
  # CONFIG_SPI_SPIDEV is not set
  # CONFIG_SPI_TLE62X0 is not set
 +CONFIG_ARCH_REQUIRE_GPIOLIB=y
 +CONFIG_GPIOLIB=y
 +# CONFIG_DEBUG_GPIO is not set
 +# CONFIG_GPIO_SYSFS is not set
 +
 +#
 +# I2C GPIO expanders:
 +#
 +# CONFIG_GPIO_MAX732X is not set
 +# CONFIG_GPIO_PCA953X is not set
 +# CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
 +
 +#
 +# PCI GPIO expanders:
 +#
 +
 +#
 +# SPI GPIO expanders:
 +#
 +# CONFIG_GPIO_MAX7301 is not set
 +# CONFIG_GPIO_MCP23S08 is not set
  # CONFIG_W1 is not set
  # CONFIG_HWMON is not set
  CONFIG_MISC_DEVICES=y
 diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
 b/arch/arm/configs/omap_3430sdp_defconfig
 index 11c0cf7..bd6006c 100644
 --- a/arch/arm/configs/omap_3430sdp_defconfig
 +++ b/arch/arm/configs/omap_3430sdp_defconfig
 @@ -790,6 +790,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 diff --git a/arch/arm/configs/omap_ldp_defconfig 
 b/arch/arm/configs/omap_ldp_defconfig
 index 9a90975..fd34367 100644
 --- a/arch/arm/configs/omap_ldp_defconfig
 +++ b/arch/arm/configs/omap_ldp_defconfig
 @@ -549,6 +549,7 @@ CONFIG_HAVE_GPIO_LIB=y
  #
  # CONFIG_GPIO_PCA953X is not set
  # CONFIG_GPIO_PCF857X is not set
 +CONFIG_GPIO_TWL4030=y
  
  #
  # SPI GPIO expanders:
 -- 
 1.5.6
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix compiler warnings in smartreflex.c

2008-10-10 Thread Sanjeev Premi
Fix these compiler warnings:
smartreflex.c:126: warning: initialization makes integer from pointer without a 
cast
smartreflex.c:134: warning: initialization makes integer from pointer without a 
cast

Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/smartreflex.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c 
b/arch/arm/mach-omap2/smartreflex.c
index e54c0fb..8460633 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -123,7 +123,7 @@ static struct omap_sr sr1 = {
.is_sr_reset= 1,
.is_autocomp_active = 0,
.clk_length = 0,
-   .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
+   .srbase_addr= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
 };
 
 static struct omap_sr sr2 = {
@@ -131,7 +131,7 @@ static struct omap_sr sr2 = {
.is_sr_reset= 1,
.is_autocomp_active = 0,
.clk_length = 0,
-   .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
+   .srbase_addr= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
 };
 
 static struct sr_custom_clk sr1_custom_clk = {
-- 
1.5.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[no subject]

2008-10-10 Thread Felipe Balbi
[EMAIL PROTECTED]
Bcc: 
Subject: Re: [PATCH 0/3] lp5521
Reply-To: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]

On Mon, Oct 06, 2008 at 12:11:28PM +0300, Felipe Balbi wrote:
 A few cleanups and moving to drivers/leds. This driver
 is probably ok for making its way to mainline, by the morning
 I'll generate a patch against mainline and send to Richard
 (led maintainer) for integration.
 
 *** Note: compile tested only due to the fact n810 doesn't boot.

News here ??

 
 Felipe Balbi (3):
   i2c: lp5521: remove dead code
   i2c: lp5521: cosmetic fixes
   lp5521: move to drivers/leds
 
  drivers/i2c/chips/Kconfig  |7 -
  drivers/i2c/chips/Makefile |1 -
  drivers/leds/Kconfig   |7 +
  drivers/leds/Makefile  |1 +
  drivers/{i2c/chips/lp5521.c = leds/leds-lp5521.c} |  181 
 
  5 files changed, 81 insertions(+), 116 deletions(-)
  rename drivers/{i2c/chips/lp5521.c = leds/leds-lp5521.c} (79%)

-- 
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Fix compiler warnings in smartreflex.c

2008-10-10 Thread Felipe Balbi
On Fri, Oct 10, 2008 at 06:07:17PM +0530, ext Sanjeev Premi wrote:
 Fix these compiler warnings:
 smartreflex.c:126: warning: initialization makes integer from pointer without 
 a cast
 smartreflex.c:134: warning: initialization makes integer from pointer without 
 a cast
 
 Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
 ---
  arch/arm/mach-omap2/smartreflex.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/smartreflex.c 
 b/arch/arm/mach-omap2/smartreflex.c
 index e54c0fb..8460633 100644
 --- a/arch/arm/mach-omap2/smartreflex.c
 +++ b/arch/arm/mach-omap2/smartreflex.c
 @@ -123,7 +123,7 @@ static struct omap_sr sr1 = {
   .is_sr_reset= 1,
   .is_autocomp_active = 0,
   .clk_length = 0,
 - .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
 + .srbase_addr= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),

please don't. Most likely srbase_addr should move to void __iomem *

Paul, any comments ??

  };
  
  static struct omap_sr sr2 = {
 @@ -131,7 +131,7 @@ static struct omap_sr sr2 = {
   .is_sr_reset= 1,
   .is_autocomp_active = 0,
   .clk_length = 0,
 - .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
 + .srbase_addr= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
  };
  
  static struct sr_custom_clk sr1_custom_clk = {
 -- 
 1.5.6
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Tony Lindgren
Hi all,

I've just updated our git tree to v2.6.27 and pushed some recent fixes.

Let's try to get the pending issues sorted out and then tag -omap1
at the end of next week. So far it looks like we still have the following
issues remaining:

- i2c transfers not working because of i2c-omap.c PM (These also make
  musb init fail at least on 3430sdp)

- 24xx/34xx write posting issue

- 34xx spurious interrupts about 1/20 reboots

Anything else not working right now?

BTW, I'll out of town for the weekend, then flying back to home on
Monday, so I'll be offline for most part until Tuesday.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap: get rid of OMAP_TAG_USB

2008-10-10 Thread Felipe Balbi
On Thu, Sep 25, 2008 at 05:22:11PM +0300, Felipe Balbi wrote:
 OMAP_TAGS should vanish soon since they're not generic arm tags.
 Most of them can be converted to a platform_data or parsed
 from a command line line the serial tag.
 
 For OMAP_TAG_USB we just let boards call omap_usb_init()
 passing a pointer to omap_usb_config.
 
 Signed-off-by: Felipe Balbi [EMAIL PROTECTED]

any news on this one ?? Anyone with omap1-based hardware and h4, could
please test this ?

 ---
  arch/arm/mach-omap1/board-ams-delta.c   |2 +-
  arch/arm/mach-omap1/board-generic.c |5 ++---
  arch/arm/mach-omap1/board-h2.c  |2 +-
  arch/arm/mach-omap1/board-h3.c  |2 +-
  arch/arm/mach-omap1/board-innovator.c   |5 ++---
  arch/arm/mach-omap1/board-nokia770.c|3 +--
  arch/arm/mach-omap1/board-osk.c |2 +-
  arch/arm/mach-omap1/board-palmte.c  |2 +-
  arch/arm/mach-omap1/board-palmtt.c  |2 +-
  arch/arm/mach-omap1/board-palmz71.c |2 +-
  arch/arm/mach-omap1/board-sx1.c |2 +-
  arch/arm/mach-omap1/board-voiceblue.c   |2 +-
  arch/arm/mach-omap2/board-apollon.c |2 +-
  arch/arm/mach-omap2/board-h4.c  |2 +-
  arch/arm/plat-omap/include/mach/board.h |1 -
  arch/arm/plat-omap/include/mach/usb.h   |1 +
  arch/arm/plat-omap/usb.c|   25 -
  18 files changed, 22 insertions(+), 42 deletions(-)
 
 diff --git a/arch/arm/mach-omap1/board-ams-delta.c 
 b/arch/arm/mach-omap1/board-ams-delta.c
 index 2e61839..8b40aac 100644
 --- a/arch/arm/mach-omap1/board-ams-delta.c
 +++ b/arch/arm/mach-omap1/board-ams-delta.c
 @@ -175,7 +175,6 @@ static struct omap_usb_config ams_delta_usb_config 
 __initdata = {
  static struct omap_board_config_kernel ams_delta_config[] = {
   { OMAP_TAG_LCD, ams_delta_lcd_config },
   { OMAP_TAG_UART,ams_delta_uart_config },
 - { OMAP_TAG_USB, ams_delta_usb_config },
  };
  
  static struct resource ams_delta_kp_resources[] = {
 @@ -232,6 +231,7 @@ static void __init ams_delta_init(void)
   /* Clear latch2 (NAND, LCD, modem enable) */
   ams_delta_latch2_write(~0, 0);
  
 + omap_usb_init(ams_delta_usb_config);
   platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
  }
  
 diff --git a/arch/arm/mach-omap1/board-generic.c 
 b/arch/arm/mach-omap1/board-generic.c
 index 7d26702..e724940 100644
 --- a/arch/arm/mach-omap1/board-generic.c
 +++ b/arch/arm/mach-omap1/board-generic.c
 @@ -62,7 +62,6 @@ static struct omap_uart_config generic_uart_config 
 __initdata = {
  };
  
  static struct omap_board_config_kernel generic_config[] __initdata = {
 - { OMAP_TAG_USB, NULL },
   { OMAP_TAG_UART,generic_uart_config },
  };
  
 @@ -70,12 +69,12 @@ static void __init omap_generic_init(void)
  {
  #ifdef CONFIG_ARCH_OMAP15XX
   if (cpu_is_omap15xx()) {
 - generic_config[0].data = generic1510_usb_config;
 + omap_usb_init(generic1510_usb_config);
   }
  #endif
  #if defined(CONFIG_ARCH_OMAP16XX)
   if (!cpu_is_omap1510()) {
 - generic_config[0].data = generic1610_usb_config;
 + omap_usb_init(generic1610_usb_config);
   }
  #endif
  
 diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
 index 2c12dfa..ab1109b 100644
 --- a/arch/arm/mach-omap1/board-h2.c
 +++ b/arch/arm/mach-omap1/board-h2.c
 @@ -494,7 +494,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = {
  };
  
  static struct omap_board_config_kernel h2_config[] __initdata = {
 - { OMAP_TAG_USB, h2_usb_config },
   { OMAP_TAG_UART,h2_uart_config },
   { OMAP_TAG_LCD, h2_lcd_config },
  };
 @@ -549,6 +548,7 @@ static void __init h2_init(void)
   omap_serial_init();
   omap_register_i2c_bus(1, 100, h2_i2c_board_info,
 ARRAY_SIZE(h2_i2c_board_info));
 + omap_usb_init(h2_usb_config);
   h2_mmc_init();
  }
  
 diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
 index c333db1..2bf50f1 100644
 --- a/arch/arm/mach-omap1/board-h3.c
 +++ b/arch/arm/mach-omap1/board-h3.c
 @@ -471,7 +471,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
  };
  
  static struct omap_board_config_kernel h3_config[] __initdata = {
 - { OMAP_TAG_USB, h3_usb_config },
   { OMAP_TAG_UART,h3_uart_config },
   { OMAP_TAG_LCD, h3_lcd_config },
  };
 @@ -630,6 +629,7 @@ static void __init h3_init(void)
   omap_serial_init();
   omap_register_i2c_bus(1, 100, h3_i2c_board_info,
 ARRAY_SIZE(h3_i2c_board_info));
 + omap_usb_init(h3_usb_config);
   h3_mmc_init();
  }
  
 diff --git a/arch/arm/mach-omap1/board-innovator.c 
 b/arch/arm/mach-omap1/board-innovator.c
 index 7a97f6b..228c86d 100644
 --- 

Failures with rc9

2008-10-10 Thread Premi, Sanjeev
Hi all,

Noticed build failures with v2.6.27-rc9-5073-g5b99e69, when building for 
omap3_evm.

arch/arm/mach-omap2/built-in.o: In function `hsmmc_card_detect':
/home/self/linux-omap/arch/arm/mach-omap2/hsmmc.c:50: undefined reference to 
`twl4030_get_gpio_datain'
arch/arm/mach-omap2/built-in.o: In function `hsmmc_cleanup':
/home/self/linux-omap/arch/arm/mach-omap2/hsmmc.c:82: undefined reference to 
`twl4030_free_gpio'
arch/arm/mach-omap2/built-in.o: In function `hsmmc_late_init':
/home/self/linux-omap/arch/arm/mach-omap2/hsmmc.c:63: undefined reference to 
`twl4030_request_gpio'
/home/self/linux-omap/arch/arm/mach-omap2/hsmmc.c:67: undefined reference to 
`twl4030_set_gpio_debounce'
make: *** [.tmp_vmlinux1] Error 1

Best regards,
Sanjeev
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] Fix compiler warnings in smartreflex.c

2008-10-10 Thread Premi, Sanjeev
 

 -Original Message-
 From: Felipe Balbi [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 10, 2008 6:24 PM
 To: ext Felipe Balbi
 Cc: Premi, Sanjeev; linux-omap@vger.kernel.org; Paul Walmsley
 Subject: Re: [PATCH] Fix compiler warnings in smartreflex.c
 
 On Fri, Oct 10, 2008 at 03:44:07PM +0300, ext Felipe Balbi wrote:
  On Fri, Oct 10, 2008 at 06:07:17PM +0530, ext Sanjeev Premi wrote:
   Fix these compiler warnings:
   smartreflex.c:126: warning: initialization makes integer from 
   pointer without a cast
   smartreflex.c:134: warning: initialization makes integer from 
   pointer without a cast
   
   Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
   ---
arch/arm/mach-omap2/smartreflex.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
   
   diff --git a/arch/arm/mach-omap2/smartreflex.c 
   b/arch/arm/mach-omap2/smartreflex.c
   index e54c0fb..8460633 100644
   --- a/arch/arm/mach-omap2/smartreflex.c
   +++ b/arch/arm/mach-omap2/smartreflex.c
   @@ -123,7 +123,7 @@ static struct omap_sr sr1 = {
 .is_sr_reset= 1,
 .is_autocomp_active = 0,
 .clk_length = 0,
   - .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
   + .srbase_addr= 
 (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
  
  please don't. Most likely srbase_addr should move to void __iomem *
  
  Paul, any comments ??
 
 Took a look at it, the following might be a better ?? (compile tested
 only)

Looks good. I will try on my evm immediately.

 
 diff --git a/arch/arm/mach-omap2/smartreflex.c 
 b/arch/arm/mach-omap2/smartreflex.c
 index e54c0fb..084f855 100644
 --- a/arch/arm/mach-omap2/smartreflex.c
 +++ b/arch/arm/mach-omap2/smartreflex.c
 @@ -43,32 +43,32 @@ struct omap_sr {
   int srid;
   int is_sr_reset;
   int is_autocomp_active;
 - struct clk  *clk;
 - u32 clk_length;
 - u32 req_opp_no;
 - u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, 
 opp4_nvalue;
 + struct clk  *clk;
 + u32 clk_length;
 + u32 req_opp_no;
 + u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, 
 opp4_nvalue;
   u32 opp5_nvalue;
   u32 senp_mod, senn_mod;
 - u32 srbase_addr;
 - u32 vpbase_addr;
 + void __iomem*srbase_addr;
 + void __iomem*vpbase_addr;
  };
  
  /* Custom clocks to enable SR specific enable/disable 
 functions. */  struct sr_custom_clk {
 - struct clk  clk;  /* meta-clock with custom 
 enable/disable calls */
 - struct clk  *fck; /* actual functional clock */
 - struct omap_sr  *sr;
 + struct clk  clk;  /* meta-clock with custom 
 enable/disable calls */
 + struct clk  *fck; /* actual functional clock */
 + struct omap_sr  *sr;
  };
  
 -#define SR_REGADDR(offs) (__force void __iomem 
 *)(sr-srbase_addr + offset)
 +#define SR_REGADDR(offs) (sr-srbase_addr + offset)
  
 -static inline void sr_write_reg(struct omap_sr *sr, int 
 offset, u32 value)
 +static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, 
 +u32 value)
  {
   __raw_writel(value, SR_REGADDR(offset));  }
  
 -static inline void sr_modify_reg(struct omap_sr *sr, int 
 offset, u32 mask,
 - 
 u32 value)
 +static inline void sr_modify_reg(struct omap_sr *sr, 
 unsigned offset, u32 mask,
 + u32 value)
  {
   u32 reg_val;
  
 @@ -79,7 +79,7 @@ static inline void sr_modify_reg(struct 
 omap_sr *sr, int offset, u32 mask,
   __raw_writel(reg_val, SR_REGADDR(offset));  }
  
 -static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
 +static inline u32 sr_read_reg(struct omap_sr *sr, unsigned offset)
  {
   return __raw_readl(SR_REGADDR(offset));  } @@ -136,7 
 +136,7 @@ static struct omap_sr sr2 = {
  
  static struct sr_custom_clk sr1_custom_clk = {
   .clk = {
 - .name   = sr1_custom_clk,
 + .name   = sr1_custom_clk,
   .enable = sr_clk_enable,
   .disable= sr_clk_disable,
   },
 @@ -145,7 +145,7 @@ static struct sr_custom_clk sr1_custom_clk = {
  
  static struct sr_custom_clk sr2_custom_clk = {
   .clk = {
 - .name   = sr2_custom_clk,
 + .name   = sr2_custom_clk,
   .enable = sr_clk_enable,
   .disable= sr_clk_disable,
   },
 
 
  
};

static struct omap_sr sr2 = {
   @@ -131,7 +131,7 @@ static struct omap_sr sr2 = {
 .is_sr_reset= 1,
 .is_autocomp_active = 0,
 .clk_length = 0,
   - .srbase_addr= OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
   + .srbase_addr= 
 (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
};

static 

Re: [PATCH] Fix IO address issue.

2008-10-10 Thread Tony Lindgren
* Felipe Balbi [EMAIL PROTECTED] [081010 12:24]:
 On Fri, Oct 10, 2008 at 12:05:09PM +0300, Tereshonkov Roman wrote:
 
 A patch description would be great here
 
  
  Signed-off-by: Roman Tereshonkov [EMAIL PROTECTED]
 
 Acked-by: Felipe Balbi [EMAIL PROTECTED]

Pushing.

Tony

 
  ---
   drivers/misc/sti/sdti.c |   12 ++--
   1 files changed, 6 insertions(+), 6 deletions(-)
  
  diff --git a/drivers/misc/sti/sdti.c b/drivers/misc/sti/sdti.c
  index c35821d..2631ccf 100644
  --- a/drivers/misc/sti/sdti.c
  +++ b/drivers/misc/sti/sdti.c
  @@ -32,7 +32,7 @@
   #define CPU2_TRACE_EN  0x02
   
   static struct clk *sdti_ck;
  -unsigned long sti_base, sti_channel_base;
  +void __iomem *sti_base, *sti_channel_base;
   static DEFINE_SPINLOCK(sdti_lock);
   
   void omap_sti_channel_write_trace(int len, int id, void *data,
  @@ -137,14 +137,14 @@ static int __devinit omap_sdti_probe(struct 
  platform_device *pdev)
  }
   
  size = res-end - res-start;
  -   sti_base = (unsigned long)ioremap(res-start, size);
  +   sti_base = ioremap(res-start, size);
  if (unlikely(!sti_base))
  return -ENODEV;
   
  size = cres-end - cres-start;
  -   sti_channel_base = (unsigned long)ioremap(cres-start, size);
  +   sti_channel_base = ioremap(cres-start, size);
  if (unlikely(!sti_channel_base)) {
  -   iounmap((void *)sti_base);
  +   iounmap(sti_base);
  return -ENODEV;
  }
   
  @@ -153,8 +153,8 @@ static int __devinit omap_sdti_probe(struct 
  platform_device *pdev)
   
   static int __devexit omap_sdti_remove(struct platform_device *pdev)
   {
  -   iounmap((void *)sti_channel_base);
  -   iounmap((void *)sti_base);
  +   iounmap(sti_channel_base);
  +   iounmap(sti_base);
  omap_sdti_exit();
   
  return 0;
  -- 
  1.5.5.1
  
  --
  To unsubscribe from this list: send the line unsubscribe linux-omap in
  the body of a message to [EMAIL PROTECTED]
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 -- 
 balbi
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] ARM: OMAP: fix uninitialized warning

2008-10-10 Thread Tony Lindgren
* Hiroshi DOYU [EMAIL PROTECTED] [081009 14:38]:
 warning: 'rev_name' may be used uninitialized in this function

Pushing.

Tony

 Signed-off-by: Hiroshi DOYU [EMAIL PROTECTED]
 ---
  arch/arm/mach-omap2/id.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
 index 7a7ad18..c002076 100644
 --- a/arch/arm/mach-omap2/id.c
 +++ b/arch/arm/mach-omap2/id.c
 @@ -147,7 +147,7 @@ void __init omap34xx_check_revision(void)
   u32 cpuid, idcode;
   u16 hawkeye;
   u8 rev;
 - char *rev_name;
 + char *rev_name = ES1.0;
  
   /*
* We cannot access revision registers on ES1.0.
 @@ -157,7 +157,6 @@ void __init omap34xx_check_revision(void)
   cpuid = read_cpuid(CPUID_ID);
   if cpuid  4)  0xfff) == 0xc08)  ((cpuid  0xf) == 0x0)) {
   system_rev = OMAP3430_REV_ES1_0;
 - rev_name = ES1.0;
   goto out;
   }
  
 -- 
 1.6.0.2.229.g1293c
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix compiler warnings in smartreflex.c

2008-10-10 Thread Sanjeev Premi
Fix these compiler warnings:
smartreflex.c:126: warning: initialization makes integer from pointer without a 
cast
smartreflex.c:134: warning: initialization makes integer from pointer without a 
cast

Refreshed after updates from Felipe.

Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/smartreflex.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c 
b/arch/arm/mach-omap2/smartreflex.c
index e54c0fb..33f604d 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -49,8 +49,8 @@ struct omap_sr {
u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, opp4_nvalue;
u32 opp5_nvalue;
u32 senp_mod, senn_mod;
-   u32 srbase_addr;
-   u32 vpbase_addr;
+   void __iomem*srbase_addr;
+   void __iomem*vpbase_addr;
 };
 
 /* Custom clocks to enable SR specific enable/disable functions. */
@@ -60,15 +60,15 @@ struct sr_custom_clk {
struct omap_sr  *sr;
 };
 
-#define SR_REGADDR(offs) (__force void __iomem *)(sr-srbase_addr + offset)
+#define SR_REGADDR(offs)   (sr-srbase_addr + offset)
 
-static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
+static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value)
 {
__raw_writel(value, SR_REGADDR(offset));
 }
 
-static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
-   u32 value)
+static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask,
+   u32 value)
 {
u32 reg_val;
 
@@ -79,7 +79,7 @@ static inline void sr_modify_reg(struct omap_sr *sr, int 
offset, u32 mask,
__raw_writel(reg_val, SR_REGADDR(offset));
 }
 
-static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
+static inline u32 sr_read_reg(struct omap_sr *sr, unsigned offset)
 {
return __raw_readl(SR_REGADDR(offset));
 }
-- 
1.5.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix IO address issue.

2008-10-10 Thread Roman Tereshonkov

Signed-off-by: Roman Tereshonkov [EMAIL PROTECTED]
---
 drivers/misc/sti/sdti.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/sti/sdti.c b/drivers/misc/sti/sdti.c
index c35821d..2631ccf 100644
--- a/drivers/misc/sti/sdti.c
+++ b/drivers/misc/sti/sdti.c
@@ -32,7 +32,7 @@
 #define CPU2_TRACE_EN  0x02
 
 static struct clk *sdti_ck;
-unsigned long sti_base, sti_channel_base;
+void __iomem *sti_base, *sti_channel_base;
 static DEFINE_SPINLOCK(sdti_lock);
 
 void omap_sti_channel_write_trace(int len, int id, void *data,
@@ -137,14 +137,14 @@ static int __devinit omap_sdti_probe(struct 
platform_device *pdev)
}
 
size = res-end - res-start;
-   sti_base = (unsigned long)ioremap(res-start, size);
+   sti_base = ioremap(res-start, size);
if (unlikely(!sti_base))
return -ENODEV;
 
size = cres-end - cres-start;
-   sti_channel_base = (unsigned long)ioremap(cres-start, size);
+   sti_channel_base = ioremap(cres-start, size);
if (unlikely(!sti_channel_base)) {
-   iounmap((void *)sti_base);
+   iounmap(sti_base);
return -ENODEV;
}
 
@@ -153,8 +153,8 @@ static int __devinit omap_sdti_probe(struct platform_device 
*pdev)
 
 static int __devexit omap_sdti_remove(struct platform_device *pdev)
 {
-   iounmap((void *)sti_channel_base);
-   iounmap((void *)sti_base);
+   iounmap(sti_channel_base);
+   iounmap(sti_base);
omap_sdti_exit();
 
return 0;
-- 
1.5.5.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP3: Add default kernel config for OMAP LDP (Re: [PATCH 0/0] Add minimal omap34xx support)

2008-10-10 Thread Tony Lindgren
* Tony Lindgren [EMAIL PROTECTED] [081010 12:15]:
 * Russell King - ARM Linux [EMAIL PROTECTED] [081010 11:42]:
  On Thu, Oct 09, 2008 at 06:17:25PM +0300, Tony Lindgren wrote:
   Sure, I'll post a minimal LDP patch separately tomorrow. I don't have
   an LDP so I can't verify it boots though.
  
  Unfortunately, Linus has been unpredictable, and released 2.6.27 last
  night, rather than the usual one week after -rc9.
  
  What this means is that the merge window is now open, and I shouldn't
  be accepting anything else into my kernel tree.
  
  However, if you can get LDP in by this evening, I'll pull it into the
  tree.  That will be the final devel code merged into my tree for 2.6.28.
 
 Sure. Here's the minimal board patch for LDP with it's defconfig
 in the following mail. Also added to the omap3-upstream queue.

Here's the defconfig.

Tony
From 99b3075b9095c23acf8d884bdc7fe33c8c3520f0 Mon Sep 17 00:00:00 2001
From: Nishant Kamat [EMAIL PROTECTED]
Date: Fri, 10 Oct 2008 11:48:56 +0300
Subject: [PATCH] ARM: OMAP3: Add default kernel config for OMAP LDP

This patch adds a default config for the OMAP LDP platform.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
Signed-off-by: Tony Lindgren [EMAIL PROTECTED]

diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig
new file mode 100644
index 000..948a212
--- /dev/null
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -0,0 +1,1044 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc5
+# Fri Oct 10 11:49:41 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 

[PATCH] [omap2] Fix compiler warnings in gpmc.c

2008-10-10 Thread Sanjeev Premi
Fix these compiler warnings:

gpmc.c: In function 'gpmc_init':
gpmc.c:432: warning: 'return' with a value, in function returning void
gpmc.c:439: warning: 'return' with a value, in function returning void

Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/gpmc.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f3e0271..4365c59 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -429,18 +429,16 @@ void __init gpmc_init(void)
gpmc_l3_clk = clk_get(NULL, ck);
if (IS_ERR(gpmc_l3_clk)) {
printk(KERN_ERR Could not get GPMC clock %s\n, ck);
-   return -ENODEV;
+   BUG();
}
 
gpmc_base = ioremap(l, SZ_4K);
if (!gpmc_base) {
clk_put(gpmc_l3_clk);
printk(KERN_ERR Could not get GPMC register memory\n);
-   return -ENOMEM;
+   BUG();
}
 
-   BUG_ON(IS_ERR(gpmc_l3_clk));
-
l = gpmc_read_reg(GPMC_REVISION);
printk(KERN_INFO GPMC revision %d.%d\n, (l  4)  0x0f, l  0x0f);
/* Set smart idle mode and automatic L3 clock gating */
-- 
1.5.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] twl4030-core: fix a typo

2008-10-10 Thread Tony Lindgren
* Felipe Balbi [EMAIL PROTECTED] [081009 23:04]:
 On Fri, Oct 10, 2008 at 01:24:10AM +0530, Pandita, Vikram wrote:
  
  To: Pakaravoor, Jagadeesh
  On Thu, Oct 09, 2008 at 08:44:49PM +0530, Pakaravoor, Jagadeesh wrote:
   From: Jagadeesh Bhaskar Pakaravoor [EMAIL PROTECTED]
  
   Fix a trivial typo.
  
  please Cc Samuel Ortiz [EMAIL PROTECTED] and lkml
  
  Samuel already fixed this. 
  http://lkml.org/lkml/2008/10/8/166
 
 cool, better applying here to avoid conflicts then :-D

Pushing to l-o tree.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP3: Add basic board support for OMAP LDP (Re: [PATCH 0/0] Add minimal omap34xx support)

2008-10-10 Thread Tony Lindgren
* Russell King - ARM Linux [EMAIL PROTECTED] [081010 11:42]:
 On Thu, Oct 09, 2008 at 06:17:25PM +0300, Tony Lindgren wrote:
  Sure, I'll post a minimal LDP patch separately tomorrow. I don't have
  an LDP so I can't verify it boots though.
 
 Unfortunately, Linus has been unpredictable, and released 2.6.27 last
 night, rather than the usual one week after -rc9.
 
 What this means is that the merge window is now open, and I shouldn't
 be accepting anything else into my kernel tree.
 
 However, if you can get LDP in by this evening, I'll pull it into the
 tree.  That will be the final devel code merged into my tree for 2.6.28.

Sure. Here's the minimal board patch for LDP with it's defconfig
in the following mail. Also added to the omap3-upstream queue.

Tony

From 492656511b109b5f9ee64d05c90b5bd9043549fa Mon Sep 17 00:00:00 2001
From: Nishant Kamat [EMAIL PROTECTED]
Date: Fri, 10 Oct 2008 11:28:23 +0300
Subject: [PATCH] ARM: OMAP3: Add basic board support for OMAP LDP

This adds minimal board support for the OMAP3430 LDP development platform.

Signed-off-by: Nishant Kamat [EMAIL PROTECTED]
Signed-off-by: Tony Lindgren [EMAIL PROTECTED]

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index aef043b..4832fcc 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -48,6 +48,10 @@ config MACH_OMAP3_BEAGLE
 	bool OMAP3 BEAGLE board
 	depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP_LDP
+	bool OMAP3 LDP board
+	depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OVERO
 	bool Gumstix Overo board
 	depends on ARCH_OMAP3  ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index feb9caf..c693923 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -30,5 +30,6 @@ obj-$(CONFIG_MACH_OMAP_H4)		+= board-h4.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)		+= board-2430sdp.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)		+= board-apollon.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)		+= board-omap3beagle.o
+obj-$(CONFIG_MACH_OMAP_LDP)		+= board-ldp.o
 obj-$(CONFIG_MACH_OVERO)		+= board-overo.o
 
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
new file mode 100644
index 000..1ea5998
--- /dev/null
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -0,0 +1,86 @@
+/*
+ * linux/arch/arm/mach-omap2/board-ldp.c
+ *
+ * Copyright (C) 2008 Texas Instruments Inc.
+ * Nishant Kamat [EMAIL PROTECTED]
+ *
+ * Modified from mach-omap2/board-3430sdp.c
+ *
+ * This program 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.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/input.h
+#include linux/workqueue.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/spi/spi.h
+#include linux/spi/ads7846.h
+
+#include mach/hardware.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include mach/board-ldp.h
+#include mach/mcspi.h
+#include mach/gpio.h
+#include mach/board.h
+#include mach/common.h
+#include mach/gpmc.h
+
+#include asm/io.h
+#include asm/delay.h
+#include mach/control.h
+
+static void __init omap_ldp_init_irq(void)
+{
+	omap2_init_common_hw();
+	omap_init_irq();
+	omap_gpio_init();
+}
+
+static struct omap_uart_config ldp_uart_config __initdata = {
+	.enabled_uarts	= ((1  0) | (1  1) | (1  2)),
+};
+
+static struct omap_board_config_kernel ldp_config[] __initdata = {
+	{ OMAP_TAG_UART,	ldp_uart_config },
+};
+
+static int __init omap_i2c_init(void)
+{
+	omap_register_i2c_bus(1, 2600, NULL, 0);
+	omap_register_i2c_bus(2, 400, NULL, 0);
+	omap_register_i2c_bus(3, 400, NULL, 0);
+	return 0;
+}
+
+static void __init omap_ldp_init(void)
+{
+	omap_i2c_init();
+	omap_board_config = ldp_config;
+	omap_board_config_size = ARRAY_SIZE(ldp_config);
+	omap_serial_init();
+}
+
+static void __init omap_ldp_map_io(void)
+{
+	omap2_set_globals_343x();
+	omap2_map_common_io();
+}
+
+MACHINE_START(OMAP_LDP, OMAP LDP board)
+	.phys_io	= 0x4800,
+	.io_pg_offst	= ((0xd800)  18)  0xfffc,
+	.boot_params	= 0x8100,
+	.map_io		= omap_ldp_map_io,
+	.init_irq	= omap_ldp_init_irq,
+	.init_machine	= omap_ldp_init,
+	.timer		= omap_timer,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h
new file mode 100644
index 000..66e2746
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-ldp.h
@@ -0,0 +1,36 @@
+/*
+ * arch/arm/plat-omap/include/mach/board-ldp.h
+ *
+ * Hardware definitions for TI OMAP3 LDP.
+ *
+ * Copyright (C) 2008 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED 

[PATCH] Enable CONFIG_GPIO_TWL4030=y

2008-10-10 Thread Sanjeev Premi
Without this option, kernel builds would fail, with
errors similar to:

hsmmc.c:50: undefined reference to `twl4030_get_gpio_datain'
hsmmc.c:82: undefined reference to `twl4030_free_gpio'
hsmmc.c:63: undefined reference to `twl4030_request_gpio'
hsmmc.c:67: undefined reference to `twl4030_set_gpio_debounce'

Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
---
 arch/arm/configs/omap2_evm_defconfig|1 +
 arch/arm/configs/omap3_beagle_defconfig |1 +
 arch/arm/configs/omap3_evm_defconfig|1 +
 arch/arm/configs/omap_3430sdp_defconfig |1 +
 arch/arm/configs/omap_ldp_defconfig |1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/omap2_evm_defconfig 
b/arch/arm/configs/omap2_evm_defconfig
index 61f0965..b52426a 100644
--- a/arch/arm/configs/omap2_evm_defconfig
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -795,6 +795,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # PCI GPIO expanders:
diff --git a/arch/arm/configs/omap3_beagle_defconfig 
b/arch/arm/configs/omap3_beagle_defconfig
index 7805995..0d2f770 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -709,6 +709,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap3_evm_defconfig 
b/arch/arm/configs/omap3_evm_defconfig
index ebeaef3..507a689 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -779,6 +779,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
b/arch/arm/configs/omap_3430sdp_defconfig
index 11c0cf7..bd6006c 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -790,6 +790,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
diff --git a/arch/arm/configs/omap_ldp_defconfig 
b/arch/arm/configs/omap_ldp_defconfig
index 9a90975..fd34367 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -549,6 +549,7 @@ CONFIG_HAVE_GPIO_LIB=y
 #
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
 
 #
 # SPI GPIO expanders:
-- 
1.5.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] omapfb bugfixes

2008-10-10 Thread Tony Lindgren
* Daniel Stone [EMAIL PROTECTED] [081009 13:23]:
 On Thu, Oct 09, 2008 at 12:58:55PM +0300, ext Tony Lindgren wrote:
  * Daniel Stone [EMAIL PROTECTED] [081009 12:39]:
   Hi,
   These should be fine for merging, one bugfix from Siarhei and one tiny
   Kconfig dependency update.
  
  OK. Can you also refresh your FB: OMAP: DISPC: Allow multiple
  external IRQ handlers patch?
 
 Sure, no problem.  Sent now.

Thanks, pushing your three patches.

Tony

  We really should get all the fb stuff to fbdevel list, but let's wait
  a bit on that, too many other things to deal with right now.
 
 Yeah, good point, sorry. :)
 
 Cheers,
 Daniel


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP2xxx: move SRAM to fix boot hang

2008-10-10 Thread Tony Lindgren
* Paul Walmsley [EMAIL PROTECTED] [081010 02:23]:
 Commit 1c957036bbd912322793da676d05e169abf24782 breaks booting on
 OMAP2; it causes the SRAM to be mapped on top of the L4 interconnect.
 This causes the system to hang early in boot in omap_map_sram() during
 the TLB flush. Fix by moving SRAM elsewhere in the memory map.
 
 Reported by Jarkko Nikula [EMAIL PROTECTED].  This patch is a
 collaboration with Tony Lindgren [EMAIL PROTECTED] and
 Kevin Hilman [EMAIL PROTECTED].
 
 Boot-tested on 2430SDP (by Paul) and N810 (by Jarkko).

Pushing.

Tony

 Signed-off-by: Paul Walmsley [EMAIL PROTECTED]
 Tested-by: Jarkko Nikula [EMAIL PROTECTED]
 Cc: Kevin Hilman [EMAIL PROTECTED]
 Cc: Tony Lindgren [EMAIL PROTECTED]
 Cc: Måns Rullgård [EMAIL PROTECTED]
 ---
  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 853048d..027b101 100644
 --- a/arch/arm/plat-omap/sram.c
 +++ b/arch/arm/plat-omap/sram.c
 @@ -37,8 +37,8 @@
  #define OMAP1_SRAM_VAVMALLOC_END
  #define OMAP2_SRAM_PA0x4020
  #define OMAP2_SRAM_PUB_PA0x4020f800
 -#define OMAP2_SRAM_VAVMALLOC_END
 -#define OMAP2_SRAM_PUB_VA(VMALLOC_END + 0x800)
 +#define OMAP2_SRAM_VA0xe300
 +#define OMAP2_SRAM_PUB_VA(OMAP2_SRAM_VA + 0x800)
  #define OMAP3_SRAM_PA   0x4020
  #define OMAP3_SRAM_VA   0xd700
  #define OMAP3_SRAM_PUB_PA   0x40208000
 
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] [omap2] Fix compiler warnings in gpmc.c

2008-10-10 Thread Pakaravoor, Jagadeesh

What was wrong with this patch?

http://marc.info/?l=linux-omapm=122277286326989w=2

--
Jagadeesh

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [omap2] Fix compiler warnings in gpmc.c

2008-10-10 Thread Tony Lindgren
* Sanjeev Premi [EMAIL PROTECTED] [081010 13:22]:
 Fix these compiler warnings:
 
 gpmc.c: In function 'gpmc_init':
 gpmc.c:432: warning: 'return' with a value, in function returning void
 gpmc.c:439: warning: 'return' with a value, in function returning void

Pushing.

Tony

 Signed-off-by: Sanjeev Premi [EMAIL PROTECTED]
 ---
  arch/arm/mach-omap2/gpmc.c |6 ++
  1 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
 index f3e0271..4365c59 100644
 --- a/arch/arm/mach-omap2/gpmc.c
 +++ b/arch/arm/mach-omap2/gpmc.c
 @@ -429,18 +429,16 @@ void __init gpmc_init(void)
   gpmc_l3_clk = clk_get(NULL, ck);
   if (IS_ERR(gpmc_l3_clk)) {
   printk(KERN_ERR Could not get GPMC clock %s\n, ck);
 - return -ENODEV;
 + BUG();
   }
  
   gpmc_base = ioremap(l, SZ_4K);
   if (!gpmc_base) {
   clk_put(gpmc_l3_clk);
   printk(KERN_ERR Could not get GPMC register memory\n);
 - return -ENOMEM;
 + BUG();
   }
  
 - BUG_ON(IS_ERR(gpmc_l3_clk));
 -
   l = gpmc_read_reg(GPMC_REVISION);
   printk(KERN_INFO GPMC revision %d.%d\n, (l  4)  0x0f, l  0x0f);
   /* Set smart idle mode and automatic L3 clock gating */
 -- 
 1.5.6
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Fix IO address issue.

2008-10-10 Thread Felipe Balbi
On Fri, Oct 10, 2008 at 12:05:09PM +0300, Tereshonkov Roman wrote:

A patch description would be great here

 
 Signed-off-by: Roman Tereshonkov [EMAIL PROTECTED]

Acked-by: Felipe Balbi [EMAIL PROTECTED]

 ---
  drivers/misc/sti/sdti.c |   12 ++--
  1 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/misc/sti/sdti.c b/drivers/misc/sti/sdti.c
 index c35821d..2631ccf 100644
 --- a/drivers/misc/sti/sdti.c
 +++ b/drivers/misc/sti/sdti.c
 @@ -32,7 +32,7 @@
  #define CPU2_TRACE_EN0x02
  
  static struct clk *sdti_ck;
 -unsigned long sti_base, sti_channel_base;
 +void __iomem *sti_base, *sti_channel_base;
  static DEFINE_SPINLOCK(sdti_lock);
  
  void omap_sti_channel_write_trace(int len, int id, void *data,
 @@ -137,14 +137,14 @@ static int __devinit omap_sdti_probe(struct 
 platform_device *pdev)
   }
  
   size = res-end - res-start;
 - sti_base = (unsigned long)ioremap(res-start, size);
 + sti_base = ioremap(res-start, size);
   if (unlikely(!sti_base))
   return -ENODEV;
  
   size = cres-end - cres-start;
 - sti_channel_base = (unsigned long)ioremap(cres-start, size);
 + sti_channel_base = ioremap(cres-start, size);
   if (unlikely(!sti_channel_base)) {
 - iounmap((void *)sti_base);
 + iounmap(sti_base);
   return -ENODEV;
   }
  
 @@ -153,8 +153,8 @@ static int __devinit omap_sdti_probe(struct 
 platform_device *pdev)
  
  static int __devexit omap_sdti_remove(struct platform_device *pdev)
  {
 - iounmap((void *)sti_channel_base);
 - iounmap((void *)sti_base);
 + iounmap(sti_channel_base);
 + iounmap(sti_base);
   omap_sdti_exit();
  
   return 0;
 -- 
 1.5.5.1
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Tony Lindgren wrote:
 Anything else not working right now?

MUSB on Overo...

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/7] Twl4030 power code updated for new twl4030 core

2008-10-10 Thread Peter 'p2' De Schrijver
This patch adds the twl4030 power handling. It downloads the scripts provided
by the board configuration to the twl4030 and configures the chip to call
the relevant script for each event (processor group 1 and 2 sleep,
processor group 3 sleep, wakeup or warm reset).

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 drivers/mfd/twl4030-power.c |  270 +++
 1 files changed, 270 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/twl4030-power.c

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
new file mode 100644
index 000..bdeac36
--- /dev/null
+++ b/drivers/mfd/twl4030-power.c
@@ -0,0 +1,270 @@
+/*
+ * linux/drivers/i2c/chips/twl4030-power.c
+ *
+ * Handle TWL4030 Power initialization
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ * Copyright (C) 2006 Texas Instruments, Inc
+ *
+ * Written by  Kalle Jokiniemi
+ * Peter De Schrijver [EMAIL PROTECTED]
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file COPYING in the main directory of this
+ * archive for more details.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include linux/module.h
+#include linux/pm.h
+#include linux/i2c/twl4030.h
+#include linux/platform_device.h
+
+#include asm/mach-types.h
+
+static u8 triton_next_free_address = 0x2b;
+
+#define PWR_P1_SW_EVENTS   0x10
+#define PWR_DEVOFF (10)
+
+#define PHY_TO_OFF_PM_MASTER(p)(p - 0x36)
+#define PHY_TO_OFF_PM_RECEIVER(p)  (p - 0x5b)
+
+/* resource - hfclk */
+#define R_HFCLKOUT_DEV_GRP PHY_TO_OFF_PM_RECEIVER(0xe6)
+
+/* PM events */
+#define R_P1_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x46)
+#define R_P2_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x47)
+#define R_P3_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x48)
+#define R_CFG_P1_TRANSITIONPHY_TO_OFF_PM_MASTER(0x36)
+#define R_CFG_P2_TRANSITIONPHY_TO_OFF_PM_MASTER(0x37)
+#define R_CFG_P3_TRANSITIONPHY_TO_OFF_PM_MASTER(0x38)
+
+#define LVL_WAKEUP 0x08
+
+#define ENABLE_WARMRESET (14)
+
+#define END_OF_SCRIPT  0x3f
+
+#define R_SEQ_ADD_A2S  PHY_TO_OFF_PM_MASTER(0x55)
+#define R_SEQ_ADD_SA12 PHY_TO_OFF_PM_MASTER(0x56)
+#defineR_SEQ_ADD_S2A3  PHY_TO_OFF_PM_MASTER(0x57)
+#defineR_SEQ_ADD_WARM  PHY_TO_OFF_PM_MASTER(0x58)
+#define R_MEMORY_ADDRESS   PHY_TO_OFF_PM_MASTER(0x59)
+#define R_MEMORY_DATA  PHY_TO_OFF_PM_MASTER(0x5a)
+
+#define R_PROTECT_KEY  0x0E
+#define KEY_1  0xC0
+#define KEY_2  0x0C
+
+static int __init twl4030_write_script_byte(u8 address, u8 byte)
+{
+   int err;
+
+   err = twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, address,
+   R_MEMORY_ADDRESS);
+   err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, byte,
+   R_MEMORY_DATA);
+
+   return err;
+}
+
+static int __init twl4030_write_script_ins(u8 address, u16 pmb_message,
+   u8 delay, u8 next)
+{
+   int err = 0;
+
+   address *= 4;
+   err |= twl4030_write_script_byte(address++, pmb_message  8);
+   err |= twl4030_write_script_byte(address++, pmb_message  0xff);
+   err |= twl4030_write_script_byte(address++, delay);
+   err |= twl4030_write_script_byte(address++, next);
+
+   return err;
+}
+
+static int __init twl4030_write_script(u8 address, struct twl4030_ins *script,
+   int len)
+{
+   int err = 0;
+
+   for (; len; len--, address++, script++) {
+   if (len == 1)
+   err |= twl4030_write_script_ins(address,
+   script-pmb_message,
+   script-delay,
+   END_OF_SCRIPT);
+   else
+   err |= twl4030_write_script_ins(address,
+   script-pmb_message,
+   script-delay,
+   address + 1);
+   }
+
+   return err;
+}
+
+static int __init config_wakeup3_sequence(u8 address)
+{
+
+   int err = 0;
+
+   /* Set SLEEP to ACTIVE SEQ address for P3 */
+   err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, address,
+ R_SEQ_ADD_S2A3);
+
+  

[PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-10 Thread Peter 'p2' De Schrijver
Make omap3 evm, beagle and overo use the generic twl4030 script.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/Makefile|9 ++---
 arch/arm/mach-omap2/board-omap3beagle.c |3 +++
 arch/arm/mach-omap2/board-omap3evm.c|3 +++
 arch/arm/mach-omap2/board-overo.c   |3 +++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 33de217..ed0cd7a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -58,10 +58,12 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += 
board-3430sdp.o \
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o \
   hsmmc.o \
   usb-musb.o usb-ehci.o \
-  board-omap3evm-flash.o
+  board-omap3evm-flash.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
-  hsmmc.o
+  hsmmc.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
   hsmmc.o \
   usb-musb.o
@@ -77,7 +79,8 @@ obj-$(CONFIG_MACH_NOKIA_N810) += board-n810.o
 obj-$(CONFIG_MACH_OVERO)   += board-overo.o \
   hsmmc.o \
   usb-musb.o \
-  usb-ehci.o
+  usb-ehci.o \
+  twl4030-generic-scripts.o
 
 # TUSB 6010 chips
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 19702c7..1579a5e 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -51,6 +51,8 @@
 
 #define NAND_BLOCK_SIZESZ_128K
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct mtd_partition omap3beagle_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
@@ -149,6 +151,7 @@ static struct twl4030_platform_data beagle_twldata = {
/* platform_data for children goes here */
.usb= beagle_usb_data,
.gpio   = beagle_gpio_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 3538067..dd7d1b7 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -42,6 +42,8 @@
 
 #include sdram-micron-mt46h32m32lf-6.h
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct resource omap3evm_smc911x_resources[] = {
[0] =   {
.start  = OMAP3EVM_ETHR_START,
@@ -139,6 +141,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
.keypad = omap3evm_kp_data,
.madc   = omap3evm_madc_data,
.usb= omap3evm_usb_data,
+   .power  = generic3430_t2scripts_data,
.gpio   = omap3evm_gpio_data,
 };
 
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 4e2781a..4d2203f 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -55,6 +55,8 @@
 #define GPMC_CS0_BASE  0x60
 #define GPMC_CS_SIZE   0x30
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct mtd_partition overo_nand_partitions[] = {
{
.name   = xloader,
@@ -160,6 +162,7 @@ static struct twl4030_platform_data overo_twldata = {
.irq_end= TWL4030_IRQ_END,
.gpio   = overo_gpio_data,
.usb= overo_usb_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/7] Generic twl4030 power script for 3430 based boards.

2008-10-10 Thread Peter 'p2' De Schrijver
This is a generic twl4030 power script for 3430 based boards. It handles
sleep and wakeup events. In case of a sleep event it will first put the
Reset and Control (RC) resources to sleep and then put the voltage regulators
to sleep. In case of a wakeup event, the system clock will be started first,
then the voltage regulators will be woken up and finally the RC resources will
be woken up.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/twl4030-generic-scripts.c |   78 +
 1 files changed, 78 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/twl4030-generic-scripts.c

diff --git a/arch/arm/mach-omap2/twl4030-generic-scripts.c 
b/arch/arm/mach-omap2/twl4030-generic-scripts.c
new file mode 100644
index 000..f41c9ef
--- /dev/null
+++ b/arch/arm/mach-omap2/twl4030-generic-scripts.c
@@ -0,0 +1,78 @@
+/*
+ * arch/arm/mach-omap2/twl4030-generic-scripts.c
+ *
+ * Generic power control scripts for TWL4030
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ * Copyright (C) 2006 Texas Instruments, Inc
+ *
+ * Written by  Kalle Jokiniemi
+ * Peter De Schrijver [EMAIL PROTECTED]
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file COPYING in the main directory of this
+ * archive for more details.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include linux/kernel.h
+#include linux/device.h
+#include linux/init.h
+#include linux/i2c/twl4030.h
+
+/*
+ * This script instructs twl4030 to first put the Reset and Control (RC)
+ * resources to sleep and then all the other resources.
+ */
+
+static struct twl4030_ins sleep_on_seq[] __initdata = {
+   {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
+   RES_STATE_SLEEP), 4},
+   {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
+   RES_STATE_SLEEP), 4},
+};
+
+static struct twl4030_script sleep_on_script __initdata = {
+   .script = sleep_on_seq,
+   .size   = ARRAY_SIZE(sleep_on_seq),
+   .flags  = TRITON_SLEEP_SCRIPT,
+};
+
+/*
+ * This script instructs twl4030 to first enable CLKEN, then wakeup the
+ * regulators and then all other resources.
+ */
+
+static struct twl4030_ins wakeup_seq[] __initdata = {
+   {MSG_SINGULAR(DEV_GRP_NULL, 0x17, RES_STATE_ACTIVE), 0x30},
+   {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP_PR, RES_TYPE_ALL, RES_TYPE2_R0,
+   RES_STATE_ACTIVE), 0x37},
+   {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
+   RES_STATE_ACTIVE), 0x2},
+};
+
+static struct twl4030_script wakeup_script __initdata = {
+   .script = wakeup_seq,
+   .size   = ARRAY_SIZE(wakeup_seq),
+   .flags  = TRITON_WAKEUP12_SCRIPT | TRITON_WAKEUP3_SCRIPT,
+};
+
+static struct twl4030_script *twl4030_scripts[] __initdata = {
+   sleep_on_script,
+   wakeup_script,
+};
+
+struct twl4030_power_data generic3430_t2scripts_data __initdata = {
+   .scripts= twl4030_scripts,
+   .size   = ARRAY_SIZE(twl4030_scripts),
+};
+
+
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/7] Add defines and data types for twl4030.

2008-10-10 Thread Peter 'p2' De Schrijver
This patch adds a bunch of data types and defines to handle the twl4030 power 
sequence scripts.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 include/linux/i2c/twl4030.h |   64 +++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index cdb4531..7dc4ee1 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -264,6 +264,69 @@ struct twl4030_usb_data {
enum twl4030_usb_mode   usb_mode;
 };
 
+struct twl4030_ins {
+   u16 pmb_message;
+   u8 delay;
+};
+
+struct twl4030_script {
+   struct twl4030_ins *script;
+   unsigned size;
+   u8 flags;
+};
+#define TRITON_WRST_SCRIPT (10)
+#define TRITON_WAKEUP12_SCRIPT (11)
+#define TRITON_WAKEUP3_SCRIPT  (12)
+#define TRITON_SLEEP_SCRIPT(13)
+
+struct twl4030_power_data {
+   struct twl4030_script **scripts;
+   unsigned size;
+};
+
+/* Power bus message definitions */
+
+#define DEV_GRP_NULL   0x0
+#define DEV_GRP_P1 0x1
+#define DEV_GRP_P2 0x2
+#define DEV_GRP_P3 0x4
+
+#define RES_GRP_RES0x0
+#define RES_GRP_PP 0x1
+#define RES_GRP_RC 0x2
+#define RES_GRP_PP_RC  0x3
+#define RES_GRP_PR 0x4
+#define RES_GRP_PP_PR  0x5
+#define RES_GRP_RC_PR  0x6
+#define RES_GRP_ALL0x7
+
+#define RES_TYPE2_R0   0x0
+
+#define RES_TYPE_ALL   0x7
+
+#define RES_STATE_WRST 0xF
+#define RES_STATE_ACTIVE   0xE
+#define RES_STATE_SLEEP0x8
+#define RES_STATE_OFF  0x0
+
+/*
+*  Power Bus Message Format
+*
+*  Broadcast Message (16 Bits)
+*  DEV_GRP[15:13] MT[12]  RES_GRP[11:9]  RES_TYPE2[8:7] RES_TYPE[6:4]
+*  RES_STATE[3:0]
+*
+*  Singular Message (16 Bits)
+*  DEV_GRP[15:13] MT[12]  RES_ID[11:4]  RES_STATE[3:0]
+*
+*/
+
+#define MSG_BROADCAST(devgrp, grp, type, type2, state) \
+   (devgrp  13 | 1  12 | grp  9 | type2  7 | type  4 | state)
+
+#define MSG_SINGULAR(devgrp, id, state) \
+   (devgrp  13 | 0  12 | id  4 | state)
+
 struct twl4030_platform_data {
unsignedirq_base, irq_end;
struct twl4030_bci_platform_data*bci;
@@ -271,6 +334,7 @@ struct twl4030_platform_data {
struct twl4030_madc_platform_data   *madc;
struct twl4030_keypad_data  *keypad;
struct twl4030_usb_data *usb;
+   struct twl4030_power_data   *power;
 
/* REVISIT more to come ... _nothing_ should be hard-wired */
 };
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/7] Hook twl4030 power code into twl4030 core.

2008-10-10 Thread Peter 'p2' De Schrijver
This patch makes twl4030 core call the power code in case the scripts are 
present in the platform data.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 drivers/mfd/twl4030-core.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c
index fd9a016..7a5c9d0 100644
--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -81,6 +81,12 @@
 #define twl_has_madc() false
 #endif
 
+#ifdef CONFIG_TWL4030_POWER
+#define twl_has_power()true
+#else
+#define twl_has_power()false
+#endif
+
 #if defined(CONFIG_RTC_DRV_TWL4030) || defined(CONFIG_RTC_DRV_TWL4030_MODULE)
 #define twl_has_rtc()  true
 #else
@@ -106,6 +112,8 @@ static inline void activate_irq(int irq)
 #endif
 }
 
+extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);
+
 /* Primary Interrupt Handler on TWL4030 Registers */
 
 /* Register Definitions */
@@ -794,6 +802,9 @@ static int add_children(struct twl4030_platform_data *pdata)
}
}
 
+   if (twl_has_power()  pdata-power)
+   twl4030_power_init(pdata-power);
+
if (twl_has_rtc()) {
twl = twl4030_modules[3];
 
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/7] Remove existing twl4030 power script code.

2008-10-10 Thread Peter 'p2' De Schrijver
First we remove the existing twl4030 power sequencer code.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 drivers/i2c/chips/twl4030-power.c |  343 -
 1 files changed, 0 insertions(+), 343 deletions(-)
 delete mode 100644 drivers/i2c/chips/twl4030-power.c

diff --git a/drivers/i2c/chips/twl4030-power.c 
b/drivers/i2c/chips/twl4030-power.c
deleted file mode 100644
index cb325b0..000
--- a/drivers/i2c/chips/twl4030-power.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * linux/drivers/i2c/chips/twl4030-power.c
- *
- * Handle TWL4030 Power initialization
- *
- * Copyright (C) 2008 Nokia Corporation
- * Copyright (C) 2006 Texas Instruments, Inc
- *
- * Written by  Kalle Jokiniemi
- * Peter De Schrijver [EMAIL PROTECTED]
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include linux/module.h
-#include linux/pm.h
-#include linux/i2c/twl4030.h
-
-#include asm/mach-types.h
-
-#define PWR_P1_SW_EVENTS   0x10
-#define PWR_DEVOFF (10)
-
-#define PHY_TO_OFF_PM_MASTER(p)(p - 0x36)
-#define PHY_TO_OFF_PM_RECIEVER(p)  (p - 0x5b)
-
-/* resource - hfclk */
-#define R_HFCLKOUT_DEV_GRP PHY_TO_OFF_PM_RECIEVER(0xe6)
-
-/* PM events */
-#define R_P1_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x46)
-#define R_P2_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x47)
-#define R_P3_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x48)
-#define R_CFG_P1_TRANSITIONPHY_TO_OFF_PM_MASTER(0x36)
-#define R_CFG_P2_TRANSITIONPHY_TO_OFF_PM_MASTER(0x37)
-#define R_CFG_P3_TRANSITIONPHY_TO_OFF_PM_MASTER(0x38)
-
-#define LVL_WAKEUP 0x08
-
-#define ENABLE_WARMRESET (14)
-
-/* sequence script */
-
-#define END_OF_SCRIPT  0x3f
-
-#define R_SEQ_ADD_A2S  PHY_TO_OFF_PM_MASTER(0x55)
-#define R_SEQ_ADD_SA12 PHY_TO_OFF_PM_MASTER(0x56)
-#defineR_SEQ_ADD_S2A3  PHY_TO_OFF_PM_MASTER(0x57)
-#defineR_SEQ_ADD_WARM  PHY_TO_OFF_PM_MASTER(0x58)
-#define R_MEMORY_ADDRESS   PHY_TO_OFF_PM_MASTER(0x59)
-#define R_MEMORY_DATA  PHY_TO_OFF_PM_MASTER(0x5a)
-
-/* Power bus message definitions */
-
-#define DEV_GRP_NULL   0x0
-#define DEV_GRP_P1 0x1
-#define DEV_GRP_P2 0x2
-#define DEV_GRP_P3 0x4
-
-#define RES_GRP_RES0x0
-#define RES_GRP_PP 0x1
-#define RES_GRP_RC 0x2
-#define RES_GRP_PP_RC  0x3
-#define RES_GRP_PR 0x4
-#define RES_GRP_PP_PR  0x5
-#define RES_GRP_RC_PR  0x6
-#define RES_GRP_ALL0x7
-
-#define RES_TYPE2_R0   0x0
-
-#define RES_TYPE_ALL   0x7
-
-#define RES_STATE_WRST 0xF
-#define RES_STATE_ACTIVE   0xE
-#define RES_STATE_SLEEP0x8
-#define RES_STATE_OFF  0x0
-
-/*
-*  Power Bus Message Format
-*
-*  Broadcast Message (16 Bits)
-*  DEV_GRP[15:13] MT[12]  RES_GRP[11:9]  RES_TYPE2[8:7] RES_TYPE[6:4]
-*  RES_STATE[3:0]
-*
-*  Singular Message (16 Bits)
-*  DEV_GRP[15:13] MT[12]  RES_ID[11:4]  RES_STATE[3:0]
-*
-*/
-
-#define MSG_BROADCAST(devgrp, grp, type, type2, state) \
-   (devgrp  13 | 1  12 | grp  9 | type2  7 | type  4 | state)
-
-#define MSG_SINGULAR(devgrp, id, state) \
-   (devgrp  13 | 0  12 | id  4 | state)
-
-#define R_PROTECT_KEY  0x0E
-#define KEY_1  0xC0
-#define KEY_2  0x0C
-
-struct triton_ins {
-   u16 pmb_message;
-   u8 delay;
-};
-
-
-#define CONFIG_DISABLE_HFCLK   1
-
-#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
-
-struct triton_ins sleep_on_seq[] __initdata = {
-   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4},
-   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
-#ifdef CONFIG_DISABLE_HFCLK
-   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
-   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 3},
-#endif /* #ifdef CONFIG_DISABLE_HFCLK */
-};
-
-struct triton_ins sleep_off_seq[] __initdata = {
-#ifndef CONFIG_DISABLE_HFCLK
-   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 4},
-   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2},
-#else
-   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30},
-   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
-   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
-   {MSG_SINGULAR(DEV_GRP_P1, 

[PATCH 0/7] Integrate the twl4030 power code into new twl4030 mfd

2008-10-10 Thread Peter 'p2' De Schrijver
This patchset integrates the twl4030 power code into the new twl4030 mfd 
framework. The scripts will be moved to the board specific data.

Peter 'p2' De Schrijver (7):
  Remove existing twl4030 power script code.
  Add defines and data types for twl4030.
  Twl4030 power code updated for new twl4030 core
  Hook twl4030 power code into twl4030 core.
  3430sdp and ldp use custom twl4030 power scripts.
  Generic twl4030 power script for 3430 based boards.
  omap3 evm beagle and overo use the generic twl4030 script

 arch/arm/mach-omap2/Makefile  |9 +-
 arch/arm/mach-omap2/board-3430sdp.c   |   61 +
 arch/arm/mach-omap2/board-ldp.c   |   62 +
 arch/arm/mach-omap2/board-omap3beagle.c   |3 +
 arch/arm/mach-omap2/board-omap3evm.c  |3 +
 arch/arm/mach-omap2/board-overo.c |3 +
 arch/arm/mach-omap2/twl4030-generic-scripts.c |   78 ++
 drivers/i2c/chips/twl4030-power.c |  343 -
 drivers/mfd/twl4030-core.c|   11 +
 drivers/mfd/twl4030-power.c   |  270 +++
 include/linux/i2c/twl4030.h   |   64 +
 11 files changed, 561 insertions(+), 346 deletions(-)
 create mode 100644 arch/arm/mach-omap2/twl4030-generic-scripts.c
 delete mode 100644 drivers/i2c/chips/twl4030-power.c
 create mode 100644 drivers/mfd/twl4030-power.c

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] 3430sdp and ldp use custom twl4030 power scripts.

2008-10-10 Thread Peter 'p2' De Schrijver
The TI 3430dsp and ldp boards have a custom power script.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/board-3430sdp.c |   61 ++
 arch/arm/mach-omap2/board-ldp.c |   62 +++
 2 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 56f28ae..93347d2 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -47,6 +47,8 @@
 
 #include sdram-qimonda-hyb18m512160af-6.h
 
+#define CONFIG_DISABLE_HFCLK 1
+
 #defineSDP3430_SMC91X_CS   3
 
 #define ENABLE_VAUX3_DEDICATED 0x03
@@ -329,6 +331,64 @@ static struct twl4030_madc_platform_data sdp3430_madc_data 
= {
.irq_line   = 1,
 };
 
+static struct twl4030_ins __initdata sleep_on_seq[] = {
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
+#ifdef CONFIG_DISABLE_HFCLK
+   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 3},
+#endif
+};
+
+static struct twl4030_script sleep_on_script __initdata = {
+   .script = sleep_on_seq,
+   .size   = ARRAY_SIZE(sleep_on_seq),
+   .flags  = TRITON_SLEEP_SCRIPT,
+};
+
+static struct twl4030_ins wakeup_seq[] __initdata = {
+#ifndef CONFIG_DISABLE_HFCLK
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 4},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2},
+#else
+   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30},
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3},
+#endif /* #ifndef CONFIG_DISABLE_HFCLK */
+};
+
+static struct twl4030_script wakeup_script __initdata = {
+   .script = wakeup_seq,
+   .size   = ARRAY_SIZE(wakeup_seq),
+   .flags  = TRITON_WAKEUP12_SCRIPT | TRITON_WAKEUP3_SCRIPT,
+};
+
+static struct twl4030_ins wrst_seq[] __initdata = {
+   {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+   {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+};
+static struct twl4030_script wrst_script __initdata = {
+   .script = wrst_seq,
+   .size   = ARRAY_SIZE(wakeup_seq),
+   .flags  = TRITON_WRST_SCRIPT,
+};
+
+static struct twl4030_script *twl4030_scripts[] __initdata = {
+   sleep_on_script,
+   wakeup_script,
+   wrst_script,
+};
+
+static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
+   .scripts= twl4030_scripts,
+   .size   = ARRAY_SIZE(twl4030_scripts),
+};
+
 static struct twl4030_platform_data sdp3430_twldata = {
.irq_base   = TWL4030_IRQ_BASE,
.irq_end= TWL4030_IRQ_END,
@@ -338,6 +398,7 @@ static struct twl4030_platform_data sdp3430_twldata = {
.gpio   = sdp3430_gpio_data,
.madc   = sdp3430_madc_data,
.keypad = sdp3430_kp_data,
+   .power  = sdp3430_t2scripts_data,
.usb= sdp3430_usb_data,
 };
 
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 92710c3..498a786 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -41,6 +41,8 @@
 #include asm/delay.h
 #include mach/control.h
 
+#define CONFIG_DISABLE_HFCLK 1
+
 #define ENABLE_VAUX1_DEDICATED 0x03
 #define ENABLE_VAUX1_DEV_GRP   0x20
 
@@ -195,6 +197,65 @@ static int ldp_batt_table[] = {
 4040,   3910,   3790,   3670,   3550
 };
 
+static struct twl4030_ins __initdata sleep_on_seq[] = {
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
+#ifdef CONFIG_DISABLE_HFCLK
+   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 3},
+#endif
+};
+
+static struct twl4030_script sleep_on_script __initdata = {
+   .script = sleep_on_seq,
+   .size   = ARRAY_SIZE(sleep_on_seq),
+   .flags  = TRITON_SLEEP_SCRIPT,
+};
+
+static struct twl4030_ins wakeup_seq[] __initdata = {
+#ifndef CONFIG_DISABLE_HFCLK
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 4},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2},
+#else
+   {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30},
+   {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
+   {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3},
+#endif /* #ifndef CONFIG_DISABLE_HFCLK */
+};
+
+static struct twl4030_script 

[PATCH] i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()

2008-10-10 Thread Paul Walmsley

omap_i2c_unidle() and omap_i2c_idle() are called recursively during
omap_i2c_probe().  This is evidently unexpected and will wipe
out the I2C interrupt enable register the second time that
omap_i2c_idle() is called consecutively.  Any I2C transactions
following a probe of a bus with at least one device on it will then
time out.

Fix by moving omap_i2c_idle() further up in omap_i2c_probe().  Ensure
the I2C controller is marked as idle before the probe starts.  Also
attempt to catch future reappearances of this bug early in development
by warning in omap_i2c_{un,}idle() when they are called recursively.

Problem reported by David Brownell [EMAIL PROTECTED].

Tested on 3430SDP and 2430SDP.

Signed-off-by: Paul Walmsley [EMAIL PROTECTED]
Cc: David Brownell [EMAIL PROTECTED]
Cc: Richard Woodruff [EMAIL PROTECTED]

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 1e6c3fd..a999606 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -202,6 +202,8 @@ static void omap_i2c_put_clocks(struct omap_i2c_dev *dev)
 
 static void omap_i2c_unidle(struct omap_i2c_dev *dev)
 {
+   WARN_ON(!dev-idle);
+
if (dev-iclk != NULL)
clk_enable(dev-iclk);
clk_enable(dev-fclk);
@@ -214,6 +216,8 @@ static void omap_i2c_idle(struct omap_i2c_dev *dev)
 {
u16 iv;
 
+   WARN_ON(dev-idle);
+
dev-iestate = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);
omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, 0);
if (dev-rev1)
@@ -748,6 +752,7 @@ omap_i2c_probe(struct platform_device *pdev)
*speed = 100; /* Defualt speed */
 
dev-speed = *speed;
+   dev-idle = 1;
dev-dev = pdev-dev;
dev-irq = irq-start;
dev-base = ioremap(mem-start, mem-end - mem-start + 1);
@@ -797,6 +802,8 @@ omap_i2c_probe(struct platform_device *pdev)
dev_info(dev-dev, bus %d rev%d.%d at %d kHz\n,
 pdev-id, r  4, r  0xf, dev-speed);
 
+   omap_i2c_idle(dev);
+
adap = dev-adapter;
i2c_set_adapdata(adap, dev);
adap-owner = THIS_MODULE;
@@ -813,8 +820,6 @@ omap_i2c_probe(struct platform_device *pdev)
goto err_free_irq;
}
 
-   omap_i2c_idle(dev);
-
return 0;
 
 err_free_irq:
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Peter 'p2' De Schrijver wrote:
 +extern struct twl4030_power_data generic3430_t2scripts_data;

Such extern decls should as a rule be in header files...

In this case the rule is appropriate, since you've got the
same decl in three different places.  That's about two times
more often than I'm comfortable making exceptions to such a
rule ... :)

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/7] 3430sdp and ldp use custom twl4030 power scripts.

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Peter 'p2' De Schrijver wrote:
 The TI 3430dsp and ldp boards have a custom power script.

And for those of us less conversant in this tech ... could
you summarize, in words of one syllable or less, just what
these scripts do that's different from the generic one?
And why the generic script is inappropriate?

IMO the C files should have at least brief comments about
that, and the patch comment can have more detail.

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/7] Hook twl4030 power code into twl4030 core.

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Peter 'p2' De Schrijver wrote:
 +#ifdef CONFIG_TWL4030_POWER

Nothing in your patches seems to set that... or update
the Makefile so that this file gets linked.

Wouldn't it be simpler to just not have that #ifdef,
and always link it?  If there's no script to install,
no problem; I'll not worry about some __init code.

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Pandita, Vikram
Sent: Friday, October 10, 2008 10:58 AM
To: David Brownell; linux-omap@vger.kernel.org List
Subject: Re: Git tree updated to v2.6.27, some issues remain

On Fri, Oct 10, 2008 at 8:43 AM, David Brownell [EMAIL PROTECTED] wrote:
 On Friday 10 October 2008, Tony Lindgren wrote:
 Anything else not working right now?

 MUSB on Overo...

Indeed.  Any theories?

My theory - 

In: drivers/mfd/twl4030-core.c
struct resource r = {
  .start = TWL4030_PWRIRQ_USB_PRES,
.flags = IORESOURCE_IRQ,
};
status = platform_device_add_resources(pdev, r, 1);

where value of TWL4030_PWRIRQ_USB_PRES = 378


In: drivers/i2c/chips/twl4030-usb.c
   status = request_irq(twl-irq ^(378)^ , twl4030_usb_irq, 0, 
twl4030_usb, twl);
fails because 378  NR_IRQS




I am trying a second build with EHCI enabled to see if it still dies on boot.

Steve
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430

2008-10-10 Thread Andrew Morton
On Wed, 8 Oct 2008 12:46:25 +0530
Gadiyar, Anand [EMAIL PROTECTED] wrote:

 From: Madhusudhan Chikkature [EMAIL PROTECTED]
 
 The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
 protocol of the master functions of the Benchmark HDQ and the Dallas
 Semiconductor 1-Wire protocols. These protocols use a single wire for
 communication between the master (HDQ/1-Wire controller) and the slave
 (HDQ/1-Wire external compliant device).
 
 This patch provides the HDQ driver to suppport TI OMAP2430/3430 platforms.

Every tab character in all five patches was converted to eight-spaces by
your email client.  Please fix the mailer and resend everything.

 +++ linux-2.6/drivers/w1/masters/omap_hdq.c 2008-09-26 14:28:36.0 
 +0530
 @@ -0,0 +1,730 @@
 +/*
 + * drivers/w1/masters/omap_hdq.c
 + *
 + * Copyright (C) 2007 Texas Instruments, Inc.
 + *
 + * This file is licensed under the terms of the GNU General Public License
 + * version 2. This program is licensed as is without any warranty of any
 + * kind, whether express or implied.
 + *
 + */
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/platform_device.h
 +#include linux/interrupt.h
 +#include linux/err.h
 +#include linux/clk.h
 +#include linux/io.h
 +#include asm/irq.h
 +#include mach/hardware.h

We conventionally put a blank line between the linux/ includes and the
asm/ includes.

 +static int omap_hdq_get(struct hdq_data *hdq_data);
 +static int omap_hdq_put(struct hdq_data *hdq_data);
 +static int omap_hdq_break(struct hdq_data *hdq_data);

These three aren't strictly needed, because these functions are defined
before first use.  I think it's best to not declare them.

 +static int hdq_wait_for_flag(struct hdq_data *hdq_data, u32 offset,
 +   u8 flag, u8 flag_set, u8 *status)
 +{
 +   int ret = 0;
 +   unsigned long timeout = jiffies + OMAP_HDQ_TIMEOUT;
 +
 +   if (flag_set == OMAP_HDQ_FLAG_CLEAR) {
 +   /* wait for the flag clear */
 +   while (((*status = hdq_reg_in(hdq_data, offset))  flag)
 +time_before(jiffies, timeout)) {
 +   set_current_state(TASK_UNINTERRUPTIBLE);
 +   schedule_timeout(1);

Use schedule_timeout_uninterruptible(1)

 +   }
 +   if (*status  flag)
 +   ret = -ETIMEDOUT;
 +   } else if (flag_set == OMAP_HDQ_FLAG_SET) {
 +   /* wait for the flag set */
 +   while (!((*status = hdq_reg_in(hdq_data, offset))  flag)
 +time_before(jiffies, timeout)) {
 +   set_current_state(TASK_UNINTERRUPTIBLE);
 +   schedule_timeout(1);

elsewhere..

 +   }
 +   if (!(*status  flag))
 +   ret = -ETIMEDOUT;
 +   } else
 +   return -EINVAL;
 +
 +   return ret;
 +}
 +
 +/* write out a byte and fill *status with HDQ_INT_STATUS */
 +static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
 +{
 +   int ret;
 +   u8 tmp_status;
 +   unsigned long irqflags;
 +
 +   *status = 0;
 +
 +   spin_lock_irqsave(hdq_data-hdq_spinlock, irqflags);
 +   /* clear interrupt flags via a dummy read */
 +   hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
 +   /* ISR loads it with new INT_STATUS */
 +   hdq_data-hdq_irqstatus = 0;
 +   spin_unlock_irqrestore(hdq_data-hdq_spinlock, irqflags);
 +
 +   hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val);
 +
 +   /* set the GO bit */
 +   hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, OMAP_HDQ_CTRL_STATUS_GO,
 +   OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
 +   /* wait for the TXCOMPLETE bit */
 +   ret = wait_event_interruptible_timeout(hdq_wait_queue,
 +   hdq_data-hdq_irqstatus, OMAP_HDQ_TIMEOUT);
 +   if (ret  0) {
 +   dev_dbg(hdq_data-dev, wait interrupted);
 +   return -EINTR;
 +   }

Is this desirable?  The user hits ^C and the driver bails out?

I assume so, but was this tested?

 +   spin_lock_irqsave(hdq_data-hdq_spinlock, irqflags);
 +   *status = hdq_data-hdq_irqstatus;
 +   spin_unlock_irqrestore(hdq_data-hdq_spinlock, irqflags);

It's unusual to put a lock around a single atomic move instruction.

 +   /* check irqstatus */
 +   if (!(*status  OMAP_HDQ_INT_STATUS_TXCOMPLETE)) {
 +   dev_dbg(hdq_data-dev, timeout waiting for
 +   TXCOMPLETE/RXCOMPLETE, %x, *status);
 +   return -ETIMEDOUT;
 +   }
 +
 +   /* wait for the GO bit return to zero */
 +   ret = hdq_wait_for_flag(hdq_data, OMAP_HDQ_CTRL_STATUS,
 +   OMAP_HDQ_CTRL_STATUS_GO,
 +   OMAP_HDQ_FLAG_CLEAR, tmp_status);
 +   if (ret) {
 +   dev_dbg(hdq_data-dev, timeout waiting GO bit
 +   return to zero, %x, tmp_status);
 +   

[patch 2.6.27-omap-git 0/6] the last planned twl4030 core IRQ updates

2008-10-10 Thread David Brownell
Following this are six patches:

 - Split PIH irq support into a separate file
 - Change SIH initialization scheme, enabling data re-use
 - Add sharable SIH irq_chip support
 - Replace unshared pwrirq irq_chip (gains IRQ trigger controls)
 - Replace unshared gpio irq_chip (no functional changes)
 - Remove more CPP symbols

The high level summary:  shrink the code, remove a task, and
have the SIH support code ready for mainline merge.

With SIH support merged, the RTC driver will also become
mergeable.  I think most of the other child drivers aren't
quite ready yet though.

- Dave


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2.6.27-omap-git 4/6] remove twl4030-pwrirq.c

2008-10-10 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Replace twl4030-pwrirq with the more capable generic TWL SIH
support.

More capable includes standard support for IRQ trigger modes;
so make the RTC and USB transceiver drivers use genirq for that.

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
 drivers/i2c/chips/Makefile |2 
 drivers/i2c/chips/twl4030-pwrirq.c |  191 ---
 drivers/i2c/chips/twl4030-usb.c|   23 
 drivers/mfd/twl4030-irq.c  |7 +
 drivers/rtc/rtc-twl4030.c  |   19 ---
 5 files changed, 15 insertions(+), 227 deletions(-)

--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -24,7 +24,7 @@ obj-$(CONFIG_GPIOEXPANDER_OMAP)   += gpio_
 obj-$(CONFIG_MENELAUS) += menelaus.o
 obj-$(CONFIG_SENSORS_TSL2550)  += tsl2550.o
 obj-$(CONFIG_SENSORS_TSL2563)  += tsl2563.o
-obj-$(CONFIG_TWL4030_CORE) += twl4030-pwrirq.o twl4030-power.o
+obj-$(CONFIG_TWL4030_CORE) += twl4030-power.o
 obj-$(CONFIG_TWL4030_USB)  += twl4030-usb.o
 obj-$(CONFIG_TWL4030_POWEROFF) += twl4030-poweroff.o
 obj-$(CONFIG_TWL4030_PWRBUTTON)+= twl4030-pwrbutton.o
--- a/drivers/i2c/chips/twl4030-pwrirq.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * twl4030-pwrirq.c - handle power interrupts from TWL3040
- *
- * Copyright (C) 2008 Nokia Corporation
- *
- * Written by Peter De Schrijver [EMAIL PROTECTED]
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License. See the file COPYING in the main directory of this
- * archive for more details.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include linux/kernel_stat.h
-#include linux/module.h
-#include linux/interrupt.h
-#include linux/irq.h
-#include linux/i2c.h
-#include linux/random.h
-#include linux/kthread.h
-#include linux/i2c/twl4030.h
-
-
-static DEFINE_SPINLOCK(pwr_lock);
-static u8 twl4030_pwrirq_mask;
-
-static struct task_struct *twl4030_pwrirq_unmask_thread;
-
-static void twl4030_pwrirq_ack(unsigned int irq) {}
-
-static void twl4030_pwrirq_disableint(unsigned int irq)
-{
-   unsigned long flags;
-
-   spin_lock_irqsave(pwr_lock, flags);
-   twl4030_pwrirq_mask |= 1  (irq - TWL4030_PWR_IRQ_BASE);
-   if (twl4030_pwrirq_unmask_thread
-twl4030_pwrirq_unmask_thread-state != TASK_RUNNING)
-   wake_up_process(twl4030_pwrirq_unmask_thread);
-   spin_unlock_irqrestore(pwr_lock, flags);
-}
-
-static void twl4030_pwrirq_enableint(unsigned int irq)
-{
-   unsigned long flags;
-
-   spin_lock_irqsave(pwr_lock, flags);
-   twl4030_pwrirq_mask = ~(1  (irq - TWL4030_PWR_IRQ_BASE));
-   if (twl4030_pwrirq_unmask_thread
-twl4030_pwrirq_unmask_thread-state != TASK_RUNNING)
-   wake_up_process(twl4030_pwrirq_unmask_thread);
-   spin_unlock_irqrestore(pwr_lock, flags);
-}
-
-static struct irq_chip twl4030_pwrirq_chip = {
-   .name   = twl4030-pwr,
-   .ack= twl4030_pwrirq_ack,
-   .mask   = twl4030_pwrirq_disableint,
-   .unmask = twl4030_pwrirq_enableint,
-};
-
-static void do_twl4030_pwrirq(unsigned int irq, irq_desc_t *desc)
-{
-   const unsigned int cpu = smp_processor_id();
-
-   desc-status |= IRQ_LEVEL;
-
-   desc-chip-ack(irq);
-
-   if (!desc-depth) {
-   int ret;
-   int module_irq;
-   u8 pwr_isr;
-
-   kstat_cpu(cpu).irqs[irq]++;
-
-   local_irq_enable();
-   ret = twl4030_i2c_read_u8(TWL4030_MODULE_INT, pwr_isr,
- TWL4030_INT_PWR_ISR1);
-   local_irq_disable();
-   if (ret) {
-   printk(KERN_WARNING
-   I2C error %d while reading TWL4030
-   INT PWR_ISR1 register\n, ret);
-   return;
-   }
-
-   for (module_irq = TWL4030_PWR_IRQ_BASE; pwr_isr != 0;
-   module_irq++, pwr_isr = 1) {
-   if (pwr_isr  1)
-   generic_handle_irq(module_irq);
-   }
-
-   desc-chip-unmask(irq);
-   }
-}
-
-static int twl4030_pwrirq_thread(void *data)
-{
-   current-flags |= PF_NOFREEZE;
-
-   while (!kthread_should_stop()) {
-   u8 local_mask;
-
-   spin_lock_irq(pwr_lock);
-   local_mask = twl4030_pwrirq_mask;
-   spin_unlock_irq(pwr_lock);
-
-   twl4030_i2c_write_u8(TWL4030_MODULE_INT, 

[patch 2.6.27-omap-git 5/6] replace twl4030-gpio irq_chip

2008-10-10 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Replace twl4030 GPIO IRQ handling with generic SIH support.
No change in functionality; but there's now one less kernel
thread tied up supporting this chip.

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
 drivers/gpio/twl4030-gpio.c |  423 --
 1 file changed, 42 insertions(+), 381 deletions(-)

--- a/drivers/gpio/twl4030-gpio.c
+++ b/drivers/gpio/twl4030-gpio.c
@@ -51,22 +51,8 @@
  */
 
 
-static inline void activate_irq(int irq)
-{
-#ifdef CONFIG_ARM
-   /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
-* sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-*/
-   set_irq_flags(irq, IRQF_VALID);
-#else
-   /* same effect on other architectures */
-   set_irq_noprobe(irq);
-#endif
-}
-
 static struct gpio_chip twl_gpiochip;
 static int twl4030_gpio_irq_base;
-static int twl4030_gpio_irq_end;
 
 /* genirq interfaces are not available to modules */
 #ifdef MODULE
@@ -89,133 +75,7 @@ static DEFINE_MUTEX(gpio_lock);
 /* store usage of each GPIO. - each bit represents one GPIO */
 static unsigned int gpio_usage_count;
 
-/* protect what irq_chip modifies through its helper task */
-static DEFINE_SPINLOCK(gpio_spinlock);
-
-/* shadow the imr register; updates are delayed */
-static u32 gpio_imr_shadow;
-static bool gpio_pending_mask;
-
-/* bitmask of requests to set gpio irq trigger type */
-static unsigned int gpio_pending_trigger;
-
-/* pointer to helper thread */
-static struct task_struct *gpio_helper_thread;
-
-/*
- * Helper functions to read and write the GPIO ISR and IMR registers as
- * 32-bit integers. Functions return 0 on success, non-zero otherwise.
- * The caller must hold gpio_lock.
- */
-
-/* NOTE:  only the IRQ dispatcher may read ISR; reading it has
- * side effects, because of the clear-on-read mechanism (COR=1).
- */
-static int gpio_read_isr(unsigned int *isr)
-{
-   int ret;
-
-   *isr = 0;
-   ret = twl4030_i2c_read(TWL4030_MODULE_GPIO, (u8 *) isr,
-   REG_GPIO_ISR1A, 3);
-   le32_to_cpup(isr);
-   *isr = GPIO_32_MASK;
-
-   return ret;
-}
-
-/* IMR is written only during initialization and
- * by request of the irq_chip code.
- */
-static int gpio_write_imr(unsigned int imr)
-{
-   imr = GPIO_32_MASK;
-   /*
-* The buffer passed to the twl4030_i2c_write() routine must have an
-* extra byte at the beginning reserved for its internal use.
-*/
-   imr = 8;
-   imr = cpu_to_le32(imr);
-   return twl4030_i2c_write(TWL4030_MODULE_GPIO, (u8 *) imr,
-   REG_GPIO_IMR1A, 3);
-}
-
-/*
- * These are the irqchip methods for the TWL4030 GPIO interrupts.
- * Our IRQ handle method doesn't call these, but they will be called by
- * other routines such as setup_irq() and enable_irq().  They are called
- * with cpu interrupts disabled and with a lock on the irq_desc.lock
- * spinlock.  This complicates matters, because accessing the TWL4030 GPIO
- * interrupt controller requires I2C bus transactions that can't be initiated
- * in this context.  Our solution is to defer accessing the interrupt
- * controller to a kernel thread.
- */
-
-static void twl4030_gpio_irq_ack(unsigned int irq)
-{
-   /* NOP -- dispatcher acks when it reads ISR */
-}
-
-static void twl4030_gpio_irq_mask(unsigned int irq)
-{
-   int gpio = irq - twl4030_gpio_irq_base;
-   u32 mask = 1  gpio;
-   unsigned long flags;
-
-   spin_lock_irqsave(gpio_spinlock, flags);
-   gpio_pending_mask = true;
-   gpio_imr_shadow |= mask;
-   if (gpio_helper_thread  gpio_helper_thread-state != TASK_RUNNING)
-   wake_up_process(gpio_helper_thread);
-   spin_unlock_irqrestore(gpio_spinlock, flags);
-}
-
-static void twl4030_gpio_irq_unmask(unsigned int irq)
-{
-   int gpio = irq - twl4030_gpio_irq_base;
-   u32 mask = 1  gpio;
-   unsigned long flags;
-
-   spin_lock_irqsave(gpio_spinlock, flags);
-   gpio_pending_mask = true;
-   gpio_imr_shadow = ~mask;
-   if (gpio_helper_thread  gpio_helper_thread-state != TASK_RUNNING)
-   wake_up_process(gpio_helper_thread);
-   spin_unlock_irqrestore(gpio_spinlock, flags);
-}
-
-static int twl4030_gpio_irq_set_type(unsigned int irq, unsigned trigger)
-{
-   struct irq_desc *desc = irq_desc + irq;
-   int gpio = irq - twl4030_gpio_irq_base;
-   unsigned long flags;
-
-   trigger = IRQ_TYPE_SENSE_MASK;
-   if (trigger  ~IRQ_TYPE_EDGE_BOTH)
-   return -EINVAL;
-   if ((desc-status  IRQ_TYPE_SENSE_MASK) == trigger)
-   return 0;
-
-   desc-status = ~IRQ_TYPE_SENSE_MASK;
-   desc-status |= trigger;
-
-   spin_lock_irqsave(gpio_spinlock, flags);
-   gpio_pending_trigger |= (1  gpio);
-   if (gpio_helper_thread  gpio_helper_thread-state != TASK_RUNNING)
-   wake_up_process(gpio_helper_thread);
-   

[patch 2.6.27-omap-git 6/6] remove some gllobal twl4030 IRQ defines

2008-10-10 Thread David Brownell
From: David Brownell [EMAIL PROTECTED]

Disable more unnecessary TWL4030_*IRQ_* symbols.

We're not yet ready to remove them all from linux/i2c/twl4030.h
since various drivers still use those symbols (maybe indirectly)
not platform resources: twl4030_bci_battery.c, twl4030-madc.c,
twl4030-pwrbutton.c, and omap-twl4030keypad.c all need updates.

Signed-off-by: David Brownell [EMAIL PROTECTED]
---
 drivers/mfd/twl4030-core.c  |   13 +
 include/linux/i2c/twl4030.h |   16 
 2 files changed, 17 insertions(+), 12 deletions(-)

--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -352,6 +352,12 @@ EXPORT_SYMBOL(twl4030_i2c_read_u8);
 
 /*--*/
 
+/*
+ * NOTE:  We know the first 8 IRQs after pdata-base_irq are
+ * for the PIH, and the next are for the PWR_INT SIH, since
+ * that's how twl_init_irq() sets things up.
+ */
+
 static int add_children(struct twl4030_platform_data *pdata)
 {
struct platform_device  *pdev = NULL;
@@ -382,7 +388,7 @@ static int add_children(struct twl4030_p
 
if (status == 0) {
struct resource r = {
-   .start = TWL4030_PWRIRQ_CHG_PRES,
+   .start = pdata-irq_base + 8 + 1,
.flags = IORESOURCE_IRQ,
};
 
@@ -531,8 +537,7 @@ static int add_children(struct twl4030_p
/* RTC module IRQ */
if (status == 0) {
struct resource r = {
-   /* REVISIT don't hard-wire this stuff */
-   .start = TWL4030_PWRIRQ_RTC,
+   .start = pdata-irq_base + 8 + 3,
.flags = IORESOURCE_IRQ,
};
 
@@ -577,7 +582,7 @@ static int add_children(struct twl4030_p
 
if (status == 0) {
struct resource r = {
-   .start = TWL4030_PWRIRQ_USB_PRES,
+   .start = pdata-irq_base + 8 + 2,
.flags = IORESOURCE_IRQ,
};
 
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -293,16 +293,16 @@ int twl4030_sih_setup(int module);
 #define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2)
 #define TWL4030_MODIRQ_MADC(TWL4030_IRQ_BASE + 3)
 /* #define TWL4030_MODIRQ_USB  (TWL4030_IRQ_BASE + 4) */
-#define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5)
+/* #define TWL4030_MODIRQ_PWR  (TWL4030_IRQ_BASE + 5) */
 
 #define TWL4030_PWRIRQ_PWRBTN  (TWL4030_PWR_IRQ_BASE + 0)
-#define TWL4030_PWRIRQ_CHG_PRES(TWL4030_PWR_IRQ_BASE + 1)
-#define TWL4030_PWRIRQ_USB_PRES(TWL4030_PWR_IRQ_BASE + 2)
-#define TWL4030_PWRIRQ_RTC (TWL4030_PWR_IRQ_BASE + 3)
-#define TWL4030_PWRIRQ_HOT_DIE (TWL4030_PWR_IRQ_BASE + 4)
-#define TWL4030_PWRIRQ_PWROK_TIMEOUT   (TWL4030_PWR_IRQ_BASE + 5)
-#define TWL4030_PWRIRQ_MBCHG   (TWL4030_PWR_IRQ_BASE + 6)
-#define TWL4030_PWRIRQ_SC_DETECT   (TWL4030_PWR_IRQ_BASE + 7)
+/* #define TWL4030_PWRIRQ_CHG_PRES (TWL4030_PWR_IRQ_BASE + 1) */
+/* #define TWL4030_PWRIRQ_USB_PRES (TWL4030_PWR_IRQ_BASE + 2) */
+/* #define TWL4030_PWRIRQ_RTC  (TWL4030_PWR_IRQ_BASE + 3) */
+/* #define TWL4030_PWRIRQ_HOT_DIE  (TWL4030_PWR_IRQ_BASE + 4) */
+/* #define TWL4030_PWRIRQ_PWROK_TIMEOUT(TWL4030_PWR_IRQ_BASE + 5) */
+/* #define TWL4030_PWRIRQ_MBCHG(TWL4030_PWR_IRQ_BASE + 6) */
+/* #define TWL4030_PWRIRQ_SC_DETECT(TWL4030_PWR_IRQ_BASE + 7) */
 
 /* Rest are unsued currently*/
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Pandita, Vikram

Sent: Friday, October 10, 2008 5:15 PM
To: Steve Sakoman; David Brownell; linux-omap@vger.kernel.org List
Subject: RE: Git tree updated to v2.6.27, some issues remain

 Anything else not working right now?

 MUSB on Overo...


Theory 2:
When I debug on LDP board, I can see the failure happening in request_irq()

In T2-probe:
   request_irq( ... )
   ...
   if (irq_desc[irq].status  IRQ_NOREQUEST)
   return -EINVAL;  code returns from here !!!
   ...

This patch fixes the T2-probe request_irq() issue:

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 5983926..57cad7e 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -159,7 +159,7 @@ void __init omap_init_irq(void)
printk(KERN_INFO Total of %ld interrupts on %d active controller%s\n,
   nr_irqs, nr_banks, nr_banks  1 ? s : );
 
-   for (i = 0; i  nr_irqs; i++) {
+   for (i = 0; i  NR_IRQS; /*nr_irqs;*/ i++) {
set_irq_chip(i, omap_irq_chip);
set_irq_handler(i, handle_level_irq);
set_irq_flags(i, IRQF_VALID);

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Nathan Monson
On Fri, Oct 10, 2008 at 3:15 PM, Pandita, Vikram [EMAIL PROTECTED] wrote:
 Theory changed. NR_IRQS is 402. so above is not the issue.

 Theory 2:
 When I debug on LDP board, I can see the failure happening in request_irq()

 In T2-probe:
request_irq( ... )
...
if (irq_desc[irq].status  IRQ_NOREQUEST)
return -EINVAL;  code returns from here !!!
...

This is exactly what I saw when testing bare linux-omap git without
Dave's i2c retry patch.  Maybe the patch is not working for you?

- Nathan
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Pandita, Vikram
Sent: Friday, October 10, 2008 5:29 PM
To: Pandita, Vikram
Cc: linux-omap@vger.kernel.org List
Subject: Re: Git tree updated to v2.6.27, some issues remain

On Fri, Oct 10, 2008 at 3:15 PM, Pandita, Vikram [EMAIL PROTECTED] wrote:
 Theory changed. NR_IRQS is 402. so above is not the issue.

 Theory 2:
 When I debug on LDP board, I can see the failure happening in request_irq()

 In T2-probe:
request_irq( ... )
...
if (irq_desc[irq].status  IRQ_NOREQUEST)
return -EINVAL;  code returns from here !!!
...

This is exactly what I saw when testing bare linux-omap git without
Dave's i2c retry patch.  Maybe the patch is not working for you?

Check the fix I just sent. 


- Nathan

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Pandita, Vikram wrote:
 --- a/arch/arm/mach-omap2/irq.c
 +++ b/arch/arm/mach-omap2/irq.c
 @@ -159,7 +159,7 @@ void __init omap_init_irq(void)
 printk(KERN_INFO Total of %ld interrupts on %d active 
 controller%s\n,
        nr_irqs, nr_banks, nr_banks  1 ? s : );
  
 -   for (i = 0; i  nr_irqs; i++) {
 +   for (i = 0; i  NR_IRQS; /*nr_irqs;*/ i++) {
 set_irq_chip(i, omap_irq_chip);
 set_irq_handler(i, handle_level_irq);
 set_irq_flags(i, IRQF_VALID);
 

This could explain a problem appearing on every OMAP3 board.
But not one appearing only on Overo ... especially when the
same binary works on Beagle.

However, that's also very incorrect.  Most of those NR_IRQS
interrupts are managed by some chip other than the toplevel
OMAP IRQ controller(s)...

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Pandita, Vikram
From: David Brownell [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2008 5:55 PM
To: Pandita, Vikram
Cc: Steve Sakoman; linux-omap@vger.kernel.org List
Subject: Re: Git tree updated to v2.6.27, some issues remain

On Friday 10 October 2008, Pandita, Vikram wrote:
 --- a/arch/arm/mach-omap2/irq.c
 +++ b/arch/arm/mach-omap2/irq.c
 @@ -159,7 +159,7 @@ void __init omap_init_irq(void)
 printk(KERN_INFO Total of %ld interrupts on %d active 
 controller%s\n,
        nr_irqs, nr_banks, nr_banks  1 ? s : );

 -   for (i = 0; i  nr_irqs; i++) {
 +   for (i = 0; i  NR_IRQS; /*nr_irqs;*/ i++) {
 set_irq_chip(i, omap_irq_chip);
 set_irq_handler(i, handle_level_irq);
 set_irq_flags(i, IRQF_VALID);


This could explain a problem appearing on every OMAP3 board.
But not one appearing only on Overo ... especially when the
same binary works on Beagle.

I saw this problem on LDP. 


However, that's also very incorrect.  Most of those NR_IRQS
interrupts are managed by some chip other than the toplevel
OMAP IRQ controller(s)...

Somewhere for the T2 interrupts following function has to be run: 
set_irq_flags(i, IRQF_VALID);


- Dave


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH][omapzoom] BRIDGE Add preemption support to unprotected functions

2008-10-10 Thread Kanigeri, Hari
Hi Doyu-san,

Thank you for your comments.

 By the way, would it be possible to replace this sync.c with normal
 in-kernel APIs like mutex_lock() and wait_event() families?
 
 There's no point to have home brewed synchronization APIs, but it may
 lose the readability of the code. If you need to add debug feature to
 kernel synchronization mechanism, it should be done in generic APIs,
 not in the driver specific code.

I agree with you that we would lose the readability and also any changes to the 
sync module functionality will have an impact on the current Bridge design and 
might require considerable amount of rework. 

I wouldn't be comfortable removing the sync module completely for above 
mentioned reasons, but we can look at analyzing and making the changes in a 
phased manner.

Thank you,
Best regards,
Hari

 -Original Message-
 From: Hiroshi DOYU [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 08, 2008 11:46 PM
 To: Ramirez Luna, Omar; Kanigeri, Hari
 Cc: Pandita, Vikram; linux-omap@vger.kernel.org
 Subject: Re: [PATCH][omapzoom] BRIDGE Add preemption support to
 unprotected functions
 
 Hi Omar and Hari,
 
 From: ext Ramirez Luna, Omar [EMAIL PROTECTED]
 Subject: [PATCH][omapzoom] BRIDGE Add preemption support to unprotected
 functions
 Date: Wed, 8 Oct 2008 17:07:15 -0500
 
  From: Hari Kanigeri [EMAIL PROTECTED]
  Date: Fri, 3 Oct 2008 12:20:45 -0500
  Subject: [PATCH] BRIDGE Add preemption support to unprotected functions
 
  This patch protects the critical sections in bridge
  driver that otherwise might end in unexpected behavior.
 
 Nice catch.
 
 By the way, would it be possible to replace this sync.c with normal
 in-kernel APIs like mutex_lock() and wait_event() families?
 
 There's no point to have home brewed synchronization APIs, but it may
 lose the readability of the code. If you need to add debug feature to
 kernel synchronization mechanism, it should be done in generic APIs,
 not in the driver specific code.
 
  Hiroshi DOYU
 
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Pandita, Vikram wrote:
 Somewhere for the T2 interrupts following function has to be run: 
 set_irq_flags(i, IRQF_VALID);

Why do you think that's not being done?

On Beagle, it's clearly done.  And the init sequence is
the same on Overo.  So I see no reason to think it's not
being done there too...

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread Pandita, Vikram

From: David Brownell [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2008 7:33 PM
To: Pandita, Vikram
Cc: Steve Sakoman; linux-omap@vger.kernel.org List
Subject: Re: Git tree updated to v2.6.27, some issues remain

On Friday 10 October 2008, Pandita, Vikram wrote:
 Somewhere for the T2 interrupts following function has to be run:
 set_irq_flags(i, IRQF_VALID);

Why do you think that's not being done?

On Beagle, it's clearly done.  And the init sequence is
the same on Overo.  So I see no reason to think it's not
being done there too...



I did not have your following patch.
Without this patch, the pwrirq does not initialize TWL-USB flag: 
set_irq_flags(i, IRQF_VALID); 
And hence the failure. 

With your patch, you delay the i2c writing and then the set_irq_flags() gets 
called.


Index: l-o/drivers/i2c/chips/twl4030-pwrirq.c
===
--- l-o.orig/drivers/i2c/chips/twl4030-pwrirq.c 2008-10-10 13:45:21.0 
-0500
+++ l-o/drivers/i2c/chips/twl4030-pwrirq.c  2008-10-10 18:14:42.0 
-0500
@@ -128,14 +128,24 @@ static int twl4030_pwrirq_thread(void *d
return 0;
 }

+#include linux/delay.h
+
 static int __init twl4030_pwrirq_init(void)
 {
int i, err;

twl4030_pwrirq_mask = 0xff;

+/* HEY:  core already did this.
+ * But that's surely not why we
+ * sometimes see timeouts here ...
+ */
+for (i = 0; i  5; i++) {
err = twl4030_i2c_write_u8(TWL4030_MODULE_INT, twl4030_pwrirq_mask,
TWL4030_INT_PWR_IMR1);
+if (!err) break;
+msleep(10);
+}
if (err)
return err;

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git tree updated to v2.6.27, some issues remain

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Pandita, Vikram wrote:
 I did not have your following patch.
 Without this patch, the pwrirq does not initialize TWL-USB flag: 
 set_irq_flags(i, IRQF_VALID); 
 And hence the failure. 
 
 With your patch, you delay the i2c writing and then the set_irq_flags() gets 
 called.

A better fix for this one would be either of the recent i2c-omap patches:
mine disabling the low-power idle mechanism, or Paul's making it actually
work like it was supposed to.  Paul's fix should IMO be merged.

The MUSB doesn't work on Overo problem kicks in even with the I2C idle
problem fixed, or that workaround patch.

- Dave
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html