n800/810 boot log

2009-11-12 Thread Gadiyar, Anand
Hi,

Could someone please send me a bootlog of n800/810 with CONFIG_DEBUG_LL enabled?
(any recent kernel will do, 2.6.29 and above. An older one is also okay)

Thanks in advance,
Anand

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


[PATCHv3 3/3] OMAP UART: Add omap-serial driver support in omap_3430sdp_defconfig.

2009-11-12 Thread Govindraj.R
>From 8dae69c5e17421123b88414021289974e968fd02 Mon Sep 17 00:00:00 2001
From: Govindraj R 
Date: Fri, 13 Nov 2009 12:08:42 +0530
Subject: [PATCH] OMAP UART: Add omap-serial driver support in 
omap_3430sdp_defconfig

This patch adds omap-serial driver support for 3430SDP defconfig.

Signed-off-by: Govindraj R 
---
 arch/arm/configs/omap_3430sdp_defconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/omap_3430sdp_defconfig 
b/arch/arm/configs/omap_3430sdp_defconfig
index 7dbfa7f..9f94965 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -794,6 +794,7 @@ CONFIG_SERIAL_8250_RSA=y
 # CONFIG_SERIAL_MAX3100 is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_OMAP is not set
 CONFIG_UNIX98_PTYS=y
 # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 # CONFIG_LEGACY_PTYS is not set
-- 
1.5.5


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


[PATCHv3 2/3] OMAP UART: Add platform data for omap-serial driver.

2009-11-12 Thread Govindraj.R
>From e7c74ee6d91d7940e1cbde03fb6bf710fa448a8a Mon Sep 17 00:00:00 2001
From: Govindraj R 
Date: Fri, 13 Nov 2009 12:07:14 +0530
Subject: [PATCH] OMAP UART: Add platform data for omap-serial driver.

This patch modifies the serial-pm framework in place and
utilises the framework to work with omap-serial driver.

However future plan is to replace this with omap-device and
omap_hwmod support.

Signed-off-by: Govindraj R 
---
 arch/arm/mach-omap2/serial.c |  335 ++
 1 files changed, 241 insertions(+), 94 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..49ac252 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -13,6 +13,9 @@
  * Copyright (C) 2009 Texas Instruments
  * Added OMAP4 support - Santosh Shilimkar 
+ *
  * 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.
@@ -29,6 +32,9 @@
 #include 
 #include 

+#include 
+#include 
+
 #include "prm.h"
 #include "pm.h"
 #include "prm-regbits-34xx.h"
@@ -52,7 +58,12 @@ struct omap_uart_state {
struct clk *fck;
int clocked;

-   struct plat_serial8250_port *p;
+   int irq;
+   int regshift;
+   int irqflags;
+   void __iomem *membase;
+   resource_size_t mapbase;
+
struct list_head node;
struct platform_device pdev;

@@ -71,6 +82,7 @@ struct omap_uart_state {

 static LIST_HEAD(uart_list);

+#ifdef CONFIG_SERIAL_8250
 static struct plat_serial8250_port serial_platform_data0[] = {
{
.mapbase= OMAP_UART1_BASE,
@@ -124,18 +136,169 @@ static struct plat_serial8250_port 
serial_platform_data3[] = {
}
 };
 #endif
-static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
-  int offset)
+
+static struct omap_uart_state omap_uart[] = {
+   {
+   .pdev = {
+   .name   = "serial8250",
+   .id = PLAT8250_DEV_PLATFORM,
+   .dev= {
+   .platform_data  = serial_platform_data0,
+   },
+   },
+   }, {
+   .pdev = {
+   .name   = "serial8250",
+   .id = PLAT8250_DEV_PLATFORM1,
+   .dev= {
+   .platform_data  = serial_platform_data1,
+   },
+   },
+   }, {
+   .pdev = {
+   .name   = "serial8250",
+   .id = PLAT8250_DEV_PLATFORM2,
+   .dev= {
+   .platform_data  = serial_platform_data2,
+   },
+   },
+   },
+#ifdef CONFIG_ARCH_OMAP4
+   {
+   .pdev = {
+   .name   = "serial8250",
+   .id = 3,
+   .dev= {
+   .platform_data  = serial_platform_data3,
+   },
+   },
+   },
+#endif
+};
+
+#else
+static struct uart_port_info uart1_port_info = {
+   .dma_enabled= 0,
+   .uartclk= OMAP24XX_BASE_BAUD * 16
+};
+
+static struct uart_port_info uart2_port_info = {
+   .dma_enabled= 0,
+   .uartclk= OMAP24XX_BASE_BAUD * 16
+};
+
+static struct uart_port_info uart3_port_info = {
+   .dma_enabled= 0,
+   .uartclk= OMAP24XX_BASE_BAUD * 16
+};
+
+static struct resource omap_uart1_resources[] = {
+   {
+   .start  = OMAP_UART1_BASE,
+   .end= OMAP_UART1_BASE + 0x3ff,
+   .flags  = IORESOURCE_MEM,
+   }, {
+   /* UART1 IRQ - 72*/
+   .start  = INT_24XX_UART1_IRQ,
+   .flags  = IORESOURCE_IRQ,
+   }, {
+   /* UART1 TX DMA CHANNEL -S_DMA_48- */
+   .start  = OMAP24XX_DMA_UART1_TX,
+   .flags  = IORESOURCE_DMA,
+   }, {
+   /* UART1 RX DMA CHANNEL -S_DMA_49- */
+   .start  = OMAP24XX_DMA_UART1_RX,
+   .flags  = IORESOURCE_DMA,
+   }
+};
+
+static struct resource omap_uart2_resources[] = {
+   {
+   .start  = OMAP_UART2_BASE,
+   .end= OMAP_UART2_BASE + 0x3ff,
+   .flags  = IORESOURCE_MEM,
+   }, {
+   /* UART2 IRQ - 73*/
+   .start  = INT_24XX_UART2_IRQ,
+   .flags  = IORESOURCE_IRQ,
+   }

[PATCHv3 1/3] OMAP UART: Add omap-serial driver support.

2009-11-12 Thread Govindraj.R
>From 4756e3743c7acd2de1030b2bd432c1b19f0b9ff5 Mon Sep 17 00:00:00 2001
From: Govindraj R 
Date: Fri, 13 Nov 2009 12:01:54 +0530
Subject: [PATCH] OMAP UART: Add omap-serial driver support.

This patch adds support for OMAP3430-HIGH SPEED UART Controller.

It adds support for the following features:
1. It supports Interrupt mode and DMA mode of operation.
2. Supports Hardware flow control and sofware flow control.
3. Debug Console support on all UARTs.

Signed-off-by: Govindraj R 
---
 arch/arm/plat-omap/include/plat/omap-serial.h |  115 +++
 drivers/serial/Kconfig|   23 +
 drivers/serial/Makefile   |1 +
 drivers/serial/omap-serial.c  | 1330 +
 include/linux/serial_core.h   |3 +
 5 files changed, 1472 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/omap-serial.h
 create mode 100644 drivers/serial/omap-serial.c

diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h
b/arch/arm/plat-omap/include/plat/omap-serial.h
new file mode 100644
index 000..4341fae
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -0,0 +1,115 @@
+/*
+ * Driver for OMAP3430 UART controller.
+ *
+ * Copyright (C) 2009 Texas Instruments.
+ *
+ * Authors:
+ * Govindraj R 
+ * Thara Gopinath  
+ *
+ * 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.
+ */
+
+#ifndef __OMAP_SERIAL_H__
+#define __OMAP_SERIAL_H__
+
+#include 
+#include 
+
+#include 
+#include 
+
+#define DRIVER_NAME"omap-hsuart"
+
+/* *
+ * tty device name used by omap-serial driver,
+ * in bootargs we specify as console=ttyO0 if uart1
+ * is used as console uart.
+ */
+#define DEVICE_NAME"ttyO"
+
+/* *
+ * We default to IRQ0 for the "no irq" hack.   Some
+ * machine types want others as well - they're free
+ * to redefine this in their header file.
+ */
+#define is_real_interrupt(irq)  ((irq) != 0)
+
+#if defined(CONFIG_SERIAL_OMAP_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#define OMAP_MDR1_DISABLE  0x07
+#define OMAP_MDR1_MODE13X  0x03
+#define OMAP_MDR1_MODE16X  0x00
+#define OMAP_MODE13X_SPEED 230400
+
+#define CONSOLE_NAME   "console="
+
+#define RX_TIMEOUT (3 * HZ)
+
+/* To be removed while adding omap_hwmod support */
+#define OMAP_MAX_HSUART_PORTS 3
+
+struct uart_port_info {
+   booldma_enabled;
+   unsigned intuartclk;
+   };
+
+struct uart_omap_dma {
+   u8  uart_dma_tx;
+   u8  uart_dma_rx;
+   int rx_dma_channel;
+   int tx_dma_channel;
+   /* Physical adress of RX DMA buffer */
+   dma_addr_t  rx_buf_dma_phys;
+   /* Physical adress of TX DMA buffer */
+   dma_addr_t  tx_buf_dma_phys;
+   /* *
+* Buffer for rx dma.It is not required for tx because the buffer
+* comes from port structure
+*/
+   unsigned intuart_base;
+   unsigned char   *rx_buf;
+   unsigned intprev_rx_dma_pos;
+   int tx_buf_size;
+   int tx_dma_state;
+   int rx_dma_state;
+   spinlock_t  tx_lock;
+   spinlock_t  rx_lock;
+   /* timer to poll activity on rx dma */
+   struct timer_list   rx_timer;
+   int rx_buf_size;
+   int rx_timeout;
+};
+
+struct uart_omap_port {
+   struct uart_portport;
+   struct uart_omap_dmauart_dma;
+   struct platform_device  *pdev;
+
+   unsigned char   ier;
+   unsigned char   lcr;
+   unsigned char   mcr;
+   unsigned char   fcr;
+   unsigned char   efr;
+
+   int use_dma;
+   int is_buf_dma_alloced;
+   /*
+* Some bits in registers are cleared on a read, so they must
+* be saved whenever the register is read but the bits will not
+* be immediately processed.
+*/
+   unsigned intlsr_break_flag;
+#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA
+   unsigned char   msr_saved_flags;
+   charname[20];
+   spinlock_t  uart_lock;
+   unsigned long   port_activity;
+};
+
+extern char *saved_command_line;
+#endif /* __OMAP_SERIAL_H__ */
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index e522572..64bbf35 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1366,6 +1366,29 @@ config SERIAL_OF_PLATFORM
  Currently, only 8250 compatible ports are supported, but
  others can easily be added.

+config SERIAL_OMAP
+   

[PATCHv3 0/3] OMAP UART: Adding support for omap-serial driver.

2009-11-12 Thread Govindraj.R
>From 8dae69c5e17421123b88414021289974e968fd02 Mon Sep 17 00:00:00 2001
From: Govindraj R 
Date: Fri, 13 Nov 2009 12:09:38 +0530
Subject: [PATCH] OMAP UART: Adding support for omap-serial driver.

The Following series of patch adds support for OMAP3430-HIGH SPEED UART 
Controller.

Govindraj R (3):
  OMAP UART: Add omap-serial driver support.
  OMAP UART: Add platform data for omap-serial driver.
  OMAP UART: Add omap-serial driver support in omap_3430sdp_defconfig

 arch/arm/configs/omap_3430sdp_defconfig   |1 +
 arch/arm/mach-omap2/serial.c  |  335 +--
 arch/arm/plat-omap/include/plat/omap-serial.h |  115 +++
 drivers/serial/Kconfig|   23 +
 drivers/serial/Makefile   |1 +
 drivers/serial/omap-serial.c  | 1330 +
 include/linux/serial_core.h   |3 +
 7 files changed, 1714 insertions(+), 94 deletions(-)
 create mode 100644 arch/arm/plat-omap/include/plat/omap-serial.h
 create mode 100644 drivers/serial/omap-serial.c


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


[PATCH 9/9 v2] omap3: pm: introduce 3630 opps

2009-11-12 Thread Nishanth Menon
Introduce the OMAP3630 OPPs including the defined OPP tuples.

Further information on OMAP3630 can be found here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

OMAP36xx family introduces:
VDD1 with 4 OPPs, of which OPP3 & 4 are available only on devices yet
to be introduced in 36xx family. Meanwhile, VDD2 has 2 opps.

Range of OPPs supported by Devices(tentative)->
   |<-3630-600->| (default)
   |<-  3630-800  ->| (device: TBD)
   |<-  3630-1000 ->| (device: TBD)
H/w OPP-> OPP50 OPP100   OPP-Turbo   OPP1G-SB
VDD1  OPP1  OPP2 OPP3OPP4
VDD2  OPP1  OPP2 OPP2OPP2

Note:
a) TI h/w naming for OPPs are now standardized in terms of OPP50, 100,
   Turbo and SB. This maps as shown above to the opp IDs (s/w term).
b) For boards which need custom VDD1/2 OPPs, the opp table can be
   updated by the board file on a need basis after the
   omap3_pm_init_opp_table call. The OPPs introduced here are the
   official OPP table at this point in time.

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/omap3-opp.h |9 
 arch/arm/mach-omap2/pm34xx.c|   87 +++---
 2 files changed, 80 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-opp.h b/arch/arm/mach-omap2/omap3-opp.h
index 7f27f44..a5880b8 100644
--- a/arch/arm/mach-omap2/omap3-opp.h
+++ b/arch/arm/mach-omap2/omap3-opp.h
@@ -4,22 +4,31 @@
 #include 
 
 /* MPU speeds */
+#define S1000M  10
+#define S800M   8
 #define S600M   6
 #define S550M   55000
 #define S500M   5
+#define S300M   3
 #define S250M   25000
 #define S125M   12500
 
 /* DSP speeds */
+#define S875M   87500
+#define S660M   66000
+#define S520M   52000
 #define S430M   43000
 #define S400M   4
 #define S360M   36000
+#define S260M   26000
 #define S180M   18000
 #define S90M9000
 
 /* L3 speeds */
 #define S83M8300
+#define S100M   1
 #define S166M   16600
+#define S200M   2
 
 extern struct omap_opp *omap3_mpu_rate_table;
 extern struct omap_opp *omap3_dsp_rate_table;
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 14131f8..86137bb 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -141,6 +141,41 @@ static __initdata struct omap_opp 
omap34xx_dsp_rate_table[] = {
{0, 0, 0, 0},
 };
 
+static __initdata struct omap_opp omap36xx_mpu_rate_table[] = {
+   {0, 0, 0, 0},
+   /*OPP1 - 930mV - OPP50*/
+   {true, S300M, VDD1_OPP1, 0x1a},
+   /*OPP2 - 1.100V - OPP100*/
+   {true, S600M, VDD1_OPP2, 0x28},
+   /*OPP3 - 1.260V - OPP-Turbo*/
+   {false, S800M, VDD1_OPP3, 0x34},
+   /*OPP4 - 1.310V - OPP-SB*/
+   {false, S1000M, VDD1_OPP4, 0x38},
+   {0, 0, 0, 0},
+};
+
+static __initdata struct omap_opp omap36xx_l3_rate_table[] = {
+   {0, 0, 0, 0},
+   /*OPP1 - 930mV - OPP50 */
+   {true, S100M, VDD2_OPP1, 0x1a},
+   /*OPP2 - 1.375V - OPP100, OPP-Turbo, OPP-SB*/
+   {true, S200M, VDD2_OPP2, 0x2b},
+   {0, 0, 0, 0},
+};
+
+static __initdata struct omap_opp omap36xx_dsp_rate_table[] = {
+   {0, 0, 0, 0},
+   /*OPP1 - OPP50*/
+   {true, S260M, VDD1_OPP1, 0x1a},
+   /*OPP2 - OPP100*/
+   {true, S520M, VDD1_OPP2, 0x28},
+   /*OPP3 - OPP-Turbo*/
+   {false, S660M, VDD1_OPP3, 0x34},
+   /*OPP4 - OPP-SB*/
+   {false, S875M, VDD1_OPP4, 0x38},
+   {0, 0, 0, 0},
+};
+
 struct omap_opp *omap3_mpu_rate_table;
 struct omap_opp *omap3_dsp_rate_table;
 struct omap_opp *omap3_l3_rate_table;
@@ -1287,22 +1322,42 @@ static void __init configure_vc(void)
 void __init omap3_pm_init_opp_table(void)
 {
/* Populate the base CPU rate tables here */
-   omap3_mpu_rate_table = kmalloc(sizeof(omap34xx_mpu_rate_table),
-   GFP_KERNEL);
-   omap3_dsp_rate_table = kmalloc(sizeof(omap34xx_dsp_rate_table),
-   GFP_KERNEL);
-   omap3_l3_rate_table = kmalloc(sizeof(omap34xx_l3_rate_table),
-   GFP_KERNEL);
-
-   BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table ||
-   !omap3_l3_rate_table);
-
-   memcpy(omap3_mpu_rate_table, omap34xx_mpu_rate_table,
-   sizeof(omap34xx_mpu_rate_table));
-   memcpy(omap3_dsp_rate_table, omap34xx_dsp_rate_table,
-   sizeof(omap34xx_dsp_rate_table));
-   memcpy(omap3_l3_rate_table, omap34xx_l3_rate_table,
-   sizeof(omap34xx_l3_rate_table));
+  

[PATCH 6/9] omap3: clk: use pm accessor functions for cpufreq table

2009-11-12 Thread Nishanth Menon
omap2_clk_init_cpufreq_table currently directly accesses the opp
table, making it unscalable to various OMAPs. Instead use the
accessor functions to populate the cpufreq table

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/clock34xx.c |   46 +++---
 1 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index da5bc1f..daec6ea 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -1042,28 +1042,46 @@ static unsigned long omap3_clkoutx2_recalc(struct clk 
*clk)
 #if defined(CONFIG_ARCH_OMAP3)
 
 #ifdef CONFIG_CPU_FREQ
-static struct cpufreq_frequency_table freq_table[MAX_VDD1_OPP+1];
+
+/* Use a dummy table with no entries to start with */
+static struct cpufreq_frequency_table dummy_freq_table = {
+   .frequency = CPUFREQ_TABLE_END,
+};
+static struct cpufreq_frequency_table *freq_table = &dummy_freq_table;
 
 void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
 {
-   struct omap_opp *prcm;
-   int i = 0;
+   int i;
+   int ret;
+   u8 opp_id;
+   unsigned long freq;
 
if (!mpu_opps)
return;
-
-   prcm = mpu_opps + MAX_VDD1_OPP;
-   for (; prcm->rate; prcm--) {
-   freq_table[i].index = i;
-   freq_table[i].frequency = prcm->rate / 1000;
-   i++;
+   ret = get_limit_freq(&freq, mpu_opps, true, true);
+   if (ret) {
+   pr_warning("%s: failed to initialize frequency"
+   "table\n", __func__);
+   return;
}
+   /* The following should'nt fail */
+   BUG_ON(freq_to_opp(&opp_id, mpu_opps, freq));
 
-   if (i == 0) {
-   printk(KERN_WARNING "%s: failed to initialize frequency \
-   table\n",
-   __func__);
-   return;
+   /* There is a risk of overallocating if the lower/intermediate
+* OPPs are disabled, but the amount is not expected to be high
+* in comparison to reallocating to exactly available opps
+*/
+   freq_table = kmalloc(sizeof(struct cpufreq_frequency_table) *
+   (opp_id + 1), GFP_KERNEL);
+
+   /* Populate the first index.. we already found the freq */
+   freq_table[0].index = 0;
+   freq_table[0].frequency =  freq / 1000;
+
+   /* Populate the table highest to lowest */
+   for (i = 1; !get_next_freq(&freq, mpu_opps, false, true, true); i++) {
+   freq_table[i].index = i;
+   freq_table[i].frequency =  freq / 1000;
}
 
freq_table[i].index = i;
-- 
1.6.3.3

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


[PATCH 4/9] omap3: pm: use opp accessor functions for omap-target

2009-11-12 Thread Nishanth Menon
The logic in omap-target can now be improved with the accessor
functions. Dont scan through the list manually, instead use
get_next_freq to do the scanning.

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/plat-omap/cpu-omap.c |   12 
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 449b6b6..16b5da2 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -111,14 +111,10 @@ static int omap_target(struct cpufreq_policy *policy,
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 #elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
if (mpu_opps) {
-   int ind;
-   for (ind = 1; ind <= MAX_VDD1_OPP; ind++) {
-   if (mpu_opps[ind].rate/1000 >= target_freq) {
-   omap_pm_cpu_set_freq
-   (mpu_opps[ind].rate);
-   break;
-   }
-   }
+   unsigned long freq = target_freq * 1000;
+   int res = get_next_freq(&freq, mpu_opps, true, true, false);
+   if (!res)
+   omap_pm_cpu_set_freq(freq);
}
 #endif
return ret;
-- 
1.6.3.3

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


[PATCH 3/9] omap3: pm: srf: use opp accessor function

2009-11-12 Thread Nishanth Menon
With the accessor functions, many of the direct accesses are
redundant. Cleanup of SRF to:
a) Remove get_opp as it redundant as freq_to_opp does exactly the
   samething.
b) Remove any direct dereference of opp tables except thru accessor
   functions.

NOTE: the implementation is just a start and leaves scope for
further performance and robustness improvements which can be added on
top.

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/resource34xx.c |  178 ++--
 1 files changed, 109 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-omap2/resource34xx.c 
b/arch/arm/mach-omap2/resource34xx.c
index af6b3c1..15b5cb6 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -155,29 +155,14 @@ static int curr_vdd1_opp;
 static int curr_vdd2_opp;
 static DEFINE_MUTEX(dvfs_mutex);
 
-static unsigned short get_opp(struct omap_opp *opp_freq_table,
-   unsigned long freq)
-{
-   struct omap_opp *prcm_config;
-   prcm_config = opp_freq_table;
-
-   if (prcm_config->rate <= freq)
-   return prcm_config->opp_id; /* Return the Highest OPP */
-   for (; prcm_config->rate; prcm_config--)
-   if (prcm_config->rate < freq)
-   return (prcm_config+1)->opp_id;
-   else if (prcm_config->rate == freq)
-   return prcm_config->opp_id;
-   /* Return the least OPP */
-   return (prcm_config+1)->opp_id;
-}
-
 /**
  * init_opp - Initialize the OPP resource
  */
 void init_opp(struct shared_resource *resp)
 {
struct clk *l3_clk;
+   int ret;
+   u8 opp_id;
resp->no_of_users = 0;
 
if (!mpu_opps || !dsp_opps || !l3_opps)
@@ -190,17 +175,18 @@ void init_opp(struct shared_resource *resp)
vdd1_resp = resp;
dpll1_clk = clk_get(NULL, "dpll1_ck");
dpll2_clk = clk_get(NULL, "dpll2_ck");
-   resp->curr_level = get_opp(mpu_opps + MAX_VDD1_OPP,
-   dpll1_clk->rate);
-   curr_vdd1_opp = resp->curr_level;
+   ret = freq_to_opp(&opp_id, mpu_opps, dpll1_clk->rate);
+   BUG_ON(ret); /* TBD Cleanup handling */
+   curr_vdd1_opp = opp_id;
} else if (strcmp(resp->name, "vdd2_opp") == 0) {
vdd2_resp = resp;
dpll3_clk = clk_get(NULL, "dpll3_m2_ck");
l3_clk = clk_get(NULL, "l3_ick");
-   resp->curr_level = get_opp(l3_opps + MAX_VDD2_OPP,
-   l3_clk->rate);
-   curr_vdd2_opp = resp->curr_level;
+   ret = freq_to_opp(&opp_id, l3_opps, l3_clk->rate);
+   BUG_ON(ret); /* TBD Cleanup handling */
+   curr_vdd2_opp = opp_id;
}
+   resp->curr_level = opp_id;
return;
 }
 
@@ -242,24 +228,40 @@ static int program_opp_freq(int res, int target_level, 
int current_level)
 {
int ret = 0, l3_div;
int *curr_opp;
+   unsigned long mpu_freq, dsp_freq, l3_freq;
+#ifndef CONFIG_CPU_FREQ
+   unsigned long mpu_cur_freq
+#endif
+
+   /* Check if I can actually switch or not */
+   if (res == VDD1_OPP) {
+   ret = opp_to_freq(&mpu_freq, mpu_opps, target_level);
+   ret |= opp_to_freq(&dsp_freq, dsp_opps, target_level);
+#ifndef CONFIG_CPU_FREQ
+   ret |= opp_to_freq(&mpu_cur_freq, mpu_opps, current_level);
+#endif
+   } else {
+   ret = opp_to_freq(&l3_freq, l3_opps, target_level);
+   }
+   /* we would have caught all bad levels earlier.. */
+   if (unlikely(ret))
+   return ret;
 
lock_scratchpad_sem();
if (res == VDD1_OPP) {
curr_opp = &curr_vdd1_opp;
-   clk_set_rate(dpll1_clk, mpu_opps[target_level].rate);
-   clk_set_rate(dpll2_clk, dsp_opps[target_level].rate);
+   clk_set_rate(dpll1_clk, mpu_freq);
+   clk_set_rate(dpll2_clk, dsp_freq);
 #ifndef CONFIG_CPU_FREQ
/*Update loops_per_jiffy if processor speed is being changed*/
loops_per_jiffy = compute_lpj(loops_per_jiffy,
-   mpu_opps[current_level].rate/1000,
-   mpu_opps[target_level].rate/1000);
+   mpu_cur_freq / 1000, mpu_freq / 1000);
 #endif
} else {
curr_opp = &curr_vdd2_opp;
l3_div = cm_read_mod_reg(CORE_MOD, CM_CLKSEL) &
OMAP3430_CLKSEL_L3_MASK;
-   ret = clk_set_rate(dpll3_clk,
-   l3_opps[target_level].rate * l3_div);
+   

[PATCH 8/9 v2] omap3: pm: introduce dynamic OPP

2009-11-12 Thread Nishanth Menon
OPP tables have been used as static arrays till now this causes
limitations in terms of ability to dynamically making decisions
for cpu types and populating it with the right values. This
implementation is based on the discussions in the thread:
http://marc.info/?l=linux-omap&m=125482970102327&w=2
inputs from Romit, Benoit, Kevin, Sanjeev, Santosh acked.

omap3_pm_init_opp_table is introduced here, and the default omap3
tables have been renamed to omap34xx_ tables, original omap3_xx
tables are now dynamically allocated and populated.

Corresponding board files calling omap2_init_common_hw with the
active opp table params have been updated with this patch.

This now paves way to introduce 3630 OPP tables.

Tested on: SDP3430 - SDP3630 boot breaks with this patch
(as SDP3630 needs corresponding correct VDD2 freq w.r.t SDRC clk.
The next patch in this series fixes things)

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/board-3430sdp.c |1 +
 arch/arm/mach-omap2/board-3630sdp.c |6 +-
 arch/arm/mach-omap2/board-omap3beagle.c |1 +
 arch/arm/mach-omap2/board-omap3evm.c|1 +
 arch/arm/mach-omap2/board-rx51.c|1 +
 arch/arm/mach-omap2/board-zoom2.c   |7 +--
 arch/arm/mach-omap2/board-zoom3.c   |6 +-
 arch/arm/mach-omap2/omap3-opp.h |6 +++---
 arch/arm/mach-omap2/pm.h|7 +++
 arch/arm/mach-omap2/pm34xx.c|   31 ---
 10 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 74c20ee..a326b39 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -220,6 +220,7 @@ static void __init omap_3430sdp_init_irq(void)
 {
omap_board_config = sdp3430_config;
omap_board_config_size = ARRAY_SIZE(sdp3430_config);
+   omap3_pm_init_opp_table();
omap3_pm_init_vc(&omap3_setuptime_table);
omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL, 
omap3_mpu_rate_table,
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
index d130d67..f613f82 100755
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -21,7 +21,9 @@
 #include 
 #include 
 
+#include "pm.h"
 #include "sdram-hynix-h8mbx00u0mer-0em.h"
+#include "omap3-opp.h"
 
 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
 
@@ -74,9 +76,11 @@ static void __init omap_sdp_init_irq(void)
 {
omap_board_config = sdp_config;
omap_board_config_size = ARRAY_SIZE(sdp_config);
+   omap3_pm_init_opp_table();
omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
 h8mbx00u0mer0em_sdrc_params,
- NULL, NULL, NULL);
+omap3_mpu_rate_table, omap3_dsp_rate_table,
+omap3_l3_rate_table);
omap_init_irq();
omap_gpio_init();
 }
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 44de94b..e7bee77 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -351,6 +351,7 @@ static void __init omap3_beagle_init_irq(void)
 {
omap_board_config = omap3_beagle_config;
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
+   omap3_pm_init_opp_table();
omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
 omap3_dsp_rate_table, omap3_l3_rate_table);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 2c63002..d8318cd 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -336,6 +336,7 @@ static void __init omap3_evm_init_irq(void)
 {
omap_board_config = omap3_evm_config;
omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
+   omap3_pm_init_opp_table();
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, 
omap3_mpu_rate_table,
 omap3_dsp_rate_table, omap3_l3_rate_table);
omap_init_irq();
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 2f1c2be..997fd1c 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -103,6 +103,7 @@ static void __init rx51_init_irq(void)
 
omap_board_config = rx51_config;
omap_board_config_size = ARRAY_SIZE(rx51_config);
+   omap3_pm_init_opp_table();
omap3_pm_init_cpui

[PATCH 1/9] omap3: pm: introduce enabled flag to omap_opp

2009-11-12 Thread Nishanth Menon
We used to enable and disable OPPs based on rate being set to 0, this
has been confusing in general. So, we now allow specific OPPs to be
now enabled/disabled by an explicit enabled flag instead of re-using
rate flag itself.

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/omap3-opp.h   |   32 ++--
 arch/arm/mach-omap2/resource34xx.c|4 +++
 arch/arm/plat-omap/include/plat/omap-pm.h |2 +
 3 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-opp.h b/arch/arm/mach-omap2/omap3-opp.h
index c773ea7..42557e1 100644
--- a/arch/arm/mach-omap2/omap3-opp.h
+++ b/arch/arm/mach-omap2/omap3-opp.h
@@ -22,41 +22,41 @@
 #define S166M   16600
 
 static struct omap_opp omap3_mpu_rate_table[] = {
-   {0, 0, 0},
+   {0, 0, 0, 0},
/*OPP1*/
-   {S125M, VDD1_OPP1, 0x1E},
+   {true, S125M, VDD1_OPP1, 0x1E},
/*OPP2*/
-   {S250M, VDD1_OPP2, 0x26},
+   {true, S250M, VDD1_OPP2, 0x26},
/*OPP3*/
-   {S500M, VDD1_OPP3, 0x30},
+   {true, S500M, VDD1_OPP3, 0x30},
/*OPP4*/
-   {S550M, VDD1_OPP4, 0x36},
+   {true, S550M, VDD1_OPP4, 0x36},
/*OPP5*/
-   {S600M, VDD1_OPP5, 0x3C},
+   {true, S600M, VDD1_OPP5, 0x3C},
 };
 
 static struct omap_opp omap3_l3_rate_table[] = {
-   {0, 0, 0},
+   {0, 0, 0, 0},
/*OPP1*/
-   {0, VDD2_OPP1, 0x1E},
+   {false, 0, VDD2_OPP1, 0x1E},
/*OPP2*/
-   {S83M, VDD2_OPP2, 0x24},
+   {true, S83M, VDD2_OPP2, 0x24},
/*OPP3*/
-   {S166M, VDD2_OPP3, 0x2C},
+   {true, S166M, VDD2_OPP3, 0x2C},
 };
 
 static struct omap_opp omap3_dsp_rate_table[] = {
-   {0, 0, 0},
+   {0, 0, 0, 0},
/*OPP1*/
-   {S90M, VDD1_OPP1, 0x1E},
+   {true, S90M, VDD1_OPP1, 0x1E},
/*OPP2*/
-   {S180M, VDD1_OPP2, 0x26},
+   {true, S180M, VDD1_OPP2, 0x26},
/*OPP3*/
-   {S360M, VDD1_OPP3, 0x30},
+   {true, S360M, VDD1_OPP3, 0x30},
/*OPP4*/
-   {S400M, VDD1_OPP4, 0x36},
+   {true, S400M, VDD1_OPP4, 0x36},
/*OPP5*/
-   {S430M, VDD1_OPP5, 0x3C},
+   {true, S430M, VDD1_OPP5, 0x3C},
 };
 
 #endif
diff --git a/arch/arm/mach-omap2/resource34xx.c 
b/arch/arm/mach-omap2/resource34xx.c
index 04be4d2..af6b3c1 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -285,6 +285,10 @@ static int program_opp(int res, struct omap_opp *opp, int 
target_level,
c_opp = ID_VDD(res) | ID_OPP_NO(opp[current_level].opp_id);
 #endif
 
+   /* Only allow enabled OPPs */
+   if (!opp[target_level].enabled)
+   return -EINVAL;
+
/* Sanity check of the OPP params before attempting to set */
if (!opp[target_level].rate || !opp[target_level].vsel)
return -EINVAL;
diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h 
b/arch/arm/plat-omap/include/plat/omap-pm.h
index 583e540..5dc2048 100644
--- a/arch/arm/plat-omap/include/plat/omap-pm.h
+++ b/arch/arm/plat-omap/include/plat/omap-pm.h
@@ -21,6 +21,7 @@
 
 /**
  * struct omap_opp - clock frequency-to-OPP ID table for DSP, MPU
+ * @enabled: enabled if true, disabled if false
  * @rate: target clock rate
  * @opp_id: OPP ID
  * @min_vdd: minimum VDD1 voltage (in millivolts) for this OPP
@@ -28,6 +29,7 @@
  * Operating performance point data.  Can vary by OMAP chip and board.
  */
 struct omap_opp {
+   bool enabled;
unsigned long rate;
u8 opp_id;
u16 vsel;
-- 
1.6.3.3

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


[PATCH 5/9] omap3: pm: sr: replace get_opp with freq_to_opp

2009-11-12 Thread Nishanth Menon
SmartReflex implements a get_opp to search through the opp table,
replace it with the accessor function as it is a duplicate of
freq_to_opp

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/smartreflex.c |   36 
 1 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c 
b/arch/arm/mach-omap2/smartreflex.c
index be3a1da..d34224d 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -146,49 +146,29 @@ static u32 cal_test_nvalue(u32 sennval, u32 senpval)
(rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT);
 }
 
-/* determine the current OPP from the frequency
- * we need to give this function last element of OPP rate table
- * and the frequency
- */
-static u16 get_opp(struct omap_opp *opp_freq_table,
-   unsigned long freq)
-{
-   struct omap_opp *prcm_config;
-
-   prcm_config = opp_freq_table;
-
-   if (prcm_config->rate <= freq)
-   return prcm_config->opp_id; /* Return the Highest OPP */
-   for (; prcm_config->rate; prcm_config--)
-   if (prcm_config->rate < freq)
-   return (prcm_config+1)->opp_id;
-   else if (prcm_config->rate == freq)
-   return prcm_config->opp_id;
-   /* Return the least OPP */
-   return (prcm_config+1)->opp_id;
-}
-
-static u16 get_vdd1_opp(void)
+static u8 get_vdd1_opp(void)
 {
-   u16 opp;
+   u8 opp;
 
if (sr1.vdd_opp_clk == NULL || IS_ERR(sr1.vdd_opp_clk) ||
mpu_opps == NULL)
return 0;
 
-   opp = get_opp(mpu_opps + MAX_VDD1_OPP, sr1.vdd_opp_clk->rate);
+   /* Not expected to fail.. */
+   BUG_ON(freq_to_opp(&opp, mpu_opps, sr1.vdd_opp_clk->rate));
return opp;
 }
 
-static u16 get_vdd2_opp(void)
+static u8 get_vdd2_opp(void)
 {
-   u16 opp;
+   u8 opp;
 
if (sr2.vdd_opp_clk == NULL || IS_ERR(sr2.vdd_opp_clk) ||
l3_opps == NULL)
return 0;
 
-   opp = get_opp(l3_opps + MAX_VDD2_OPP, sr2.vdd_opp_clk->rate);
+   /* Not expected to fail.. */
+   BUG_ON(freq_to_opp(&opp, l3_opps, sr2.vdd_opp_clk->rate));
return opp;
 }
 
-- 
1.6.3.3

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


[PATCH 7/9] omap3: pm: remove VDDx_MIN/MAX macros

2009-11-12 Thread Nishanth Menon
Since accessor functions are used through out, we dont depend
on the predefined macros to know the limits of the opp table.
Hence, remove these.

Tested on: SDP3430, SDP3630

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Nishanth Menon 
---
 arch/arm/plat-omap/include/plat/omap34xx.h |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap34xx.h 
b/arch/arm/plat-omap/include/plat/omap34xx.h
index 868e238..cc7cfae 100644
--- a/arch/arm/plat-omap/include/plat/omap34xx.h
+++ b/arch/arm/plat-omap/include/plat/omap34xx.h
@@ -104,10 +104,5 @@
 #define VDD2_OPP2  0x2
 #define VDD2_OPP3  0x3
 
-#define MIN_VDD1_OPP   VDD1_OPP1
-#define MAX_VDD1_OPP   VDD1_OPP5
-#define MIN_VDD2_OPP   VDD2_OPP1
-#define MAX_VDD2_OPP   VDD2_OPP3
-
 #endif /* __ASM_ARCH_OMAP34XX_H */
 
-- 
1.6.3.3

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


[PATCH 2/9 v2] omap3: pm: introduce opp accessor functions

2009-11-12 Thread Nishanth Menon
Modifies the initial patch From Sanjeev:
http://patchwork.kernel.org/patch/50998/

NOTE:
The original opp_table introduced by Sanjeev is not needed anymore as
we can use enabled flag to have better granularity in enable/disable
of OPPs.

This introduces the following accessor functions:

freq_to_opp and opp_to_freq: Matching functions to convert OPP to freq
and viceversa.

freq_to_vsel: Converts a frequency to corresponding voltage.

opp_enable: To enable/disable a specific OPP in a OPP table this allows
granular runtime disable/enable of specific OPPs, esp when used in
conjunction with search and mapping functions

get_next_freq: A search function to get next matching frequency. This
could possibly provide the basis for more complex OPP transition algos
of the future.

get_limit_freq: A search function to get the least or maximum
frequency based on search criteria. Allows for independence from
OPP_IDs in the future.

Since the accessor functions hide the details of the table
implementation, the opp table is now moved away from omap3-opp.h to
pm34xx.c. The terminator entry is needed at the start and end of the
table as it is still needed for reverse and forward search as the
length of the table is unknown.

Tests done: Accessor functions standalone tested on a PC host with
dummy OPP table to simulate boundary, invalid and valid conditions,
SDP3430, SDP3630 for system stability.

Cc: Benoit Cousson 
Cc: Jon Hunter 
Cc: Kevin Hilman 
Cc: Madhusudhan Chikkature Rajashekar 
Cc: Paul Walmsley 
Cc: Romit Dasgupta 
Cc: Sanjeev Premi 
Cc: Santosh Shilimkar 
Cc: Sergio Alberto Aguirre Rodriguez 
Cc: SuiLun Lam 
Cc: Thara Gopinath 
Cc: Vishwanath Sripathy 

Signed-off-by: Sanjeev Premi 
Signed-off-by: Nishanth Menon 
---
 arch/arm/mach-omap2/omap3-opp.h   |   40 +---
 arch/arm/mach-omap2/pm.c  |  160 +
 arch/arm/mach-omap2/pm34xx.c  |   42 
 arch/arm/plat-omap/include/plat/omap-pm.h |  109 
 4 files changed, 314 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-opp.h b/arch/arm/mach-omap2/omap3-opp.h
index 42557e1..27e2ca5 100644
--- a/arch/arm/mach-omap2/omap3-opp.h
+++ b/arch/arm/mach-omap2/omap3-opp.h
@@ -21,42 +21,8 @@
 #define S83M8300
 #define S166M   16600
 
-static struct omap_opp omap3_mpu_rate_table[] = {
-   {0, 0, 0, 0},
-   /*OPP1*/
-   {true, S125M, VDD1_OPP1, 0x1E},
-   /*OPP2*/
-   {true, S250M, VDD1_OPP2, 0x26},
-   /*OPP3*/
-   {true, S500M, VDD1_OPP3, 0x30},
-   /*OPP4*/
-   {true, S550M, VDD1_OPP4, 0x36},
-   /*OPP5*/
-   {true, S600M, VDD1_OPP5, 0x3C},
-};
-
-static struct omap_opp omap3_l3_rate_table[] = {
-   {0, 0, 0, 0},
-   /*OPP1*/
-   {false, 0, VDD2_OPP1, 0x1E},
-   /*OPP2*/
-   {true, S83M, VDD2_OPP2, 0x24},
-   /*OPP3*/
-   {true, S166M, VDD2_OPP3, 0x2C},
-};
-
-static struct omap_opp omap3_dsp_rate_table[] = {
-   {0, 0, 0, 0},
-   /*OPP1*/
-   {true, S90M, VDD1_OPP1, 0x1E},
-   /*OPP2*/
-   {true, S180M, VDD1_OPP2, 0x26},
-   /*OPP3*/
-   {true, S360M, VDD1_OPP3, 0x30},
-   /*OPP4*/
-   {true, S400M, VDD1_OPP4, 0x36},
-   /*OPP5*/
-   {true, S430M, VDD1_OPP5, 0x3C},
-};
+extern struct omap_opp omap3_mpu_rate_table[];
+extern struct omap_opp omap3_dsp_rate_table[];
+extern struct omap_opp omap3_l3_rate_table[];
 
 #endif
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index f50e93d..b2cd30c 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "prm-regbits-34xx.h"
 #include "pm.h"
@@ -203,3 +204,162 @@ static int __init omap_pm_init(void)
return error;
 }
 late_initcall(omap_pm_init);
+
+int opp_to_freq(unsigned long *freq, const struct omap_opp *opps, u8 opp_id)
+{
+   int i = 1;
+
+   BUG_ON(!freq || !opps);
+
+   /* The first entry is a dummy one, loop till we hit terminator */
+   while (!IS_OPP_TERMINATOR(opps, i)) {
+   if (opps[i].enabled && (opps[i].opp_id == opp_id)) {
+   *freq = opps[i].rate;
+   return 0;
+   }
+   i++;
+   }
+
+   return -EINVAL;
+}
+EXPORT_SYMBOL(opp_to_freq);
+
+int freq_to_vsel(u8 *vsel, const struct omap_opp *opps, unsigned long freq)
+{
+   int i = 1;
+
+   BUG_ON(!vsel || !opps);
+
+   /* The first entry is a dummy one, loop till we hit terminator */
+   while (!IS_OPP_TERMINATOR(opps, i)) {
+   if (opps[i].enabled && (opps[i].rate == freq)) {
+   *vsel = opps[i].vsel;
+   return 0;
+   }
+   i++;
+   }
+
+   return -EINVAL;
+}
+EXPORT_SYMBOL(freq_to_vsel);
+
+int freq_to_opp(u8 *opp_id, const struct omap_opp *opps, unsigned long freq)
+{
+   int i = 1;
+
+   BUG_ON(!opp_id || !opps);
+
+ 

[PATCH 0/9 v2] omap3: pm: introduce support for 3630 OPPs

2009-11-12 Thread Nishanth Menon
Hi,
V2 of the patch series.
What changed in V2:
* Rebased to latest pm branch as of today (with zoom3 and SDP3630
  support -thanks kevin and Vikram in getting it done) 8/9 changed
* Jon Hunter pointed me to errors in vdd2 opp2 voltage that I made
  a mistake-9/9 changed
* Lam pointed me to an error in OPP enable for 3630OPP I made-
  vdd1 opp3 was disabled by default in DSP but I missed MPU :( -
  9/9 changed
* Accepted Kevin's recommendation that I rename opp_onoff to
  opp_enable 2/9 changed
* I realized that macro paramaters usage in IS_OPP_TERMINATOR,
  so made them mess up safe (2/9 changed)
* Few of the patch subjects got renamed from "introduce opp accessor
  functions" to "use accessor function" to better reflect what was
  being done.

Finally,
This series has been tested on SDP3430 and SDP3630 :) - though
not stress tested for various drivers - basic OPP changes on VDD1 &
VDD2, and cpufreq tests only. Requesting more thorough testing from
as many folks as possible. (omap3_pm_defconfig used)
NOTE: SDP3630 needs the patch for 8250 as discussed here:
http://marc.info/?l=linux-omap&m=125795354108797&w=2

I am reposting the complete rebased set as v2 to maintain continuity
on the new baseline

 
This patch series is based on previous discussions:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg17632.html

I have modified the initial patch From Sanjeev:
http://patchwork.kernel.org/patch/50998/

Other than these, we cannot use the old VDDx_MAX based usage
anymore as 3630 OPPs are now different and runtime handling
is a must-have, hence introducing these accessor functions is not
avoidable.

The changes are incremental and tries to avoid intrusive change
as much as possible.

The OPP accessor functions introduced in this series is hopefully
a start for us to optimize this heavily used path.

Finally, I have only done limited testing of SR, as it is still in
my TODO list to revamp SR in the form of a v5 patch next time I get
some bandwidth.

An alternate approach for detecting 3630 OPP is using FEATURES
instead of detecting the cpu_type as I have implemented in this series.

Nishanth Menon (9):
  omap3: pm: introduce enabled flag to omap_opp
  omap3: pm: introduce opp accessor functions
  omap3: pm: srf: use opp accessor function
  omap3: pm: use opp accessor functions for omap-target
  omap3: pm: sr: replace get_opp with freq_to_opp
  omap3: clk: use pm accessor functions for cpufreq table
  omap3: pm: remove VDDx_MIN/MAX macros
  omap3: pm: introduce dynamic OPP
  omap3: pm: introduce 3630 opps

 arch/arm/mach-omap2/board-3430sdp.c|1 +
 arch/arm/mach-omap2/board-3630sdp.c|6 +-
 arch/arm/mach-omap2/board-omap3beagle.c|1 +
 arch/arm/mach-omap2/board-omap3evm.c   |1 +
 arch/arm/mach-omap2/board-rx51.c   |1 +
 arch/arm/mach-omap2/board-zoom2.c  |7 +-
 arch/arm/mach-omap2/board-zoom3.c  |6 +-
 arch/arm/mach-omap2/clock34xx.c|   46 +---
 arch/arm/mach-omap2/omap3-opp.h|   49 ++--
 arch/arm/mach-omap2/pm.c   |  160 +
 arch/arm/mach-omap2/pm.h   |7 +
 arch/arm/mach-omap2/pm34xx.c   |  122 +++
 arch/arm/mach-omap2/resource34xx.c |  174 +--
 arch/arm/mach-omap2/smartreflex.c  |   36 ++-
 arch/arm/plat-omap/cpu-omap.c  |   12 +--
 arch/arm/plat-omap/include/plat/omap-pm.h  |  111 ++
 arch/arm/plat-omap/include/plat/omap34xx.h |5 -
 17 files changed, 584 insertions(+), 161 deletions(-)

Regards,
Nishanth Menon

PS: Sample log from 3630SDP:
 3630SDP cpufreq results:
 # head /sys/devices/system/cpu/cpu0/cpu
 /sys/devices/system/cpu/cpu0/cpufreq/  /sys/devices/system/cpu/cpu0/cpuidle/
 /tests/pm-test-scripts # head /sys/devices/system/cpu/cpu0/cpufreq/*
 ==> /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus <==
 0
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq <==
 30
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq <==
 60
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq <==
 30
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency <==
 30
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/related_cpus <==
 0
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies <==
 60 30 
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors <==
 userspace 
 
 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq <==
 30

 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver <==
 omap

 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor <==
 userspace

 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq <==
 60

 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq <==
 30

 ==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed <==
 30

 # head /sys/devices/system/cpu/cpu0/cpufreq/stats/*
 ==> /s

RE: [PATCH] omap3: Change the default silicon

2009-11-12 Thread Gadiyar, Anand
Tony Lindgren wrote:
> * Sanjeev Premi  [091029 07:35]:
> > Currently the default silicon - in absence of
> > identification - is set to OMAP3630 ES1.0.
> > 
> > Though, condition may/should not arise; but
> > the default should be latest in the most
> > common silicon variant - currently OMAP3430
> > ES3.1.
> 
> Is this still needed? To me it seems more likely there will
> more 3630 based silicon than 3430 based silicon?
> 

3430 ES3.1s are the most common I believe. All boards in the wild
are 3430 based.

3630 is just coming up and will take a while to be as common.

IMO, 3430 ES3.1 should be default.

- Anand


> Regards,
> 
> Tony
>  
> > Signed-off-by: Sanjeev Premi 
> > ---
> >  arch/arm/mach-omap2/id.c |4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> > index 1c15112..0162623 100644
> > --- a/arch/arm/mach-omap2/id.c
> > +++ b/arch/arm/mach-omap2/id.c
> > @@ -243,8 +243,8 @@ void __init omap3_check_revision(void)
> > }
> > break;
> > default:
> > -   /* Unknown default to latest silicon rev as default*/
> > -   omap_revision = OMAP3630_REV_ES1_0;
> > +   /* Unknown. Default to latest among all variants */
> > +   omap_revision = OMAP3430_REV_ES3_1;
> > }
> >  }
> >  
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Some patches need reposting, inbox cleared, patchwork cleared

2009-11-12 Thread Gadiyar, Anand
Gadiyar, Anand wrote:
> Tony Lindgren wrote:
> > Hi all,
> > 
> > I'm finally done sorting through the patchwork patches to add to
> > the omap for-next queue. So I've nuked my linux-omap inbox, and
> > cleared the patches that I'm supposed to deal with in patchwork.
> > 
> > Please check that you patch is applied (or merged into some existing
> > patch) in the omap for-next branch.
> > 
> > If you don't see your patch in the omap for-next branch, and you
> > don't see the patch in the patchwork list, please repost your
> > patch. When reposting, please send the whole series again.
> > 
> > The patchwork pending patches are at:
> > 
> > http://patchwork.kernel.org/project/linux-omap/list/
> > 
> > I have not touched the patches in patchwork that are tagged for
> > felipebalbi, khilman or pwsan, so this message only concerns the
> > ones I'm supposed to deal with.
> > 
> > If you have lots of patches, you can also post a git branch that's
> > rebased on commit 8171d88089ad63fc442b2bf32af7c18653adc5cb.
> > Don't use the omap for-next for rebasing, as it's still changing.
> > 
> > I've dropped all the patches that did not apply to for-next,
> > or that have dependency to some other subsystem. I've commented
> > on few of the patches that don't apply, but not all of them.
> > Then some fix patches I've merged to the earlier patches,
> > and for those there's no APPLIED email message.
> > 
> > I've probably also accidentally trashed some perfectly valid
> > patches too.. So please check and repost as needed!
> > 
> 
> Tony,
> 
> What happened to the 3630 support stuff that had been merged to
> your master branch as of yesterday?
> 
> - Anand

I meant, I see these patches in for-next, but they're not present
in the l-o master branch. Is this deliberate?

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Some patches need reposting, inbox cleared, patchwork cleared

2009-11-12 Thread Gadiyar, Anand
Tony Lindgren wrote:
> Hi all,
> 
> I'm finally done sorting through the patchwork patches to add to
> the omap for-next queue. So I've nuked my linux-omap inbox, and
> cleared the patches that I'm supposed to deal with in patchwork.
> 
> Please check that you patch is applied (or merged into some existing
> patch) in the omap for-next branch.
> 
> If you don't see your patch in the omap for-next branch, and you
> don't see the patch in the patchwork list, please repost your
> patch. When reposting, please send the whole series again.
> 
> The patchwork pending patches are at:
> 
> http://patchwork.kernel.org/project/linux-omap/list/
> 
> I have not touched the patches in patchwork that are tagged for
> felipebalbi, khilman or pwsan, so this message only concerns the
> ones I'm supposed to deal with.
> 
> If you have lots of patches, you can also post a git branch that's
> rebased on commit 8171d88089ad63fc442b2bf32af7c18653adc5cb.
> Don't use the omap for-next for rebasing, as it's still changing.
> 
> I've dropped all the patches that did not apply to for-next,
> or that have dependency to some other subsystem. I've commented
> on few of the patches that don't apply, but not all of them.
> Then some fix patches I've merged to the earlier patches,
> and for those there's no APPLIED email message.
> 
> I've probably also accidentally trashed some perfectly valid
> patches too.. So please check and repost as needed!
> 

Tony,

What happened to the 3630 support stuff that had been merged to
your master branch as of yesterday?

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Query: Regulator framework in EHCI driver

2009-11-12 Thread Gupta, Ajay Kumar
Hi,

> > MODE_UNKNOWN means that the port is not connected and so no need to
> check
> > the regulator availability.
> 
> Sure, currently - the point is that if you're going to check for the
> individual allocations anyway then the check doesn't buy you anything.

Now I have taken this into consideration during driver exit function.

Please review the v2 of this patch below.

Regards,
Ajay
 cut here ===

Adding regulator framework in EHCI driver.

OMAP3 has three HS USB ports so it can have three different regulator
for each PHY connected to each port.

Currently these regulators are assumed to be optional and driver doesn't
fail but continue with the initialization if it doesn't get any regulators.

Regulator supply names has to be mapped in board files as 'hsusbN' where
'N' is port number and can be {0, 1 ,2}.

Signed-off-by: Ajay Kumar Gupta 
---
 drivers/usb/host/ehci-omap.c |   31 +++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 97ce7d5..394c0c6 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 struct usb_hcd *ghcd;
@@ -191,6 +192,11 @@ struct ehci_hcd_omap {
void __iomem*uhh_base;
void __iomem*tll_base;
void __iomem*ehci_base;
+
+   /* Regulators for USB PHYs.
+* Each PHY can have a seperate regulator.
+*/
+   struct regulator*regulator[OMAP3_HS_USB_PORTS];
 };
 
 /*-*/
@@ -839,6 +845,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
 
int irq = platform_get_irq(pdev, 0);
int ret = -ENODEV;
+   int i;
+   char supply[7];
 
if (!pdata) {
dev_dbg(&pdev->dev, "missing platform_data\n");
@@ -918,6 +926,21 @@ static int ehci_hcd_omap_probe(struct platform_device 
*pdev)
goto err_tll_ioremap;
}
 
+   /* get ehci regulator and enable */
+   for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
+   if (omap->port_mode[i] != EHCI_HCD_OMAP_MODE_PHY) {
+   omap->regulator[i] = NULL;
+   continue;
+   }
+   snprintf(supply, 7, "hsusb%d", i);
+   omap->regulator[i] = regulator_get(omap->dev, supply);
+   if (IS_ERR(omap->regulator[i]))
+   dev_dbg(&pdev->dev,
+   "failed to get ehci port%d regulator\n", i);
+   else
+   regulator_enable(omap->regulator[i]);
+   }
+
ret = omap_start_ehc(omap, hcd);
if (ret) {
dev_dbg(&pdev->dev, "failed to start ehci\n");
@@ -981,6 +1004,7 @@ static int ehci_hcd_omap_remove(struct platform_device 
*pdev)
 {
struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);
+   int i;
 
if (omap->port_mode[0] != EHCI_HCD_OMAP_MODE_UNKNOWN)
device_remove_file(&pdev->dev, &dev_attr_port1);
@@ -992,6 +1016,13 @@ static int ehci_hcd_omap_remove(struct platform_device 
*pdev)
usb_remove_hcd(hcd);
omap_stop_ehc(omap, hcd);
iounmap(hcd->regs);
+   for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
+   if (omap->regulator[i]) {
+   if (regulator_is_enabled(omap->regulator[i]))
+   regulator_disable(omap->regulator[i]);
+   regulator_put(omap->regulator[i]);
+   }
+   }
iounmap(omap->tll_base);
iounmap(omap->uhh_base);
usb_put_hcd(hcd);
-- 
1.6.2.4


==
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Some patches need reposting, inbox cleared, patchwork cleared

2009-11-12 Thread Tony Lindgren
Hi all,

I'm finally done sorting through the patchwork patches to add to
the omap for-next queue. So I've nuked my linux-omap inbox, and
cleared the patches that I'm supposed to deal with in patchwork.

Please check that you patch is applied (or merged into some existing
patch) in the omap for-next branch.

If you don't see your patch in the omap for-next branch, and you
don't see the patch in the patchwork list, please repost your
patch. When reposting, please send the whole series again.

The patchwork pending patches are at:

http://patchwork.kernel.org/project/linux-omap/list/

I have not touched the patches in patchwork that are tagged for
felipebalbi, khilman or pwsan, so this message only concerns the
ones I'm supposed to deal with.

If you have lots of patches, you can also post a git branch that's
rebased on commit 8171d88089ad63fc442b2bf32af7c18653adc5cb.
Don't use the omap for-next for rebasing, as it's still changing.

I've dropped all the patches that did not apply to for-next,
or that have dependency to some other subsystem. I've commented
on few of the patches that don't apply, but not all of them.
Then some fix patches I've merged to the earlier patches,
and for those there's no APPLIED email message.

I've probably also accidentally trashed some perfectly valid
patches too.. So please check and repost as needed!

Cheers,

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


[PATCH 14/14] omap3: drop all IVA-related address base definitions

2009-11-12 Thread Tony Lindgren
From: Paul Walmsley 

All of the OMAP3 IVA physical address macros in
plat-omap/include/plat/omap34xx.h are wrong[1]:

OMAP34XX_IVA_INTC_BASE: The IVA interrupt controller does not appear
to be accessible from the L3 interconnect, and in any case is
definitely not at 0x4000; the latter address appears to be the
internal IVA physical address base for the OMAP2420's interrupt control[2].

OMAP34XX_DSP_BASE: The section of L3 physical address space mapped to
the IVA starts at 0x5c00, not 0x5800.

OMAP34XX_DSP_MEM_BASE: It's not clear what this refers to, but it's not
in the L3 IVA address space.

OMAP34XX_DSP_IPI_BASE: The Intrusive Port Interface is a relic from
the OMAP2420 days and no longer applies to OMAP3.

OMAP34XX_DSP_MMU_BASE: The DSP MMU is mapped at 0x5d00, not 0x5a00.


Nothing that uses these can possibly be working, so drop them.  When
future code needs these, correct versions can be added in.

1. OMAP34xx Multimedia Device Silicon Revision 3.1.x Rev. W, Table 2-8:
   "L3 Interconnect View of the IVA2.2 Subsystem Memory Space."  p. 229.

2. OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (Rev. Q),
   section 2.2.4.1, "IVA Memory Space Seen by L3", p. 132.

3. ibid., section 4.3.11, "DSP IPI Overview", p. 200.

Signed-off-by: Paul Walmsley 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/include/plat/omap34xx.h |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap34xx.h 
b/arch/arm/plat-omap/include/plat/omap34xx.h
index 4655707..077f059 100644
--- a/arch/arm/plat-omap/include/plat/omap34xx.h
+++ b/arch/arm/plat-omap/include/plat/omap34xx.h
@@ -72,7 +72,6 @@
 #define OMAP3430_ISP_CSI2A_END (OMAP3430_ISP_CSI2A_BASE   + 0x16F)
 #define OMAP3430_ISP_CSI2PHY_END   (OMAP3430_ISP_CSI2PHY_BASE + 0x007)
 
-#define OMAP34XX_IVA_INTC_BASE 0x4000
 #define OMAP34XX_HSUSB_OTG_BASE(L4_34XX_BASE + 0xAB000)
 #define OMAP34XX_USBTLL_BASE   (L4_34XX_BASE + 0x62000)
 #define OMAP34XX_UHH_CONFIG_BASE   (L4_34XX_BASE + 0x64000)
@@ -83,9 +82,5 @@
 
 #define OMAP34XX_MAILBOX_BASE  (L4_34XX_BASE + 0x94000)
 
-#define OMAP34XX_DSP_BASE  0x5800
-#define OMAP34XX_DSP_MEM_BASE  (OMAP34XX_DSP_BASE + 0x0)
-#define OMAP34XX_DSP_IPI_BASE  (OMAP34XX_DSP_BASE + 0x100)
-#define OMAP34XX_DSP_MMU_BASE  (OMAP34XX_DSP_BASE + 0x200)
 #endif /* __ASM_ARCH_OMAP34XX_H */
 

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


[PATCH 13/14] omap3: keep SoC features on the same line

2009-11-12 Thread Tony Lindgren
From: Kevin Hilman 

When listing the various SoC features, print them on the same line.
So, instead of this

OMAP3430/3530 ES3.1
 - l2cache : Y
 - iva : Y
 - sgx : Y
 - neon : Y
 - isp : Y

you get this:

OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )

Signed-off-by: Kevin Hilman 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/id.c |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 6c11b41..4984660 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -257,11 +257,8 @@ void __init omap3_check_revision(void)
 }
 
 #define OMAP3_SHOW_FEATURE(feat)   \
-   if (omap3_has_ ##feat()) {  \
-   pr_info (" - "#feat" : Y"); \
-   } else {\
-   pr_info (" - "#feat" : N"); \
-   }
+   if (omap3_has_ ##feat())\
+   printk(#feat" ");
 
 void __init omap3_cpuinfo(void)
 {
@@ -331,13 +328,15 @@ void __init omap3_cpuinfo(void)
/*
 * Print verbose information
 */
-   pr_info("%s ES%s\n", cpu_name, cpu_rev);
+   pr_info("%s ES%s (", cpu_name, cpu_rev);
 
OMAP3_SHOW_FEATURE(l2cache);
OMAP3_SHOW_FEATURE(iva);
OMAP3_SHOW_FEATURE(sgx);
OMAP3_SHOW_FEATURE(neon);
OMAP3_SHOW_FEATURE(isp);
+
+   printk(")\n");
 }
 
 /*

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


[PATCH 12/14] omap3: move check_revision above check_features

2009-11-12 Thread Tony Lindgren
From: Tony Lindgren 

omap3_check_revision() does not depend on omap3_check_features()
move this above so that we can add logic based on revision
detected in check_features.

Signed-off-by: Nishanth Menon 
Acked-by: Mika Westerberg 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/id.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 441ca26..6c11b41 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -352,8 +352,8 @@ void __init omap2_check_revision(void)
if (cpu_is_omap24xx())
omap24xx_check_revision();
else if (cpu_is_omap34xx()) {
-   omap3_check_features();
omap3_check_revision();
+   omap3_check_features();
omap3_cpuinfo();
}
else if (cpu_is_omap44xx()) {

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


[PATCH 11/14] omap3: evm: make HSMMC driver built-in

2009-11-12 Thread Tony Lindgren
From: Sriram 

For ease of use it is preferrable to build in HSMMC driver
rather than build it as kernel module. This patches updates
default configuration for omap3evm to reflect this change.

Signed-off-by: Sriramakrishnan 
Signed-off-by: Tony Lindgren 
---
 arch/arm/configs/omap3_evm_defconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/omap3_evm_defconfig 
b/arch/arm/configs/omap3_evm_defconfig
index d5ff477..36c99e0 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1126,7 +1126,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 #
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_OMAP is not set
-CONFIG_MMC_OMAP_HS=m
+CONFIG_MMC_OMAP_HS=y
 # CONFIG_MMC_SPI is not set
 # CONFIG_MEMSTICK is not set
 # CONFIG_ACCESSIBILITY is not set

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


[PATCH 10/14] omap3: HSMMC2 8-bit mux configuration

2009-11-12 Thread Tony Lindgren
From: Madhu 

Add support for omap hsmmc2 8-bit mux configuration.

Signed-off-by: Madhusudhan Chikkature 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/devices.c |6 ++
 arch/arm/mach-omap2/mux.c |8 
 arch/arm/plat-omap/include/plat/mux.h |4 
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 8d23e1f..8b6cd8c 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -609,6 +609,12 @@ static inline void omap2_mmc_mux(struct 
omap_mmc_platform_data *mmc_controller,
omap_cfg_reg(AG4_3430_MMC2_DAT2);
omap_cfg_reg(AF4_3430_MMC2_DAT3);
}
+   if (mmc_controller->slots[0].wires == 8) {
+   omap_cfg_reg(AE4_3430_MMC2_DAT4);
+   omap_cfg_reg(AH3_3430_MMC2_DAT5);
+   omap_cfg_reg(AF3_3430_MMC2_DAT6);
+   omap_cfg_reg(AE3_3430_MMC2_DAT7);
+   }
}
 
/*
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 32c953e..83256d3 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -532,6 +532,14 @@ MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
 MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AE4_3430_MMC2_DAT4", 0x164,
+   OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AH3_3430_MMC2_DAT5", 0x166,
+   OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AF3_3430_MMC2_DAT6", 0x168,
+   OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
+MUX_CFG_34XX("AE3_3430_MMC2_DAT7", 0x16A,
+   OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
 
 /* MMC3 */
 MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
diff --git a/arch/arm/plat-omap/include/plat/mux.h 
b/arch/arm/plat-omap/include/plat/mux.h
index 56e357e..f74331d 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -834,6 +834,10 @@ enum omap34xx_index {
AH4_3430_MMC2_DAT1,
AG4_3430_MMC2_DAT2,
AF4_3430_MMC2_DAT3,
+   AE4_3430_MMC2_DAT4,
+   AH3_3430_MMC2_DAT5,
+   AF3_3430_MMC2_DAT6,
+   AE3_3430_MMC2_DAT7,
 
/* MMC3 */
AF10_3430_MMC3_CLK,

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


[PATCH 09/14] omap3630: Set omap3630 MMC1 I/O speed to 52Mhz

2009-11-12 Thread Tony Lindgren
From: Madhu 

The speed ctrl bit for MMC I/O is part of CONTROL_PROG_IO1 register
in omap3630.This patch sets it up accordingly.

Signed-off-by: Madhusudhan Chikkature 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/mmc-twl4030.c |   11 +--
 arch/arm/plat-omap/include/plat/control.h |3 +++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/mmc-twl4030.c 
b/arch/arm/mach-omap2/mmc-twl4030.c
index 7bef170..0c3c72d 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -213,7 +213,7 @@ static int twl4030_mmc_get_context_loss(struct device *dev)
 static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
int vdd)
 {
-   u32 reg;
+   u32 reg, prog_io;
int ret = 0;
struct twl_mmc_controller *c = &hsmmc[0];
struct omap_mmc_platform_data *mmc = dev->platform_data;
@@ -245,7 +245,14 @@ static int twl_mmc1_set_power(struct device *dev, int 
slot, int power_on,
}
 
reg = omap_ctrl_readl(control_pbias_offset);
-   reg |= OMAP2_PBIASSPEEDCTRL0;
+   if (cpu_is_omap3630()) {
+   /* Set MMC I/O to 52Mhz */
+   prog_io = omap_ctrl_readl(OMAP343X_CONTROL_PROG_IO1);
+   prog_io |= OMAP3630_PRG_SDMMC1_SPEEDCTRL;
+   omap_ctrl_writel(prog_io, OMAP343X_CONTROL_PROG_IO1);
+   } else {
+   reg |= OMAP2_PBIASSPEEDCTRL0;
+   }
reg &= ~OMAP2_PBIASLITEPWRDNZ0;
omap_ctrl_writel(reg, control_pbias_offset);
 
diff --git a/arch/arm/plat-omap/include/plat/control.h 
b/arch/arm/plat-omap/include/plat/control.h
index 79985e4..2ae8843 100644
--- a/arch/arm/plat-omap/include/plat/control.h
+++ b/arch/arm/plat-omap/include/plat/control.h
@@ -241,6 +241,9 @@
 #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1)
 #define OMAP2_PBIASLITEVMODE0  (1 << 0)
 
+/* CONTROL_PROG_IO1 bits */
+#define OMAP3630_PRG_SDMMC1_SPEEDCTRL  (1 << 20)
+
 /* CONTROL_IVA2_BOOTMOD bits */
 #define OMAP3_IVA2_BOOTMOD_SHIFT   0
 #define OMAP3_IVA2_BOOTMOD_MASK(0xf << 0)

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


[PATCH 08/14] omap3630: Configure HSMMC1 to 4-bit

2009-11-12 Thread Tony Lindgren
From: Madhu 

The HSMMC1 controller on omap3630 supprts only 4-bit mode. If cpu
is 3630 configure HSMMC1 wires to 4-bit.

Signed-off-by: Madhusudhan Chikkature 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/mmc-twl4030.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/mmc-twl4030.c 
b/arch/arm/mach-omap2/mmc-twl4030.c
index 3403914..7bef170 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -489,6 +489,12 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info 
*controllers)
/* on-chip level shifting via PBIAS0/PBIAS1 */
mmc->slots[0].set_power = twl_mmc1_set_power;
mmc->slots[0].set_sleep = twl_mmc1_set_sleep;
+
+   /* Omap3630 HSMMC1 supports only 4-bit */
+   if (cpu_is_omap3630() && c->wires > 4) {
+   c->wires = 4;
+   mmc->slots[0].wires = c->wires;
+   }
break;
case 2:
if (c->ext_clock)

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


[PATCH 07/14] omap3630: Add HSMMC related checks

2009-11-12 Thread Tony Lindgren
From: Madhu 

Change the cpu_is_omap3430() check to cpu_is_omap34xx() to allow HSMMC1/2
mux configuration for omap3630.

Signed-off-by: Madhusudhan Chikkature 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/devices.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 7d4513b..8d23e1f 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -575,7 +575,7 @@ static inline void omap2_mmc_mux(struct 
omap_mmc_platform_data *mmc_controller,
}
}
 
-   if (cpu_is_omap3430()) {
+   if (cpu_is_omap34xx()) {
if (controller_nr == 0) {
omap_cfg_reg(N28_3430_MMC1_CLK);
omap_cfg_reg(M27_3430_MMC1_CMD);

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


[PATCH 06/14] omap: McBSP: Do not use extensive spin locks for dma_op_mode

2009-11-12 Thread Tony Lindgren
From: Peter Ujfalusi 

The use of the spin lock, which supposed to protect the the
dma_op_mode causing "INFO: inconsistent lock state" on
playback start.
Remove the spin locks around the dma_op_mode, when it's
purpuse is to protect the dma_op_mode.

Signed-off-by: Peter Ujfalusi 
Acked-by: Jarkko Nikula 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/mcbsp.c |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 9277033..2cc1cc3 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -298,9 +298,7 @@ int omap_mcbsp_get_dma_op_mode(unsigned int id)
}
mcbsp = id_to_mcbsp_ptr(id);
 
-   spin_lock_irq(&mcbsp->lock);
dma_op_mode = mcbsp->dma_op_mode;
-   spin_unlock_irq(&mcbsp->lock);
 
return dma_op_mode;
 }
@@ -318,7 +316,6 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp 
*mcbsp)
syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON);
syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
 
-   spin_lock_irq(&mcbsp->lock);
if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) {
syscon |= (ENAWAKEUP | SIDLEMODE(0x02) |
CLOCKACTIVITY(0x02));
@@ -327,7 +324,6 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp 
*mcbsp)
} else {
syscon |= SIDLEMODE(0x01);
}
-   spin_unlock_irq(&mcbsp->lock);
 
OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon);
}
@@ -1145,9 +1141,7 @@ static ssize_t dma_op_mode_show(struct device *dev,
ssize_t len = 0;
const char * const *s;
 
-   spin_lock_irq(&mcbsp->lock);
dma_op_mode = mcbsp->dma_op_mode;
-   spin_unlock_irq(&mcbsp->lock);
 
for (s = &dma_op_modes[i]; i < ARRAY_SIZE(dma_op_modes); s++, i++) {
if (dma_op_mode == i)

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


[PATCH 05/14] omap: iommu: reorganize

2009-11-12 Thread Tony Lindgren
From: Felipe Contreras 

This way it's more object oriented and easier to see what is happening.
No functional changes.

Signed-off-by: Felipe Contreras 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/omap3-iommu.c |   62 +++--
 1 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
b/arch/arm/mach-omap2/omap3-iommu.c
index 6a9bf4f..fbbcb5c 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -14,47 +14,50 @@
 
 #include 
 
-#define OMAP3_MMU1_BASE0x480bd400
-#define OMAP3_MMU2_BASE0x5d00
-#define OMAP3_MMU1_IRQ 24
-#define OMAP3_MMU2_IRQ 28
-
-
-static unsigned long iommu_base[] __initdata = {
-   OMAP3_MMU1_BASE,
-   OMAP3_MMU2_BASE,
-};
-
-static int iommu_irq[] __initdata = {
-   OMAP3_MMU1_IRQ,
-   OMAP3_MMU2_IRQ,
+struct iommu_device {
+   resource_size_t base;
+   int irq;
+   struct iommu_platform_data pdata;
+   struct resource res[2];
 };
 
-static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
+static struct iommu_device devices[] = {
{
-   .name = "isp",
-   .nr_tlb_entries = 8,
-   .clk_name = "cam_ick",
+   .base = 0x480bd400,
+   .irq = 24,
+   .pdata = {
+   .name = "isp",
+   .nr_tlb_entries = 8,
+   .clk_name = "cam_ick",
+   },
},
 #if defined(CONFIG_MPU_BRIDGE_IOMMU)
{
-   .name = "iva2",
-   .nr_tlb_entries = 32,
-   .clk_name = "iva2_ck",
+   .base = 0x5d00,
+   .irq = 28,
+   .pdata = {
+   .name = "iva2",
+   .nr_tlb_entries = 32,
+   .clk_name = "iva2_ck",
+   },
},
 #endif
 };
-#define NR_IOMMU_DEVICES ARRAY_SIZE(omap3_iommu_pdata)
+#define NR_IOMMU_DEVICES ARRAY_SIZE(devices)
 
 static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES];
 
 static int __init omap3_iommu_init(void)
 {
int i, err;
+   struct resource res[] = {
+   { .flags = IORESOURCE_MEM },
+   { .flags = IORESOURCE_IRQ },
+   };
 
for (i = 0; i < NR_IOMMU_DEVICES; i++) {
struct platform_device *pdev;
-   struct resource res[2];
+   const struct iommu_device *d = &devices[i];
 
pdev = platform_device_alloc("omap-iommu", i);
if (!pdev) {
@@ -62,19 +65,16 @@ static int __init omap3_iommu_init(void)
goto err_out;
}
 
-   memset(res, 0,  sizeof(res));
-   res[0].start = iommu_base[i];
-   res[0].end = iommu_base[i] + MMU_REG_SIZE - 1;
-   res[0].flags = IORESOURCE_MEM;
-   res[1].start = res[1].end = iommu_irq[i];
-   res[1].flags = IORESOURCE_IRQ;
+   res[0].start = d->base;
+   res[0].end = d->base + MMU_REG_SIZE - 1;
+   res[1].start = res[1].end = d->irq;
 
err = platform_device_add_resources(pdev, res,
ARRAY_SIZE(res));
if (err)
goto err_out;
-   err = platform_device_add_data(pdev, &omap3_iommu_pdata[i],
-  sizeof(omap3_iommu_pdata[0]));
+   err = platform_device_add_data(pdev, &d->pdata,
+  sizeof(d->pdata));
if (err)
goto err_out;
err = platform_device_add(pdev);

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


[PATCH 04/14] omap: iovmm: remove cache flush operation

2009-11-12 Thread Tony Lindgren
From: Hiroshi DOYU 

Cache flush operation is handled in the upper client layer and iovmm
modules doesn't have to care about it. This patch will improve some
performance with current camera isp driver.

Signed-off-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/iovmm.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 577d8c0..544772e 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -392,7 +392,6 @@ static void sgtable_fill_vmalloc(struct sg_table *sgt, void 
*_va)
}
 
va_end = _va + PAGE_SIZE * i;
-   flush_cache_vmap((unsigned long)_va, (unsigned long)va_end);
 }
 
 static inline void sgtable_drain_vmalloc(struct sg_table *sgt)
@@ -427,8 +426,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 
pa, size_t len)
len -= bytes;
}
BUG_ON(len);
-
-   clean_dcache_area(va, len);
 }
 
 static inline void sgtable_drain_kmalloc(struct sg_table *sgt)

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


[PATCH 03/14] omap: iommu: avoid remapping if it's been mapped in MPU side

2009-11-12 Thread Tony Lindgren
From: Hiroshi DOYU 

MPU side (v)-(p) mapping is necessary only if IOVMF_MMIO is set in
"flags".

Signed-off-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/iovmm.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 0ce36bb..577d8c0 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -617,7 +617,7 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct 
sg_table *sgt,
 u32 flags)
 {
size_t bytes;
-   void *va;
+   void *va = NULL;
 
if (!obj || !obj->dev || !sgt)
return -EINVAL;
@@ -627,9 +627,11 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct 
sg_table *sgt,
return -EINVAL;
bytes = PAGE_ALIGN(bytes);
 
-   va = vmap_sg(sgt);
-   if (IS_ERR(va))
-   return PTR_ERR(va);
+   if (flags & IOVMF_MMIO) {
+   va = vmap_sg(sgt);
+   if (IS_ERR(va))
+   return PTR_ERR(va);
+   }
 
flags &= IOVMF_HW_MASK;
flags |= IOVMF_DISCONT;

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


[PATCH 02/14] omap: Add platform init code for EHCI driver

2009-11-12 Thread Tony Lindgren
From: Felipe Balbi 

Add platform init code for EHCI driver.

Various fixes to the original patch by Ajay Kumar Gupta 
and Anand Gadiyar .

Overo support added by Olof Johansson 
Beagle support added by Koen Kooi 
CM-T32 support added by Mike Rapoport 

Signed-off-by: Signed-off-by: Olof Johansson 
Acked-by: Steve Sakoman 
Signed-off-by: Koen Kooi 
Signed-off-by: Mike Rapoport 
Signed-off-by: Ajay Kumar Gupta 
Signed-off-by: Anand Gadiyar 
Signed-off-by: Felipe Balbi 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/Makefile   |1 
 arch/arm/mach-omap2/board-3430sdp.c|   13 ++
 arch/arm/mach-omap2/board-omap3beagle.c|   13 ++
 arch/arm/mach-omap2/board-omap3evm.c   |   15 ++
 arch/arm/mach-omap2/board-omap3pandora.c   |   13 ++
 arch/arm/mach-omap2/board-overo.c  |   21 ++-
 arch/arm/mach-omap2/usb-ehci.c |  192 
 arch/arm/plat-omap/include/plat/omap34xx.h |6 +
 8 files changed, 265 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/mach-omap2/usb-ehci.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 1d54ad3..5c32b65 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -80,6 +80,7 @@ obj-$(CONFIG_MACH_OMAP_4430SDP)   += 
board-4430sdp.o
 # Platform specific device init code
 obj-y  += usb-musb.o
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
+obj-y  += usb-ehci.o
 
 onenand-$(CONFIG_MTD_ONENAND_OMAP2):= gpmc-onenand.o
 obj-y  += $(onenand-m) $(onenand-y)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index a2abac9..a3c1271 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -484,6 +484,18 @@ static void enable_board_wakeup_source(void)
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
 }
 
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset  = true,
+   .reset_gpio_port[0]  = 57,
+   .reset_gpio_port[1]  = 61,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init omap_3430sdp_init(void)
 {
omap3430_i2c_init();
@@ -500,6 +512,7 @@ static void __init omap_3430sdp_init(void)
usb_musb_init();
board_smc91x_init();
enable_board_wakeup_source();
+   usb_ehci_init(&ehci_pdata);
 }
 
 static void __init omap_3430sdp_map_io(void)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 71a3528..6cb99f6 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -400,6 +400,18 @@ static void __init omap3beagle_flash_init(void)
}
 }
 
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset  = true,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = 147,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init omap3_beagle_init(void)
 {
omap3_beagle_i2c_init();
@@ -413,6 +425,7 @@ static void __init omap3_beagle_init(void)
gpio_direction_output(170, true);
 
usb_musb_init();
+   usb_ehci_init(&ehci_pdata);
omap3beagle_flash_init();
 
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 522ff62..30b25f7 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -297,6 +297,18 @@ static struct platform_device *omap3_evm_devices[] 
__initdata = {
&omap3evm_smc911x_device,
 };
 
+static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset  = true,
+   .reset_gpio_port[0]  = -EINVAL,
+   .reset_gpio_port[1]  = 135,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init omap3_evm_init(void)
 {
omap3_evm_i2c_init();
@@ -312,6 +324,9 @@ static void __init omap3_evm_init(void)
usb_nop_xceiv_register();
 #endif
usb_musb_init();
+   /* Setup EHCI phy reset padconfig */
+   omap_cfg_reg(AF4_34XX_GPIO135_OUT);
+   usb_ehci_init(&ehci_pdata);
ads7846_dev_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 5a38494..581a18d 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -38

[PATCH 01/14] omap: update plat/usb.h to allow ehci driver to build

2009-11-12 Thread Tony Lindgren
From: Anand Gadiyar 

Add missing declarations to allow the recently introduced
ehci-omap driver to build on OMAP3

Signed-off-by: Anand Gadiyar 
Cc: Felipe Balbi 
Signed-off-by: Tony Lindgren 
Signed-off-by: Greg Kroah-Hartman 
---
 arch/arm/plat-omap/include/plat/usb.h |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/usb.h 
b/arch/arm/plat-omap/include/plat/usb.h
index 33e72ca..33a500e 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -5,6 +5,21 @@
 
 #include 
 
+#define OMAP3_HS_USB_PORTS 3
+enum ehci_hcd_omap_mode {
+   EHCI_HCD_OMAP_MODE_UNKNOWN,
+   EHCI_HCD_OMAP_MODE_PHY,
+   EHCI_HCD_OMAP_MODE_TLL,
+};
+
+struct ehci_hcd_omap_platform_data {
+   enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS];
+   unsignedphy_reset:1;
+
+   /* have to be valid if phy_reset is true and portx is in phy mode */
+   int reset_gpio_port[OMAP3_HS_USB_PORTS];
+};
+
 /*-*/
 
 #define OMAP1_OTG_BASE 0xfffb0400
@@ -29,6 +44,8 @@
 
 extern void usb_musb_init(void);
 
+extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata);
+
 #endif
 
 void omap_usb_init(struct omap_usb_config *pdata);

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


[PATCH 00/14] Omap low-level device init updates for 2.6.33

2009-11-12 Thread Tony Lindgren
Hi all,

Here are some patches for review for the upcoming merge window.

This series mostly updates the low-level device init code to
support the new omap processors. Few more clean-up patches are
included too.

Regards,

Tony

---

Anand Gadiyar (1):
  omap: update plat/usb.h to allow ehci driver to build

Felipe Balbi (1):
  omap: Add platform init code for EHCI driver

Felipe Contreras (1):
  omap: iommu: reorganize

Hiroshi DOYU (2):
  omap: iommu: avoid remapping if it's been mapped in MPU side
  omap: iovmm: remove cache flush operation

Kevin Hilman (1):
  omap3: keep SoC features on the same line

Madhu (4):
  omap3630: Add HSMMC related checks
  omap3630: Configure HSMMC1 to 4-bit
  omap3630: Set omap3630 MMC1 I/O speed to 52Mhz
  omap3: HSMMC2 8-bit mux configuration

Paul Walmsley (1):
  omap3: drop all IVA-related address base definitions

Peter Ujfalusi (1):
  omap: McBSP: Do not use extensive spin locks for dma_op_mode

Sriram (1):
  omap3: evm: make HSMMC driver built-in

Tony Lindgren (1):
  omap3: move check_revision above check_features


 arch/arm/configs/omap3_evm_defconfig   |2 
 arch/arm/mach-omap2/Makefile   |1 
 arch/arm/mach-omap2/board-3430sdp.c|   13 ++
 arch/arm/mach-omap2/board-omap3beagle.c|   13 ++
 arch/arm/mach-omap2/board-omap3evm.c   |   15 ++
 arch/arm/mach-omap2/board-omap3pandora.c   |   13 ++
 arch/arm/mach-omap2/board-overo.c  |   21 ++-
 arch/arm/mach-omap2/devices.c  |8 +
 arch/arm/mach-omap2/id.c   |   13 +-
 arch/arm/mach-omap2/mmc-twl4030.c  |   17 ++
 arch/arm/mach-omap2/mux.c  |8 +
 arch/arm/mach-omap2/omap3-iommu.c  |   62 +
 arch/arm/mach-omap2/usb-ehci.c |  192 
 arch/arm/plat-omap/include/plat/control.h  |3 
 arch/arm/plat-omap/include/plat/mux.h  |4 +
 arch/arm/plat-omap/include/plat/omap34xx.h |   11 +-
 arch/arm/plat-omap/include/plat/usb.h  |   17 ++
 arch/arm/plat-omap/iovmm.c |   13 +-
 arch/arm/plat-omap/mcbsp.c |6 -
 19 files changed, 363 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/mach-omap2/usb-ehci.c

-- 
Signature
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[APPLIED] [PATCH] OMAP3: keep SoC features on the same line

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 98c9d913b2387e978432e8df4a97890d83531469

PatchWorks
http://patchwork.kernel.org/patch/59675/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=98c9d913b2387e978432e8df4a97890d83531469


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


[APPLIED] [PATCH] RX51: Add SDRAM init

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): a5ffea111ead0122b8dd7ae61b77a44fea022219

PatchWorks
http://patchwork.kernel.org/patch/56083/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=a5ffea111ead0122b8dd7ae61b77a44fea022219


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


Re: [PATCH] RX51: Add SDRAM init

2009-11-12 Thread Kevin Hilman
Tero Kristo  writes:

> From: Tero Kristo 
>
> This patch adds board specific SDRAM init for RX51. This patch is a
> collaboration of work from following people:
>
> Juha Yrjola: Original code
> Lauri Leukkunen: Port to RX51
> Tero Kristo: Support for multiple OPP:s, merge of patches
> Samu Onkalo: Fixed SDRAM parameters according to specs
> Kalle Jokiniemi: A fix for rounding error
>
> Signed-off-by: Tero Kristo 
> Cc: Samu Onkalo 
> Cc: Kalle Jokiniemi 
> Cc: Lauri Leukkunen 
> Cc: Juha Yrjola 

Signed-off-by: Kevin Hilman 

I've had a hacked version of this in the PM branch for while now.
This one can go into l-o master and I'll drop mine from the PM branch.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: FEATURES prints

2009-11-12 Thread Kevin Hilman
Tony Lindgren  writes:

> * Kevin Hilman  [091013 15:01]:
>> Nishanth Menon  writes:
>> 
>> > Folks,
>> >
>> > With the addition of FEATURES in l-o, the following prints:
>> >  - l2cache : Y
>> >  - iva : Y
>> >  - sgx : Y
>> >  - neon : Y
>> >  - isp : Y
>> >
>> > comes up on SDP3430 -> now that we will introduce half a dozen
>> > features here and there, we will soon clutter this up. we should
>> > introduce a sysfs entry + remove the above noise..
>> >
>> 
>> Like Nishanth, I don't like the multi-line noise here.  The patch
>> below results in a single line output like this instead
>> 
>> OMAP3430/3530 ES3.0 (l2cache iva sgx neon isp )
>> 
>> Not sure why we need to dump features that are not there, but if that
>> s considered important, maybe prefixing each feature with a '+' or '-'
>> would still allow this to be collapsed into a single line.
>> 
>> Even with this, I think adding the display of these features into an
>> OMAP-specific section of /proc/cpuinfo would be even better.
>> 
>> Comments?
>
> I like. Looks like this patch needs to be refreshed.
>

OK, will send refreshed version.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP3: keep SoC features on the same line

2009-11-12 Thread Kevin Hilman
When listing the various SoC features, print them on the same line.
So, instead of this

OMAP3430/3530 ES3.1
 - l2cache : Y
 - iva : Y
 - sgx : Y
 - neon : Y
 - isp : Y

you get this:

OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )

Signed-off-by: Kevin Hilman 
---
Patch applies to current for-next branch.

 arch/arm/mach-omap2/id.c |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 441ca26..128e3f6 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -257,11 +257,8 @@ void __init omap3_check_revision(void)
 }
 
 #define OMAP3_SHOW_FEATURE(feat)   \
-   if (omap3_has_ ##feat()) {  \
-   pr_info (" - "#feat" : Y"); \
-   } else {\
-   pr_info (" - "#feat" : N"); \
-   }
+   if (omap3_has_ ##feat())\
+   printk(#feat" ");
 
 void __init omap3_cpuinfo(void)
 {
@@ -331,13 +328,15 @@ void __init omap3_cpuinfo(void)
/*
 * Print verbose information
 */
-   pr_info("%s ES%s\n", cpu_name, cpu_rev);
+   pr_info("%s ES%s (", cpu_name, cpu_rev);
 
OMAP3_SHOW_FEATURE(l2cache);
OMAP3_SHOW_FEATURE(iva);
OMAP3_SHOW_FEATURE(sgx);
OMAP3_SHOW_FEATURE(neon);
OMAP3_SHOW_FEATURE(isp);
+
+   printk(")\n");
 }
 
 /*
-- 
1.6.5.1

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


[APPLIED] [PATCH v3] omap3-iommu: reorganize

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 295f8ab5e478722a05388c25e73a5549c97312e1

PatchWorks
http://patchwork.kernel.org/patch/59650/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=295f8ab5e478722a05388c25e73a5549c97312e1


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


Re: [PATCH 2/2] omap3evm: Add keypad as wakeup source

2009-11-12 Thread Tony Lindgren
* Sanjeev Premi  [091103 05:30]:
> Add keypad as wakeup source from 'suspend'
> state.

Let's put this one on hold too until the new mux framework is done.

Tony
 
> Signed-off-by: Sanjeev Premi 
> ---
>  arch/arm/mach-omap2/board-omap3evm.c |   12 
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
> b/arch/arm/mach-omap2/board-omap3evm.c
> index 660ef8c..6a1a0cd 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -343,6 +343,16 @@ static struct platform_device *omap3_evm_devices[] 
> __initdata = {
>   &omap3evm_smc911x_device,
>  };
>  
> +/*
> + * Set wakeup sources for the board
> + */
> +static void __init omap3_evm_wakeup_sources(void)
> +{
> + pr_info("omap3evm: Adding wakeup sources");
> +
> + omap_cfg_reg(AF26_34XX_SYS_NIRQ);
> +}
> +
>  static void __init omap3_evm_init(void)
>  {
>   omap3_evm_i2c_init();
> @@ -359,6 +369,8 @@ static void __init omap3_evm_init(void)
>  #endif
>   usb_musb_init();
>   ads7846_dev_init();
> +
> + omap3_evm_wakeup_sources();
>  }
>  
>  static void __init omap3_evm_map_io(void)
> -- 
> 1.6.2.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/3] omap3evm: ehci: Add EHCI padconfig for board Rev >= E

2009-11-12 Thread Tony Lindgren
Hi,

* Ajay Kumar Gupta  [091028 16:12]:
> OMAP3EVM (Rev >= E) has EHCI port on main board itself. Apart from this
> there is a slot to connect Mistral Daughter Card (MDC) to it which also
> has one EHCI port. Only one EHCI port can be used at a time and we can
> choose the port using GPIO61.
> 
> These are the new GPIO lines used for different purpose on EHCI interface.
>   - GPIO21 - EHCI phy reset
>   - GPIO22 - EHCI VBUS enable
>   - GPIO61 - Selects EHCI port either on main board or on Mistral
> Daughter Card (MDC).

Let's put this on hold until we have the new mux framework. Should be
trivial to do then.

Tony
 
> Signed-off-by: Ajay Kumar Gupta 
> 
> ---
> arch/arm/mach-omap2/mux.c |7 +++
>  arch/arm/plat-omap/include/plat/mux.h |5 +
>  2 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index 32c953e..00ad592 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -551,6 +551,13 @@ MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
>  MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
>   OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
>   OMAP34XX_MUX_MODE0)
> +/* EHCI GPIO's on OMAP3EVM (Rev >= E) */
> +MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea,
> + OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
> +MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec,
> + OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
> +MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8,
> + OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
>  };
>  
>  #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
> diff --git a/arch/arm/plat-omap/include/plat/mux.h 
> b/arch/arm/plat-omap/include/plat/mux.h
> index f3c1d8a..8316d4f 100644
> --- a/arch/arm/plat-omap/include/plat/mux.h
> +++ b/arch/arm/plat-omap/include/plat/mux.h
> @@ -840,6 +840,11 @@ enum omap34xx_index {
>  
>   /* SYS_NIRQ T2 INT1 */
>   AF26_34XX_SYS_NIRQ,
> +
> + /* EHCI GPIO's for OMAP3EVM (Rev >= E) */
> + AH14_34XX_GPIO21,
> + AF9_34XX_GPIO22,
> + U3_34XX_GPIO61,
>  };
>  
>  struct omap_mux_cfg {
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.

2009-11-12 Thread Tony Lindgren
* Govindarajan, Sriramakrishnan  [09 00:12]:
> Tony,
> Are there comments with respect to this patch. Will this be merged in the 
> next window?

Looks OK to me, but needs to be refreshed against omap for-next to apply.

Tony

> Regards
> Sriram
> 
> > -Original Message-
> > From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> > ow...@vger.kernel.org] On Behalf Of Govindarajan, Sriramakrishnan
> > Sent: Wednesday, October 28, 2009 7:19 PM
> > To: linux-omap@vger.kernel.org
> > Cc: Govindarajan, Sriramakrishnan
> > Subject: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.
> > 
> > Migrate to smsc911x ethernet driver instead of smc911x driver.
> > The smsc911x ethernet driver supports NAPI and performs better
> > under heavy traffic. With the smc911x driver we were witnessing
> > very high iowait time for high IO load over NFS.
> > 
> > Signed-off-by: Sriramakrishnan 
> > ---
> > This patch is generated against tip of for-next branch.
> > 
> >  arch/arm/configs/omap3_evm_defconfig |4 +-
> >  arch/arm/mach-omap2/board-omap3evm.c |   36
> > +
> >  2 files changed, 29 insertions(+), 11 deletions(-)
> > 
> > diff --git a/arch/arm/configs/omap3_evm_defconfig
> > b/arch/arm/configs/omap3_evm_defconfig
> > index d5ff477..50afc67 100644
> > --- a/arch/arm/configs/omap3_evm_defconfig
> > +++ b/arch/arm/configs/omap3_evm_defconfig
> > @@ -617,8 +617,8 @@ CONFIG_MII=y
> >  # CONFIG_DM9000 is not set
> >  # CONFIG_ENC28J60 is not set
> >  # CONFIG_ETHOC is not set
> > -CONFIG_SMC911X=y
> > -# CONFIG_SMSC911X is not set
> > +# CONFIG_SMC911X is not set
> > +CONFIG_SMSC911X=y
> >  # CONFIG_DNET is not set
> >  # CONFIG_IBM_NEW_EMAC_ZMII is not set
> >  # CONFIG_IBM_NEW_EMAC_RGMII is not set
> > diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-
> > omap2/board-omap3evm.c
> > index 5d2310e..9bcdaf7 100644
> > --- a/arch/arm/mach-omap2/board-omap3evm.c
> > +++ b/arch/arm/mach-omap2/board-omap3evm.c
> > @@ -21,11 +21,13 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> > 
> >  #include 
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> > 
> >  #include 
> > 
> > @@ -51,7 +53,8 @@
> >  #define OMAP3EVM_ETHR_GPIO_IRQ 176
> >  #define OMAP3EVM_SMC911X_CS5
> > 
> > -static struct resource omap3evm_smc911x_resources[] = {
> > +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
> > +static struct resource omap3evm_smsc911x_resources[] = {
> > [0] =   {
> > .start  = OMAP3EVM_ETHR_START,
> > .end= (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
> > @@ -60,18 +63,28 @@ static struct resource
> > omap3evm_smc911x_resources[] = {
> > [1] =   {
> > .start  = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
> > .end= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
> > -   .flags  = IORESOURCE_IRQ,
> > +   .flags  = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
> > },
> >  };
> > 
> > -static struct platform_device omap3evm_smc911x_device = {
> > -   .name   = "smc911x",
> > +static struct smsc911x_platform_config smsc911x_config = {
> > +   .phy_interface  = PHY_INTERFACE_MODE_MII,
> > +   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
> > +   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
> > +   .flags  = (SMSC911X_USE_32BIT |
> > SMSC911X_SAVE_MAC_ADDRESS),
> > +};
> > +
> > +static struct platform_device omap3evm_smsc911x_device = {
> > +   .name   = "smsc911x",
> > .id = -1,
> > -   .num_resources  = ARRAY_SIZE(omap3evm_smc911x_resources),
> > -   .resource   = &omap3evm_smc911x_resources[0],
> > +   .num_resources  = ARRAY_SIZE(omap3evm_smsc911x_resources),
> > +   .resource   = &omap3evm_smsc911x_resources[0],
> > +   .dev= {
> > +   .platform_data = &smsc911x_config,
> > +   },
> >  };
> > 
> > -static inline void __init omap3evm_init_smc911x(void)
> > +static inline void __init omap3evm_init_smsc911x(void)
> >  {
> > int eth_cs;
> > struct clk *l3ck;
> > @@ -92,8 +105,14 @@ static inline void __init
> > omap3evm_init_smc911x(void)
> > }
> > 
> > gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
> > +
> > +   platform_device_register(&omap3evm_smsc911x_device);
> >  }
> > 
> > +#else
> > +static inline void __init omap3evm_init_smsc911x(void) { return; }
> > +#endif
> > +
> >  static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
> > .supply = "vmmc",
> >  };
> > @@ -335,12 +354,10 @@ static void __init omap3_evm_init_irq(void)
> > omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
> > omap_init_irq();
> > omap_gpio_init();
> > -   omap3evm_init_smc911x();
> >  }
> > 
> >  static struct platform_device *omap3_evm_devices[] __initdata = {
> > &omap3_evm_lcd_device,
> > -   &omap3evm_smc911x_device,
> >  };
> > 
> >  static void __init omap3_evm_init(void)
> > @@ -359,6 +376,7 @@ static void __init omap3_evm_init

[APPLIED] [PATCH] omap3evm: Add board revision function

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 35bb10f7c977e01e499546c5754df1c7257b87e1

PatchWorks
http://patchwork.kernel.org/patch/56274/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=35bb10f7c977e01e499546c5754df1c7257b87e1


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


[APPLIED] [PATCH] Fixing keymap for zoom2 according to matrix keypad framwork

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 954f2a12bee18db3fca8cfdcf988499d0c4d9ae7

PatchWorks
http://patchwork.kernel.org/patch/59541/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=954f2a12bee18db3fca8cfdcf988499d0c4d9ae7


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


Re: MMC related patches

2009-11-12 Thread Tony Lindgren
* Madhusudhan  [091112 14:21]:
> 
> 
> > -Original Message-
> > From: Tony Lindgren [mailto:t...@atomide.com]
> > Sent: Wednesday, November 11, 2009 8:30 PM
> > To: Madhusudhan
> > Cc: linux-omap@vger.kernel.org
> > Subject: Re: MMC related patches
> > 
> > * Madhusudhan  [09 16:02]:
> > > Hi Tony,
> > >
> > > Just a ping on the below patches. I did not see any comments on them.
> > Are
> > > you planning to push them?
> > >
> > > Regards,
> > > Madhu
> > >
> > > http://marc.info/?l=linux-omap&m=125668573422479&w=2
> > > http://marc.info/?l=linux-omap&m=125624185318767&w=2
> > 
> > OK, adding.
> > 
> > > http://marc.info/?l=linux-omap&m=125623349405262&w=2
> > 
> > This needs to be refreshed against board-zoom-peripherals.c now
> > in omap for-next. But if it depends on 3630 mux patch,
> > let's wait on that until we have the new mux framework.
> > 
> Sure, I will rebase and send a new patch. It should not have any dependency
> on 3630 mux patch.

OK, thanks.
 
> > > http://marc.info/?l=linux-omap&m=125623339105103&w=2
> > > http://marc.info/?l=linux-omap&m=125623327504912&w=2
> > 
> > Adding.
> > 
> > Also, this needs to be refreshed:
> > 
> > http://patchwork.kernel.org/patch/45196/
> > 
> This one is an omap4 mmc patch which is already in the tree. Why does this
> need to be refreshed?

Oops, never mind, I'm out of date again :)

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


[APPLIED] [PATCH 2/2] AM35xx: Defconfig for AM3517 EVM board

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 51498d8fc650e4384f352b80cc7cd1b7adfb438c

PatchWorks
http://patchwork.kernel.org/patch/56295/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=51498d8fc650e4384f352b80cc7cd1b7adfb438c


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


[APPLIED] [PATCH v2 1/2] Revert "[IA64] prevent ia64 from invoking irq

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 742eb23e178bf582b4a35633fc5470cbe7785166

PatchWorks
http://patchwork.kernel.org/patch/6295/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=742eb23e178bf582b4a35633fc5470cbe7785166


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


[APPLIED] [PATCH 1/2] AM35xx: Add support for AM3517 EVM board

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 1f34795d7cecb2824f3146405cab8aaa4ab6e6d6

PatchWorks
http://patchwork.kernel.org/patch/56294/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=1f34795d7cecb2824f3146405cab8aaa4ab6e6d6


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


Re: [PATCH 1/2] ARM: OMAP3: Add support for the IGEP v2 board (rev B)

2009-11-12 Thread Tony Lindgren
* Enric Balletbò i Serra  [091014 01:48]:
> This patch adds minimal IGEP v2 support.
> 
> The IGEP v2 board is a low-cost, fan-less and industrial temperature
> range single board computer that unleashes laptop-like performance and
> expandability without the bulk, expense, or noise of typical desktop
> machines. Its architecture shares much in common with other OMAP3 boards.

Can you please refresh against the for-next branch in linux-omap and
repost?

Thanks,

Tony
 
> Signed-off-by: Enric Balletbo i Serra 
> ---
>  arch/arm/mach-omap2/Kconfig  |4 +
>  arch/arm/mach-omap2/Makefile |2 +
>  arch/arm/mach-omap2/board-igep0020.c |  252 
> ++
>  3 files changed, 258 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-igep0020.c
> 
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 75b1c7e..9936510 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -85,6 +85,10 @@ config MACH_OMAP_ZOOM2
>   bool "OMAP3 Zoom2 board"
>   depends on ARCH_OMAP3 && ARCH_OMAP34XX
> 
> +config MACH_IGEP0020
> + bool "IGEP0020"
> + depends on ARCH_OMAP3 && ARCH_OMAP34XX
> +
>  config MACH_OMAP_4430SDP
>   bool "OMAP 4430 SDP board"
>   depends on ARCH_OMAP4
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 6b7702f..df0bdc4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -74,6 +74,8 @@ obj-$(CONFIG_MACH_NOKIA_RX51)   += board-rx51.o 
> \
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)+= board-zoom2.o \
>  mmc-twl4030.o \
>  board-zoom-debugboard.o
> +obj-$(CONFIG_MACH_IGEP0020)  += board-igep0020.o \
> +mmc-twl4030.o \
> 
>  obj-$(CONFIG_MACH_OMAP_4430SDP)  += board-4430sdp.o
> 
> diff --git a/arch/arm/mach-omap2/board-igep0020.c
> b/arch/arm/mach-omap2/board-igep0020.c
> new file mode 100644
> index 000..15175e0
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-igep0020.c
> @@ -0,0 +1,252 @@
> +/*
> + * Copyright (C) 2009 Integration Software and Electronic Engineering.
> + *
> + * Modified from mach-omap2/board-generic.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 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "mmc-twl4030.h"
> +
> +#define IGEP2_SMSC911X_CS   5
> +#define IGEP2_SMSC911X_GPIO 176
> +#define IGEP2_GPIO_LED_0_RED 26
> +#define IGEP2_GPIO_LED_0_GREEN   27
> +#define IGEP2_GPIO_LED_1_RED 28
> +
> +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
> +
> +#include 
> +
> +static struct resource igep2_smsc911x_resources[] = {
> + {
> + .name   = "smsc911x-memory",
> + .flags  = IORESOURCE_MEM,
> + },
> + {
> + .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
> + },
> +};
> +
> +static struct smsc911x_platform_config igep2_smsc911x_config = {
> + .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
> + .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
> + .flags  = SMSC911X_USE_32BIT ,
> + .phy_interface  = PHY_INTERFACE_MODE_MII,
> +};
> +
> +static struct platform_device igep2_smsc911x_device = {
> + .name   = "smsc911x",
> + .id = -1,
> + .num_resources  = ARRAY_SIZE(igep2_smsc911x_resources),
> + .resource   = igep2_smsc911x_resources,
> + .dev= {
> + .platform_data = &igep2_smsc911x_config,
> + },
> +};
> +
> +static inline void __init igep2_init_smsc911x(void)
> +{
> + unsigned long cs_mem_base;
> +
> + if (gpmc_cs_request(IGEP2_SMSC911X_CS, SZ_16M, &cs_mem_base) < 0) {
> + pr_warning("igep2_init_smsc911x: "
> +"Failed request for GPMC mem\n");
> + gpmc_cs_free(IGEP2_SMSC911X_CS);
> + return;
> + }
> +
> + igep2_smsc911x_resources[0].start = cs_mem_base + 0x0;
> + igep2_smsc911x_resources[0].end   = cs_mem_base + 0xff;
> +
> + if ((gpio_request(IGEP2_SMSC911X_GPIO, "SMSC911X IRQ") == 0) &&
> + (gpio_direction_input(IGEP2_SMSC911X_GPIO) == 0)) {
> + gpio_export(IGEP2_SMSC911X_GPIO, 0);
> + } else {
> + pr_warning("igep2_init_smsc911x: "
> +"Could not obtain gpio for IRQ\n");
> + return;
> + }
> +
> + igep2_smsc911x_resources[1].start = OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO);
> + igep2_smsc911x_resources[1].end   = 0;
> +
> + platform_device_register(&igep2_s

Re: [PATCH V3] [OMAP] GPIO module enable/disable

2009-11-12 Thread Tony Lindgren
* ch...@ti.com  [091110 04:28]:
> From: Charulatha V 
> 
> This patch disables a GPIO module when all pins of a GPIO
> module are inactive (clock gating forced at module level) and
> enables the module when any gpio in the module is requested.
> 
> The module is enabled only when "mod_usage" indicates that no GPIO
> in that module is currently active and the GPIO being requested
> is the 1st one to be active in that module.
> 
> Each module would be disabled in omap_gpio_free() API when all
> GPIOs in a particular module becomes inactive. The module is
> re-enabled in omap_gpio_request() API when a GPIO is requested
> from the module that was previously disabled.
> 
> Since individual GPIO's bookkeeping is added in this patch
> via "mod_usage", the same is used in omap_set_gpio_debounce()
> & omap_set_gpio_debounce_time() APIs to ensure that the gpio being
> used is actually "requested" prior to being used (Nishant Menon's
> Suggestion )
> 
> GPIO module level details are specific to hardware and hence
> introducing this patch in low level layer (plat-omap/gpio.c)

Looks like this needs to be refreshed against current for-next
branch in linux-omap.

Regards,

Tony
 
> Signed-off-by: Charulatha V 
> Acked-by: Nishanth Menon 
> ---
>  arch/arm/plat-omap/gpio.c |   32 
>  1 files changed, 32 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 4c35f9f..06a391b 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -199,6 +199,7 @@ struct gpio_bank {
>   struct gpio_chip chip;
>   struct clk *dbck;
>   u32 dbck_enable_mask;
> + u32 mod_usage;
>  };
>  
>  #define METHOD_MPUIO 0
> @@ -690,6 +691,10 @@ void omap_set_gpio_debounce(int gpio, int enable)
>  #else
>   reg += OMAP24XX_GPIO_DEBOUNCE_EN;
>  #endif
> + if (!(bank->mod_usage & l)) {
> + printk(KERN_ERR "GPIO %d not requested\n", gpio);
> + return;
> + }
>  
>   spin_lock_irqsave(&bank->lock, flags);
>   val = __raw_readl(reg);
> @@ -726,6 +731,11 @@ void omap_set_gpio_debounce_time(int gpio, int enc_time)
>   bank = get_gpio_bank(gpio);
>   reg = bank->base;
>  
> + if (!bank->mod_usage) {
> + printk(KERN_ERR "GPIO not requested\n");
> + return;
> + }
> +
>   enc_time &= 0xff;
>  #ifdef CONFIG_ARCH_OMAP4
>   reg += OMAP4_GPIO_DEBOUNCINGTIME;
> @@ -1219,6 +1229,16 @@ static int omap_gpio_request(struct gpio_chip *chip, 
> unsigned offset)
>   __raw_writel(__raw_readl(reg) | (1 << offset), reg);
>   }
>  #endif
> + if (!cpu_class_is_omap1()) {
> + if (!bank->mod_usage) {
> + u32 ctrl;
> + ctrl = __raw_readl(bank->base + OMAP24XX_GPIO_CTRL);
> + ctrl &= 0xFFFE;
> + /* Module is enabled, clocks are not gated */
> + __raw_writel(ctrl, bank->base + OMAP24XX_GPIO_CTRL);
> + }
> + bank->mod_usage |= 1 << offset;
> + }
>   spin_unlock_irqrestore(&bank->lock, flags);
>  
>   return 0;
> @@ -1245,6 +1265,16 @@ static void omap_gpio_free(struct gpio_chip *chip, 
> unsigned offset)
>   __raw_writel(1 << offset, reg);
>   }
>  #endif
> + if (!cpu_class_is_omap1()) {
> + bank->mod_usage &= ~(1 << offset);
> + if (!bank->mod_usage) {
> + u32 ctrl;
> + ctrl = __raw_readl(bank->base + OMAP24XX_GPIO_CTRL);
> + /* Module is disabled, clocks are gated */
> + ctrl |= 1;
> + __raw_writel(ctrl, bank->base + OMAP24XX_GPIO_CTRL);
> + }
> + }
>   _reset_gpio(bank, bank->chip.base + offset);
>   spin_unlock_irqrestore(&bank->lock, flags);
>  }
> @@ -1879,6 +1909,8 @@ static int __init _omap_gpio_init(void)
>   gpio_count = 32;
>   }
>  #endif
> +
> + bank->mod_usage = 0;
>   /* REVISIT eventually switch from OMAP-specific gpio structs
>* over to the generic ones
>*/
> -- 
> 1.6.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: MMC related patches

2009-11-12 Thread Madhusudhan


> -Original Message-
> From: Tony Lindgren [mailto:t...@atomide.com]
> Sent: Wednesday, November 11, 2009 8:30 PM
> To: Madhusudhan
> Cc: linux-omap@vger.kernel.org
> Subject: Re: MMC related patches
> 
> * Madhusudhan  [09 16:02]:
> > Hi Tony,
> >
> > Just a ping on the below patches. I did not see any comments on them.
> Are
> > you planning to push them?
> >
> > Regards,
> > Madhu
> >
> > http://marc.info/?l=linux-omap&m=125668573422479&w=2
> > http://marc.info/?l=linux-omap&m=125624185318767&w=2
> 
> OK, adding.
> 
> > http://marc.info/?l=linux-omap&m=125623349405262&w=2
> 
> This needs to be refreshed against board-zoom-peripherals.c now
> in omap for-next. But if it depends on 3630 mux patch,
> let's wait on that until we have the new mux framework.
> 
Sure, I will rebase and send a new patch. It should not have any dependency
on 3630 mux patch.

> > http://marc.info/?l=linux-omap&m=125623339105103&w=2
> > http://marc.info/?l=linux-omap&m=125623327504912&w=2
> 
> Adding.
> 
> Also, this needs to be refreshed:
> 
> http://patchwork.kernel.org/patch/45196/
> 
This one is an omap4 mmc patch which is already in the tree. Why does this
need to be refreshed?

Regards,
Madhu
 
> Thanks for summarizing the patches, that always helps.
> Maybe use patchwork.kernel.org links the next time,
> as I can directly apply from those?
> 
> Or even better, just set a git branch against some static
> commit :) (Not against for-next as that's still changing)
> 
> BTW, some of these patches I had to unwrap manually again..
> 
> Regards,
> 
> Tony


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


Re: [PATCH] omap3: Change the default silicon

2009-11-12 Thread Tony Lindgren
* Sanjeev Premi  [091029 07:35]:
> Currently the default silicon - in absence of
> identification - is set to OMAP3630 ES1.0.
> 
> Though, condition may/should not arise; but
> the default should be latest in the most
> common silicon variant - currently OMAP3430
> ES3.1.

Is this still needed? To me it seems more likely there will
more 3630 based silicon than 3430 based silicon?

Regards,

Tony
 
> Signed-off-by: Sanjeev Premi 
> ---
>  arch/arm/mach-omap2/id.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 1c15112..0162623 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -243,8 +243,8 @@ void __init omap3_check_revision(void)
>   }
>   break;
>   default:
> - /* Unknown default to latest silicon rev as default*/
> - omap_revision = OMAP3630_REV_ES1_0;
> + /* Unknown. Default to latest among all variants */
> + omap_revision = OMAP3430_REV_ES3_1;
>   }
>  }
>  
> -- 
> 1.6.2.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[APPLIED] [PATCH] OMAP3: drop all IVA-related address base definitions

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 815c0a2288781c9a2d2495824fad3afc820c7a91

PatchWorks
http://patchwork.kernel.org/patch/56403/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=815c0a2288781c9a2d2495824fad3afc820c7a91


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


[APPLIED] [PATCH] OMAP: McBSP: Do not use extensive spin locks for dma_op_mode

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): e1d8daf0013a8c6dd9f53dbde4c80f4723dee85f

PatchWorks
http://patchwork.kernel.org/patch/56075/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=e1d8daf0013a8c6dd9f53dbde4c80f4723dee85f


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


[APPLIED] [PATCH 12/14] arch/arm/plat-omap: Drop an unnecessary NULL test

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: omap-testing

Initial commit ID (Likely to change): d067810bbe621c19ab96e913877c90b1b2e8bcc1

PatchWorks
http://patchwork.kernel.org/patch/54504/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=d067810bbe621c19ab96e913877c90b1b2e8bcc1


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


[APPLIED] [PATCH 1/2] OMAP3: move check_revision above check_features

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): fbb9e29aa28c779f48c9af03988c602e2ed7c5bb

PatchWorks
http://patchwork.kernel.org/patch/54925/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=fbb9e29aa28c779f48c9af03988c602e2ed7c5bb


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


Re: [PATCH V2] FIX OMAP3:McBSP poll read and write for OMAP3

2009-11-12 Thread Tony Lindgren
* ch...@ti.com  [091019 23:41]:
> omap_mcbsp_pollwrite and omap_mcbsp_pollread functions access
> McBSP registers as 16-bit registers.
> 
> In OMAP3, McBSP registers (DRR_REG and DXR_REG) are limited to
> 32-bit data accesses (L4 Interconnect). 16-bit and 8-bit is
> not allowed and can corrupt register content.
> 
> This patch adds omap3_mcbsp_pollwrite and
> omap3_mcbsp_pollread functions for OMAP3 cpu, inorder to
> perform 32 bit access of above mentioned McBSP registers.

How about making the functions generic, I don't think we want
to have separate omap1_mcbsp_pollread, omap2_mcbsp_pollread,
omap3_mcbsp_pollread..

If it's not obvious how to implement it for some omap, just
return an error based on the CPU type.

Regards,

Tony
 
> Signed-off-by: Charulatha V 
> Signed-off-by: Syed Rafiuddin 
> ---
>  arch/arm/plat-omap/include/mach/mcbsp.h |4 +
>  arch/arm/plat-omap/mcbsp.c  |   92 
> ++-
>  2 files changed, 95 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h 
> b/arch/arm/plat-omap/include/mach/mcbsp.h
> index 0c5f937..b0f9260 100644
> --- a/arch/arm/plat-omap/include/mach/mcbsp.h
> +++ b/arch/arm/plat-omap/include/mach/mcbsp.h
> @@ -406,6 +406,10 @@ void omap_mcbsp_set_spi_mode(unsigned int id, const 
> struct omap_mcbsp_spi_cfg *
>  /* Polled read/write functions */
>  int omap_mcbsp_pollread(unsigned int id, u16 * buf);
>  int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
> +
> +int omap3_mcbsp_pollread(unsigned int id, u32 *buf);
> +int omap3_mcbsp_pollwrite(unsigned int id, u32 buf);
> +
>  int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type);
>  
>  #endif
> diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
> index b6b520d..1212d11 100644
> --- a/arch/arm/plat-omap/mcbsp.c
> +++ b/arch/arm/plat-omap/mcbsp.c
> @@ -425,7 +425,7 @@ void omap_mcbsp_stop(unsigned int id)
>  }
>  EXPORT_SYMBOL(omap_mcbsp_stop);
>  
> -/* polled mcbsp i/o operations */
> +/* polled mcbsp i/o operations for omap1 and omap2420 */
>  int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
>  {
>   struct omap_mcbsp *mcbsp;
> @@ -515,6 +515,96 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf)
>  }
>  EXPORT_SYMBOL(omap_mcbsp_pollread);
>  
> +/* polled mcbsp i/o operations for omap3 */
> +int omap3_mcbsp_pollwrite(unsigned int id, u32 buf)
> +{
> + struct omap_mcbsp *mcbsp;
> + void __iomem *base;
> +
> + if (!omap_mcbsp_check_valid_id(id)) {
> + printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
> + return -ENODEV;
> + }
> +
> + mcbsp = id_to_mcbsp_ptr(id);
> + base = mcbsp->io_base;
> +
> + OMAP_MCBSP_WRITE(base, DXR, buf);
> + /* if frame sync error - clear the error */
> + if (OMAP_MCBSP_READ(base, SPCR2) & XSYNC_ERR) {
> + /* clear error */
> + OMAP_MCBSP_WRITE(base, SPCR2, OMAP_MCBSP_READ(base, SPCR2)
> + & (~XSYNC_ERR));
> + /* resend */
> + return -EPERM;
> + } else {
> + /* wait for transmit confirmation */
> + int attemps = 0;
> + while (!(OMAP_MCBSP_READ(base, SPCR2) & XRDY)) {
> + if (attemps++ > 1000) {
> + OMAP_MCBSP_WRITE(base, SPCR2,
> + OMAP_MCBSP_READ(base, SPCR2) &
> + (~XRST));
> + udelay(10);
> + OMAP_MCBSP_WRITE(base, SPCR2,
> + OMAP_MCBSP_READ(base, SPCR2) |
> + (XRST));
> + udelay(10);
> + dev_err(mcbsp->dev, "Could not write to"
> + " McBSP%d Register\n", mcbsp->id);
> + return -ENOENT;
> + }
> + }
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(omap3_mcbsp_pollwrite);
> +
> +int omap3_mcbsp_pollread(unsigned int id, u32 *buf)
> +{
> + struct omap_mcbsp *mcbsp;
> + void __iomem *base;
> +
> + if (!omap_mcbsp_check_valid_id(id)) {
> + printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
> + return -ENODEV;
> + }
> + mcbsp = id_to_mcbsp_ptr(id);
> +
> + base = mcbsp->io_base;
> + /* if frame sync error - clear the error */
> + if (OMAP_MCBSP_READ(base, SPCR1) & RSYNC_ERR) {
> + /* clear error */
> + OMAP_MCBSP_WRITE(base, SPCR1, OMAP_MCBSP_READ(base, SPCR1)
> + & (~RSYNC_ERR));
> + /* resend */
> + return -EPERM;
> + } else {
> + /* wait for recieve confirmation */
> + int attemps = 0;
> + while (!(OMAP_MCBSP_READ(base, SPCR1) & RRDY)) {
> + if (attemps++ > 1000) {
> +   

Re: [lm-sensors] [RFC PATCH 1/3] hwmon:driver support for Kionix kxte9 accelerometer

2009-11-12 Thread Jonathan Cameron
Hi Chris, 

Obviously a few things will change with your move over to input, but as I have
a few mins and might not then, here are a few comments.

The ones I'd really like to see acted upon are

*removing the global pointer that
restricts you to one device (all hell will break loose if you add a second one
currently!)
*Explanation or removal of the various 'retries' on the i2c bus. 
*justification or removal of the dedicated work queue
*Clean up and documenation of the platform data.

More detailed comments inline.

Do copy me in when you post version for input.

Thanks,

Jonathan

> From: Chris Hudson 
> 
> This is a request for comments for adding driver support for the Kionix KXTE9 
> digital tri-axis accelerometer.  This part features built-in tilt position 
> (orientation), wake-up and back-to-sleep algorithms, which can trigger a 
> user-configurable physical interrupt.  The driver uses i2c for device 
> communication, a misc node for IOCTLs, and input nodes for reporting 
> acceleration data and interrupt status information.
> 
> Signed-off-by: Chris Hudson 
> ---
>  drivers/hwmon/Kconfig  |   10 +
>  drivers/hwmon/Makefile |1 +
>  drivers/hwmon/kxte9.c  |  998 
> 
>  include/linux/kxte9.h  |   95 +
>  4 files changed, 1104 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/hwmon/kxte9.c
>  create mode 100644 include/linux/kxte9.h
> 
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 700e93a..f52e141 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -419,6 +419,16 @@ config SENSORS_IT87
> This driver can also be built as a module.  If so, the module
> will be called it87.
>  
> +config SENSORS_KXTE9
> + tristate "Kionix KXTE9 tri-axis digital accelerometer"
> + depends on I2C && SYSFS
> + help
> +   If you say yes here you get support for the Kionix KXTE9 digital
> +   tri-axis accelerometer.
> +
> +   This driver can also be built as a module.  If so, the module
> +   will be called kxte9.
> +
>  config SENSORS_LM63
>   tristate "National Semiconductor LM63"
>   depends on I2C
> diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
> index 9f46cb0..65ce35e 100644
> --- a/drivers/hwmon/Makefile
> +++ b/drivers/hwmon/Makefile
> @@ -53,6 +53,7 @@ obj-$(CONFIG_SENSORS_IBMAEM)+= ibmaem.o
>  obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o
>  obj-$(CONFIG_SENSORS_IT87)   += it87.o
>  obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
> +obj-$(CONFIG_SENSORS_KXTE9)  += kxte9.o
>  obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o hp_accel.o
>  obj-$(CONFIG_SENSORS_LIS3_SPI)   += lis3lv02d.o lis3lv02d_spi.o
>  obj-$(CONFIG_SENSORS_LM63)   += lm63.o
> diff --git a/drivers/hwmon/kxte9.c b/drivers/hwmon/kxte9.c
> new file mode 100644
> index 000..29df50e
> --- /dev/null
> +++ b/drivers/hwmon/kxte9.c
> @@ -0,0 +1,998 @@
> +/*
> + * Copyright (C) 2009 Kionix, Inc.
> + * Written by Chris Hudson 
> + *
> + * 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.
> + *
> + * 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 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define NAME "kxte9"
> +#define G_MAX2000
> +/* OUTPUT REGISTERS */
> +#define XOUT 0x12
> +#define INT_STATUS_REG   0x16
> +#define INT_SRC_REG2 0x17
> +#define TILT_POS_CUR 0x10
> +#define TILT_POS_PRE 0x11
> +#define INT_REL  0x1A
> +/* CONTROL REGISTERS */
> +#define CTRL_REG10x1B
> +#define CTRL_REG30x1D
> +#define INT_CTRL10x1E
> +#define TILT_TIMER   0x28
> +#define WUF_TIMER0x29
> +#define B2S_TIMER0x2A
> +#define WUF_THRESH   0x5A
> +#define B2S_THRESH   0x5B
> +/* CONTROL REGISTER 1 BITS */
> +#define PC1_OFF  0x00
> +#define PC1_ON   0x80
> +/* INTERRUPT SOURCE 1 BITS */
> +#define TPS  0x01
> +#define WUFS 0x02
> +#define B2SS 0x04
> +/* INPUT_ABS CONSTANTS */
> +#define FUZZ 32
> +#define FLAT 32
> +#define I2C_RETRY_DELAY  5
> +#define I2C_RETRIES 

Re: FEATURES prints

2009-11-12 Thread Tony Lindgren
* Kevin Hilman  [091013 15:01]:
> Nishanth Menon  writes:
> 
> > Folks,
> >
> > With the addition of FEATURES in l-o, the following prints:
> >  - l2cache : Y
> >  - iva : Y
> >  - sgx : Y
> >  - neon : Y
> >  - isp : Y
> >
> > comes up on SDP3430 -> now that we will introduce half a dozen
> > features here and there, we will soon clutter this up. we should
> > introduce a sysfs entry + remove the above noise..
> >
> 
> Like Nishanth, I don't like the multi-line noise here.  The patch
> below results in a single line output like this instead
> 
> OMAP3430/3530 ES3.0 (l2cache iva sgx neon isp )
> 
> Not sure why we need to dump features that are not there, but if that
> s considered important, maybe prefixing each feature with a '+' or '-'
> would still allow this to be collapsed into a single line.
> 
> Even with this, I think adding the display of these features into an
> OMAP-specific section of /proc/cpuinfo would be even better.
> 
> Comments?

I like. Looks like this patch needs to be refreshed.

Tony
 
> Kevin
> 
> 
> commit 24f7422bad970cea2ed71d71e3994eeed70f175f
> Author: Kevin Hilman 
> Date:   Tue Oct 13 14:42:00 2009 -0700
> 
> OMAP3: collapse chip feature prints to single line
> 
> Signed-off-by: Kevin Hilman 
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 71d5568..b90fcf1 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -249,11 +249,8 @@ void __init omap3_check_revision(void)
>  }
>  
>  #define OMAP3_SHOW_FEATURE(feat) \
> - if (omap3_has_ ##feat()) {  \
> - pr_info (" - "#feat" : Y"); \
> - } else {\
> - pr_info (" - "#feat" : N"); \
> - }
> + if (omap3_has_ ##feat())\
> + printk (#feat" ");  \
>  
>  void __init omap3_cpuinfo(void)
>  {
> @@ -307,13 +304,14 @@ void __init omap3_cpuinfo(void)
>   /*
>* Print verbose information
>*/
> - pr_info("OMAP%s ES%s\n", cpu_name, cpu_rev);
> + pr_info("OMAP%s ES%s (", cpu_name, cpu_rev);
>  
>   OMAP3_SHOW_FEATURE(l2cache);
>   OMAP3_SHOW_FEATURE(iva);
>   OMAP3_SHOW_FEATURE(sgx);
>   OMAP3_SHOW_FEATURE(neon);
>   OMAP3_SHOW_FEATURE(isp);
> + printk(")\n");
>  }
>  
>  /*
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3] omap3-iommu: reorganize

2009-11-12 Thread Felipe Contreras
This way it's more object oriented and easier to see what is happening.
No functional changes.

Signed-off-by: Felipe Contreras 
---
 arch/arm/mach-omap2/omap3-iommu.c |   62 ++--
 1 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/arch/arm/mach-omap2/omap3-iommu.c 
b/arch/arm/mach-omap2/omap3-iommu.c
index 6a9bf4f..fbbcb5c 100644
--- a/arch/arm/mach-omap2/omap3-iommu.c
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -14,47 +14,50 @@
 
 #include 
 
-#define OMAP3_MMU1_BASE0x480bd400
-#define OMAP3_MMU2_BASE0x5d00
-#define OMAP3_MMU1_IRQ 24
-#define OMAP3_MMU2_IRQ 28
-
-
-static unsigned long iommu_base[] __initdata = {
-   OMAP3_MMU1_BASE,
-   OMAP3_MMU2_BASE,
-};
-
-static int iommu_irq[] __initdata = {
-   OMAP3_MMU1_IRQ,
-   OMAP3_MMU2_IRQ,
+struct iommu_device {
+   resource_size_t base;
+   int irq;
+   struct iommu_platform_data pdata;
+   struct resource res[2];
 };
 
-static const struct iommu_platform_data omap3_iommu_pdata[] __initconst = {
+static struct iommu_device devices[] = {
{
-   .name = "isp",
-   .nr_tlb_entries = 8,
-   .clk_name = "cam_ick",
+   .base = 0x480bd400,
+   .irq = 24,
+   .pdata = {
+   .name = "isp",
+   .nr_tlb_entries = 8,
+   .clk_name = "cam_ick",
+   },
},
 #if defined(CONFIG_MPU_BRIDGE_IOMMU)
{
-   .name = "iva2",
-   .nr_tlb_entries = 32,
-   .clk_name = "iva2_ck",
+   .base = 0x5d00,
+   .irq = 28,
+   .pdata = {
+   .name = "iva2",
+   .nr_tlb_entries = 32,
+   .clk_name = "iva2_ck",
+   },
},
 #endif
 };
-#define NR_IOMMU_DEVICES ARRAY_SIZE(omap3_iommu_pdata)
+#define NR_IOMMU_DEVICES ARRAY_SIZE(devices)
 
 static struct platform_device *omap3_iommu_pdev[NR_IOMMU_DEVICES];
 
 static int __init omap3_iommu_init(void)
 {
int i, err;
+   struct resource res[] = {
+   { .flags = IORESOURCE_MEM },
+   { .flags = IORESOURCE_IRQ },
+   };
 
for (i = 0; i < NR_IOMMU_DEVICES; i++) {
struct platform_device *pdev;
-   struct resource res[2];
+   const struct iommu_device *d = &devices[i];
 
pdev = platform_device_alloc("omap-iommu", i);
if (!pdev) {
@@ -62,19 +65,16 @@ static int __init omap3_iommu_init(void)
goto err_out;
}
 
-   memset(res, 0,  sizeof(res));
-   res[0].start = iommu_base[i];
-   res[0].end = iommu_base[i] + MMU_REG_SIZE - 1;
-   res[0].flags = IORESOURCE_MEM;
-   res[1].start = res[1].end = iommu_irq[i];
-   res[1].flags = IORESOURCE_IRQ;
+   res[0].start = d->base;
+   res[0].end = d->base + MMU_REG_SIZE - 1;
+   res[1].start = res[1].end = d->irq;
 
err = platform_device_add_resources(pdev, res,
ARRAY_SIZE(res));
if (err)
goto err_out;
-   err = platform_device_add_data(pdev, &omap3_iommu_pdata[i],
-  sizeof(omap3_iommu_pdata[0]));
+   err = platform_device_add_data(pdev, &d->pdata,
+  sizeof(d->pdata));
if (err)
goto err_out;
err = platform_device_add(pdev);
-- 
1.6.5.2

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


[APPLIED] [PATCH] ARM: OMAP3: Fix 3430SDP defconfig

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 75f391e30e4a2c6b5b5dc7b57190f21718337acc

PatchWorks
http://patchwork.kernel.org/patch/47669/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=75f391e30e4a2c6b5b5dc7b57190f21718337acc


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


Re: [PATCH 00/19] OMAP: DSS2 v5 intro

2009-11-12 Thread Stephen Rothwell
Hi Tony, Tomi,

On Thu, 12 Nov 2009 10:14:57 -0800 Tony Lindgren  wrote:
>
> OK. The only dependency is the the move of the headers.
> 
> Tomi, can you please rebase your patches on top of the 
> "7xx-iosplit-plat-merge"
> branch in linux-omap tree? This is commit 
> 8171d88089ad63fc442b2bf32af7c18653adc5cb,
> and it should stay static.

OK, *if* you (Tony) guarantee that the base is stable (i.e. never
rebased, but may have things added to it) and in linux-next, then I can
take the DSS2 stuff separately if you want me to.

Tomi, you can, of course, merge that branch into your tree instead of
rebasing on top of it (which ever is easiest).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


pgpUPgc9VLLlG.pgp
Description: PGP signature


Re: [PATCH-v5 2/4] OMAP3: Add support for NAND on ZOOM2/LDP boards

2009-11-12 Thread Tony Lindgren
* Vimal Singh  [091110 02:08]:
> From 6f535d7128ca392458dd0cb31d138cda84747c06 Mon Sep 17 00:00:00 2001
> From: Vimal Singh 
> Date: Tue, 10 Nov 2009 11:42:45 +0530
> Subject: [PATCH] OMAP3: Add support for NAND on ZOOM2/LDP boards
> 
> Adding NAND support for ZOOM2 and LDP board. I have tested it for ZOOM2 
> boards,
> someone can verify it for LDP, hopefully it should not have any problem.
> 
> The size of the U-Boot environment partition was increased to 1.25MB.
> 
> Vikram: Changed ldp name to zoom.
>   Future boards will be called Zoom2/3/4 etc.
>   LDP is a Zoom1. Somhow the LDP name got stuck to that.
> 
> Signed-off-by: Vimal Singh 
> Signed-off-by: Vikram Pandita 
> ---
>  arch/arm/mach-omap2/Makefile |2 +
>  arch/arm/mach-omap2/board-ldp.c  |2 +
>  arch/arm/mach-omap2/board-zoom-flash.c   |  196 
> ++
>  arch/arm/mach-omap2/board-zoom2.c|2 +
>  arch/arm/plat-omap/include/plat/board-zoom.h |   36 +
>  arch/arm/plat-omap/include/plat/nand.h   |2 +
>  6 files changed, 240 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-zoom-flash.c
>  create mode 100644 arch/arm/plat-omap/include/plat/board-zoom.h
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 627f500..b3a9d1c 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -59,6 +59,7 @@ obj-$(CONFIG_MACH_OMAP_APOLLON) += 
> board-apollon.o
>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)  += board-omap3beagle.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_OMAP_LDP)  += board-ldp.o \
> +board-zoom-flash.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_OVERO) += board-overo.o \
>  mmc-twl4030.o
> @@ -74,6 +75,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51)   += board-rx51.o 
> \
>  board-rx51-peripherals.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_OMAP_ZOOM2)+= board-zoom2.o \
> +board-zoom-flash.o \
>  mmc-twl4030.o \
>  board-zoom-debugboard.o
>  obj-$(CONFIG_MACH_CM_T35)+= board-cm-t35.o \
> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
> index c062238..8aebdf9 100644
> --- a/arch/arm/mach-omap2/board-ldp.c
> +++ b/arch/arm/mach-omap2/board-ldp.c
> @@ -42,6 +42,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include "mmc-twl4030.h"
> 
> @@ -385,6 +386,7 @@ static void __init omap_ldp_init(void)
>   ads7846_dev_init();
>   omap_serial_init();
>   usb_musb_init();
> + zoom_flash_init();
> 
>   twl4030_mmc_init(mmc);
>   /* link regulators to MMC adapters */
> diff --git a/arch/arm/mach-omap2/board-zoom-flash.c
> b/arch/arm/mach-omap2/board-zoom-flash.c
> new file mode 100644
> index 000..1406a57
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-zoom-flash.c
> @@ -0,0 +1,196 @@
> +/*
> + * arch/arm/mach-omap2/board-zoom-flash.c
> + *
> + * Copyright (C) 2008-09 Texas Instruments Inc.
> + *
> + * Modified from mach-omap2/board-2430sdp-flash.c
> + * Author(s): Rohit Choraria 
> + *Vimal Singh 
> + *
> + * 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 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +#define NAND_CMD_UNLOCK1 0x23
> +#define NAND_CMD_UNLOCK2 0x24
> +/**
> + * @brief platform specific unlock function
> + *
> + * @param mtd - mtd info
> + * @param ofs - offset to start unlock from
> + * @param len - length to unlock
> + *
> + * @return - unlock status
> + */
> +static int omap_ldp_nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t 
> len)
> +{
> + int ret = 0;
> + int chipnr;
> + int status;
> + unsigned long page;
> + struct nand_chip *this = mtd->priv;
> + printk(KERN_INFO "nand_unlock: start: %08x, length: %d!\n",
> + (int)ofs, (int)len);
> +
> + /* select the NAND device */
> + chipnr = (int)(ofs >> this->chip_shift);
> + this->select_chip(mtd, chipnr);
> + /* check the WP bit */
> + this->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
> + if ((this->read_byte(mtd) & 0x80) == 0) {
> + printk(KERN_ERR "nand_unlock: Device is write protected!\n");
> + ret = -EINVAL;
> + goto out;
> + }
> +
> + if ((ofs & (mtd->writesize - 1)) != 0) {
> + printk(KERN_ERR "nand

Re: [PATCH-v5 1/4] OMAP2/3: Add support for flash on SDP boards

2009-11-12 Thread Tony Lindgren
* Vimal Singh  [091110 02:08]:
> From 42f080e0915bbce1509fc8ab3773569fec0a44f1 Mon Sep 17 00:00:00 2001
> From: Vimal Singh 
> Date: Tue, 10 Nov 2009 11:39:39 +0530
> Subject: [PATCH] OMAP2/3: Add support for flash on SDP boards
> 
> Add support for flash on SDP boards. NAND, NOR and OneNAND
> are supported.
> 
> Only tested on 3430SDP (ES2 and ES3.1), somebody please test on
> 2430SDP and check the chips select for 2430SDP.
> 
> Also note that:
> For OneNAND: in the earlier 2430SDP code the kernel partition
> was set to only 1MB instead of 2MB on 3430SDP. If people want
> the old partition sizes back on 2430SDP, please provide a patch.
> 
> For NAND: 'U-Boot', 'Boot Env' and 'Kernel' partitions sizes increased
> by few blocks to provide few spare blocks for NAND bab block management
> in u-boot. If people want old partition sizes, please provide a patch.
> 
> Signed-off-by: Vimal Singh 
> Cc: Tony Lindgren 
> ---
>  arch/arm/mach-omap2/Makefile|2 +
>  arch/arm/mach-omap2/board-2430sdp.c |2 +
>  arch/arm/mach-omap2/board-3430sdp.c |2 +
>  arch/arm/mach-omap2/board-sdp-flash.c   |  326 
> +++
>  arch/arm/plat-omap/include/plat/board-sdp.h |   15 ++
>  arch/arm/plat-omap/include/plat/gpmc.h  |2 +
>  6 files changed, 349 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-sdp-flash.c
>  create mode 100644 arch/arm/plat-omap/include/plat/board-sdp.h
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 03cb4fc..627f500 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -53,6 +53,7 @@ obj-$(CONFIG_OMAP_IOMMU)+= $(iommu-y)
>  obj-$(CONFIG_MACH_OMAP_GENERIC)  += board-generic.o
>  obj-$(CONFIG_MACH_OMAP_H4)   += board-h4.o
>  obj-$(CONFIG_MACH_OMAP_2430SDP)  += board-2430sdp.o \
> +board-sdp-flash.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_OMAP_APOLLON)  += board-apollon.o
>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)  += board-omap3beagle.o \
> @@ -66,6 +67,7 @@ obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \
>  obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_OMAP_3430SDP)  += board-3430sdp.o \
> +board-sdp-flash.o \
>  mmc-twl4030.o
>  obj-$(CONFIG_MACH_NOKIA_N8X0)+= board-n8x0.o
>  obj-$(CONFIG_MACH_NOKIA_RX51)+= board-rx51.o \
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c
> b/arch/arm/mach-omap2/board-2430sdp.c
> index db9374b..5676ab9 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -38,6 +38,7 @@
>  #include 
>  #include 
> 
> +#include 
>  #include "mmc-twl4030.h"
> 
>  #define SDP2430_CS0_BASE 0x0400
> @@ -205,6 +206,7 @@ static void __init omap_2430sdp_init(void)
>   twl4030_mmc_init(mmc);
>   usb_musb_init();
>   board_smc91x_init();
> + sdp_flash_init();
> 
>   /* Turn off secondary LCD backlight */
>   ret = gpio_request(SECONDARY_LCD_GPIO, "Secondary LCD backlight");
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c
> b/arch/arm/mach-omap2/board-3430sdp.c
> index a3c1271..4497ded 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -41,6 +41,7 @@
>  #include 
>  #include 
> 
> +#include 
>  #include "sdram-qimonda-hyb18m512160af-6.h"
>  #include "mmc-twl4030.h"
> 
> @@ -511,6 +512,7 @@ static void __init omap_3430sdp_init(void)
>   omap_serial_init();
>   usb_musb_init();
>   board_smc91x_init();
> + sdp_flash_init();
>   enable_board_wakeup_source();
>   usb_ehci_init(&ehci_pdata);
>  }
> diff --git a/arch/arm/mach-omap2/board-sdp-flash.c
> b/arch/arm/mach-omap2/board-sdp-flash.c
> new file mode 100644
> index 000..c881772
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-sdp-flash.c
> @@ -0,0 +1,326 @@
> +/*
> + * arch/arm/mach-omap2/board-sdp-flash.c
> + *
> + * Copyright (C) 2009 Nokia Corporation
> + * Copyright (C) 2007 Texas Instruments
> + *
> + * Modified from mach-omap2/board-3430sdp-flash.c
> + * Author: Vimal Singh 
> + *
> + * 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 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define REG_FPGA_REV 0x10
> +#define REG_FPGA_DIP_SWITCH_INPUT2   0x60
> +#define MAX_SUPPORTED_GPMC_CONFIG3
> +
> +/* various memory sizes */
> +#define FLASH_SIZE_SDPV1 SZ_64M
> +#define FLASH_SIZE_SDPV2 SZ_128M
> +
> +#define

[APPLIED] [PATCH] OMAP3: defconfigs: remove SYSFS_DEPRECATED flag

2009-11-12 Thread Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): bfcf88c1f14c0d6afcc3600dcaffd70d335d4268

PatchWorks
http://patchwork.kernel.org/patch/40949/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=bfcf88c1f14c0d6afcc3600dcaffd70d335d4268


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


Re: [PATCH] I2C: OMAP3: PM: (re)init for every transfer to support off-mode

2009-11-12 Thread Kevin Hilman
On Wed, Sep 30, 2009 at 2:06 PM, Kevin Hilman
 wrote:
> On Mon, Aug 3, 2009 at 3:11 PM, Kevin Hilman
>  wrote:
>> Ben Dooks wrote:
>>>
>>> On Tue, Jul 21, 2009 at 04:09:03PM -0700, Kevin Hilman wrote:

 From: Rajendra Nayak 

 Because of OMAP off-mode, powerdomain can go off when I2C is idle.
 Save enough state, and do a re-init for each transfer.

 Additional save/restore state added by Jagadeesh Bhaskar Pakaravoor
 (SYSC_REG) and Aaro Koskinen (wakeup sources.)

 Also, The OMAP3430 TRM states:

 "During active mode (I2Ci.I2C_CON[15] I2C_EN bit is set to 1), make no
 changes to the I2Ci.I2C_SCLL and I2Ci.I2C_SCLH registers.  Changes may
 result in unpredictable behavior."

 Hence, the I2C_EN bit should be clearer when modifying these
 registers. Please note that clearing the entire I2C_CON register to
 disable the I2C module is safe, because the I2C_CON register is
 re-configured for each transfer.
>>>
>>> should this be applied as a bugfix, or kept for next merge window?
>>
>> next merge window is fine.
>>
>
> Ben,
>
> It doesn't look like this made it in during the 2.6.32 merge window.
> Can you queue it for the -rc series?
>

ping
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PULL] omap-fixes for v2.6.32-rc6

2009-11-12 Thread Tony Lindgren
Linus,

Please pull omap fixes from:

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

Regards,

Tony


The following changes since commit b419148e567728f6af0c3b01965c1cc141e3e13a:
  Linus Torvalds (1):
Linux 2.6.32-rc6

are available in the git repository at:

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

Grazvydas Ignotas (2):
  omap3: pandora: Fix keypad keymap
  omap3: update Pandora defconfig

Janusz Krzysztofik (2):
  omap: Fix omapfb/lcdc on OMAP1510 broken when PM set
  omap1: Amstrad Delta defconfig fixes

Jarkko Nikula (1):
  omap3: beagle: Fix USB host port power control

Mike Turquette (1):
  omap3: Decrease cpufreq transition latency

Sergio Aguirre (1):
  omap3: 3430sdp: Enable Linux Regulator framework

Tao Hu (1):
  omap: Fix race condition in omap dma driver

Tobias Klauser (1):
  omap: Use resource_size

 arch/arm/configs/ams_delta_defconfig |   24 +++---
 arch/arm/configs/omap3_pandora_defconfig |   49 +--
 arch/arm/configs/omap_3430sdp_defconfig  |9 +++-
 arch/arm/mach-omap2/board-omap3beagle.c  |2 +-
 arch/arm/mach-omap2/board-omap3pandora.c |   78 +++---
 arch/arm/mach-omap2/gpmc.c   |2 +-
 arch/arm/mach-omap2/mailbox.c|2 +-
 arch/arm/plat-omap/cpu-omap.c|2 +-
 arch/arm/plat-omap/dma.c |   14 +
 9 files changed, 126 insertions(+), 56 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/19] OMAP: DSS2 v5 intro

2009-11-12 Thread Tony Lindgren
* Stephen Rothwell  [09 21:10]:
> Hi Tony,
> 
> On Wed, 11 Nov 2009 10:42:09 -0800 Tony Lindgren  wrote:
> >
> > * Tomi Valkeinen  [09 01:43]:
> > > On Wed, 2009-11-11 at 09:45 +0100, Valkeinen Tomi (Nokia-D/Helsinki)
> > > wrote:
> > > > On Tue, 2009-11-10 at 13:40 +0100, Artem Bityutskiy wrote:
> > > > > 
> > > > > could you please kindly ask Stephen (CCed) to include the DSS2 tree 
> > > > > into
> > > > > linux-next, because you are going to merge it the next merge window, 
> > > > > and
> > > > > there does not seem to be any blocker for this.
> > > > > 
> > > > > Being in linux-next for a while is really important.
> > > > 
> > > > Stephen, would this be possible? DSS2 driver is rather big piece of
> > > > code, even if it's quite isolated, so it would be nice to have it in
> > > > linux-next.
> > > > 
> > > > What does it require from me? A git tree, obviously, but what should it
> > > > be based on?
> > > 
> > > Ah, I just realized that DSS2 patches depend on patches from Tony's
> > > tree. I guess I should base my tree on top of some Tony's tree that is
> > > going to linux-next?
> > 
> > Or I can merge them into my for-next if that's OK with everybody. This
> > merge cycle is a pain for omap as we've moved all the common headers from
> > include/mach to include/plat.
> 
> If the DSS2 patches really are dependent on other stuff in the omap tree,
> then this is probably the best plan.

OK. The only dependency is the the move of the headers.

Tomi, can you please rebase your patches on top of the "7xx-iosplit-plat-merge"
branch in linux-omap tree? This is commit 
8171d88089ad63fc442b2bf32af7c18653adc5cb,
and it should stay static.

Please don't rebase on the for-next branch in linux-omap tree, that's still
changing.

Regards,

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


Re: [PATCH 00/19] OMAP: DSS2 v5 intro

2009-11-12 Thread Tony Lindgren
* Artem Bityutskiy  [09 21:05]:
> On Wed, 2009-11-11 at 10:42 -0800, Tony Lindgren wrote:
> > * Tomi Valkeinen  [09 01:43]:
> > > On Wed, 2009-11-11 at 09:45 +0100, Valkeinen Tomi (Nokia-D/Helsinki)
> > > wrote:
> > > > On Tue, 2009-11-10 at 13:40 +0100, Artem Bityutskiy wrote:
> > > > > Tomi,
> > > > > 
> > > > > could you please kindly ask Stephen (CCed) to include the DSS2 tree 
> > > > > into
> > > > > linux-next, because you are going to merge it the next merge window, 
> > > > > and
> > > > > there does not seem to be any blocker for this.
> > > > > 
> > > > > Being in linux-next for a while is really important.
> > > > 
> > > > Stephen, would this be possible? DSS2 driver is rather big piece of
> > > > code, even if it's quite isolated, so it would be nice to have it in
> > > > linux-next.
> > > > 
> > > > What does it require from me? A git tree, obviously, but what should it
> > > > be based on?
> > > 
> > > Ah, I just realized that DSS2 patches depend on patches from Tony's
> > > tree. I guess I should base my tree on top of some Tony's tree that is
> > > going to linux-next?
> > 
> > Or I can merge them into my for-next if that's OK with everybody. This
> > merge cycle is a pain for omap as we've moved all the common headers from
> > include/mach to include/plat.
> 
> I thought everything stable which you are going to merge next merge
> window should be in the next branch by default. Especially these massive
> re-names which potentially may break many things, right?

Yes, the renames are already there.

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


RE: [PATCH 8/10 v3] omap mailbox: OMAP4-Mailbox - Adds code changes to support OMAP4 mailbox.

2009-11-12 Thread C.A, Subramaniam
 
> -Original Message-
> From: Tony Lindgren [mailto:t...@atomide.com] 
> Sent: Thursday, November 12, 2009 4:35 AM
> To: C.A, Subramaniam
> Cc: li...@arm.linux.org.uk; linux-omap@vger.kernel.org; 
> Hiroshi DOYU; Gupta, Ramesh; Kanigeri, Hari
> Subject: Re: [PATCH 8/10 v3] omap mailbox: OMAP4-Mailbox - 
> Adds code changes to support OMAP4 mailbox.
> 
> * C.A, Subramaniam  [090924 08:06]:
> > Hi all,
> > This is the revised version of the patch incorporating 
> Russell's comments.
> > 
> > Regards
> > Subbu
> >  
> > From 0c7c506f0a47acc8444bed83fa56ad2aa76c3b7c Mon Sep 17 
> 00:00:00 2001
> > From: C A Subramaniam 
> > Date: Thu, 24 Sep 2009 19:16:39 +0530
> > Subject: [PATCH 8/10 v3] omap mailbox: OMAP4-Mailbox - Adds 
> code changes to support OMAP4 mailbox.
> > 
> > This patch adds code changes in the mailbox driver module to add 
> > support for OMAP4 mailbox.
> 
> Subbu, can you please repost patch 8/10 and 10/10 against 
> what I currently have in the omap for-next branch?
> 
> I got the other ones applied, but those two need to be refreshed.
> 
Tony,
I am working on the 2 patches (8 and 10). I will send them out tomorrow.

> Also, please make sure I got the other 8 patches merged right.

I will check the patches and ensure that they are in place. 

> 
> Regards,
> 
> Tony
> 
> 

Thank you and Regards
Subbu--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/6] OMAP3: CPUidle: Fixed support for ON / INACTIVE states

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

New powerdomain code support for INACTIVE state removes the need to control
clockdomains directly from cpuidle. Also, cpuidle state definitions can now
directly support ON / INACTIVE simplifying the implementation.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/cpuidle34xx.c |   32 
 1 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
b/arch/arm/mach-omap2/cpuidle34xx.c
index fdfa1d5..e46345f 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -91,20 +91,6 @@ static int omap3_idle_bm_check(void)
return 0;
 }
 
-static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
-   struct clockdomain *clkdm)
-{
-   omap2_clkdm_allow_idle(clkdm);
-   return 0;
-}
-
-static int _cpuidle_deny_idle(struct powerdomain *pwrdm,
-   struct clockdomain *clkdm)
-{
-   omap2_clkdm_deny_idle(clkdm);
-   return 0;
-}
-
 /**
  * omap3_enter_idle - Programs OMAP3 to enter the specified state
  * @dev: cpuidle device
@@ -141,19 +127,9 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
if (omap_irq_pending() || need_resched())
goto return_sleep_time;
 
-   if (cx->type == OMAP3_STATE_C1) {
-   pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle);
-   pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle);
-   }
-
/* Execute ARM wfi */
omap_sram_idle();
 
-   if (cx->type == OMAP3_STATE_C1) {
-   pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle);
-   pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle);
-   }
-
 return_sleep_time:
getnstimeofday(&ts_postidle);
ts_idle = timespec_sub(ts_postidle, ts_preidle);
@@ -242,8 +218,8 @@ void omap_init_power_states(void)
cpuidle_params_table[OMAP3_STATE_C2].wake_latency;
omap3_power_states[OMAP3_STATE_C2].threshold =
cpuidle_params_table[OMAP3_STATE_C2].threshold;
-   omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON;
-   omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON;
+   omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_INACTIVE;
+   omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_INACTIVE;
omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID;
 
/* C3 . MPU CSWR + Core inactive */
@@ -256,7 +232,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C3].threshold =
cpuidle_params_table[OMAP3_STATE_C3].threshold;
omap3_power_states[OMAP3_STATE_C3].mpu_state = PWRDM_POWER_RET;
-   omap3_power_states[OMAP3_STATE_C3].core_state = PWRDM_POWER_ON;
+   omap3_power_states[OMAP3_STATE_C3].core_state = PWRDM_POWER_INACTIVE;
omap3_power_states[OMAP3_STATE_C3].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
 
@@ -270,7 +246,7 @@ void omap_init_power_states(void)
omap3_power_states[OMAP3_STATE_C4].threshold =
cpuidle_params_table[OMAP3_STATE_C4].threshold;
omap3_power_states[OMAP3_STATE_C4].mpu_state = PWRDM_POWER_OFF;
-   omap3_power_states[OMAP3_STATE_C4].core_state = PWRDM_POWER_ON;
+   omap3_power_states[OMAP3_STATE_C4].core_state = PWRDM_POWER_INACTIVE;
omap3_power_states[OMAP3_STATE_C4].flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_CHECK_BM;
 
-- 
1.5.4.3

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


[PATCH 5/6] OMAP: Powerdomains: Add support for checking if pwrdm can idle

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

pwrdm_can_idle(pwrdm) will check if the specified powerdomain can enter
idle. This is done by checking the current fclk enable bits.

This call can be used e.g. inside cpuidle to decide which power states
core and mpu should enter during idle, as there are certain dependencies
between wakeup capabilities and reset logic.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/powerdomain.c |   22 ++
 arch/arm/mach-omap2/powerdomains34xx.h|   14 ++
 arch/arm/plat-omap/include/plat/powerdomain.h |9 +
 3 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
index 1237717..bf2b97a 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -1217,6 +1217,28 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
return 0;
 }
 
+/**
+ * pwrdm_can_idle - check if the powerdomain can enter idle
+ * @pwrdm: struct powerdomain * the powerdomain to check status of
+ *
+ * Does a functional clock check for the powerdomain and returns 1 if the
+ * powerdomain can enter idle, 0 if not.
+ */
+int pwrdm_can_idle(struct powerdomain *pwrdm)
+{
+   int i;
+   const int fclk_regs[] = { CM_FCLKEN, OMAP3430ES2_CM_FCLKEN3 };
+
+   if (!pwrdm)
+   return -EINVAL;
+
+   for (i = 0; i < pwrdm->fclk_reg_amt; i++)
+   if (cm_read_mod_reg(pwrdm->prcm_offs, fclk_regs[i]) &
+   (0x ^ pwrdm->fclk_masks[i]))
+   return 0;
+   return 1;
+}
+
 int pwrdm_state_switch(struct powerdomain *pwrdm)
 {
return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h 
b/arch/arm/mach-omap2/powerdomains34xx.h
index 9eb2dc5..c8cd297 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -180,6 +180,7 @@ static struct powerdomain iva2_pwrdm = {
[2] = PWRSTS_OFF_ON,
[3] = PWRDM_POWER_ON,
},
+   .fclk_reg_amt = 1,
 };
 
 static struct powerdomain mpu_34xx_pwrdm = {
@@ -236,6 +237,11 @@ static struct powerdomain core_34xx_es3_1_pwrdm = {
[0] = PWRSTS_OFF_RET_INA_ON, /* MEM1ONSTATE */
[1] = PWRSTS_OFF_RET_INA_ON, /* MEM2ONSTATE */
},
+   .fclk_reg_amt = 2,
+   .fclk_masks   = {
+   [0] = OMAP3430_EN_UART2 | OMAP3430_EN_UART1,
+   [1] = 0,
+   },
 };
 
 /* Another case of bit name collisions between several registers: EN_DSS */
@@ -255,6 +261,7 @@ static struct powerdomain dss_pwrdm = {
.pwrsts_mem_on= {
[0] = PWRDM_POWER_ON,  /* MEMONSTATE */
},
+   .fclk_reg_amt = 1,
 };
 
 /*
@@ -278,6 +285,7 @@ static struct powerdomain sgx_pwrdm = {
.pwrsts_mem_on= {
[0] = PWRDM_POWER_ON,  /* MEMONSTATE */
},
+   .fclk_reg_amt = 1,
 };
 
 static struct powerdomain cam_pwrdm = {
@@ -295,6 +303,7 @@ static struct powerdomain cam_pwrdm = {
.pwrsts_mem_on= {
[0] = PWRDM_POWER_ON,  /* MEMONSTATE */
},
+   .fclk_reg_amt = 1,
 };
 
 static struct powerdomain per_pwrdm = {
@@ -313,6 +322,10 @@ static struct powerdomain per_pwrdm = {
.pwrsts_mem_on= {
[0] = PWRDM_POWER_ON,  /* MEMONSTATE */
},
+   .fclk_reg_amt = 1,
+   .fclk_masks   = {
+   [0] = OMAP3430_EN_UART3,
+   },
 };
 
 static struct powerdomain emu_pwrdm = {
@@ -352,6 +365,7 @@ static struct powerdomain usbhost_pwrdm = {
.pwrsts_mem_on= {
[0] = PWRDM_POWER_ON,  /* MEMONSTATE */
},
+   .fclk_reg_amt = 1,
 };
 
 static struct powerdomain dpll1_pwrdm = {
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h 
b/arch/arm/plat-omap/include/plat/powerdomain.h
index 55350d0..b004d88 100644
--- a/arch/arm/plat-omap/include/plat/powerdomain.h
+++ b/arch/arm/plat-omap/include/plat/powerdomain.h
@@ -57,6 +57,12 @@
  */
 #define PWRDM_MAX_CLKDMS   4
 
+/*
+ * Maximum number of FCLK register masks that can be associated with a
+ * powerdomain. CORE powerdomain on OMAP3 is the worst case
+ */
+#define PWRDM_MAX_FCLK 2
+
 /* XXX A completely arbitrary number. What is reasonable here? */
 #define PWRDM_TRANSITION_BAILOUT 10
 
@@ -124,6 +130,8 @@ struct powerdomain {
s8 next_state;
unsigned state_counter[4];
 
+   u8 fclk_reg_amt;
+   u32 fclk_masks[PWRDM_MAX_FCLK];
 #ifdef CONFIG_PM_DEBUG
s64 timer;
s64 state_timer[4];
@@ -177,6 +185,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm);
 bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm);
 
 int pwrdm_wait_transition(struct powerdomain *pwrdm);
+int pwrdm_can_idle(struct powerdomain *pwrdm);
 
 int pwrdm_state_switch(struct powerdomain *pwrdm);
 int pwrdm_clkdm_sta

[PATCH 1/6] OMAP: Powerdomains: Add support for INACTIVE state on pwrdm level

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

Currently only ON, RET and OFF are supported, and ON is arguably broken as it
allows the powerdomain to enter INACTIVE state unless idle is prevented.
Now, pwrdm code prevents idle if ON is selected, and also adds support for
INACTIVE. This simplifies the control needed inside sleep code.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/powerdomain.c |   32 +
 arch/arm/mach-omap2/powerdomains34xx.h|   26 ++--
 arch/arm/plat-omap/include/plat/powerdomain.h |6 -
 3 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
index b6990e3..1237717 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -112,8 +112,8 @@ static struct powerdomain *_pwrdm_deps_lookup(struct 
powerdomain *pwrdm,
 static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
 {
 
-   int prev;
-   int state;
+   u8 prev;
+   u8 state;
 
if (pwrdm == NULL)
return -EINVAL;
@@ -220,7 +220,7 @@ int pwrdm_register(struct powerdomain *pwrdm)
 
pr_debug("powerdomain: registered %s\n", pwrdm->name);
ret = 0;
-
+   pwrdm->next_state = -1;
 pr_unlock:
write_unlock_irqrestore(&pwrdm_rwlock, flags);
 
@@ -701,19 +701,38 @@ int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm)
  */
 int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
 {
+   u8 prg_pwrst;
+
if (!pwrdm)
return -EINVAL;
 
+   if (pwrdm->next_state == pwrst)
+   return 0;
+
if (!(pwrdm->pwrsts & (1 << pwrst)))
return -EINVAL;
 
pr_debug("powerdomain: setting next powerstate for %s to %0x\n",
 pwrdm->name, pwrst);
 
+   /* INACTIVE is reserved, so we program pwrdm as ON */
+   if (pwrst == PWRDM_POWER_INACTIVE)
+   prg_pwrst = PWRDM_POWER_ON;
+   else
+   prg_pwrst = pwrst;
+
prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
-(pwrst << OMAP_POWERSTATE_SHIFT),
+(prg_pwrst << OMAP_POWERSTATE_SHIFT),
 pwrdm->prcm_offs, PM_PWSTCTRL);
 
+   /* If next state is ON, prevent idle */
+   if (pwrst == PWRDM_POWER_ON)
+   omap2_clkdm_deny_idle(pwrdm->pwrdm_clkdms[0]);
+   else
+   omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
+
+   pwrdm->next_state = pwrst;
+
return 0;
 }
 
@@ -730,8 +749,11 @@ int pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
if (!pwrdm)
return -EINVAL;
 
+   if (pwrdm->next_state > -1)
+   return pwrdm->next_state;
+
return prm_read_mod_bits_shift(pwrdm->prcm_offs, PM_PWSTCTRL,
-   OMAP_POWERSTATE_MASK);
+  OMAP_POWERSTATE_MASK);
 }
 
 /**
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h 
b/arch/arm/mach-omap2/powerdomains34xx.h
index fd09b08..9eb2dc5 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -165,7 +165,7 @@ static struct powerdomain iva2_pwrdm = {
.omap_chip= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
.dep_bit  = OMAP3430_PM_WKDEP_MPU_EN_IVA2_SHIFT,
.wkdep_srcs   = iva2_wkdeps,
-   .pwrsts   = PWRSTS_OFF_RET_ON,
+   .pwrsts   = PWRSTS_OFF_RET_INA_ON,
.pwrsts_logic_ret = PWRSTS_OFF_RET,
.banks= 4,
.pwrsts_mem_ret   = {
@@ -188,7 +188,7 @@ static struct powerdomain mpu_34xx_pwrdm = {
.omap_chip= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
.dep_bit  = OMAP3430_EN_MPU_SHIFT,
.wkdep_srcs   = mpu_34xx_wkdeps,
-   .pwrsts   = PWRSTS_OFF_RET_ON,
+   .pwrsts   = PWRSTS_OFF_RET_INA_ON,
.pwrsts_logic_ret = PWRSTS_OFF_RET,
.banks= 1,
.pwrsts_mem_ret   = {
@@ -206,7 +206,7 @@ static struct powerdomain core_34xx_pre_es3_1_pwrdm = {
.omap_chip= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
   CHIP_IS_OMAP3430ES2 |
   CHIP_IS_OMAP3430ES3_0),
-   .pwrsts   = PWRSTS_OFF_RET_ON,
+   .pwrsts   = PWRSTS_OFF_RET_INA_ON,
.dep_bit  = OMAP3430_EN_CORE_SHIFT,
.banks= 2,
.pwrsts_mem_ret   = {
@@ -214,8 +214,8 @@ static struct powerdomain core_34xx_pre_es3_1_pwrdm = {
[1] = PWRSTS_OFF_RET,/* MEM2RETSTATE */
},
.pwrsts_mem_on= {
-   [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
-   [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
+   [0] = PWRSTS_OFF_RET_INA_ON, /* MEM1ONSTATE */
+   [1] = PWRSTS_OFF_RET_INA_ON, /* MEM2ONSTATE */
},
 };
 
@@ -224,7 +224,7 @

[PATCH 6/6] OMAP3: CPUidle: Added peripheral pwrdm checks into bm check

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

Following checks are made (and their reasoning):

- If CAM domain is active, prevent idle completely
  * CAM pwrdm does not have HW wakeup capability
- If PER is likely to remain on, prevent PER off
  * Saves on unnecessary context save/restore
- If CORE domain is active, prevent PER off-mode
  * PER off in this case would prevent wakeups from PER completely
- Only allow CORE off, if all peripheral domains are off
  * CORE off will cause a chipwide reset

Also, enabled CHECK_BM flag for C2, as this is needed for the camera case.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/cpuidle34xx.c |  105 ++---
 1 files changed, 98 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
b/arch/arm/mach-omap2/cpuidle34xx.c
index e46345f..4654e87 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -58,7 +58,8 @@ struct omap3_processor_cx {
 
 struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
 struct omap3_processor_cx current_cx_state;
-struct powerdomain *mpu_pd, *core_pd;
+struct powerdomain *mpu_pd, *core_pd, *per_pd, *iva2_pd;
+struct powerdomain *sgx_pd, *usb_pd, *cam_pd, *dss_pd;
 
 /*
  * The latencies/thresholds for various C states have
@@ -91,6 +92,13 @@ static int omap3_idle_bm_check(void)
return 0;
 }
 
+static int pwrdm_get_idle_state(struct powerdomain *pwrdm)
+{
+   if (pwrdm_can_idle(pwrdm))
+   return pwrdm_read_next_pwrst(pwrdm);
+   return PWRDM_POWER_ON;
+}
+
 /**
  * omap3_enter_idle - Programs OMAP3 to enter the specified state
  * @dev: cpuidle device
@@ -153,14 +161,90 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
   struct cpuidle_state *state)
 {
struct cpuidle_state *new_state = state;
-
-   if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) {
-   BUG_ON(!dev->safe_state);
-   new_state = dev->safe_state;
+   u32 per_state = 0, saved_per_state = 0, cam_state, usb_state;
+   u32 iva2_state, sgx_state, dss_state, new_core_state;
+   struct omap3_processor_cx *cx;
+   int ret;
+
+   if (state->flags & CPUIDLE_FLAG_CHECK_BM) {
+   if (omap3_idle_bm_check()) {
+   BUG_ON(!dev->safe_state);
+   new_state = dev->safe_state;
+   goto select_state;
+   }
+   cx = cpuidle_get_statedata(state);
+   new_core_state = cx->core_state;
+
+   /* Check if CORE is active, if yes, fallback to inactive */
+   if (!pwrdm_can_idle(core_pd))
+   new_core_state = PWRDM_POWER_INACTIVE;
+
+   /*
+* Prevent idle completely if CAM is active.
+* CAM does not have wakeup capability in OMAP3.
+*/
+   cam_state = pwrdm_get_idle_state(cam_pd);
+   if (cam_state == PWRDM_POWER_ON) {
+   new_state = dev->safe_state;
+   goto select_state;
+   }
+
+   /*
+* Check if PER can idle or not. If we are not likely
+* to idle, deny PER off. This prevents unnecessary
+* context save/restore.
+*/
+   saved_per_state = pwrdm_read_next_pwrst(per_pd);
+   if (pwrdm_can_idle(per_pd)) {
+   per_state = saved_per_state;
+   /*
+* Prevent PER off if CORE is active as this
+* would disable PER wakeups completely
+*/
+   if (per_state == PWRDM_POWER_OFF &&
+   new_core_state > PWRDM_POWER_RET)
+   per_state = PWRDM_POWER_RET;
+
+   } else if (saved_per_state == PWRDM_POWER_OFF)
+   per_state = PWRDM_POWER_RET;
+
+   /*
+* If we are attempting CORE off, check if any other
+* powerdomains are at retention or higher. CORE off causes
+* chipwide reset which would reset these domains also.
+*/
+   if (new_core_state == PWRDM_POWER_OFF) {
+   dss_state = pwrdm_get_idle_state(dss_pd);
+   iva2_state = pwrdm_get_idle_state(iva2_pd);
+   sgx_state = pwrdm_get_idle_state(sgx_pd);
+   usb_state = pwrdm_get_idle_state(usb_pd);
+
+   if (cam_state > PWRDM_POWER_OFF ||
+   dss_state > PWRDM_POWER_OFF ||
+   iva2_state > PWRDM_POWER_OFF ||
+   per_state > PWRDM_POWER_OFF ||
+   sgx_state > PWRDM_POWER_OFF ||
+   usb_state > PWRDM_POWER_OFF)
+   new_core_state = PWR

[PATCH 2/6] OMAP3: PM: Added support for INACTIVE and ON states for powerdomains

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

Previously omap_sram_idle() did not know about the difference between ON and
INACTIVE states, which complicated the state handling in these cases.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/pm34xx.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 9d0a9b4..7b52f30 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -383,6 +383,7 @@ void omap_sram_idle(void)
mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
switch (mpu_next_state) {
case PWRDM_POWER_ON:
+   case PWRDM_POWER_INACTIVE:
case PWRDM_POWER_RET:
/* No need to save context */
save_state = 0;
@@ -448,9 +449,11 @@ void omap_sram_idle(void)
OMAP3430_GR_MOD,
OMAP3_PRM_VOLTCTRL_OFFSET);
}
-   /* Enable IO-PAD and IO-CHAIN wakeups */
-   prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
-   omap3_enable_io_chain();
+   if (core_next_state <= PWRDM_POWER_RET) {
+   /* Enable IO-PAD and IO-CHAIN wakeups */
+   prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
+   omap3_enable_io_chain();
+   }
}
omap3_intc_prepare_idle();
 
@@ -542,15 +545,13 @@ void omap_sram_idle(void)
}
 
/* Disable IO-PAD and IO-CHAIN wakeup */
-   if (core_next_state < PWRDM_POWER_ON) {
+   if (core_next_state <= PWRDM_POWER_ON) {
prm_clear_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
omap3_disable_io_chain();
}
 
 
pwrdm_post_transition();
-
-   omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
 }
 
 int omap3_can_sleep(void)
@@ -598,7 +599,6 @@ int set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
}
 
if (sleep_switch) {
-   omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
pwrdm_wait_transition(pwrdm);
pwrdm_state_switch(pwrdm);
}
-- 
1.5.4.3

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


[PATCH 4/6] OMAP3: PM: Removed PER + CORE state hacking from omap_sram_idle

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

This should be moved inside cpuidle to simplify design.

Signed-off-by: Tero Kristo 
---
 arch/arm/mach-omap2/pm34xx.c |   18 ++
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 7b52f30..c704756 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -81,7 +81,6 @@ static int (*_omap_save_secure_sram)(u32 *addr);
 
 static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
 static struct powerdomain *core_pwrdm, *per_pwrdm;
-static struct powerdomain *cam_pwrdm;
 
 static struct prm_setup_times_vc prm_setup_times_default = {
.clksetup = 0xff,
@@ -370,7 +369,6 @@ void omap_sram_idle(void)
int core_next_state = PWRDM_POWER_ON;
int core_prev_state, per_prev_state;
u32 sdrc_pwr = 0;
-   int per_state_modified = 0;
 
if (!_omap_sram_idle)
return;
@@ -409,19 +407,10 @@ void omap_sram_idle(void)
if (per_next_state < PWRDM_POWER_ON) {
omap_uart_prepare_idle(2);
omap2_gpio_prepare_for_idle(per_next_state);
-   if (per_next_state == PWRDM_POWER_OFF) {
-   if (core_next_state == PWRDM_POWER_ON) {
-   per_next_state = PWRDM_POWER_RET;
-   pwrdm_set_next_pwrst(per_pwrdm, per_next_state);
-   per_state_modified = 1;
-   } else
-   omap3_per_save_context();
-   }
+   if (per_next_state == PWRDM_POWER_OFF)
+   omap3_per_save_context();
}
 
-   if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON)
-   omap2_clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]);
-
/*
 * Disable smartreflex before entering WFI.
 * Only needed if we are going to enter retention or off.
@@ -540,8 +529,6 @@ void omap_sram_idle(void)
omap3_gpio_restore_pad_context(1);
omap2_gpio_resume_after_idle();
omap_uart_resume_idle(2);
-   if (per_state_modified)
-   pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF);
}
 
/* Disable IO-PAD and IO-CHAIN wakeup */
@@ -1170,7 +1157,6 @@ static int __init omap3_pm_init(void)
neon_pwrdm = pwrdm_lookup("neon_pwrdm");
per_pwrdm = pwrdm_lookup("per_pwrdm");
core_pwrdm = pwrdm_lookup("core_pwrdm");
-   cam_pwrdm = pwrdm_lookup("cam_pwrdm");
 
omap_push_sram_idle();
 #ifdef CONFIG_SUSPEND
-- 
1.5.4.3

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


[PATCH 0/6] Idle status patches revisited

2009-11-12 Thread Tero Kristo
From: Tero Kristo 

Following set implements checks for idle states of powerdomains, and
changes target cpuidle state according to those. This also includes as
a cleanup removal of some hacks from omap_sram_idle(), and also introduces
INACTIVE / ON state support for powerdomains which simplifies the code.

Applies on top of PM branch.


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


Linux-2.;6.29 needed

2009-11-12 Thread tarek attia
Hey all,,

I want any link for Linux-2.6.29 with power management patches for
Beagleboard urgently..


Any help will be appreciated .

thx in advance.

Best Regards,
tarek
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] Add support for DEVKIT8000 LCD

2009-11-12 Thread Daniel Toussaint



On Thu, Nov 12, 2009 at 7:46 PM, Tomi Valkeinen 
mailto:tomi.valkei...@nokia.com>> wrote:


   On Thu, 2009-11-12 at 11:23 +0100, ext Kim Botherway wrote:
> This patch add support for the Timll DEVKIT8000 LCD panel

   I don't handle old omapfb patches. I think you should contact Imre Deak
   for those, although my advise would be to use the new display subsystem
   driver.


Question more or less related to this thread : when submitting new 
boards, it is better to work with DSS2 directly right ? I am also 
preparing a new board patch at this point, so I would like to know what 
is the sanest way to work ? Patch the linux-omap-2.6 tree with DSS2 
patches , and then diff from there ? Or is is wiser to first submit 
without display related items, and wait for linux-omap-2.6 tree to have 
DSS2 support - which is going to happen soon I guess. 


Thanks




Tomi


   --
   To unsubscribe from this list: send the line "unsubscribe linux-omap" in
   the body of a message to majord...@vger.kernel.org
   
   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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 5/5] OMAP3: PM: Disable OTG autoidle when waking up from off-mode

2009-11-12 Thread Gadiyar, Anand
> Tero Kristo  writes:
> 
> > From: Tero Kristo 
> >
> > OMAP3 sleep can be prevented in some cases where OTG autoidle is enabled.
> > This patch force disables autoidle during wakeup from off-mode. See omap
> > errata 1.164.
> >
> > This fix can't be done in driver level, as off-mode entry resets and enables
> > the autoidle bit, and driver does not access the register after each 
> > off-mode
> > entry even if it is loaded.
> >
> > Signed-off-by: Tero Kristo 
> 
> Thanks Tero for the updated changelog.
> 
> Applying to PM branch reluctantly and with grumbles.  I sure hope
> someone in TI is reporting all these ROM code issues to the ROM code
> team so they get appropriate fixes.
> 
> Kevin

Yes, rest assured we're following these up with the HW teams.

This particular one should not matter on 3630, we can keep autoidle
enabled all the time, I think.

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5] OMAP3: PM: Disable OTG autoidle when waking up from off-mode

2009-11-12 Thread Kevin Hilman
Tero Kristo  writes:

> From: Tero Kristo 
>
> OMAP3 sleep can be prevented in some cases where OTG autoidle is enabled.
> This patch force disables autoidle during wakeup from off-mode. See omap
> errata 1.164.
>
> This fix can't be done in driver level, as off-mode entry resets and enables
> the autoidle bit, and driver does not access the register after each off-mode
> entry even if it is loaded.
>
> Signed-off-by: Tero Kristo 

Thanks Tero for the updated changelog.

Applying to PM branch reluctantly and with grumbles.  I sure hope
someone in TI is reporting all these ROM code issues to the ROM code
team so they get appropriate fixes.

Kevin

> ---
>  arch/arm/mach-omap2/pm34xx.c  |6 ++
>  arch/arm/mach-omap2/usb-musb.c|   14 --
>  arch/arm/plat-omap/include/plat/usb.h |3 +++
>  3 files changed, 17 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 2f9f4a0..ab7b30f 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -37,6 +37,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  
> @@ -496,6 +497,11 @@ void omap_sram_idle(void)
>   omap3_prcm_restore_context();
>   omap3_sram_restore_context();
>   omap2_sms_restore_context();
> + /*
> +  * Errata 1.164 fix : OTG autoidle can prevent
> +  * sleep
> +  */
> + usb_musb_disable_autoidle();
>   }
>   omap_uart_resume_idle(0);
>   omap_uart_resume_idle(1);
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index f5364b8..bb3cee4 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -44,10 +44,11 @@ static struct platform_device dummy_pdev = {
>   },
>  };
>  
> +static void __iomem *otg_base;
> +static struct clk *otg_clk;
> +
>  static void __init usb_musb_pm_init(void)
>  {
> - void __iomem *otg_base;
> - struct clk *otg_clk;
>   struct device *dev = &dummy_pdev.dev;
>  
>   if (!cpu_is_omap34xx())
> @@ -74,12 +75,13 @@ static void __init usb_musb_pm_init(void)
>   cpu_relax();
>   }
>  
> - if (otg_clk) {
> + if (otg_clk)
>   clk_disable(otg_clk);
> - clk_put(otg_clk);
> - }
> +}
>  
> - iounmap(otg_base);
> +void usb_musb_disable_autoidle(void)
> +{
> + __raw_writel(0, otg_base + OTG_SYSCONFIG);
>  }
>  
>  #ifdef CONFIG_USB_MUSB_SOC
> diff --git a/arch/arm/plat-omap/include/plat/usb.h 
> b/arch/arm/plat-omap/include/plat/usb.h
> index 33a500e..31b13bc 100644
> --- a/arch/arm/plat-omap/include/plat/usb.h
> +++ b/arch/arm/plat-omap/include/plat/usb.h
> @@ -46,6 +46,9 @@ extern void usb_musb_init(void);
>  
>  extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata);
>  
> +/* This is needed for OMAP3 errata 1.164: enabled autoidle can prevent sleep 
> */
> +extern void usb_musb_disable_autoidle(void);
> +
>  #endif
>  
>  void omap_usb_init(struct omap_usb_config *pdata);
> -- 
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/5] OMAP3: PM: Disabled I2C4 repeated start operation mode

2009-11-12 Thread Kevin Hilman
Tero Kristo  writes:

> From: Tero Kristo 
>
> Repeated start forces I2C4 pads low during idle, which increases power
> consumption through external pull-ups. On the other hand, this change
> increases I2C4 command latencies somewhat due to additional master code
> sent in the beginning of each I2C4 command (8 bits data + start + ack bits
> in fast/standard mode => increases total command duration from 25us to 50us.)
>
> Signed-off-by: Tero Kristo 

Thanks, applying this version to PM branch.

Kevin

> ---
>  arch/arm/mach-omap2/pm34xx.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index b97f7d8..796d726 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -1221,7 +1221,7 @@ static void __init configure_vc(void)
>   prm_write_mod_reg(OMAP3430_CMD1 | OMAP3430_RAV1, OMAP3430_GR_MOD,
> OMAP3_PRM_VC_CH_CONF_OFFSET);
>  
> - prm_write_mod_reg(OMAP3430_MCODE_SHIFT | OMAP3430_HSEN | OMAP3430_SREN,
> + prm_write_mod_reg(OMAP3430_MCODE_SHIFT | OMAP3430_HSEN,
> OMAP3430_GR_MOD,
> OMAP3_PRM_VC_I2C_CFG_OFFSET);
>  
> -- 
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/5] OMAP3: PM: Write voltage and clock setup times dynamically in idle loop

2009-11-12 Thread Kevin Hilman
Tero Kristo  writes:

> From: Tero Kristo 
>
> It is suggested by TI (SWPA152 February 2009) to write clksetup,
> voltsetup_time1, voltsetup_time2, voltsetup2 dynamically in idle loop.
>
> This allows us to optimize the voltage + clock setup times according to the
> used power save mode.
>
> Signed-off-by: Tero Kristo 

You also need to fixup the current users of this, currently only
board-3430sdp.c I think.

Kevin

> ---
>  arch/arm/mach-omap2/pm.h |   10 -
>  arch/arm/mach-omap2/pm34xx.c |   87 +++--
>  2 files changed, 57 insertions(+), 40 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index b576424..d10e0c1 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -24,12 +24,18 @@ extern int omap3_can_sleep(void);
>  extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
>  extern int omap3_idle_init(void);
>  
> -struct prm_setup_vc {
> +struct prm_setup_times_vc {
>   u16 clksetup;
>   u16 voltsetup_time1;
>   u16 voltsetup_time2;
> - u16 voltoffset;
>   u16 voltsetup2;
> + u16 voltsetup1;
> +};
> +
> +struct prm_setup_vc {
> + struct prm_setup_times_vc *setup_times;
> + struct prm_setup_times_vc *setup_times_off;
> + u16 voltoffset;
>  /* PRM_VC_CMD_VAL_0 specific bits */
>   u16 vdd0_on;
>   u16 vdd0_onlp;
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 796d726..2f9f4a0 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -82,12 +82,17 @@ static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
>  static struct powerdomain *core_pwrdm, *per_pwrdm;
>  static struct powerdomain *cam_pwrdm;
>  
> -static struct prm_setup_vc prm_setup = {
> +static struct prm_setup_times_vc prm_setup_times_default = {
>   .clksetup = 0xff,
>   .voltsetup_time1 = 0xfff,
>   .voltsetup_time2 = 0xfff,
> - .voltoffset = 0xff,
>   .voltsetup2 = 0xff,
> +};
> +
> +static struct prm_setup_vc prm_setup_default = {
> + .setup_times = &prm_setup_times_default,
> + .setup_times_off = NULL,
> + .voltoffset = 0xff,
>   .vdd0_on = 0x30,/* 1.2v */
>   .vdd0_onlp = 0x20,  /* 1.0v */
>   .vdd0_ret = 0x1e,   /* 0.975v */
> @@ -98,6 +103,8 @@ static struct prm_setup_vc prm_setup = {
>   .vdd1_off = 0x00,   /* 0.6v */
>  };
>  
> +static struct prm_setup_vc *prm_setup = &prm_setup_default;
> +
>  static inline void omap3_per_save_context(void)
>  {
>   omap_gpio_save_context();
> @@ -338,6 +345,16 @@ static void restore_table_entry(void)
>   restore_control_register(control_reg_value);
>  }
>  
> +static void prm_program_setup_times(struct prm_setup_times_vc *times)
> +{
> + prm_write_mod_reg(times->voltsetup1, OMAP3430_GR_MOD,
> + OMAP3_PRM_VOLTSETUP1_OFFSET);
> + prm_write_mod_reg(times->voltsetup2, OMAP3430_GR_MOD,
> + OMAP3_PRM_VOLTSETUP2_OFFSET);
> + prm_write_mod_reg(times->clksetup, OMAP3430_GR_MOD,
> + OMAP3_PRM_CLKSETUP_OFFSET);
> +}
> +
>  void omap_sram_idle(void)
>  {
>   /* Variable to tell what needs to be saved and restored
> @@ -422,6 +439,9 @@ void omap_sram_idle(void)
>OMAP3_PRM_VOLTCTRL_OFFSET);
>   omap3_core_save_context();
>   omap3_prcm_save_context();
> + if (prm_setup->setup_times_off != NULL)
> + prm_program_setup_times(prm_setup->
> + setup_times_off);
>   } else if (core_next_state == PWRDM_POWER_RET) {
>   prm_set_mod_reg_bits(OMAP3430_AUTO_RET,
>   OMAP3430_GR_MOD,
> @@ -479,11 +499,13 @@ void omap_sram_idle(void)
>   }
>   omap_uart_resume_idle(0);
>   omap_uart_resume_idle(1);
> - if (core_next_state == PWRDM_POWER_OFF)
> + if (core_next_state == PWRDM_POWER_OFF) {
>   prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF,
>  OMAP3430_GR_MOD,
>  OMAP3_PRM_VOLTCTRL_OFFSET);
> - else if (core_next_state == PWRDM_POWER_RET)
> + if (prm_setup->setup_times_off != NULL)
> + prm_program_setup_times(prm_setup->setup_times);
> + } else if (core_next_state == PWRDM_POWER_RET)
>   prm_clear_mod_reg_bits(OMAP3430_AUTO_RET,
>   OMAP3430_GR_MOD,
>   OMAP3_PRM_VOLTCTRL_OFFSET);
> @@ -1043,24 +1065,21 @@ int omap3_pm_set_suspend_state(struct powerdomain 
> *pwrdm, int state)
>   return -EINVAL;
>  }
>  
> +static void omap3_init_prm_setup_times(struct prm_setup_times_vc *conf)
> +{
> +   

Re: [PATCH 07/11] OMAP3: Fixed ARM aux ctrl register save/restore

2009-11-12 Thread Kevin Hilman
"Gopinath, Thara"  writes:

[...]

>>>
>>>Thanks, applying to PM branch, queuing for pm-fixes.
>
> There were review comments for this patch to be redone in a
> different manner. Are they not going to be addressed ?

Thara, my apologies.  Somehow I missed your comments.

Tero has posted a new version of this patch.  Please add your comments
or Ack to that one.

Thanks,

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/11] OMAP3: PM: Disable OTG autoidle when waking up from off-mode

2009-11-12 Thread Kevin Hilman
"Gadiyar, Anand"  writes:

> Kevin Hilman wrote:
>> Tero Kristo  writes:
>> 
>> > From: Tero Kristo 
>> >
>> > OMAP3 sleep can be prevented in some cases where OTG autoidle is enabled.
>> > This patch force disables autoidle during wakeup from off-mode. See omap
>> > errata 1.164.
>> >
>> > Signed-off-by: Tero Kristo 
>> 
>> This one needs a refresh against current PM branch.
>> 
>> > ---
>> >  arch/arm/mach-omap2/pm34xx.c  |6 ++
>> >  arch/arm/mach-omap2/usb-musb.c|   14 --
>> >  arch/arm/plat-omap/include/mach/usb.h |3 +++
>> 
>> mach/usb.h moved to plat/usb.h
>> 
>> >  3 files changed, 17 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
>> > index 5eb7321..070a0a2 100644
>> > --- a/arch/arm/mach-omap2/pm34xx.c
>> > +++ b/arch/arm/mach-omap2/pm34xx.c
>> > @@ -39,6 +39,7 @@
>> >  #include 
>> >  #include 
>> >  #include 
>> > +#include 
>> >  
>> >  #include 
>> >  
>> > @@ -496,6 +497,11 @@ void omap_sram_idle(void)
>> >omap3_prcm_restore_context();
>> >omap3_sram_restore_context();
>> >omap2_sms_restore_context();
>> > +  /*
>> > +   * Errata 1.164 fix : OTG autoidle can prevent
>> > +   * sleep
>> > +   */
>> > +  usb_musb_disable_autoidle();
>> 
>> NAK.  This belongs in the MUSB driver, not in the idle path.
>> 
>
> Kevin,
>
> When we exit off-mode, the autoidle will get enabled, and needs
> an explicit disable. If the MUSB driver is not loaded, there will
> be no one to do this.
>

OK, thanks for the clarification.  The changelog should be updated to
describe this problem in more detail.

Kevin

>
>> Kevin
>> 
>> >}
>> >omap_uart_resume_idle(0);
>> >omap_uart_resume_idle(1);
>> > diff --git a/arch/arm/mach-omap2/usb-musb.c 
>> > b/arch/arm/mach-omap2/usb-musb.c
>> > index 8dde0b7..f4b86c0 100644
>> > --- a/arch/arm/mach-omap2/usb-musb.c
>> > +++ b/arch/arm/mach-omap2/usb-musb.c
>> > @@ -44,10 +44,11 @@ static struct platform_device dummy_pdev = {
>> >},
>> >  };
>> >  
>> > +static void __iomem *otg_base;
>> > +static struct clk *otg_clk;
>> > +
>> >  static void __init usb_musb_pm_init(void)
>> >  {
>> > -  void __iomem *otg_base;
>> > -  struct clk *otg_clk;
>> >struct device *dev = &dummy_pdev.dev;
>> >  
>> >if (!cpu_is_omap34xx())
>> > @@ -74,12 +75,13 @@ static void __init usb_musb_pm_init(void)
>> >cpu_relax();
>> >}
>> >  
>> > -  if (otg_clk) {
>> > +  if (otg_clk)
>> >clk_disable(otg_clk);
>> > -  clk_put(otg_clk);
>> > -  }
>> > +}
>> >
>> >  
>> > -  iounmap(otg_base);
>> > +void usb_musb_disable_autoidle(void)
>> > +{
>> > +  __raw_writel(0, otg_base + OTG_SYSCONFIG);
>> >  }
>> >  
>> >  #ifdef CONFIG_USB_MUSB_SOC
>> > diff --git a/arch/arm/plat-omap/include/mach/usb.h 
>> > b/arch/arm/plat-omap/include/mach/usb.h
>> > index a4068a4..310ee17 100644
>> > --- a/arch/arm/plat-omap/include/mach/usb.h
>> > +++ b/arch/arm/plat-omap/include/mach/usb.h
>> > @@ -46,6 +46,9 @@ extern void usb_musb_init(void);
>> >  
>> >  extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata);
>> >  
>> > +/* This is needed for OMAP3 errata 1.164: enabled autoidle can prevent 
>> > sleep */
>> > +extern void usb_musb_disable_autoidle(void);
>> > +
>> >  #endif
>> >  
>> >  void omap_usb_init(struct omap_usb_config *pdata);
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH v3 1/3] input:misc:driver support for Kionix kxte9 accelerometer

2009-11-12 Thread Chris Hudson

Pandita, Vikram wrote:

-Original Message-
From: Chris Hudson [mailto:chud...@kionix.com]

Pandita, Vikram wrote:


Chris
  


  

Any way to test these features of accelerometer with your set of 3 patches 
applied?

Say with a busybox filesystem or poky?

  

Sure, I've been using busybox with the ZoomII and testing the hardware
throughout the development process.  You'll need to attach a KXTE9 to



I thought the accelerometer was a built-in feature of zoom2?
Can you give reference of details of KXTE9 module? Is it to be plugged in to 
come connector on zoom2?
  
There are two accelerometers built into the OMAP ZoomII: a MEMSIC and a 
Bosch.(1)  From what I've seen, they don't seem to be initialized in any 
stardard kernel configuration for this platform.


To work with the KXTE9, I used a 200-pin connecter(2) mounted to the J43 
expansion header, which is under the camera cover on the ZoomII. 

The KXTE9 product specification is available here: 
http://www.kionix.com/accelerometers/accelerometer-KXTE9.html


(1)https://gforge.ti.com/gf/project/omapzoom/wiki/?pagename=WhatIsZoom2
(2)http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&WT.z_homepage_link=hp_go_button&KeyWords=sam8019-nd&x=0&y=0

  

the i2c-2 bus, vdd, iovdd, ground, and gpio156 on the J43 header if
using a ZoomII.  I can give you the exact pins I'm using if you would like.
Thank you,
Chris


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] Add ASoC support for DEVKIT8000

2009-11-12 Thread Mark Brown
On Thu, Nov 12, 2009 at 09:24:43PM +1100, Kim Botherway wrote:
> This patch add support for DEVKIT8000, it is a copy of Beagleboard sound
> driver

You forgot your Signed-off-by here.  Please also remember to CC the
maintainers on patch submissions.

If this genuinely is just a straight copy of the Beagleboard driver then
it would be better to do this by changing the existing driver so that it
can be built and loaded on both boards, together with updating the
Kconfig so users can see which driver to use for DEVKIT8000.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Query: Regulator framework in EHCI driver

2009-11-12 Thread Mark Brown
On Thu, Nov 12, 2009 at 09:11:58AM +0530, Gupta, Ajay Kumar wrote:

> > > + if (omap->port_mode[i] == EHCI_HCD_OMAP_MODE_UNKNOWN)
> > > + continue;
> > > + if (omap->regulator[i]) {
> > > + if (regulator_is_enabled(omap->regulator[i]))
> > > + regulator_disable(omap->regulator[i]);
> > > + regulator_put(omap->regulator[i]);
> > > + }

> > For robustness I'd drop the first check for MODE_UNKNOWN here - it
> > doesn't add anything.

> MODE_UNKNOWN means that the port is not connected and so no need to check
> the regulator availability.

Sure, currently - the point is that if you're going to check for the
individual allocations anyway then the check doesn't buy you anything.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] AM35xx: Clock table updates for AM3505/17

2009-11-12 Thread Paul Walmsley
On Fri, 6 Nov 2009, Lohithakshan, Ranjith wrote:

> > -Original Message-
> > From: Menon, Nishanth
> > Sent: Thursday, November 05, 2009 9:55 PM

...

> > > + CLK(NULL,   "virt_13m_ck",  &virt_13m_ck,   CK_343X | CK_35XX),
> > > + CLK(NULL,   "virt_16_8m_ck", &virt_16_8m_ck, CK_3430ES2 | CK_35XX),
> > > + CLK(NULL,   "virt_19_2m_ck", &virt_19_2m_ck, CK_343X | CK_35XX),
> > > + CLK(NULL,   "virt_26m_ck",  &virt_26m_ck,   CK_343X | CK_35XX),
> > [...]
> > Could we have CK_3XXX? I mean this would probably happen when 36/37xx gets
> > introduced also.. does that make sense?
> > 
> Yes, it would help to have a CK_3XXX defined to cover all common OMAP3 
> clocks. 
> The tables would look simpler going forward.
> 
> Paul, what do you think?

Sounds like a good idea to me.

- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them

2009-11-12 Thread Jens Axboe
On Thu, Nov 12 2009, Romit Dasgupta wrote:
> Resubmitting after incorporationg the suggestions:
> > 
> > Romit, please rework as suggested by Jens and resubmit.
> 
> Unfreezes the bdi flusher task when the said task needs to exit.

Thanks, this looks more palatable. I will merge it and make sure it goes
upstream soon.

-- 
Jens Axboe

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


Re: [PATCH 3/4] Add support for DEVKIT8000 LCD

2009-11-12 Thread Tomi Valkeinen
On Thu, 2009-11-12 at 11:23 +0100, ext Kim Botherway wrote:
> This patch add support for the Timll DEVKIT8000 LCD panel

I don't handle old omapfb patches. I think you should contact Imre Deak
for those, although my advise would be to use the new display subsystem
driver.

 Tomi


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


Re: [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them

2009-11-12 Thread Romit Dasgupta
Resubmitting after incorporationg the suggestions:
> 
> Romit, please rework as suggested by Jens and resubmit.

Unfreezes the bdi flusher task when the said task needs to exit.

Steps to reproduce this.
1) Mount a file system from MMC/SD card.
2) Unmount the file system. This creates a flusher task.
3) Attempt suspend to RAM. System is unresponsive.

This is because the bdi flusher thread is already in the refrigerator and will
remain so until it is thawed. The MMC driver suspend routine call stack will
ultimately issue a 'kthread_stop' on the bdi flusher thread and will block
until the flusher thread is exited. Since the bdi flusher thread is in the
refrigerator it never cleans up until thawed.

Signed-off-by: Romit Dasgupta 
---
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 5a37e20..5a9ab6f 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -603,11 +603,15 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi)
bdi_remove_from_list(bdi);
 
/*
+* Force unfreeze of bdi threads before stopping it, otherwise
+* it would never exit if it is stuck in the refrigerator.
 * Finally, kill the kernel threads. We don't need to be RCU
 * safe anymore, since the bdi is gone from visibility.
 */
-   list_for_each_entry(wb, &bdi->wb_list, list)
+   list_for_each_entry(wb, &bdi->wb_list, list) {
+   wb->task->flags &= ~PF_FROZEN;
kthread_stop(wb->task);
+   }
 }
 
 void bdi_unregister(struct backing_dev_info *bdi)


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


RE: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.

2009-11-12 Thread Aggarwal, Anuj
Sorry for the earlier mail, not meant for the l-o list :(

Regards,
Anuj Aggarwal


> -Original Message-
> From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> ow...@vger.kernel.org] On Behalf Of Aggarwal, Anuj
> Sent: Thursday, November 12, 2009 4:27 PM
> To: linux-omap@vger.kernel.org
> Subject: FW: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.
> 
> Pushed this patch to psp-group:build7 ...
> 
> Regards,
> Anuj Aggarwal
> 
> 
> -Original Message-
> From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> ow...@vger.kernel.org] On Behalf Of Govindarajan, Sriramakrishnan
> Sent: Wednesday, November 11, 2009 1:43 PM
> To: linux-omap@vger.kernel.org
> Subject: RE: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.
> 
> Tony,
> Are there comments with respect to this patch. Will this be merged in the
> next window?
> Regards
> Sriram
> 
> > -Original Message-
> > From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> > ow...@vger.kernel.org] On Behalf Of Govindarajan, Sriramakrishnan
> > Sent: Wednesday, October 28, 2009 7:19 PM
> > To: linux-omap@vger.kernel.org
> > Cc: Govindarajan, Sriramakrishnan
> > Subject: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.
> >
> > Migrate to smsc911x ethernet driver instead of smc911x driver.
> > The smsc911x ethernet driver supports NAPI and performs better
> > under heavy traffic. With the smc911x driver we were witnessing
> > very high iowait time for high IO load over NFS.
> >
> > Signed-off-by: Sriramakrishnan 
> > ---
> > This patch is generated against tip of for-next branch.
> >
> >  arch/arm/configs/omap3_evm_defconfig |4 +-
> >  arch/arm/mach-omap2/board-omap3evm.c |   36
> > +
> >  2 files changed, 29 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/arm/configs/omap3_evm_defconfig
> > b/arch/arm/configs/omap3_evm_defconfig
> > index d5ff477..50afc67 100644
> > --- a/arch/arm/configs/omap3_evm_defconfig
> > +++ b/arch/arm/configs/omap3_evm_defconfig
> > @@ -617,8 +617,8 @@ CONFIG_MII=y
> >  # CONFIG_DM9000 is not set
> >  # CONFIG_ENC28J60 is not set
> >  # CONFIG_ETHOC is not set
> > -CONFIG_SMC911X=y
> > -# CONFIG_SMSC911X is not set
> > +# CONFIG_SMC911X is not set
> > +CONFIG_SMSC911X=y
> >  # CONFIG_DNET is not set
> >  # CONFIG_IBM_NEW_EMAC_ZMII is not set
> >  # CONFIG_IBM_NEW_EMAC_RGMII is not set
> > diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-
> > omap2/board-omap3evm.c
> > index 5d2310e..9bcdaf7 100644
> > --- a/arch/arm/mach-omap2/board-omap3evm.c
> > +++ b/arch/arm/mach-omap2/board-omap3evm.c
> > @@ -21,11 +21,13 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include 
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include 
> >
> > @@ -51,7 +53,8 @@
> >  #define OMAP3EVM_ETHR_GPIO_IRQ 176
> >  #define OMAP3EVM_SMC911X_CS5
> >
> > -static struct resource omap3evm_smc911x_resources[] = {
> > +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
> > +static struct resource omap3evm_smsc911x_resources[] = {
> > [0] =   {
> > .start  = OMAP3EVM_ETHR_START,
> > .end= (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
> > @@ -60,18 +63,28 @@ static struct resource
> > omap3evm_smc911x_resources[] = {
> > [1] =   {
> > .start  = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
> > .end= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
> > -   .flags  = IORESOURCE_IRQ,
> > +   .flags  = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
> > },
> >  };
> >
> > -static struct platform_device omap3evm_smc911x_device = {
> > -   .name   = "smc911x",
> > +static struct smsc911x_platform_config smsc911x_config = {
> > +   .phy_interface  = PHY_INTERFACE_MODE_MII,
> > +   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
> > +   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
> > +   .flags  = (SMSC911X_USE_32BIT |
> > SMSC911X_SAVE_MAC_ADDRESS),
> > +};
> > +
> > +static struct platform_device omap3evm_smsc911x_device = {
> > +   .name   = "smsc911x",
> > .id = -1,
> > -   .num_resources  = ARRAY_SIZE(omap3evm_smc911x_resources),
> > -   .resource   = &omap3evm_smc911x_resources[0],
> > +   .num_resources  = ARRAY_SIZE(omap3evm_smsc911x_resources),
> > +   .resource   = &omap3evm_smsc911x_resources[0],
> > +   .dev= {
> > +   .platform_data = &smsc911x_config,
> > +   },
> >  };
> >
> > -static inline void __init omap3evm_init_smc911x(void)
> > +static inline void __init omap3evm_init_smsc911x(void)
> >  {
> > int eth_cs;
> > struct clk *l3ck;
> > @@ -92,8 +105,14 @@ static inline void __init
> > omap3evm_init_smc911x(void)
> > }
> >
> > gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
> > +
> > +   platform_device_register(&omap3evm_smsc911x_device);
> >  }
> >
> > +#else
> > +static inline void __init omap3evm_init_smsc911x(void) { return;

Re: [PATCH 2/4] Add omap3_devkit8000_defconfig

2009-11-12 Thread Vimal Singh
Signed-off-by missing

On Thu, Nov 12, 2009 at 3:49 PM, Kim Botherway  wrote:
> This patch adds a default config for the Timll DEVKIT8000
>
>
>
> diff --git a/arch/arm/configs/omap3_devkit8000_defconfig
> b/arch/arm/configs/omap3_devkit8000_defconfig
> new file mode 100644
> index 000..2fd0fbb
> --- /dev/null
> +++ b/arch/arm/configs/omap3_devkit8000_defconfig
> @@ -0,0 +1,1811 @@
> +#
> +# Automatically generated make config: don't edit
> +# Linux kernel version: 2.6.32-rc5
> +# Tue Oct 27 13:00:22 2009
> +#
> +CONFIG_ARM=y
> +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
> +CONFIG_GENERIC_GPIO=y
> +CONFIG_GENERIC_TIME=y
> +CONFIG_GENERIC_CLOCKEVENTS=y
> +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_CPUFREQ=y
> +CONFIG_GENERIC_HWEIGHT=y
> +CONFIG_GENERIC_CALIBRATE_DELAY=y
> +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
> +CONFIG_VECTORS_BASE=0x
> +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
> +CONFIG_CONSTRUCTORS=y
> +
> +#
> +# 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_POSIX_MQUEUE is not set
> +CONFIG_BSD_PROCESS_ACCT=y
> +# CONFIG_BSD_PROCESS_ACCT_V3 is not set
> +# CONFIG_TASKSTATS is not set
> +# CONFIG_AUDIT is not set
> +
> +#
> +# RCU Subsystem
> +#
> +CONFIG_TREE_RCU=y
> +# CONFIG_TREE_PREEMPT_RCU is not set
> +# CONFIG_RCU_TRACE is not set
> +CONFIG_RCU_FANOUT=32
> +# CONFIG_RCU_FANOUT_EXACT is not set
> +# CONFIG_TREE_RCU_TRACE is not set
> +CONFIG_IKCONFIG=y
> +CONFIG_IKCONFIG_PROC=y
> +CONFIG_LOG_BUF_SHIFT=14
> +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_CGROUPS is not set
> +# CONFIG_SYSFS_DEPRECATED_V2 is not set
> +# CONFIG_RELAY is not set
> +# CONFIG_NAMESPACES is not set
> +CONFIG_BLK_DEV_INITRD=y
> +CONFIG_INITRAMFS_SOURCE=""
> +CONFIG_RD_GZIP=y
> +CONFIG_RD_BZIP2=y
> +CONFIG_RD_LZMA=y
> +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
> +CONFIG_SYSCTL=y
> +CONFIG_ANON_INODES=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_BASE_FULL=y
> +CONFIG_FUTEX=y
> +CONFIG_EPOLL=y
> +CONFIG_SIGNALFD=y
> +CONFIG_TIMERFD=y
> +CONFIG_EVENTFD=y
> +CONFIG_SHMEM=y
> +CONFIG_AIO=y
> +
> +#
> +# Kernel Performance Events And Counters
> +#
> +CONFIG_VM_EVENT_COUNTERS=y
> +CONFIG_COMPAT_BRK=y
> +CONFIG_SLAB=y
> +# CONFIG_SLUB is not set
> +# CONFIG_SLOB is not set
> +# CONFIG_PROFILING is not set
> +CONFIG_HAVE_OPROFILE=y
> +# CONFIG_KPROBES is not set
> +CONFIG_HAVE_KPROBES=y
> +CONFIG_HAVE_KRETPROBES=y
> +CONFIG_HAVE_CLK=y
> +
> +#
> +# GCOV-based kernel profiling
> +#
> +# CONFIG_SLOW_WORK is not set
> +CONFIG_HAVE_GENERIC_DMA_COHERENT=y
> +CONFIG_SLABINFO=y
> +CONFIG_RT_MUTEXES=y
> +CONFIG_BASE_SMALL=0
> +CONFIG_MODULES=y
> +CONFIG_MODULE_FORCE_LOAD=y
> +CONFIG_MODULE_UNLOAD=y
> +# CONFIG_MODULE_FORCE_UNLOAD is not set
> +CONFIG_MODVERSIONS=y
> +# CONFIG_MODULE_SRCVERSION_ALL is not set
> +CONFIG_BLOCK=y
> +CONFIG_LBDAF=y
> +# 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_FREEZER is not set
> +
> +#
> +# System Type
> +#
> +CONFIG_MMU=y
> +# 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_CLPS711X is not set
> +# CONFIG_ARCH_GEMINI is not set
> +# CONFIG_ARCH_EBSA110 is not set
> +# CONFIG_ARCH_EP93XX is not set
> +# CONFIG_ARCH_FOOTBRIDGE is not set
> +# CONFIG_ARCH_MXC is not set
> +# CONFIG_ARCH_STMP3XXX is not set
> +# CONFIG_ARCH_NETX is not set
> +# CONFIG_ARCH_H720X is not set
> +# CONFIG_ARCH_NOMADIK is not set
> +# CONFIG_ARCH_IOP13XX is not set
> +# CONFIG_ARCH_IOP32X is not set
> +# CONFIG_ARCH_IOP33X is not set
> +# CONFIG_ARCH_IXP23XX is not set
> +# CONFIG_ARCH_IXP2000 is not set
> +# CONFIG_ARCH_IXP4XX is not set
> +# CONFIG_ARCH_L7200 is not set
> +# CONFIG_ARCH_KIRKWOOD is not set
> +# CONFIG_ARCH_LOKI is not set
> +# CONFIG_ARCH_MV78XX0 is not set
> +# CONFIG_ARCH_ORION5X is not set
> +# CONFIG_ARCH_MMP is not set
> +# CONFIG_ARCH_KS8695 is not set
> +# CONFIG_ARCH_NS9XXX is not set

Re: [PATCH 3/4] Add support for DEVKIT8000 LCD

2009-11-12 Thread Vimal Singh
'Signed-off-by' missing.

On Thu, Nov 12, 2009 at 3:53 PM, Kim Botherway  wrote:
> This patch add support for the Timll DEVKIT8000 LCD panel
>
>
> diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile
> index b63b198..b906d25 100644
> --- a/drivers/video/omap/Makefile
> +++ b/drivers/video/omap/Makefile
> @@ -33,6 +33,7 @@ objs-y$(CONFIG_MACH_OMAP_LDP) += lcd_ldp.o
>  objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o
>  objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o
>  objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o
> +objs-y$(CONFIG_MACH_OMAP3_DEVKIT8000) += lcd_omap3devkit8000.o
>  objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o
>  objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o
>
> diff --git a/drivers/video/omap/lcd_omap3devkit8000.c
> b/drivers/video/omap/lcd_omap3devkit8000.c
> new file mode 100644
> index 000..242cece
> --- /dev/null
> +++ b/drivers/video/omap/lcd_omap3devkit8000.c
> @@ -0,0 +1,132 @@
> +/*
> + * LCD panel support for the TI OMAP3 Beagle board
> + *
> + * Author: Koen Kooi 
> + *
> + * Derived from drivers/video/omap/lcd-omap3evm.c
> + *
> + * 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 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 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +
> +#define LCD_PANEL_ENABLE_GPIO       170
> +
> +static int omap3devkit8000_panel_init(struct lcd_panel *panel,
> +                               struct omapfb_device *fbdev)
> +{
> +       gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable");
> +       return 0;
> +}
> +
> +static void omap3devkit8000_panel_cleanup(struct lcd_panel *panel)
> +{
> +       gpio_free(LCD_PANEL_ENABLE_GPIO);
> +}
> +
> +static int omap3devkit8000_panel_enable(struct lcd_panel *panel)
> +{
> +       gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
> +       return 0;
> +}
> +
> +static void omap3devkit8000_panel_disable(struct lcd_panel *panel)
> +{
> +       gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0);
> +}
> +
> +static unsigned long omap3devkit8000_panel_get_caps(struct lcd_panel
> *panel)
> +{
> +       return 0;
> +}
> +
> +struct lcd_panel omap3devkit8000_panel = {
> +       .name           = "omap3devkit8000",
> +       .config         = OMAP_LCDC_PANEL_TFT,
> +       .bpp            = 16,
> +       .data_lines     = 24,
> +
> +       .name           = "7inch_LCD",
> +       .x_res          = 800,
> +       .y_res          = 480,
> +       .hsw            = 48,   /* hsync_len (4) - 1 */
> +       .hfp            = 1,      /* right_margin (4) - 1 */
> +       .hbp            = 1,      /* left_margin (40) - 1 */
> +       .vsw            = 3,       /* vsync_len (2) - 1 */
> +       .vfp            = 12,     /* lower_margin */
> +       .vbp            = 25,     /* upper_margin (8) - 1 */
> +       .pixel_clock    = 36000,
> +
> +       .init           = omap3devkit8000_panel_init,
> +       .cleanup        = omap3devkit8000_panel_cleanup,
> +       .enable         = omap3devkit8000_panel_enable,
> +       .disable        = omap3devkit8000_panel_disable,
> +       .get_caps       = omap3devkit8000_panel_get_caps,
> +
> +};
> +
> +
> +static int omap3devkit8000_panel_probe(struct platform_device *pdev)
> +{
> +       omapfb_register_panel(&omap3devkit8000_panel);
> +       return 0;
> +}
> +
> +static int omap3devkit8000_panel_remove(struct platform_device *pdev)
> +{
> +       return 0;
> +}
> +
> +static int omap3devkit8000_panel_suspend(struct platform_device *pdev,
> +                                  pm_message_t mesg)
> +{
> +       return 0;
> +}
> +
> +static int omap3devkit8000_panel_resume(struct platform_device *pdev)
> +{
> +       return 0;
> +}
> +
> +struct platform_driver omap3devkit8000_panel_driver = {
> +       .probe          = omap3devkit8000_panel_probe,
> +       .remove         = omap3devkit8000_panel_remove,
> +       .suspend        = omap3devkit8000_panel_suspend,
> +       .resume         = omap3devkit8000_panel_resume,
> +       .driver         = {
> +               .name   = "omap3devkit8000_lcd",
> +               .owner  = THIS_MODULE,
> +       },
> +};
> +
> +static int __init omap3devkit8000_panel_drv_init(void)
> +{
> +       return platform_driver_register(&omap3devkit8000_panel_driver);
> +}
> +
> +static void __exit omap3devkit8000_panel_drv_exit(void)
> +{
> +       plat

FW: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.

2009-11-12 Thread Aggarwal, Anuj
Pushed this patch to psp-group:build7 ...

Regards,
Anuj Aggarwal


-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Govindarajan, 
Sriramakrishnan
Sent: Wednesday, November 11, 2009 1:43 PM
To: linux-omap@vger.kernel.org
Subject: RE: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.

Tony,
Are there comments with respect to this patch. Will this be merged in the next 
window?
Regards
Sriram

> -Original Message-
> From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
> ow...@vger.kernel.org] On Behalf Of Govindarajan, Sriramakrishnan
> Sent: Wednesday, October 28, 2009 7:19 PM
> To: linux-omap@vger.kernel.org
> Cc: Govindarajan, Sriramakrishnan
> Subject: [PATCH] omap3evm: Migrate to smsc911x ethernet driver.
> 
> Migrate to smsc911x ethernet driver instead of smc911x driver.
> The smsc911x ethernet driver supports NAPI and performs better
> under heavy traffic. With the smc911x driver we were witnessing
> very high iowait time for high IO load over NFS.
> 
> Signed-off-by: Sriramakrishnan 
> ---
> This patch is generated against tip of for-next branch.
> 
>  arch/arm/configs/omap3_evm_defconfig |4 +-
>  arch/arm/mach-omap2/board-omap3evm.c |   36
> +
>  2 files changed, 29 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/configs/omap3_evm_defconfig
> b/arch/arm/configs/omap3_evm_defconfig
> index d5ff477..50afc67 100644
> --- a/arch/arm/configs/omap3_evm_defconfig
> +++ b/arch/arm/configs/omap3_evm_defconfig
> @@ -617,8 +617,8 @@ CONFIG_MII=y
>  # CONFIG_DM9000 is not set
>  # CONFIG_ENC28J60 is not set
>  # CONFIG_ETHOC is not set
> -CONFIG_SMC911X=y
> -# CONFIG_SMSC911X is not set
> +# CONFIG_SMC911X is not set
> +CONFIG_SMSC911X=y
>  # CONFIG_DNET is not set
>  # CONFIG_IBM_NEW_EMAC_ZMII is not set
>  # CONFIG_IBM_NEW_EMAC_RGMII is not set
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-
> omap2/board-omap3evm.c
> index 5d2310e..9bcdaf7 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -21,11 +21,13 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
> 
> @@ -51,7 +53,8 @@
>  #define OMAP3EVM_ETHR_GPIO_IRQ   176
>  #define OMAP3EVM_SMC911X_CS  5
> 
> -static struct resource omap3evm_smc911x_resources[] = {
> +#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
> +static struct resource omap3evm_smsc911x_resources[] = {
>   [0] =   {
>   .start  = OMAP3EVM_ETHR_START,
>   .end= (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
> @@ -60,18 +63,28 @@ static struct resource
> omap3evm_smc911x_resources[] = {
>   [1] =   {
>   .start  = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
>   .end= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
> - .flags  = IORESOURCE_IRQ,
> + .flags  = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
>   },
>  };
> 
> -static struct platform_device omap3evm_smc911x_device = {
> - .name   = "smc911x",
> +static struct smsc911x_platform_config smsc911x_config = {
> + .phy_interface  = PHY_INTERFACE_MODE_MII,
> + .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
> + .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
> + .flags  = (SMSC911X_USE_32BIT |
> SMSC911X_SAVE_MAC_ADDRESS),
> +};
> +
> +static struct platform_device omap3evm_smsc911x_device = {
> + .name   = "smsc911x",
>   .id = -1,
> - .num_resources  = ARRAY_SIZE(omap3evm_smc911x_resources),
> - .resource   = &omap3evm_smc911x_resources[0],
> + .num_resources  = ARRAY_SIZE(omap3evm_smsc911x_resources),
> + .resource   = &omap3evm_smsc911x_resources[0],
> + .dev= {
> + .platform_data = &smsc911x_config,
> + },
>  };
> 
> -static inline void __init omap3evm_init_smc911x(void)
> +static inline void __init omap3evm_init_smsc911x(void)
>  {
>   int eth_cs;
>   struct clk *l3ck;
> @@ -92,8 +105,14 @@ static inline void __init
> omap3evm_init_smc911x(void)
>   }
> 
>   gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
> +
> + platform_device_register(&omap3evm_smsc911x_device);
>  }
> 
> +#else
> +static inline void __init omap3evm_init_smsc911x(void) { return; }
> +#endif
> +
>  static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
>   .supply = "vmmc",
>  };
> @@ -335,12 +354,10 @@ static void __init omap3_evm_init_irq(void)
>   omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
>   omap_init_irq();
>   omap_gpio_init();
> - omap3evm_init_smc911x();
>  }
> 
>  static struct platform_device *omap3_evm_devices[] __initdata = {
>   &omap3_evm_lcd_device,
> - &omap3evm_smc911x_device,
>  };
> 
>  static void __init omap3_evm_init(void)
> @@ -359,6 +376,7 @@ static void __

Re: [PATCH 4/4] Add ASoC support for DEVKIT8000

2009-11-12 Thread Vimal Singh
On Thu, Nov 12, 2009 at 3:54 PM, Kim Botherway  wrote:
> This patch add support for DEVKIT8000, it is a copy of Beagleboard sound
> driver
>
> diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
> index 653a362..8cdcfe9 100644
> --- a/sound/soc/omap/Kconfig
> +++ b/sound/soc/omap/Kconfig
> @@ -91,6 +91,14 @@ config SND_OMAP_SOC_OMAP3_BEAGLE
>        help
>          Say Y if you want to add support for SoC audio on the Beagleboard.
>
> +config SND_OMAP_SOC_OMAP3_DEVKIT8000
> +        tristate "SoC Audio support for OMAP3 DEVKIT8000"
> +        depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_DEVKIT8000
> +        select SND_OMAP_SOC_MCBSP
> +        select SND_SOC_TWL4030
> +        help
> +          Say Y if you want to add support for SoC audio on the
> DEVKIT8000.

Patch is corrupted due to line-wrapping.

> +
>  config SND_OMAP_SOC_ZOOM2
>        tristate "SoC Audio support for Zoom2"
>        depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_ZOOM2
>
> diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
> index 02d6947..7239737 100644
> --- a/sound/soc/omap/Makefile
> +++ b/sound/soc/omap/Makefile
> @@ -15,6 +15,7 @@ snd-soc-omap3evm-objs := omap3evm.o
>  snd-soc-sdp3430-objs := sdp3430.o
>  snd-soc-omap3pandora-objs := omap3pandora.o
>  snd-soc-omap3beagle-objs := omap3beagle.o
> +snd-soc-omap3devkit8000-objs := omap3devkit8000.o
>  snd-soc-zoom2-objs := zoom2.o
>
>  obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
> @@ -26,4 +27,5 @@ obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
>  obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
>  obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
>  obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
> +obj-$(CONFIG_SND_OMAP_SOC_OMAP3_DEVKIT8000) += snd-soc-omap3devkit8000.o
>  obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
>
> diff --git a/sound/soc/omap/omap3devkit8000.c
> b/sound/soc/omap/omap3devkit8000.c
> new file mode 100644
> index 000..6a975d4
> --- /dev/null
> +++ b/sound/soc/omap/omap3devkit8000.c
> @@ -0,0 +1,154 @@
> +/*
> + * omap3devkit8000.c  --  SoC audio for OMAP3 Beagle
> + *
> + * Author: Steve Sakoman 
> + *
> + * 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.
> + *
> + * 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., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA
> + *
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "omap-mcbsp.h"
> +#include "omap-pcm.h"
> +#include "../codecs/twl4030.h"
> +
> +static int omap3devkit8000_hw_params(struct snd_pcm_substream *substream,
> +       struct snd_pcm_hw_params *params)
> +{
> +       struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +       struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
> +       struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
> +       unsigned int fmt;
> +       int ret;
> +
> +       switch (params_channels(params)) {
> +       case 2: /* Stereo I2S mode */
> +               fmt =   SND_SOC_DAIFMT_I2S |
> +                       SND_SOC_DAIFMT_NB_NF |
> +                       SND_SOC_DAIFMT_CBM_CFM;
> +               break;
> +       case 4: /* Four channel TDM mode */
> +               fmt =   SND_SOC_DAIFMT_DSP_A |
> +                       SND_SOC_DAIFMT_IB_NF |
> +                       SND_SOC_DAIFMT_CBM_CFM;
> +               break;
> +       default:
> +               return -EINVAL;
> +       }
> +
> +       /* Set codec DAI configuration */
> +       ret = snd_soc_dai_set_fmt(codec_dai, fmt);
> +       if (ret < 0) {
> +               printk(KERN_ERR "can't set codec DAI configuration\n");
> +               return ret;
> +       }
> +
> +       /* Set cpu DAI configuration */
> +       ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
> +       if (ret < 0) {
> +               printk(KERN_ERR "can't set cpu DAI configuration\n");
> +               return ret;
> +       }
> +
> +       /* Set the codec system clock for DAC and ADC */
> +       ret = snd_soc_dai_set_sysclk(codec_dai, 0, 2600,
> +                                    SND_SOC_CLOCK_IN);
> +       if (ret < 0) {
> +               printk(KERN_ERR "can't set codec system clock\n");
> +               return ret;
> +       }
> +
> +       return 0;
> +}
> +
> +static struct snd_soc_ops omap3devkit8000_ops = {
> +       .hw_params = omap3devkit8000_hw_params,
> +};
> +
> +/* Digital audio interfac

Re: [PATCH 1/4] Add minimal support for DEVKIT8000

2009-11-12 Thread Felipe Balbi

Hi,

On Thu, Nov 12, 2009 at 11:17:42AM +0100, ext Kim Botherway wrote:

These patches add omap3 board support for the Timll DEVKIT8000

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..5c850e1 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -53,6 +53,10 @@ config MACH_OMAP3_BEAGLE
   bool "OMAP3 BEAGLE board"
   depends on ARCH_OMAP3 && ARCH_OMAP34XX

+config MACH_OMAP3_DEVKIT8000
+bool "OMAP3 DEVKIT8000 board"
+depends on ARCH_OMAP3 && ARCH_OMAP34XX
+
config MACH_OMAP_LDP
   bool "OMAP3 LDP board"
   depends on ARCH_OMAP3 && ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..080f3ac 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -57,6 +57,8 @@ obj-$(CONFIG_MACH_OMAP_2430SDP)   += 
board-2430sdp.o \
obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o
obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
  mmc-twl4030.o
+obj-$(CONFIG_MACH_OMAP3_DEVKIT8000) += board-omap3devkit8000.o \
+   mmc-twl4030.o
obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
  mmc-twl4030.o
obj-$(CONFIG_MACH_OVERO)   += board-overo.o \
diff --git a/arch/arm/mach-omap2/board-omap3devkit8000.c
b/arch/arm/mach-omap2/board-omap3devkit8000.c
new file mode 100644
index 000..5be7852
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap3devkit8000.c
@@ -0,0 +1,604 @@
+/*
+ * linux/arch/arm/mach-omap2/board-omap3devkit8000.c


remove the path, it should be something like:

board-omap3devkit8000.c - Texas Instruments' DevKit 8000


+static struct omap_nand_platform_data omap3devkit8000_nand_data = {
+   .options= NAND_BUSWIDTH_16,
+   .parts  = omap3devkit8000_nand_partitions,
+   .nr_parts   = ARRAY_SIZE(omap3devkit8000_nand_partitions),
+   .dma_channel= -1,   /* disable DMA in OMAP NAND driver */
+   .nand_setup = NULL,
+   .dev_ready  = NULL,


this is static variable, you don't need these NULL here.


+};
+
+static struct resource omap3devkit8000_nand_resource = {


wrong, should be a real array:

static struct resource omap3devkti8000_nand_resources[] = {
{
.start  = ??,
.end= ??,
.flags  = IORESOURCE_MEM,
},
};


+static struct platform_device omap3devkit8000_nand_device = {
+   .name   = "omap2-nand",
+   .id = -1,
+   .dev= {
+   .platform_data  = &omap3devkit8000_nand_data,
+   },
+   .num_resources  = 1,
+   .resource   = &omap3devkit8000_nand_resource,


.num_resources = ARRAY_SIZE(omap3devkit8000_nand_resources),
.resource   = omap3devkit8000_nand_resources,


+static struct gpio_led gpio_leds[] = {
+   {
+   .name   = "led1",
+   .default_trigger= "heartbeat",
+   .gpio   = 186,
+   .active_low = true,
+   },
+   {
+   .name   = "led2",
+   .default_trigger= "mmc0",
+   .gpio   = 163,
+   .active_low = true,
+   },
+   {
+   .name   = "ledB",
+   .default_trigger= "none",
+   .gpio   = 153,
+   .active_low = true,
+   },
+   {
+   .name   = "led3",
+   .default_trigger= "none",
+   .gpio   = 164,  /* gets replaced */


if so, you should initialize to -EINVAL.


+static struct ads7846_platform_data ads7846_config = {
+   .x_max  = 0x0fff,
+   .y_max  = 0x0fff,
+// .x_plate_ohms   = 180,
+// .pressure_max   = 255,


why this commented code with the wrong comment style here ?


+static struct spi_board_info omap3devkit8000_spi_board_info[] __initdata = {
+   {
+   .modalias   = "ads7846",
+   .bus_num= 2,
+   .chip_select= 0,
+   .max_speed_hz   = 150,
+   .controller_data= &ads7846_mcspi_config,
+   .irq= OMAP_GPIO_IRQ(OMAP3_DEVKIT_TS_GPIO),
+   .platform_data  = &ads7846_config,
+   }
+};
+
+


one blank like is enough.


+#define OMAP_DM9000_BASE   0x2c00
+
+static struct resource omap_dm9000_resources[] = {
+   [0] = {
+   .start  = OMAP_DM9000_BASE,
+   .end= (OMAP_DM9000_BASE + 0x4 - 1),
+   .flags  = IORESOURCE_MEM,
+   },
+

  1   2   >