[PATCH v3] printk: add option to print cpu id

2012-08-03 Thread Vikram Pandita
From: Vikram Pandita 

Introduce config option to enable CPU id reporting for printk() calls.

Example logs with this option enabled look like:
[   0] [0.063232] Mount-cache hash table entries: 512
[   0] [0.068054] CPU: Testing write buffer coherency: ok
[   0] [0.068939] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[   0] [0.069305] Setting up static identity map for 0x8046dc90 - 0x8046dd00
[   0] [0.069366] L310 cache controller enabled
[   0] [0.069396] l2x0: 16 ways, CACHE_ID 0x41c7, AUX_CTRL 0x7e47
[   1] [0.073211] CPU1: Booted secondary processor
[   1] [0.100463] CPU1: thread -1, cpu 1, socket 0, mpidr 8001
[   1] [0.100555] CPU1: Unknown IPI message 0x0
[   0] [0.101348] Brought up 2 CPUs

Its sometimes very useful to have printk also print the CPU Identifier
that executed the call. This has helped to debug various SMP issues on shipping
products.

Known limitation is if the system gets preempted between function call and
actual printk, the reported cpu-id might not be accurate. But most of the
times its seen to give a good feel of how the N cpu's in the system are
getting loaded.

Signed-off-by: Vikram Pandita 
Cc: Kay Sievers 
Cc: Mike Turquette 
Cc: Vimarsh Zutshi 
Signed-off-by: Vikram Pandita 
---
v1: initial version - had wrong cpuid logging mechanism
v2: fixed as per review comments from Kay Sievers
v3: allow cpuid to be u16 to support multi-core systems with 1000+ cores

 kernel/printk.c   |   51 +--
 lib/Kconfig.debug |   13 +
 2 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 6a76ab9..90d49b2 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -208,6 +208,7 @@ struct log {
u8 facility;/* syslog facility */
u8 flags:5; /* internal record flags */
u8 level:3; /* syslog level */
+   u16 cpuid;  /* cpu invoking the log */
 };
 
 /*
@@ -305,7 +306,8 @@ static u32 log_next(u32 idx)
 static void log_store(int facility, int level,
  enum log_flags flags, u64 ts_nsec,
  const char *dict, u16 dict_len,
- const char *text, u16 text_len)
+ const char *text, u16 text_len,
+ const u16 cpuid)
 {
struct log *msg;
u32 size, pad_len;
@@ -356,6 +358,7 @@ static void log_store(int facility, int level,
msg->ts_nsec = local_clock();
memset(log_dict(msg) + dict_len, 0, pad_len);
msg->len = sizeof(struct log) + text_len + dict_len + pad_len;
+   msg->cpuid = cpuid;
 
/* insert message */
log_next_idx += msg->len;
@@ -855,6 +858,25 @@ static size_t print_time(u64 ts, char *buf)
   (unsigned long)ts, rem_nsec / 1000);
 }
 
+#if defined(CONFIG_PRINTK_CPUID)
+static bool printk_cpuid = 1;
+#else
+static bool printk_cpuid;
+#endif
+module_param_named(cpuid, printk_cpuid, bool, S_IRUGO | S_IWUSR);
+
+static size_t print_cpuid(u16 cpuid, char *buf)
+{
+
+   if (!printk_cpuid)
+   return 0;
+
+   if (!buf)
+   return 7;
+
+   return sprintf(buf, "[%4d] ", cpuid);
+}
+
 static size_t print_prefix(const struct log *msg, bool syslog, char *buf)
 {
size_t len = 0;
@@ -874,6 +896,7 @@ static size_t print_prefix(const struct log *msg, bool 
syslog, char *buf)
}
}
 
+   len += print_cpuid(msg->cpuid, buf ? buf + len : NULL);
len += print_time(msg->ts_nsec, buf ? buf + len : NULL);
return len;
 }
@@ -1387,6 +1410,7 @@ static struct cont {
u64 ts_nsec;/* time of first print */
u8 level;   /* log level of first message */
u8 facility;/* log level of first message */
+   u16 cpuid;  /* cpu invoking the logging request */
enum log_flags flags;   /* prefix, newline flags */
bool flushed:1; /* buffer sealed and committed */
 } cont;
@@ -1405,7 +1429,8 @@ static void cont_flush(enum log_flags flags)
 * line. LOG_NOCONS suppresses a duplicated output.
 */
log_store(cont.facility, cont.level, flags | LOG_NOCONS,
- cont.ts_nsec, NULL, 0, cont.buf, cont.len);
+ cont.ts_nsec, NULL, 0, cont.buf, cont.len,
+ cont.cpuid);
cont.flags = flags;
cont.flushed = true;
} else {
@@ -1414,12 +1439,14 @@ static void cont_flush(enum log_flags flags)
 * just submit it to the store and free the buffer.
 */
log_store(cont.facility, cont.level, flags, 0,
- NULL, 0, cont.buf, cont.len);
+   

[PATCH] usb: musb: handle nuked ep dma interrupt

2012-05-18 Thread Vikram Pandita
From: Vikram Pandita 

User can trigger disabling of gadget at run time while the
transfers are going on.
Eg: 1: rmmod of musb driver while transfers are going on

Eg: 2: On android doing:
 echo 0   > /sys/class/android_usb/android0/enable
While a big file transfer is going on via PTP/MTP.

In such a case, musb_gadget_disable() calls nuke()
but the dma interrupt may still happen for an endpoint since hw
would raise the interrupt in anycase.

This can result in a NULL pointer access crash:

[  314.030426] PC is at txstate+0x74/0x20c
[  314.034759] LR is at musb_g_tx+0x140/0x204
[  314.039489] pc : []lr : []psr: 2193
[  314.039520] sp : c783bc68  ip : 0002  fp : c783bc9c
[  314.052429] r10: 0018  r9 :   r8 : 0200
[  314.058258] r7 :   r6 : fc0ab130  r5 : c781a410  r4 : c6caf640
[  314.065643] r3 :   r2 :   r1 :   r0 : c781a000
[  315.083251] Backtrace:
[  315.086242] [] (txstate+0x0/0x20c) from [] 
(musb_g_tx+0x140/0x204)
[  315.095123] [] (musb_g_tx+0x0/0x204) from [] 
(musb_dma_completion+0x40/0x54)
[  315.104980] [] (musb_dma_completion+0x0/0x54) from [] 
(dma_controller_irq+0x118/0x184)
[  315.115661] [] (dma_controller_irq+0x0/0x184) from [] 
(handle_irq_event_percpu+0x54/0x188)

So put protection in code to handle possiblity of getting an interrupt for an
endpoint that might have been already nuked.

Reported-by: Todd Poynor 
Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/musb_gadget.c |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index f42c29b..695c892 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -328,6 +328,13 @@ static void txstate(struct musb *musb, struct musb_request 
*req)
 
musb_ep = req->ep;
 
+   /* Check if EP is disabled */
+   if (!musb_ep->desc) {
+   dev_dbg(musb->controller, "ep:%s disabled - ignore request\n",
+   musb_ep->end_point.name);
+   return;
+   }
+
/* we shouldn't get here while DMA is active ... but we do ... */
if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) {
dev_dbg(musb->controller, "dma pending...\n");
@@ -650,6 +657,13 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
 
len = musb_ep->packet_sz;
 
+   /* Check if EP is disabled */
+   if (!musb_ep->desc) {
+   dev_dbg(musb->controller, "ep:%s disabled - ignore request\n",
+   musb_ep->end_point.name);
+   return;
+   }
+
/* We shouldn't get here while DMA is active, but we do... */
if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) {
dev_dbg(musb->controller, "DMA pending...\n");
-- 
1.7.9.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


[PATCH v2] OMAP: clock: optimize dpll locking logic

2011-11-04 Thread Vikram Pandita
From: Vikram Pandita 

If the dpll is already locked, code can be optimized
to return much earlier than doing redundent set of lock mode
and wait on idlest.

Signed-off-by: Vikram Pandita 
Reviewed-by: Todd Poynor 
---
v1: initial draft

v2: fix review comments

 arch/arm/mach-omap2/dpll3xxx.c |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index f77022b..2d4f6bd 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -135,11 +135,20 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, 
u8 n)
  */
 static int _omap3_noncore_dpll_lock(struct clk *clk)
 {
+   const struct dpll_data *dd;
u8 ai;
-   int r;
+   u8 state = 1;
+   int r = 0;
 
pr_debug("clock: locking DPLL %s\n", clk->name);
 
+   dd = clk->dpll_data;
+   state <<= __ffs(dd->idlest_mask);
+
+   /* Check if already locked */
+   if ((__raw_readl(dd->idlest_reg) & dd->idlest_mask) == state)
+   goto done;
+
ai = omap3_dpll_autoidle_read(clk);
 
omap3_dpll_deny_idle(clk);
@@ -151,6 +160,7 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
if (ai)
omap3_dpll_allow_idle(clk);
 
+done:
return r;
 }
 
-- 
1.7.5.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


[PATCH] OMAP: clock: optimize dpll locking logic

2011-11-02 Thread Vikram Pandita
From: Vikram Pandita 

If the dpll is already locked, code can be optimized
to return much earlier than doing redundent set of lock mode
and wait on idlest.

Signed-off-by: Vikram Pandita 
Cc: Rajendra Nayak 
---
 arch/arm/mach-omap2/dpll3xxx.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index f77022b..d100391 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -135,8 +135,9 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 
n)
  */
 static int _omap3_noncore_dpll_lock(struct clk *clk)
 {
+   const struct dpll_data *dd;
u8 ai;
-   int r;
+   int r = 0;
 
pr_debug("clock: locking DPLL %s\n", clk->name);
 
@@ -144,10 +145,16 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
 
omap3_dpll_deny_idle(clk);
 
+   dd = clk->dpll_data;
+   /* Check if already locked */
+   if ((__raw_readl(dd->idlest_reg) & dd->idlest_mask) == 1)
+   goto done;
+
_omap3_dpll_write_clken(clk, DPLL_LOCKED);
 
r = _omap3_wait_dpll_status(clk, 1);
 
+done:
if (ai)
omap3_dpll_allow_idle(clk);
 
-- 
1.7.5.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


[PATCH v3] usb: ehci: report Data Buffer Error in debug mode

2011-10-30 Thread Vikram Pandita
From: Vikram Pandita 

Data Buffer Error as per spec section 4.15.1.1.2
results when there is Underrun or Overrun condition.

This error is considered non-fatal and never gets reported.
Its a very good indication on things going wrong at system level,
like running memory at much slower speed.

This is a good error to flag allowing system level corrections.

An issue was found with OMAP4460 board where DDR had to be run
at full speed and this logging helped.

Signed-off-by: Vikram Pandita 
Reviewed-by: Marek Vasut 
Signed-off-by: Vikram Pandita 
---
v1: original patch

v2: fix review comments from Alan Stern
* use usb_endpoint_num, usb_endpoint_dir_in

v3: More comments from Alan Stern
* indent, use qh

 drivers/usb/host/ehci-q.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 4e4066c..f136f7f1 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -373,6 +373,17 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
  retry_xacterr:
if ((token & QTD_STS_ACTIVE) == 0) {
 
+   /* Report Data Buffer Error: non-fatal but useful */
+   if (token & QTD_STS_DBE)
+   ehci_dbg(ehci,
+   "detected DataBufferErr for urb %p 
ep%d%s len %d, qtd %p [qh %p]\n",
+   urb,
+   usb_endpoint_num(&urb->ep->desc),
+   usb_endpoint_dir_in(&urb->ep->desc) ? 
"in" : "out",
+   urb->transfer_buffer_length,
+   qtd,
+   qh);
+
/* on STALL, error, and short reads this urb must
 * complete and all its qtds must be recycled.
 */
-- 
1.7.5.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


[PATCH v2] usb: ehci: report Data Buffer Error in debug mode

2011-10-29 Thread Vikram Pandita
From: Vikram Pandita 

Data Buffer Error as per spec section 4.15.1.1.2
results when there is Underrun or Overrun condition.

This error is considered non-fatal and never gets reported.
Its a very good indication on things going wrong at system level,
like running memory at much slower speed.

This is a good error to flag allowing system level corrections.

An issue was found with OMAP4460 board where DDR had to be run
at full speed and this logging helped.

Signed-off-by: Vikram Pandita 
Reviewed-by: Marek Vasut 
---
v1: original patch

v2: fix review comments from Alan Stern

 drivers/usb/host/ehci-q.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 4e4066c..f81c6de 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -373,6 +373,16 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
  retry_xacterr:
if ((token & QTD_STS_ACTIVE) == 0) {
 
+   /* Report Data Buffer Error: non-fatal but useful */
+   if (token & QTD_STS_DBE) {
+   ehci_dbg(ehci,
+   "detected DataBufferErr for urb %p ep%d%s len 
%d, qtd %p [qh %p]\n",
+   urb, usb_endpoint_num(urb->ep),
+   usb_endpoint_dir_in(urb->ep) ? "in" : "out",
+   urb->transfer_buffer_length,
+   qtd, urb->ep->hcpriv);
+   }
+
/* on STALL, error, and short reads this urb must
 * complete and all its qtds must be recycled.
 */
-- 
1.7.5.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


[PATCH] mmc: omap_hsmmc: fix compile break

2011-10-29 Thread Vikram Pandita
From: Vikram Pandita 

omap_hsmmc.c: In function 'omap_hsmmc_protect_card':
omap_hsmmc.c:1273: error: 'pr_info' undeclared (first use in this function)
omap_hsmmc.c:1273: error: (Each undeclared identifier is reported only once
omap_hsmmc.c:1273: error: for each function it appears in.)
omap_hsmmc.c:1273: error: expected ';' before string constant
omap_hsmmc.c:1275: error: expected statement before ')' token

Signed-off-by: Vikram Pandita 
---
 drivers/mmc/host/omap_hsmmc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index e8ff123..101cd31 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1270,7 +1270,7 @@ static void omap_hsmmc_protect_card(struct 
omap_hsmmc_host *host)
}
} else {
if (!host->protect_card) {
-   pr_info"%s: cover is open, "
+   pr_info("%s: cover is open, "
 "card is now inaccessible\n",
 mmc_hostname(host->mmc));
host->protect_card = 1;
-- 
1.7.5.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


[PATCH] usb: ehci: report Data Buffer Error in debug mode

2011-10-28 Thread Vikram Pandita
From: Vikram Pandita 

Data Buffer Error as per spec section 4.15.1.1.2
results when there is Underrun or Overrun condition.

This error is considered non-fatal and never gets reported.
Its a very good indication on things going wrong at system level,
like running memory at much slower speed.

This is a good error to flag allowing system level corrections.

An issue was found with OMAP4460 board where DDR had to be run
at full speed and this logging helped.

Signed-off-by: Vikram Pandita 
---
 drivers/usb/host/ehci-q.c |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 4e4066c..2451361 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -373,6 +373,20 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
  retry_xacterr:
if ((token & QTD_STS_ACTIVE) == 0) {
 
+   /* Report Data Buffer Error: non-fatal but useful */
+   if (token & QTD_STS_DBE) {
+
+   ehci_dbg(ehci,
+   "detected DataBufferErr %s for urb %p ep%d%s 
len %d, qtd %p [qh %p]\n",
+   (urb->ep->desc.bEndpointAddress & USB_DIR_IN) ?
+   "OVER-RUN" : "UNDER-RUN",
+   urb, urb->ep->desc.bEndpointAddress & 0x0f,
+   (urb->ep->desc.bEndpointAddress & USB_DIR_IN) ? 
"in" : "out",
+   urb->transfer_buffer_length,
+   qtd, urb->ep->hcpriv);
+
+   }
+
/* on STALL, error, and short reads this urb must
 * complete and all its qtds must be recycled.
 */
-- 
1.7.5.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


[v2 0/2] usb: musb: off mode fixes

2011-09-07 Thread Vikram Pandita
From: Vikram Pandita 

v1:
Recent tests with OFF mode on OMAP44xx brings out these bugs 
v2:
Fix review comments from: Sergei Shtylyov 

Hema HK (1):
  usb: musb: omap2+: save and restore OTG_INTERFSEL

Vikram Pandita (1):
  usb: musb: omap2+: fix context api's

 drivers/usb/musb/musb_core.c |2 ++
 drivers/usb/musb/musb_core.h |1 +
 drivers/usb/musb/omap2430.c  |6 ++
 3 files changed, 9 insertions(+), 0 deletions(-)

-- 
1.7.4.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


[v2 1/2] usb: musb: omap2+: fix context api's

2011-09-07 Thread Vikram Pandita
From: Vikram Pandita 

RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr
are all indexed registers.

So before doing a context save or restore, INDEX register
should be set, then only one gets to the right register offset.

Signed-off-by: Vikram Pandita 
Signed-off-by: Anand Gadiyar 
---
 drivers/usb/musb/musb_core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 20a2873..6328aaf 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2159,6 +2159,7 @@ static void musb_save_context(struct musb *musb)
if (!epio)
continue;
 
+   musb_writeb(musb_base, MUSB_INDEX, i);
musb->context.index_regs[i].txmaxp =
musb_readw(epio, MUSB_TXMAXP);
musb->context.index_regs[i].txcsr =
@@ -2234,6 +2235,7 @@ static void musb_restore_context(struct musb *musb)
if (!epio)
continue;
 
+   musb_writeb(musb_base, MUSB_INDEX, i);
musb_writew(epio, MUSB_TXMAXP,
musb->context.index_regs[i].txmaxp);
musb_writew(epio, MUSB_TXCSR,
-- 
1.7.4.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


[v2 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL

2011-09-07 Thread Vikram Pandita
From: Hema HK 

we need to save and restore OTG_INTERFSEL register
else we will be unable to function on resume after
OFF mode.

Reported-by: Devaraj Rangasamy 
Signed-off-by: Hema HK 
Signed-off-by: Kishon Vijay Abraham I 
Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/musb_core.h |1 +
 drivers/usb/musb/omap2430.c  |6 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index b3c065a..3259a6b 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -311,6 +311,7 @@ struct musb_context_registers {
u8 index, testmode;
 
u8 devctl, busctl, misc;
+   u32 otg_interfsel;
 
struct musb_csr_regs index_regs[MUSB_C_NUM_EPS];
 };
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ba85f27..78eb13a 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -491,6 +491,9 @@ static int omap2430_runtime_suspend(struct device *dev)
struct omap2430_glue*glue = dev_get_drvdata(dev);
struct musb *musb = glue_to_musb(glue);
 
+   musb->context.otg_interfsel = musb_readl(musb->mregs,
+   OTG_INTERFSEL);
+
omap2430_low_level_exit(musb);
otg_set_suspend(musb->xceiv, 1);
 
@@ -503,6 +506,9 @@ static int omap2430_runtime_resume(struct device *dev)
struct musb *musb = glue_to_musb(glue);
 
omap2430_low_level_init(musb);
+   musb_writel(musb->mregs, OTG_INTERFSEL,
+   musb->context.otg_interfsel);
+
otg_set_suspend(musb->xceiv, 0);
 
return 0;
-- 
1.7.4.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


[PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL

2011-09-06 Thread Vikram Pandita
From: Hema HK 

we need to save and restore OTG_INTERFSEL register
else we will be unable to function on resume after
OFF mode.

Change-Id: I6c29c69596d5f47e00cf74ab0e32bb44ef71dda9
Reported-by: Devaraj Rangasamy 
Signed-off-by: Hema HK 
Signed-off-by: Kishon Vijay Abraham I 
---
 drivers/usb/musb/musb_core.h |1 +
 drivers/usb/musb/omap2430.c  |6 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index b3c065a..3259a6b 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -311,6 +311,7 @@ struct musb_context_registers {
u8 index, testmode;
 
u8 devctl, busctl, misc;
+   u32 otg_interfsel;
 
struct musb_csr_regs index_regs[MUSB_C_NUM_EPS];
 };
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ba85f27..78eb13a 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -491,6 +491,9 @@ static int omap2430_runtime_suspend(struct device *dev)
struct omap2430_glue*glue = dev_get_drvdata(dev);
struct musb *musb = glue_to_musb(glue);
 
+   musb->context.otg_interfsel = musb_readl(musb->mregs,
+   OTG_INTERFSEL);
+
omap2430_low_level_exit(musb);
otg_set_suspend(musb->xceiv, 1);
 
@@ -503,6 +506,9 @@ static int omap2430_runtime_resume(struct device *dev)
struct musb *musb = glue_to_musb(glue);
 
omap2430_low_level_init(musb);
+   musb_writel(musb->mregs, OTG_INTERFSEL,
+   musb->context.otg_interfsel);
+
otg_set_suspend(musb->xceiv, 0);
 
return 0;
-- 
1.7.4.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


[PATCH 1/2] usb: musb: omap2+: fix context api's

2011-09-06 Thread Vikram Pandita
From: Vikram Pandita 

RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr
are all indexed registers.

So before doing a context save or restore, INDEX register
should be set, then only one gets to the right register offset.

Change-Id: I33ab09f8c214457914ee848e097880c8800de9e6
Signed-off-by: Vikram Pandita 
Signed-off-by: Anand Gadiyar 
---
 drivers/usb/musb/musb_core.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 20a2873..83facaf 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2158,7 +2158,7 @@ static void musb_save_context(struct musb *musb)
epio = hw_ep->regs;
if (!epio)
continue;
-
+   musb_writeb(musb_base, MUSB_INDEX, i);
musb->context.index_regs[i].txmaxp =
musb_readw(epio, MUSB_TXMAXP);
musb->context.index_regs[i].txcsr =
@@ -2233,7 +2233,7 @@ static void musb_restore_context(struct musb *musb)
epio = hw_ep->regs;
if (!epio)
continue;
-
+   musb_writeb(musb_base, MUSB_INDEX, i);
musb_writew(epio, MUSB_TXMAXP,
musb->context.index_regs[i].txmaxp);
musb_writew(epio, MUSB_TXCSR,
-- 
1.7.4.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


[PATCH 0/2] usb: musb: off mode fixes

2011-09-06 Thread Vikram Pandita
From: Vikram Pandita 

Recent tests with OFF mode on OMAP44xx brings out these bugs

Hema HK (1):
  usb: musb: omap2+: save and restore OTG_INTERFSEL

Vikram Pandita (1):
  usb: musb: omap2+: fix context api's

 drivers/usb/musb/musb_core.c |4 ++--
 drivers/usb/musb/musb_core.h |1 +
 drivers/usb/musb/omap2430.c  |6 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

-- 
1.7.4.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


[PATCH] usb: musb: fix pm_runtime calls while atomic

2011-08-12 Thread Vikram Pandita
From: Vikram Pandita 

musb pm_runtime_get_sync call happens in intrrupt context on cable attach case
That can result in re-enabling the interrupts and cause side affects.

So move the code to a work queue.

Following is the error path hit on cable attach:

BUG: sleeping function called from invalid context at 
drivers/base/power/runtime.c:802
in_atomic(): 0, irqs_disabled(): 0, pid: 18, name: irq/378-twl6030

Backtrace:
[] (dump_backtrace+0x0/0x110) from [] (dump_stack+0x18/0x1c)
[] (dump_stack+0x0/0x1c) from [] (__might_sleep+0x130/0x134)
[] (__might_sleep+0x0/0x134) from [] 
(__pm_runtime_resume+0x94/0x98)
[] (__pm_runtime_resume+0x0/0x98) from [] 
(musb_otg_notifications+0x9c/0x164)
[] (musb_otg_notifications+0x0/0x164) from [] 
(notifier_call_chain+0x4c/0x8c)
[] (notifier_call_chain+0x0/0x8c) from [] 
(__atomic_notifier_call_chain+0x40/0x54)
[] (__atomic_notifier_call_chain+0x0/0x54) from [] 
(atomic_notifier_call_chain+0x20/0x28)
[] (atomic_notifier_call_chain+0x0/0x28) from [] 
(twl6030_usb_irq+0xc8/0xdc)
[] (twl6030_usb_irq+0x0/0xdc) from [] 
(irq_thread_fn+0x24/0x40)
[] (irq_thread_fn+0x0/0x40) from [] (irq_thread+0x150/0x1d8)
[] (irq_thread+0x0/0x1d8) from [] (kthread+0x94/0x98)
[] (kthread+0x0/0x98) from [] (do_exit+0x0/0x720)

Tested with:
MUSB Device mode: Cold boot / Hot plug
MUSB Host mode: Cold boot / Hot plug

Signed-off-by: Vikram Pandita 
Signed-off-by: Moiz Sonasath 
Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/musb_core.h |2 ++
 drivers/usb/musb/omap2430.c  |   14 +-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 0e053b5..ff47316 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -386,6 +386,7 @@ struct musb {
 
irqreturn_t (*isr)(int, void *);
struct work_struct  irq_work;
+   struct work_struct  otg_notifier_work;
u16 hwvers;
 
 /* this hub status bit is reserved by USB 2.0 and not seen by usbcore */
@@ -432,6 +433,7 @@ struct musb {
u16 int_tx;
 
struct otg_transceiver  *xceiv;
+   u8  xceiv_event;
 
int nIrq;
unsignedirq_wake:1;
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index c5d4c44..3026673 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -234,11 +234,21 @@ static int musb_otg_notifications(struct notifier_block 
*nb,
unsigned long event, void *unused)
 {
struct musb *musb = container_of(nb, struct musb, nb);
+
+   musb->xceiv_event = event;
+   schedule_work(&musb->otg_notifier_work);
+
+   return 0;
+}
+
+static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
+{
+   struct musb *musb = container_of(data_notifier_work, struct musb, 
otg_notifier_work);
struct device *dev = musb->controller;
struct musb_hdrc_platform_data *pdata = dev->platform_data;
struct omap_musb_board_data *data = pdata->board_data;
 
-   switch (event) {
+   switch (musb->xceiv_event) {
case USB_EVENT_ID:
dev_dbg(musb->controller, "ID GND\n");
 
@@ -310,6 +320,8 @@ static int omap2430_musb_init(struct musb *musb)
return -ENODEV;
}
 
+   INIT_WORK(&musb->otg_notifier_work, musb_otg_notifier_work);
+
status = pm_runtime_get_sync(dev);
if (status < 0) {
dev_err(dev, "pm_runtime_get_sync FAILED");
-- 
1.7.4.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


[PATCH v4] usb: musb: Enable DMA mode1 RX for USB-Mass-Storage

2011-07-19 Thread Vikram Pandita
From: Anand Gadiyar 

This patch enables the DMA mode1 RX support.
This feature is enabled based on the short_not_ok flag passed from
gadget drivers.

This will result in a thruput performance gain of around
40% for USB mass-storage/mtp use cases.

Signed-off-by: Anand Gadiyar 
Signed-off-by: Moiz Sonasath 
Signed-off-by: Vikram Pandita 
Tested-by: Vikram Pandita 
---
v1 - initial push
v2 - fixed whitespace issues as per Sergei Shtylyov 
comments
v3 - restor authorship to Anand Gadiyar 
v4 - adding my signed-off as per Kevin Hilman 

 drivers/usb/musb/musb_gadget.c |   68 ---
 1 files changed, 42 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6aeb363..4a1432e 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -634,6 +634,7 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
u16 len;
u16 csr = musb_readw(epio, MUSB_RXCSR);
struct musb_hw_ep   *hw_ep = &musb->endpoints[epnum];
+   u8  use_mode_1;
 
if (hw_ep->is_shared_fifo)
musb_ep = &hw_ep->ep_in;
@@ -683,6 +684,18 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
 
if (csr & MUSB_RXCSR_RXPKTRDY) {
len = musb_readw(epio, MUSB_RXCOUNT);
+
+   /*
+* Enable Mode 1 for RX transfers only for mass-storage
+* use-case, based on short_not_ok flag which is set only
+* from file_storage and f_mass_storage drivers
+*/
+
+   if (request->short_not_ok && len == musb_ep->packet_sz)
+   use_mode_1 = 1;
+   else
+   use_mode_1 = 0;
+
if (request->actual < request->length) {
 #ifdef CONFIG_USB_INVENTRA_DMA
if (is_buffer_mapped(req)) {
@@ -714,37 +727,40 @@ static void rxstate(struct musb *musb, struct 
musb_request *req)
 * then becomes usable as a runtime "use mode 1" hint...
 */
 
-   csr |= MUSB_RXCSR_DMAENAB;
-#ifdef USE_MODE1
-   csr |= MUSB_RXCSR_AUTOCLEAR;
-   /* csr |= MUSB_RXCSR_DMAMODE; */
-
-   /* this special sequence (enabling and then
-* disabling MUSB_RXCSR_DMAMODE) is required
-* to get DMAReq to activate
-*/
-   musb_writew(epio, MUSB_RXCSR,
-   csr | MUSB_RXCSR_DMAMODE);
-#else
-   if (!musb_ep->hb_mult &&
-   musb_ep->hw_ep->rx_double_buffered)
+   /* Experimental: Mode1 works with mass storage 
use cases */
+   if (use_mode_1) {
csr |= MUSB_RXCSR_AUTOCLEAR;
-#endif
-   musb_writew(epio, MUSB_RXCSR, csr);
+   musb_writew(epio, MUSB_RXCSR, csr);
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   /* this special sequence (enabling and 
then
+   * disabling MUSB_RXCSR_DMAMODE) is 
required
+   * to get DMAReq to activate
+   */
+   musb_writew(epio, MUSB_RXCSR,
+   csr | MUSB_RXCSR_DMAMODE);
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   } else {
+   if (!musb_ep->hb_mult &&
+   
musb_ep->hw_ep->rx_double_buffered)
+   csr |= MUSB_RXCSR_AUTOCLEAR;
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+   }
 
if (request->actual < request->length) {
int transfer_size = 0;
-#ifdef USE_MODE1
-   transfer_size = min(request->length - 
request->actual,
-   channel->max_len);
-#else
-   transfer_size = min(request->length - 
request->actual,
-   (unsigned)len);
-#endif
-

[PATCH v3] usb: musb: Enable DMA mode1 RX for USB-Mass-Storage

2011-07-19 Thread Vikram Pandita
From: Anand Gadiyar 

This patch enables the DMA mode1 RX support.
This feature is enabled based on the short_not_ok flag passed from
gadget drivers.

This will result in a thruput performance gain of around
40% for USB mass-storage/mtp use cases.

Signed-off-by: Anand Gadiyar 
Signed-off-by: Moiz Sonasath 
Tested-by: Vikram Pandita 
---
v1 - initial push
v2 - fixed whitespace issues as per Sergei Shtylyov 
comments
v3 - restor authorship to Anand Gadiyar 

 drivers/usb/musb/musb_gadget.c |   68 ---
 1 files changed, 42 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6aeb363..4a1432e 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -634,6 +634,7 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
u16 len;
u16 csr = musb_readw(epio, MUSB_RXCSR);
struct musb_hw_ep   *hw_ep = &musb->endpoints[epnum];
+   u8  use_mode_1;
 
if (hw_ep->is_shared_fifo)
musb_ep = &hw_ep->ep_in;
@@ -683,6 +684,18 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
 
if (csr & MUSB_RXCSR_RXPKTRDY) {
len = musb_readw(epio, MUSB_RXCOUNT);
+
+   /*
+* Enable Mode 1 for RX transfers only for mass-storage
+* use-case, based on short_not_ok flag which is set only
+* from file_storage and f_mass_storage drivers
+*/
+
+   if (request->short_not_ok && len == musb_ep->packet_sz)
+   use_mode_1 = 1;
+   else
+   use_mode_1 = 0;
+
if (request->actual < request->length) {
 #ifdef CONFIG_USB_INVENTRA_DMA
if (is_buffer_mapped(req)) {
@@ -714,37 +727,40 @@ static void rxstate(struct musb *musb, struct 
musb_request *req)
 * then becomes usable as a runtime "use mode 1" hint...
 */
 
-   csr |= MUSB_RXCSR_DMAENAB;
-#ifdef USE_MODE1
-   csr |= MUSB_RXCSR_AUTOCLEAR;
-   /* csr |= MUSB_RXCSR_DMAMODE; */
-
-   /* this special sequence (enabling and then
-* disabling MUSB_RXCSR_DMAMODE) is required
-* to get DMAReq to activate
-*/
-   musb_writew(epio, MUSB_RXCSR,
-   csr | MUSB_RXCSR_DMAMODE);
-#else
-   if (!musb_ep->hb_mult &&
-   musb_ep->hw_ep->rx_double_buffered)
+   /* Experimental: Mode1 works with mass storage 
use cases */
+   if (use_mode_1) {
csr |= MUSB_RXCSR_AUTOCLEAR;
-#endif
-   musb_writew(epio, MUSB_RXCSR, csr);
+   musb_writew(epio, MUSB_RXCSR, csr);
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   /* this special sequence (enabling and 
then
+   * disabling MUSB_RXCSR_DMAMODE) is 
required
+   * to get DMAReq to activate
+   */
+   musb_writew(epio, MUSB_RXCSR,
+   csr | MUSB_RXCSR_DMAMODE);
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   } else {
+   if (!musb_ep->hb_mult &&
+   
musb_ep->hw_ep->rx_double_buffered)
+   csr |= MUSB_RXCSR_AUTOCLEAR;
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+   }
 
if (request->actual < request->length) {
int transfer_size = 0;
-#ifdef USE_MODE1
-   transfer_size = min(request->length - 
request->actual,
-   channel->max_len);
-#else
-   transfer_size = min(request->length - 
request->actual,
-   (unsigned)len);
-#endif
-   if (transfer_size <= musb_ep->packet_sz)
- 

[PATCH v2] usb: musb: Enable DMA mode1 RX for USB-Mass-Storage

2011-07-18 Thread Vikram Pandita
From: Vikram Pandita 

This patch enables the DMA mode1 RX support.
This feature is enabled based on the short_not_ok flag passed from
gadget drivers.

This will result in a thruput performance gain of around
40% for USB mass-storage/mtp use cases.

Based on Original work by
Anand Gadiyar  on 2.6.35 kernel

Change-Id: I9b3a7cae73b63e86128d2caf4cdd67ab77556e75
Signed-off-by: Moiz Sonasath 
Signed-off-by: Vikram Pandita 
---

V1 - initial drop
V2 - fixed whitespace issues as per Sergei Shtylyov 
comments

 drivers/usb/musb/musb_gadget.c |   68 ---
 1 files changed, 42 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6aeb363..4a1432e 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -634,6 +634,7 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
u16 len;
u16 csr = musb_readw(epio, MUSB_RXCSR);
struct musb_hw_ep   *hw_ep = &musb->endpoints[epnum];
+   u8  use_mode_1;
 
if (hw_ep->is_shared_fifo)
musb_ep = &hw_ep->ep_in;
@@ -683,6 +684,18 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
 
if (csr & MUSB_RXCSR_RXPKTRDY) {
len = musb_readw(epio, MUSB_RXCOUNT);
+
+   /*
+* Enable Mode 1 for RX transfers only for mass-storage
+* use-case, based on short_not_ok flag which is set only
+* from file_storage and f_mass_storage drivers
+*/
+
+   if (request->short_not_ok && len == musb_ep->packet_sz)
+   use_mode_1 = 1;
+   else
+   use_mode_1 = 0;
+
if (request->actual < request->length) {
 #ifdef CONFIG_USB_INVENTRA_DMA
if (is_buffer_mapped(req)) {
@@ -714,37 +727,40 @@ static void rxstate(struct musb *musb, struct 
musb_request *req)
 * then becomes usable as a runtime "use mode 1" hint...
 */
 
-   csr |= MUSB_RXCSR_DMAENAB;
-#ifdef USE_MODE1
-   csr |= MUSB_RXCSR_AUTOCLEAR;
-   /* csr |= MUSB_RXCSR_DMAMODE; */
-
-   /* this special sequence (enabling and then
-* disabling MUSB_RXCSR_DMAMODE) is required
-* to get DMAReq to activate
-*/
-   musb_writew(epio, MUSB_RXCSR,
-   csr | MUSB_RXCSR_DMAMODE);
-#else
-   if (!musb_ep->hb_mult &&
-   musb_ep->hw_ep->rx_double_buffered)
+   /* Experimental: Mode1 works with mass storage 
use cases */
+   if (use_mode_1) {
csr |= MUSB_RXCSR_AUTOCLEAR;
-#endif
-   musb_writew(epio, MUSB_RXCSR, csr);
+   musb_writew(epio, MUSB_RXCSR, csr);
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   /* this special sequence (enabling and 
then
+   * disabling MUSB_RXCSR_DMAMODE) is 
required
+   * to get DMAReq to activate
+   */
+   musb_writew(epio, MUSB_RXCSR,
+   csr | MUSB_RXCSR_DMAMODE);
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   } else {
+   if (!musb_ep->hb_mult &&
+   
musb_ep->hw_ep->rx_double_buffered)
+   csr |= MUSB_RXCSR_AUTOCLEAR;
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+   }
 
if (request->actual < request->length) {
int transfer_size = 0;
-#ifdef USE_MODE1
-   transfer_size = min(request->length - 
request->actual,
-   channel->max_len);
-#else
-   transfer_size = min(request->length - 
request->actual,
-   (unsigned)len);
-#endif
-   if (tra

[PATCH] usb: musb: Enable DMA mode1 RX for USB-Mass-Storage

2011-07-15 Thread Vikram Pandita
From: Vikram Pandita 

This patch enables the DMA mode1 RX support.
This feature is enabled based on the short_not_ok flag passed from
gadget drivers.

This will result in a thruput performance gain of around
40% for USB mass-storage/mtp use cases.

Based on Original work by
Anand Gadiyar  on 2.6.35 kernel

Tested on OMAP4460 Blaze board.

Signed-off-by: Moiz Sonasath 
Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/musb_gadget.c |   42 ---
 1 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 9412410..e643ec2 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -624,6 +624,7 @@ void musb_g_tx(struct musb *musb, u8 epnum)
 /*
  * Context: controller locked, IRQs blocked, endpoint selected
  */
+
 static void rxstate(struct musb *musb, struct musb_request *req)
 {
const u8epnum = req->epnum;
@@ -634,6 +635,7 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
u16 len;
u16 csr = musb_readw(epio, MUSB_RXCSR);
struct musb_hw_ep   *hw_ep = &musb->endpoints[epnum];
+   u8  use_mode_1;
 
if (hw_ep->is_shared_fifo)
musb_ep = &hw_ep->ep_in;
@@ -683,6 +685,18 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
 
if (csr & MUSB_RXCSR_RXPKTRDY) {
len = musb_readw(epio, MUSB_RXCOUNT);
+
+   /*
+* Enable Mode 1 for RX transfers only for mass-storage
+* use-case, based on short_not_ok flag which is set only
+* from file_storage and f_mass_storage drivers
+*/
+
+   if (request->short_not_ok && len == musb_ep->packet_sz)
+   use_mode_1 = 1;
+   else
+   use_mode_1 = 0;
+
if (request->actual < request->length) {
 #ifdef CONFIG_USB_INVENTRA_DMA
if (is_buffer_mapped(req)) {
@@ -714,10 +728,13 @@ static void rxstate(struct musb *musb, struct 
musb_request *req)
 * then becomes usable as a runtime "use mode 1" hint...
 */
 
-   csr |= MUSB_RXCSR_DMAENAB;
-#ifdef USE_MODE1
+   /* Experimental: Mode1 works with mass storage use cases
+*/
+   if (use_mode_1) {
csr |= MUSB_RXCSR_AUTOCLEAR;
-   /* csr |= MUSB_RXCSR_DMAMODE; */
+   musb_writew(epio, MUSB_RXCSR, csr);
+   csr |= MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
 
/* this special sequence (enabling and then
 * disabling MUSB_RXCSR_DMAMODE) is required
@@ -725,26 +742,27 @@ static void rxstate(struct musb *musb, struct 
musb_request *req)
 */
musb_writew(epio, MUSB_RXCSR,
csr | MUSB_RXCSR_DMAMODE);
-#else
+   musb_writew(epio, MUSB_RXCSR, csr);
+
+   } else {
if (!musb_ep->hb_mult &&
musb_ep->hw_ep->rx_double_buffered)
csr |= MUSB_RXCSR_AUTOCLEAR;
-#endif
+   csr |= MUSB_RXCSR_DMAENAB;
musb_writew(epio, MUSB_RXCSR, csr);
+   }
 
if (request->actual < request->length) {
int transfer_size = 0;
-#ifdef USE_MODE1
+   if (use_mode_1) {
transfer_size = min(request->length - 
request->actual,
channel->max_len);
-#else
+   musb_ep->dma->desired_mode = 1;
+   } else {
transfer_size = min(request->length - 
request->actual,
(unsigned)len);
-#endif
-   if (transfer_size <= musb_ep->packet_sz)
-   musb_ep->dma->desired_mode = 0;
-   else
-   musb_ep->dma->desired_mode = 1;
+   musb_ep->dma->desired_mode = 0;
+   }
 
use_dma = c->channel_program(
channel,
-- 
1.7.4.1

--
To unsubscribe from this list: send the

[PATCH] OMAP: DSS2: DSI: enable interface for omap4

2011-04-20 Thread Vikram Pandita
From: Vikram Pandita 

By default, the DSI is not getting enabled for omap4.
OMAP2PLUS does not catch this issue since it has ARCH_OMAP3.

The issue is only seen when using defconfig with ARCH_OMAP4 only.

Signed-off-by: Vikram Pandita 
Cc: Archit Taneja 
Cc: Tomi Valkeinen 
---
 drivers/video/omap2/dss/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig
index 7a49a75..6b3e2da 100644
--- a/drivers/video/omap2/dss/Kconfig
+++ b/drivers/video/omap2/dss/Kconfig
@@ -80,7 +80,7 @@ config OMAP2_DSS_SDI
 
 config OMAP2_DSS_DSI
bool "DSI support"
-   depends on ARCH_OMAP3
+   depends on ARCH_OMAP3 || ARCH_OMAP4
 default n
help
  MIPI DSI (Display Serial Interface) support.
-- 
1.7.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


[PATCH v2] omap4: fix omap_type() function

2010-07-10 Thread Vikram Pandita
Following patch added the omap_type() functionality for omap4
737daa03: omap4: Fix omap_type() for omap4

However the omap_type() function would not work as:
1) the base address for CONTROL_STATUS register is wrong
So insted of using omap_ctrl_readl that has a different base offset,
use a correct offset using omap_readl

2) "Not yet supported" check for omap4 needs to be removed

Verified on OMAP4 SDP board

Signed-off-by: Vikram Pandita 
Cc: Shilimkar, Santosh 
---

V1: had broken mmc support
V2: No mmc break; use omap_readl to get to the right register

 arch/arm/mach-omap2/id.c  |2 +-
 arch/arm/plat-omap/sram.c |4 
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37b8a1a..6d47f91 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -58,7 +58,7 @@ int omap_type(void)
} else if (cpu_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
} else if (cpu_is_omap44xx()) {
-   val = omap_ctrl_readl(OMAP44XX_CONTROL_STATUS);
+   val = omap_readl(OMAP443X_SCM_BASE + OMAP44XX_CONTROL_STATUS);
} else {
pr_err("Cannot detect omap type!\n");
goto out;
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index a72b391..98c86ff 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -93,10 +93,6 @@ extern unsigned long omapfb_reserve_sram(unsigned long 
sram_pstart,
  */
 static int is_sram_locked(void)
 {
-   if (cpu_is_omap44xx())
-   /* Not yet supported */
-   return 0;
-
if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
/* RAMFW: R/W access to all initiators for all qualifier sets */
if (cpu_is_omap242x()) {
-- 
1.6.6.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


[PATCH v2 1/2] omap: sram: fix is_sram_locked check

2010-07-10 Thread Vikram Pandita
For OMAP24xx/34xx/44xx: omap_type() returns the correct type:
 OMAP2_DEVICE_TYPE_TEST
 OMAP2_DEVICE_TYPE_EMU
 OMAP2_DEVICE_TYPE_SEC
 OMAP2_DEVICE_TYPE_GP
 OMAP2_DEVICE_TYPE_BAD

In current implementation there are two problems:
Problem 1:
For 34xx, the current if check will never return true.

Problem 2:
For 24xx the correct type check should be with omap_type() function
Verified by checking the TRM 24xx for CONTROL_STATUS register bits

Signed-off-by: Vikram Pandita 
Acked-by: Santosh Shilimkar 
---

Not fixing the omap_type() check for OMAP4 since Santosh suggests there is
a clean 44xx register definition change coming that would fix the issue

 arch/arm/plat-omap/sram.c |7 +--
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 226b2e8..2eb5a27 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -93,16 +93,11 @@ extern unsigned long omapfb_reserve_sram(unsigned long 
sram_pstart,
  */
 static int is_sram_locked(void)
 {
-   int type = 0;
-
if (cpu_is_omap44xx())
/* Not yet supported */
return 0;
 
-   if (cpu_is_omap242x())
-   type = omap_rev() & OMAP2_DEVICETYPE_MASK;
-
-   if (type == GP_DEVICE) {
+   if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
/* RAMFW: R/W access to all initiators for all qualifier sets */
if (cpu_is_omap242x()) {
__raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all 
q-vects */
-- 
1.6.6.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


[PATCH v2 2/2] omap4: SRAM start address correction

2010-07-10 Thread Vikram Pandita
On OMAP4 there is no need to have SRAM_BOOTLOADER_SZ provision

Hence put this macro under CONFIG_ARCH_OMAP2PLUS check

Signed-off-by: Vikram Pandita 
Reviewed-by: Santosh Shilimkar 
---
 arch/arm/plat-omap/sram.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 2eb5a27..a72b391 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -53,7 +53,7 @@
 #define OMAP4_SRAM_PUB_PA  (OMAP4_SRAM_PA + 0x4000)
 #define OMAP4_SRAM_PUB_VA  (OMAP4_SRAM_VA + 0x4000)
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2PLUS)
 #define SRAM_BOOTLOADER_SZ 0x00
 #else
 #define SRAM_BOOTLOADER_SZ 0x80
-- 
1.6.6.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


[PATCH 1/3] omap: sram: fix is_sram_locked check

2010-07-10 Thread Vikram Pandita
For OMAP24xx/34xx/44xx: omap_type() returns the correct type:
 OMAP2_DEVICE_TYPE_TEST
 OMAP2_DEVICE_TYPE_EMU
 OMAP2_DEVICE_TYPE_SEC
 OMAP2_DEVICE_TYPE_GP
 OMAP2_DEVICE_TYPE_BAD

In current implementation there are two problems:
Problem 1:
For 34xx, the current if check will never return true.

Problem 2:
For 24xx the correct type check should be with omap_type() function
Verified by checking the TRM 24xx for CONTROL_STATUS register bits

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/sram.c |7 +--
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 226b2e8..2eb5a27 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -93,16 +93,11 @@ extern unsigned long omapfb_reserve_sram(unsigned long 
sram_pstart,
  */
 static int is_sram_locked(void)
 {
-   int type = 0;
-
if (cpu_is_omap44xx())
/* Not yet supported */
return 0;
 
-   if (cpu_is_omap242x())
-   type = omap_rev() & OMAP2_DEVICETYPE_MASK;
-
-   if (type == GP_DEVICE) {
+   if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
/* RAMFW: R/W access to all initiators for all qualifier sets */
if (cpu_is_omap242x()) {
__raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all 
q-vects */
-- 
1.6.6.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


[PATCH 2/3] omap4: fix omap_type() function

2010-07-10 Thread Vikram Pandita
Following patch added the omap_type() functionality for omap4
737daa03: omap4: Fix omap_type() for omap4

However the omap_type() function would not work as:
1) the base address for CONTROL_STATUS register is wrongly mapped

2) "Not yet supported" check for omap4 needs to be removed

Verified on OMAP4 SDP board

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/include/plat/omap44xx.h |2 +-
 arch/arm/plat-omap/sram.c  |4 
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h 
b/arch/arm/plat-omap/include/plat/omap44xx.h
index 8b3f12f..2075856 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -33,7 +33,7 @@
 #define OMAP4430_PRCM_MPU_BASE 0x48243000
 #define OMAP44XX_GPMC_BASE 0x5000
 #define OMAP443X_SCM_BASE  0x4a002000
-#define OMAP443X_CTRL_BASE 0x4a10
+#define OMAP443X_CTRL_BASE 0x4a002000
 #define OMAP44XX_IC_BASE   0x4820
 #define OMAP44XX_IVA_INTC_BASE 0x4000
 #define IRQ_SIR_IRQ0x0040
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 2eb5a27..112b807 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -93,10 +93,6 @@ extern unsigned long omapfb_reserve_sram(unsigned long 
sram_pstart,
  */
 static int is_sram_locked(void)
 {
-   if (cpu_is_omap44xx())
-   /* Not yet supported */
-   return 0;
-
if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
/* RAMFW: R/W access to all initiators for all qualifier sets */
if (cpu_is_omap242x()) {
-- 
1.6.6.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


[PATCH 3/3] omap4: SRAM start and size change for EMU/HS devices

2010-07-10 Thread Vikram Pandita
On OMAP4 the SRAM configuration is:
GP Device:
Start Address: 0x4030 
Size: 0xE000 (56KB)

EMU/HS Device:
Start Address: 0x4030 4000
Size: 0xA000 (40KB)

Implement this mapping in the sram file

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/sram.c |   17 +
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 112b807..3c7c9a6 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -53,7 +53,7 @@
 #define OMAP4_SRAM_PUB_PA  (OMAP4_SRAM_PA + 0x4000)
 #define OMAP4_SRAM_PUB_VA  (OMAP4_SRAM_VA + 0x4000)
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2PLUS)
 #define SRAM_BOOTLOADER_SZ 0x00
 #else
 #define SRAM_BOOTLOADER_SZ 0x80
@@ -134,9 +134,18 @@ void __init omap_detect_sram(void)
omap_sram_size = 0x8000; /* 32K */
}
} else if (cpu_is_omap44xx()) {
-   omap_sram_base = OMAP4_SRAM_PUB_VA;
-   omap_sram_start = OMAP4_SRAM_PUB_PA;
-   omap_sram_size = 0xa000; /* 40K */
+   if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) ||
+   (omap_type() == OMAP2_DEVICE_TYPE_SEC)) {
+   /* 40K For Public SRAM */
+   omap_sram_base = OMAP4_SRAM_PUB_VA;
+   omap_sram_start = OMAP4_SRAM_PUB_PA;
+   omap_sram_size = 0xA000;
+   } else {
+   /* 56 KB SRAM on GP device */
+   omap_sram_base = OMAP4_SRAM_VA;
+   omap_sram_start = OMAP4_SRAM_PA;
+   omap_sram_size = 0xE000;
+   }
} else {
omap_sram_base = OMAP2_SRAM_PUB_VA;
omap_sram_start = OMAP2_SRAM_PUB_PA;
-- 
1.6.6.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


[PATCH 0/3] Fix omap_type() function

2010-07-10 Thread Vikram Pandita
Aim was to get omap_type() function work on omap4.
In doing so, fixing an issue with is_sram_locked() function.

Patches tested/verified on omap4 sdp.
Patches based of latest linus commit: e467e10

Vikram Pandita (3):
  omap: sram: fix is_sram_locked check
  omap4: fix omap_type() function
  omap4: SRAM start and size change for EMU/HS devices

 arch/arm/plat-omap/include/plat/omap44xx.h |2 +-
 arch/arm/plat-omap/sram.c  |   28 ++--
 2 files changed, 15 insertions(+), 15 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


[PATCH] USB: musb: allow unaligned memory data transfers

2010-01-12 Thread Vikram Pandita
On MUSB:IP rev RTL1.8 and above(OMAP3630, OMAP4),
DMA addresses have to be word aligned.

g-ether gadget passes unaligned buffers to the controller
For such buffers, dma fails and a fall back mechanism of interrupt
mode is used

Validated on Zoom3 with g-ether diver

Signed-off-by: Anand Gadiyar 
Signed-off-by: Vikram Pandita 
Cc: Maulik Mankad 
Cc: Nilkesh Patra 
Cc: Felipe Balbi 
---
 drivers/usb/musb/musb_gadget.c |9 -
 drivers/usb/musb/musbhsdma.c   |   11 +++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index cbcf14a..7ad3571 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -681,8 +681,15 @@ static void rxstate(struct musb *musb, struct musb_request 
*req)
transfer_size);
}
 
-   if (use_dma)
+   if (use_dma) {
return;
+   } else {
+   /* Need to clear DMAENAB for the
+* backup PIO mode transfer to work
+*/
+   csr &= ~MUSB_RXCSR_DMAENAB;
+   musb_writew(epio, MUSB_RXCSR, csr);
+   }
}
 #endif /* Mentor's DMA */
 
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index a237550..f118ae2 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -166,6 +166,8 @@ static int dma_channel_program(struct dma_channel *channel,
dma_addr_t dma_addr, u32 len)
 {
struct musb_dma_channel *musb_channel = channel->private_data;
+   struct musb_dma_controller *controller = musb_channel->controller;
+   struct musb *musb = controller->private_data;
 
DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
musb_channel->epnum,
@@ -175,6 +177,15 @@ static int dma_channel_program(struct dma_channel *channel,
BUG_ON(channel->status == MUSB_DMA_STATUS_UNKNOWN ||
channel->status == MUSB_DMA_STATUS_BUSY);
 
+   /* On MUSB:RTL1.8 and above, DMA has to be word aligned */
+   if ((dma_addr % 4) &&
+   (musb->hwvers >= MUSB_HWVERS_1800)) {
+   /* Fail DMA for unaligned buffers:
+* Use PIO for such buffers
+*/
+   return false;
+   }
+
channel->actual_len = 0;
musb_channel->start_addr = dma_addr;
musb_channel->len = len;
-- 
1.6.6.rc0.66.ge160d

--
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 v2] omap: zoom3: enable ehci support

2010-01-07 Thread Vikram Pandita
Zoom3 board has omap3630 EHCI port2 connected to a ULPI phy.
GPIO_64 is connected to the PHY reset pin.

Signed-off-by: Vikram Pandita 
Cc: Gadiyar, Anand 
---
History:
v1: initial draft
v2: fix minor header file include comment by Anand Gadiyar

 arch/arm/mach-omap2/board-zoom3.c |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
index a9fe918..b691340 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -20,6 +20,7 @@
 
 #include 
 #include 
+#include 
 
 #include "mux.h"
 #include "sdram-hynix-h8mbx00u0mer-0em.h"
@@ -51,11 +52,25 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+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]  = 64,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init omap_zoom_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
zoom_peripherals_init();
zoom_debugboard_init();
+
+   omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
+   usb_ehci_init(&ehci_pdata);
 }
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
-- 
1.6.6.rc0.66.ge160d

--
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 v2] omap: serial: fix coding style indentaion

2010-01-07 Thread Vikram Pandita
No logical code change

Fix coding style indentaion as per checkpatch.pl
Fix multi-line comment style reported by Nishanth Menon

Signed-off-by: Vikram Pandita 
Cc: Menon, Nishanth 
---
 arch/arm/mach-omap2/serial.c |   19 ++-
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 8c964be..837b347 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -694,15 +694,16 @@ void __init omap_serial_init_port(int port)
DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout);
}
 
-   /* omap44xx: Never read empty UART fifo
-* omap3xxx: Never read empty UART fifo on UARTs
-* with IP rev >=0x52
-*/
-   if (cpu_is_omap44xx())
-   uart->p->serial_in = serial_in_override;
-   else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
-   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
-   uart->p->serial_in = serial_in_override;
+   /*
+* omap44xx: Never read empty UART fifo
+* omap3xxx: Never read empty UART fifo on UARTs
+* with IP rev >=0x52
+*/
+   if (cpu_is_omap44xx())
+   uart->p->serial_in = serial_in_override;
+   else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
+   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+   uart->p->serial_in = serial_in_override;
 }
 
 /**
-- 
1.6.6.rc0.66.ge160d

--
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] omap: serial: fix coding style indentaion

2010-01-07 Thread Vikram Pandita
Just fix coding style indentaion as per checkpatch
No logical code change.

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/serial.c |   18 +-
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 8c964be..467e5de 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -694,15 +694,15 @@ void __init omap_serial_init_port(int port)
DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout);
}
 
-   /* omap44xx: Never read empty UART fifo
-* omap3xxx: Never read empty UART fifo on UARTs
-* with IP rev >=0x52
-*/
-   if (cpu_is_omap44xx())
-   uart->p->serial_in = serial_in_override;
-   else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
-   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
-   uart->p->serial_in = serial_in_override;
+   /* omap44xx: Never read empty UART fifo
+* omap3xxx: Never read empty UART fifo on UARTs
+* with IP rev >=0x52
+*/
+   if (cpu_is_omap44xx())
+   uart->p->serial_in = serial_in_override;
+   else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
+   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+   uart->p->serial_in = serial_in_override;
 }
 
 /**
-- 
1.6.6.rc0.66.ge160d

--
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] omap: zoom3: enable ehci support

2009-12-18 Thread Vikram Pandita
Zoom3 board has omap3630 EHCI port2 connected to a ULPI phy.
GPIO_64 is connected to the PHY reset pin.

Signed-off-by: Vikram Pandita 
Cc: Gadiyar, Anand 
---
 arch/arm/mach-omap2/board-zoom3.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
index a9fe918..a5e8036 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -20,6 +20,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include "mux.h"
 #include "sdram-hynix-h8mbx00u0mer-0em.h"
@@ -51,11 +53,25 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+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]  = 64,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init omap_zoom_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
zoom_peripherals_init();
zoom_debugboard_init();
+
+   omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
+   usb_ehci_init(&ehci_pdata);
 }
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
-- 
1.6.6.rc0.66.ge160d

--
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] omap: header: remove unused data-type

2009-12-09 Thread Vikram Pandita
Remove unused data type omap_gpio_switch_config

Thereby also get rid of following sparse warnings:
arch/arm/plat-omap/include/plat/board.h :121:20:
warning: dubious bitfield without explicit `signed' or `unsigned'
arch/arm/plat-omap/include/plat/board.h :122:19:
warning: dubious bitfield without explicit `signed' or `unsigned'
arch/arm/plat-omap/include/plat/board.h :123:24:
warning: dubious bitfield without explicit `signed' or `unsigned'

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/include/plat/board.h |9 -
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/board.h 
b/arch/arm/plat-omap/include/plat/board.h
index abb17b6..376ce18 100644
--- a/arch/arm/plat-omap/include/plat/board.h
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -114,15 +114,6 @@ struct omap_pwm_led_platform_data {
void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
 };
 
-/* See arch/arm/plat-omap/include/mach/gpio-switch.h for definitions */
-struct omap_gpio_switch_config {
-   char name[12];
-   u16 gpio;
-   int flags:4;
-   int type:4;
-   int key_code:24; /* Linux key code */
-};
-
 struct omap_uart_config {
/* Bit field of UARTs present; bit 0 --> UART1 */
unsigned int enabled_uarts;
-- 
1.6.6.rc0.66.ge160d

--
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] omap: serial: fix non-empty uart fifo read abort

2009-12-04 Thread Vikram Pandita
OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort.

OMAP3xxx:
UART IP revision >= 0x52 have this issue
MVR register format is:
Bits  Field Name  Description   Type  Reset
31:8   RESERVED RO  0x0
7:4MAJORMajor revision number of the module.RO  0x--  
3:0MINORMinor revision number of the module.RO  0x--

OMAP4xxx: 
All revisions have this issue
Revision id check is not used as the format of MVR resigster has changed
For omap4 MVR register reads as: 0x50410602 => Revision id = 0x0602
Format of MVR register on omap4 is: (Courtesy: Cousson, Benoit)
Bits  Field Name  Description   Type  Reset
31:30 SCHEMEScheme revision number of moduleRO  0x1
29:28 RESERVED  RO  0x1  
27:16 FUNC  Function revision number of module  RO  0x041  
15:11 RTL   Rtl revision number of module   RO  0x00  
10:8  MAJOR Major revision number of the module.RO  0x6  
7:6   CUSTOMCustom revision number of the module.   RO  0x0  
5:0   MINOR Minor revision number of the module.RO  0x02

Override the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()
which makes sure that RX fifo is not read when empty

tested on zoom3(3630) board

Cc: Cousson, Benoit 
Signed-off-by: Vikram Pandita 
---
History of Patch:
V1:
http://patchwork.kernel.org/patch/61671/
http://patchwork.kernel.org/patch/61672/

V2: Incorporate approach suggested by Tony L
Introduce IP version check in mach-omap2/serial.c file  

V3: Change #ifdef OMAP4 to cpu_is_omap44xx()

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..e853115 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -33,6 +33,7 @@
 #include "pm.h"
 #include "prm-regbits-34xx.h"
 
+#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV0x52
 #define UART_OMAP_WER  0x17/* Wake-up enable register */
 
 #define DEFAULT_TIMEOUT (5 * HZ)
@@ -572,6 +573,23 @@ static struct omap_uart_state omap_uart[] = {
 #endif
 };
 
+/*
+ * Override the default 8250 read handler: mem_serial_in()
+ * Empty RX fifo read causes an abort on omap3630 and omap4
+ * This function makes sure that an empty rx fifo is not read on these silicons
+ * (OMAP1/2/3430 are not affected)
+ */
+static unsigned int serial_in_override(struct uart_port *up, int offset)
+{
+   if (UART_RX == offset) {
+   unsigned int lsr;
+   lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
+   if (!(lsr & UART_LSR_DR))
+   return -EPERM;
+   }
+   return serial_read_reg(omap_uart[up->line].p, offset);
+}
+
 void __init omap_serial_early_init(void)
 {
int i;
@@ -650,5 +668,15 @@ void __init omap_serial_init(void)
device_init_wakeup(dev, true);
DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout);
}
+
+   /* omap44xx: Never read empty UART fifo
+* omap3xxx: Never read empty UART fifo on UARTs
+* with IP rev >=0x52
+*/
+   if (cpu_is_omap44xx())
+   uart->p->serial_in = serial_in_override;
+   else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
+   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+   uart->p->serial_in = serial_in_override;
}
 }
-- 
1.6.6.rc0.66.ge160d

--
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 v2] omap: serial: fix non-empty uart fifo read abort

2009-12-03 Thread Vikram Pandita
OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort.

OMAP3xxx:
UART IP revision >= 0x52 have this issue
MVR register format is:
Bits  Field Name  Description   Type  Reset
31:8   RESERVED RO  0x0
7:4MAJORMajor revision number of the module.RO  0x--  
3:0MINORMinor revision number of the module.RO  0x--

OMAP4xxx: 
All revisions have this issue
Revision id check is not used as the format of MVR resigster has changed
For omap4 MVR register reads as: 0x50410602 => Revision id = 0x0602
Format of MVR register on omap4 is: (Courtesy: Cousson, Benoit)
Bits  Field Name  Description   Type  Reset
31:30 SCHEMEScheme revision number of moduleRO  0x1
29:28 RESERVED  RO  0x1  
27:16 FUNC  Function revision number of module  RO  0x041  
15:11 RTL   Rtl revision number of module   RO  0x00  
10:8  MAJOR Major revision number of the module.RO  0x6  
7:6   CUSTOMCustom revision number of the module.   RO  0x0  
5:0   MINOR Minor revision number of the module.RO  0x02

Override the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()
which makes sure that RX fifo is not read when empty

tested on zoom3(3630) board

Cc: Cousson, Benoit 
Signed-off-by: Vikram Pandita 
---
History of Patch:
V1:
http://patchwork.kernel.org/patch/61671/
http://patchwork.kernel.org/patch/61672/

V2: Incorporate approach suggested by Tony L
Introduce IP version check in mach-omap2/serial.c file  

 arch/arm/mach-omap2/serial.c |   29 +
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..bd646a2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -33,6 +33,7 @@
 #include "pm.h"
 #include "prm-regbits-34xx.h"
 
+#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV0x52
 #define UART_OMAP_WER  0x17/* Wake-up enable register */
 
 #define DEFAULT_TIMEOUT (5 * HZ)
@@ -572,6 +573,23 @@ static struct omap_uart_state omap_uart[] = {
 #endif
 };
 
+/*
+ * Override the default 8250 read handler: mem_serial_in()
+ * Empty RX fifo read causes an abort on omap3630 and omap4
+ * This function makes sure that an empty rx fifo is not read on these silicons
+ * (OMAP1/2/3 are not affected)
+ */
+static unsigned int serial_in_override(struct uart_port *up, int offset)
+{
+   if (UART_RX == offset) {
+   unsigned int lsr;
+   lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
+   if (!(lsr & UART_LSR_DR))
+   return -EPERM;
+   }
+   return serial_read_reg(omap_uart[up->line].p, offset);
+}
+
 void __init omap_serial_early_init(void)
 {
int i;
@@ -650,5 +668,16 @@ void __init omap_serial_init(void)
device_init_wakeup(dev, true);
DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout);
}
+
+#ifdef CONFIG_ARCH_OMAP4
+   /* Never read empty UART fifo on omap4 */
+   p->serial_in = serial_in_override;
+#else
+   /* OMAP2/3 */
+   /* Never read empty UART fifo on UARTs with IP rev >=0x52 */
+   if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
+   >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+   uart->p->serial_in = serial_in_override;
+#endif
}
 }
-- 
1.6.6.rc0.66.ge160d

--
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 2/2] omap: serial: fix non-empty uart fifo read abort

2009-11-20 Thread Vikram Pandita
OMAP3630 and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort. OMAP1/2/3 do not have this restriction.

Override the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()

serial_in_8250() makes sure that RX fifo is not read when empty,
on omap4 and 3630 silicons only

tested on zoom3(3630) board

Signed-off-by: Vikram Pandita 
Cc: Alan Cox 
---
 arch/arm/mach-omap2/serial.c |   21 +
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..600e4d2 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -572,6 +572,23 @@ static struct omap_uart_state omap_uart[] = {
 #endif
 };
 
+/*
+ * Override the default 8250 read handler: mem_serial_in()
+ * Empty RX fifo read causes an abort on omap3630 and omap4
+ * This function makes sure that an empty rx fifo is not read on these silicons
+ * (OMAP1/2/3 are not affected)
+ */
+static unsigned int serial_in_override(struct uart_port *up, int offset)
+{
+   if (UART_RX == offset) {
+   unsigned int lsr;
+   lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
+   if (!(lsr & UART_LSR_DR))
+   return -EPERM;
+   }
+   return serial_read_reg(omap_uart[up->line].p, offset);
+}
+
 void __init omap_serial_early_init(void)
 {
int i;
@@ -627,6 +644,10 @@ void __init omap_serial_early_init(void)
if (cpu_is_omap44xx())
p->irq += 32;
 
+   /* Do not read empty UART fifo on omap3630/omap4 */
+   if (omap3_has_uart_no_empty_fifo_read())
+   p->serial_in = serial_in_override;
+
omap_uart_enable_clocks(uart);
}
 }
-- 
1.6.5.1.69.g36942

--
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 0/2] omap: serial: handle abort on empty rx fifo read

2009-11-20 Thread Vikram Pandita
introduce OMAP3_HAS_UART_NO_EMPTY_FIFO_READ feature

this feature is set for omap3630 and omap4 currently as 
empty uart rx fifo read causes an abort

check on this feature on omap3630 and omap4 for now and extend for future
vairants in future

Patch history:
V1: initial implementation
http://patchwork.kernel.org/patch/60785/
http://patchwork.kernel.org/patch/60786/

V2: incorporate review comments from Alan Cox
http://patchwork.kernel.org/patch/60785/
to remove 8250.c file changes by override serial_in
No 8250 driver change required now

V3: incorporate review comments
khilman: make function override only for affected silicons
nishant m: interoduce has_feature check, rather than cpu_is
anand g: minor commit message change

Vikram Pandita (2):
  omap: introduce uart_no_empty_fifo_read feature
  omap: serial: fix non-empty uart fifo read abort

 arch/arm/mach-omap2/id.c  |7 +++
 arch/arm/mach-omap2/serial.c  |   21 +
 arch/arm/plat-omap/include/plat/cpu.h |2 ++
 3 files changed, 30 insertions(+), 0 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


[PATCH v3 1/2] omap: introduce uart_no_empty_fifo_read feature

2009-11-20 Thread Vikram Pandita
Interoduce omap feature OMAP3_HAS_UART_NO_EMPTY_FIFO_READ

On omap3630/omap4 an empty fifo read causes a crash

Signed-off-by: Vikram Pandita 
Ack-by: Menon, Nishanth 
---
 arch/arm/mach-omap2/id.c  |7 +++
 arch/arm/plat-omap/include/plat/cpu.h |2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index f48a4b2..3e266cd 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -176,6 +176,12 @@ void __init omap3_check_features(void)
OMAP3_CHECK_FEATURE(status, NEON);
OMAP3_CHECK_FEATURE(status, ISP);
 
+   /* On omap3630 and omap4: UART empty rx fifo read aborts */
+   if (cpu_is_omap3630())
+   omap3_features |= OMAP3_HAS_UART_NO_EMPTY_FIFO_READ;
+   if (cpu_is_omap44xx())
+   omap3_features |= OMAP3_HAS_UART_NO_EMPTY_FIFO_READ;
+
/*
 * TODO: Get additional info (where applicable)
 *   e.g. Size of L2 cache.
@@ -316,6 +322,7 @@ void __init omap3_cpuinfo(void)
OMAP3_SHOW_FEATURE(sgx);
OMAP3_SHOW_FEATURE(neon);
OMAP3_SHOW_FEATURE(isp);
+   OMAP3_SHOW_FEATURE(uart_no_empty_fifo_read);
 
printk(")\n");
 }
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 2e17890..c32f015 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -497,6 +497,7 @@ extern u32 omap3_features;
 #define OMAP3_HAS_SGX  BIT(2)
 #define OMAP3_HAS_NEON BIT(3)
 #define OMAP3_HAS_ISP  BIT(4)
+#define OMAP3_HAS_UART_NO_EMPTY_FIFO_READ  BIT(5)
 
 #define OMAP3_HAS_FEATURE(feat,flag)   \
 static inline unsigned int omap3_has_ ##feat(void) \
@@ -509,5 +510,6 @@ OMAP3_HAS_FEATURE(sgx, SGX)
 OMAP3_HAS_FEATURE(iva, IVA)
 OMAP3_HAS_FEATURE(neon, NEON)
 OMAP3_HAS_FEATURE(isp, ISP)
+OMAP3_HAS_FEATURE(uart_no_empty_fifo_read, UART_NO_EMPTY_FIFO_READ)
 
 #endif
-- 
1.6.5.1.69.g36942

--
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 v2 1/1] omap: serial: fix non-empty uart fifo read abort

2009-11-17 Thread Vikram Pandita
OMAP3630 and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort. OMAP1/2/3 do not have this restriction.

Overrigt the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()

serial_in_8250() makes sure that RX fifo is not read when empty,
on omap4 and 3630 silicons only

tested on zoom3(3630) board

Signed-off-by: Vikram Pandita 
Cc: Alan Cox 
---
v1: initial implementation
http://patchwork.kernel.org/patch/60785/
http://patchwork.kernel.org/patch/60786/

v2: incorporate review comments from Alan Cox
http://patchwork.kernel.org/patch/60785/
No 8250 driver change required now

 arch/arm/mach-omap2/serial.c |   28 
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..362cb82 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -71,6 +71,30 @@ struct omap_uart_state {
 
 static LIST_HEAD(uart_list);
 
+static struct omap_uart_state omap_uart[];
+static inline unsigned int serial_read_reg(struct plat_serial8250_port *, int);
+
+/*
+ * Overrigt the default 8250 read handler: mem_serial_in()
+ * Empty RX fifo read causes an abort on omap3630 and omap4
+ * This function makes sure that an empty rx fifo is not read on these silicons
+ * (OMAP1/2/3 are not affected)
+ */
+static unsigned int serial_in_8250(struct uart_port *up, int offset)
+{
+   /* Do not read empty UART fifo on omap3630/44xx */
+   if ((UART_RX == offset) &&
+   (cpu_is_omap3630() || cpu_is_omap44xx())) {
+
+   unsigned int lsr;
+
+   lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
+   if (!(lsr & UART_LSR_DR))
+   return 0;
+   }
+   return serial_read_reg(omap_uart[up->line].p, offset);
+}
+
 static struct plat_serial8250_port serial_platform_data0[] = {
{
.mapbase= OMAP_UART1_BASE,
@@ -79,6 +103,7 @@ static struct plat_serial8250_port serial_platform_data0[] = 
{
.iotype = UPIO_MEM,
.regshift   = 2,
.uartclk= OMAP24XX_BASE_BAUD * 16,
+   .serial_in  = serial_in_8250,
}, {
.flags  = 0
}
@@ -92,6 +117,7 @@ static struct plat_serial8250_port serial_platform_data1[] = 
{
.iotype = UPIO_MEM,
.regshift   = 2,
.uartclk= OMAP24XX_BASE_BAUD * 16,
+   .serial_in  = serial_in_8250,
}, {
.flags  = 0
}
@@ -105,6 +131,7 @@ static struct plat_serial8250_port serial_platform_data2[] 
= {
.iotype = UPIO_MEM,
.regshift   = 2,
.uartclk= OMAP24XX_BASE_BAUD * 16,
+   .serial_in  = serial_in_8250,
}, {
.flags  = 0
}
@@ -119,6 +146,7 @@ static struct plat_serial8250_port serial_platform_data3[] 
= {
.iotype = UPIO_MEM,
.regshift   = 2,
.uartclk= OMAP24XX_BASE_BAUD * 16,
+   .serial_in  = serial_in_8250,
}, {
.flags  = 0
}
-- 
1.6.5.1.69.g36942

--
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/2] omap: serial: fix non-empty rx uart fifo abort

2009-11-17 Thread Vikram Pandita
OMAP3630 and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort. OMAP1/2/3 do not have this restriction.

so pass the flag UPF_NO_EMPTY_FIFO_READ in plat_serial8250_port, so that 8250
driver does not abort on empty rx fifo read

tested on zoom3(3630) board

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/serial.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..669652b 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -624,8 +624,15 @@ void __init omap_serial_early_init(void)
uart->p = p;
list_add_tail(&uart->node, &uart_list);
 
-   if (cpu_is_omap44xx())
+   if (cpu_is_omap44xx()) {
p->irq += 32;
+   /* Do not read empty UART fifo on omap4 */
+   p->flags |= UPF_NO_EMPTY_FIFO_READ;
+   }
+
+   /* Do not read empty UART fifo on omap3630 */
+   if (cpu_is_omap3630())
+   p->flags |= UPF_NO_EMPTY_FIFO_READ;
 
omap_uart_enable_clocks(uart);
}
-- 
1.6.5.1.69.g36942

--
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 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Vikram Pandita
OMAP3630 and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort. OMAP1/2/3 do not have this restriction.

So interoduce a flag in 8250 driver: UPF_NO_EMPTY_FIFO_READ

If this flag is specified for an 8250 port, then first check if rx fifo has
contents, and only then proceed to read the fifo.

The change affects only boards passing this flag in port data and hence is
non-disruptive for other boards.

First reported/fixed on omap4430 by Shilimkar, Santosh

Cc: Shilimkar, Santosh 
Signed-off-by: Vikram Pandita 
---
 drivers/serial/8250.c   |   30 +-
 include/linux/serial_core.h |1 +
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 737b4c9..03c890e 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1245,7 +1245,11 @@ static void autoconfig(struct uart_8250_port *up, 
unsigned int probeflags)
 #endif
serial_outp(up, UART_MCR, save_mcr);
serial8250_clear_fifos(up);
-   serial_in(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   serial_in(up, UART_RX);
+   } else
+   serial_in(up, UART_RX);
if (up->capabilities & UART_CAP_UUE)
serial_outp(up, UART_IER, UART_IER_UUE);
else
@@ -1289,7 +1293,11 @@ static void autoconfig_irq(struct uart_8250_port *up)
}
serial_outp(up, UART_IER, 0x0f);/* enable all intrs */
(void)serial_inp(up, UART_LSR);
-   (void)serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void)serial_inp(up, UART_RX);
+   } else
+   (void)serial_inp(up, UART_RX);
(void)serial_inp(up, UART_IIR);
(void)serial_inp(up, UART_MSR);
serial_outp(up, UART_TX, 0xFF);
@@ -1984,7 +1992,11 @@ static int serial8250_startup(struct uart_port *port)
 * Clear the interrupt registers.
 */
(void) serial_inp(up, UART_LSR);
-   (void) serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void) serial_inp(up, UART_RX);
+   } else
+   (void) serial_inp(up, UART_RX);
(void) serial_inp(up, UART_IIR);
(void) serial_inp(up, UART_MSR);
 
@@ -2141,7 +2153,11 @@ dont_test_tx_en:
 * routines or the previous session.
 */
serial_inp(up, UART_LSR);
-   serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   serial_inp(up, UART_RX);
+   } else
+   serial_inp(up, UART_RX);
serial_inp(up, UART_IIR);
serial_inp(up, UART_MSR);
up->lsr_saved_flags = 0;
@@ -2207,7 +2223,11 @@ static void serial8250_shutdown(struct uart_port *port)
 * Read data port to reset things, and then unlink from
 * the IRQ chain.
 */
-   (void) serial_in(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void) serial_inp(up, UART_RX);
+   } else
+   (void) serial_in(up, UART_RX);
 
del_timer_sync(&up->timer);
up->timer.function = serial8250_timeout;
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index db532ce..0d65bb3 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -308,6 +308,7 @@ struct uart_port {
 #define UPF_SPD_WARP   ((__force upf_t) (0x1010))
 #define UPF_SKIP_TEST  ((__force upf_t) (1 << 6))
 #define UPF_AUTO_IRQ   ((__force upf_t) (1 << 7))
+#define UPF_NO_EMPTY_FIFO_READ ((__force upf_t) (1 << 8))
 #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11))
 #define UPF_LOW_LATENCY((__force upf_t) (1 << 13))
 #define UPF_BUGGY_UART ((__force upf_t) (1 << 14))
-- 
1.6.5.1.69.g36942

--
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/2] omap: serial: fix non-empty rx uart fifo abort

2009-11-16 Thread Vikram Pandita
Empty uart rx fifo read can cause omap to abort
OMAP silicon affected: OMAP3630, OMAP4430
OMAP silicon not-affected: omap1/2/3

So pass flag UPF_NO_EMPTY_FIFO_READ in plat_serial8250_port, so that 8250
driver does not abort on empty rx fifo read

Tested on zoom3(3630) board

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/serial.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57..669652b 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -624,8 +624,15 @@ void __init omap_serial_early_init(void)
uart->p = p;
list_add_tail(&uart->node, &uart_list);
 
-   if (cpu_is_omap44xx())
+   if (cpu_is_omap44xx()) {
p->irq += 32;
+   /* Do not read empty UART fifo on omap4 */
+   p->flags |= UPF_NO_EMPTY_FIFO_READ;
+   }
+
+   /* Do not read empty UART fifo on omap3630 */
+   if (cpu_is_omap3630())
+   p->flags |= UPF_NO_EMPTY_FIFO_READ;
 
omap_uart_enable_clocks(uart);
}
-- 
1.6.5.1.69.g36942

--
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 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-16 Thread Vikram Pandita
OMAP3630 and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort. OMAP1/2/3 do not have this restriction.

So interoduce a flag in 8250 driver: UPF_NO_EMPTY_FIFO_READ

If this flag is specified for an 8250 port, then first check if rx fifo has
contents, and only then proceed to read the fifo.

The change affects only boards passing this flag in port data and hence is
non-disruptive for other boards.

First reported/fixed on omap4430 by Shilimkar, Santosh

Signed-off-by: Vikram Pandita 
Cc: Shilimkar, Santosh 
---
 drivers/serial/8250.c   |   30 +-
 include/linux/serial_core.h |1 +
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 737b4c9..03c890e 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1245,7 +1245,11 @@ static void autoconfig(struct uart_8250_port *up, 
unsigned int probeflags)
 #endif
serial_outp(up, UART_MCR, save_mcr);
serial8250_clear_fifos(up);
-   serial_in(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   serial_in(up, UART_RX);
+   } else
+   serial_in(up, UART_RX);
if (up->capabilities & UART_CAP_UUE)
serial_outp(up, UART_IER, UART_IER_UUE);
else
@@ -1289,7 +1293,11 @@ static void autoconfig_irq(struct uart_8250_port *up)
}
serial_outp(up, UART_IER, 0x0f);/* enable all intrs */
(void)serial_inp(up, UART_LSR);
-   (void)serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void)serial_inp(up, UART_RX);
+   } else
+   (void)serial_inp(up, UART_RX);
(void)serial_inp(up, UART_IIR);
(void)serial_inp(up, UART_MSR);
serial_outp(up, UART_TX, 0xFF);
@@ -1984,7 +1992,11 @@ static int serial8250_startup(struct uart_port *port)
 * Clear the interrupt registers.
 */
(void) serial_inp(up, UART_LSR);
-   (void) serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void) serial_inp(up, UART_RX);
+   } else
+   (void) serial_inp(up, UART_RX);
(void) serial_inp(up, UART_IIR);
(void) serial_inp(up, UART_MSR);
 
@@ -2141,7 +2153,11 @@ dont_test_tx_en:
 * routines or the previous session.
 */
serial_inp(up, UART_LSR);
-   serial_inp(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   serial_inp(up, UART_RX);
+   } else
+   serial_inp(up, UART_RX);
serial_inp(up, UART_IIR);
serial_inp(up, UART_MSR);
up->lsr_saved_flags = 0;
@@ -2207,7 +2223,11 @@ static void serial8250_shutdown(struct uart_port *port)
 * Read data port to reset things, and then unlink from
 * the IRQ chain.
 */
-   (void) serial_in(up, UART_RX);
+   if (up->port.flags & UPF_NO_EMPTY_FIFO_READ) {
+   if (serial_inp(up, UART_LSR) & UART_LSR_DR)
+   (void) serial_inp(up, UART_RX);
+   } else
+   (void) serial_in(up, UART_RX);
 
del_timer_sync(&up->timer);
up->timer.function = serial8250_timeout;
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index db532ce..0d65bb3 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -308,6 +308,7 @@ struct uart_port {
 #define UPF_SPD_WARP   ((__force upf_t) (0x1010))
 #define UPF_SKIP_TEST  ((__force upf_t) (1 << 6))
 #define UPF_AUTO_IRQ   ((__force upf_t) (1 << 7))
+#define UPF_NO_EMPTY_FIFO_READ ((__force upf_t) (1 << 8))
 #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11))
 #define UPF_LOW_LATENCY((__force upf_t) (1 << 13))
 #define UPF_BUGGY_UART ((__force upf_t) (1 << 14))
-- 
1.6.5.1.69.g36942

--
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 8/8] omap: 3630sdp: defconfig creation

2009-11-11 Thread Vikram Pandita
Create 3630sdp defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_3630sdp_defconfig | 1606 +++
 1 files changed, 1606 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig

diff --git a/arch/arm/configs/omap_3630sdp_defconfig 
b/arch/arm/configs/omap_3630sdp_defconfig
new file mode 100644
index 000..eb96b1a
--- /dev/null
+++ b/arch/arm/configs/omap_3630sdp_defconfig
@@ -0,0 +1,1606 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 14:18:44 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 is not set
+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 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH

[PATCH v3 4/8] omap: zoom3: introduce zoom3 board support

2009-11-11 Thread Vikram Pandita
Zoom3 is the next versoin of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.
Zoom2 has OMAP34xx
Zoom3 has OMAP3630 [1]
Zoom3 = OMAP3630 SOM board [2] + same zoom2 main board [3] + same debugboard

Zoom3 has a SDRAM part from Hynix
Zoom2 had SDRAM part from micron

Hynix memory timings are contributed by:
Chalhoub, Nicole and Bour, Vincent

Reuse the zoom2 files as much for zoom3, as at board level,
there is no change at all.

References: (courtesy Nishant Menon)
[1] OMAP3630
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

[2] SOM boards
http://logicpd.com/products/system-modules/texas-instruments-omap35x-som-lv

[3] Zoom2 boards
http://logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp
OMAP3630:

Signed-off-by: Vikram Pandita 
Cc: Chalhoub, Nicole 
Cc: Bour, Vincent 
---
 arch/arm/mach-omap2/Kconfig|4 +
 arch/arm/mach-omap2/Makefile   |4 +
 arch/arm/mach-omap2/board-zoom3.c  |   60 
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   51 +
 4 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..9824775 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -101,6 +101,10 @@ config MACH_CM_T35
bool "CompuLab CM-T35 module"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_ZOOM3
+   bool "OMAP3630 Zoom3 board"
+   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 4d66b42..712e7fc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -75,6 +75,10 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2)+= 
board-zoom2.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_ZOOM3)  += board-zoom3.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o \
+  board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
new file mode 100644
index 000..b031eaa
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+static void __init omap_zoom_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel zoom_config[] __initdata = {
+};
+
+static void __init omap_zoom_init_irq(void)
+{
+   omap_board_config = zoom_config;
+   omap_board_config_size = ARRAY_SIZE(zoom_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern int __init omap_zoom2_debugboard_init(void);
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_zoom_init(void)
+{
+   zoom_peripherals_init();
+   omap_zoom2_debugboard_init();
+}
+
+MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_zoom_map_io,
+   .init_irq   = omap_zoom_init_irq,
+   .init_machine   = omap_zoom_init,
+   .timer  = &omap_timer,
+MACHINE_END
diff --git a/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h 
b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
new file mode 100644
index 000..8bfaf34
--- /dev/null
+++ b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
@@ -0,0 +1,51 @@
+/*
+ * SDRC register values for the Hynix H8MBX00U0MER-0EM
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Pu

[PATCH v3 7/8] omap: zoom3: defconfig creation

2009-11-11 Thread Vikram Pandita
Create zoom3 defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom3_defconfig | 1605 +
 1 files changed, 1605 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig

diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
new file mode 100644
index 000..989cedd
--- /dev/null
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -0,0 +1,1605 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 09:50:40 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 is not set
+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=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_A

[PATCH v3 5/8] omap: 3630sdp: introduce 3630 sdp board support

2009-11-11 Thread Vikram Pandita
Add 3630SDP board support

The board shares the same peripherals as a zoom2 main.
So reuse the peripheral file of zoom platform.

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (persent on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

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

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Kconfig |4 ++
 arch/arm/mach-omap2/Makefile|3 +
 arch/arm/mach-omap2/board-3630sdp.c |  101 +++
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 9824775..83551a8 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,10 @@ config MACH_OMAP_ZOOM3
bool "OMAP3630 Zoom3 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool "OMAP3630 SDP board"
+   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 712e7fc..90cf2cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -79,6 +79,9 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
new file mode 100755
index 000..f0bc5c6
--- /dev/null
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+
+static struct omap_smc91x_platform_data board_smc91x_data = {
+   .cs = 3,
+   .flags  = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
+};
+
+static void __init board_smc91x_init(void)
+{
+   board_smc91x_data.gpio_irq = 158;
+   gpmc_smc91x_init(&board_smc91x_data);
+}
+
+#else
+
+static inline void board_smc91x_init(void)
+{
+}
+
+#endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
+
+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]  = 126,
+   .reset_gpio_port[1]  = 61,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap_sdp_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel sdp_config[] __initdata = {
+};
+
+static void __init omap_sdp_init_irq(void)
+{
+   omap_board_config = sdp_config;
+   omap_board_config_size = ARRAY_SIZE(sdp_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_sdp_init(void)
+{
+   zoom_peripherals_init();
+   board_smc91x_init();
+   enable_board_wakeup_source();
+   usb_ehci_init(&ehci_pdata);
+}
+
+MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
+   .ph

[PATCH v3 3/8] omap: zoom: drop i2c-1 speed to 2400

2009-11-11 Thread Vikram Pandita
The I2C-1 bus frequency on zoom2/zoom3/sdp3630 should be 2.4 MHz.
The speed is limited by TWL5030/GAIA; a higher speed could lead to errors
on the interface.

The maximum I2C speed depends on the system clock for GAIA:
2.2 MHz (sys-clk = 19.2 MHz)
2.4 MHz (sys-clk = 26 MHz)
2.9 MHz (sys-clk = 38.4 MHz)

For Zoom2/Zoom3/SDP3630 the system clock is 26Mhz
and hence choose 2.4Mhz for I2C1 bus speed

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 arch/arm/mach-omap2/board-zoom-peripherals.c

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
old mode 100644
new mode 100755
index 4ca9c20..54619d5
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -235,7 +235,7 @@ static struct twl4030_platform_data zoom_twldata = {
 
 static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
{
-   I2C_BOARD_INFO("twl4030", 0x48),
+   I2C_BOARD_INFO("twl5030", 0x48),
.flags  = I2C_CLIENT_WAKE,
.irq= INT_34XX_SYS_NIRQ,
.platform_data  = &zoom_twldata,
@@ -244,7 +244,7 @@ static struct i2c_board_info __initdata 
zoom_i2c_boardinfo[] = {
 
 static int __init omap_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 2600, zoom_i2c_boardinfo,
+   omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
ARRAY_SIZE(zoom_i2c_boardinfo));
omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0);
-- 
1.6.5.1.69.g36942

--
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 6/8] omap: zoom2: update defconfig for LL_DEBUG_NONE

2009-11-11 Thread Vikram Pandita
Update DEBUG_LL for zoom2 board as CONFIG_OMAP_LL_DEBUG_NONE

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom2_defconfig |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..2eec53b 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -202,7 +202,8 @@ CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_LL_DEBUG_UART1 is not set
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_LL_DEBUG_NONE=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
 
-- 
1.6.5.1.69.g36942

--
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 2/8] omap: zoom: rename zoom2 name to generic zoom

2009-11-11 Thread Vikram Pandita
Replace zoom2 with zoom name in board-zoom-peripherals.c file
This file has functions reused for boards: Zoom2/Zoom3/sdp3630.
Hence have all functions commonly named as zoom

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/board-zoom-peripherals.c |   70 +-
 1 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 1bb4a8a..4ca9c20 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -87,27 +87,27 @@ static struct matrix_keymap_data board_map_data = {
.keymap_size= ARRAY_SIZE(board_keymap),
 };
 
-static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
+static struct twl4030_keypad_data zoom_kp_twl4030_data = {
.keymap_data= &board_map_data,
.rows   = 8,
.cols   = 8,
.rep= 1,
 };
 
-static struct regulator_consumer_supply zoom2_vmmc1_supply = {
+static struct regulator_consumer_supply zoom_vmmc1_supply = {
.supply = "vmmc",
 };
 
-static struct regulator_consumer_supply zoom2_vsim_supply = {
+static struct regulator_consumer_supply zoom_vsim_supply = {
.supply = "vmmc_aux",
 };
 
-static struct regulator_consumer_supply zoom2_vmmc2_supply = {
+static struct regulator_consumer_supply zoom_vmmc2_supply = {
.supply = "vmmc",
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
-static struct regulator_init_data zoom2_vmmc1 = {
+static struct regulator_init_data zoom_vmmc1 = {
.constraints = {
.min_uV = 185,
.max_uV = 315,
@@ -118,11 +118,11 @@ static struct regulator_init_data zoom2_vmmc1 = {
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies  = 1,
-   .consumer_supplies  = &zoom2_vmmc1_supply,
+   .consumer_supplies  = &zoom_vmmc1_supply,
 };
 
 /* VMMC2 for MMC2 card */
-static struct regulator_init_data zoom2_vmmc2 = {
+static struct regulator_init_data zoom_vmmc2 = {
.constraints = {
.min_uV = 185,
.max_uV = 185,
@@ -133,11 +133,11 @@ static struct regulator_init_data zoom2_vmmc2 = {
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies  = 1,
-   .consumer_supplies  = &zoom2_vmmc2_supply,
+   .consumer_supplies  = &zoom_vmmc2_supply,
 };
 
 /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
-static struct regulator_init_data zoom2_vsim = {
+static struct regulator_init_data zoom_vsim = {
.constraints = {
.min_uV = 180,
.max_uV = 300,
@@ -148,7 +148,7 @@ static struct regulator_init_data zoom2_vsim = {
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies  = 1,
-   .consumer_supplies  = &zoom2_vsim_supply,
+   .consumer_supplies  = &zoom_vsim_supply,
 };
 
 static struct twl4030_hsmmc_info mmc[] __initdata = {
@@ -165,7 +165,7 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
{}  /* Terminator */
 };
 
-static int zoom2_twl_gpio_setup(struct device *dev,
+static int zoom_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
/* gpio + 0 is "mmc0_cd" (input/IRQ),
@@ -178,15 +178,15 @@ static int zoom2_twl_gpio_setup(struct device *dev,
/* link regulators to MMC adapters ... we "know" the
 * regulators will be set up only *after* we return.
*/
-   zoom2_vmmc1_supply.dev = mmc[0].dev;
-   zoom2_vsim_supply.dev = mmc[0].dev;
-   zoom2_vmmc2_supply.dev = mmc[1].dev;
+   zoom_vmmc1_supply.dev = mmc[0].dev;
+   zoom_vsim_supply.dev = mmc[0].dev;
+   zoom_vmmc2_supply.dev = mmc[1].dev;
 
return 0;
 }
 
 
-static int zoom2_batt_table[] = {
+static int zoom_batt_table[] = {
 /* 0 C*/
 30800, 29500, 28300, 27100,
 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
@@ -197,55 +197,55 @@ static int zoom2_batt_table[] = {
 4040,  3910,  3790,  3670,  3550
 };
 
-static struct twl4030_bci_platform_data zoom2_bci_data = {
-   .battery_tmp_tbl= zoom2_batt_table,
-   .tblsize= ARRAY_SIZE(zoom2_batt_table),
+static struct twl4030_bci_platform_data zoom_bci_data = {
+   .battery_tmp_tbl= zoom_batt_table,
+   .tblsize= ARRAY_SIZE(zoom_batt_table),
 };
 
-static struct twl4030_usb_data zoom2_usb_data = {
+static struct twl4030_usb_data zoom_usb_data = {
.usb_mode   = T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_gpio_platform_data zoom2_gpio_data = {
+

[PATCH v3 0/8] introduce 3630 boards

2009-11-11 Thread Vikram Pandita
Introducing 3630 boards: zoom3 and sdp3630

Git tree hosting these patches:
git://dev.omapzoom.org/pub/scm/vikram/omap3.git zoom3

The peripherals are very similar for the two bards as per this discussion:
http://marc.info/?l=linux-omap&m=125676595710748&w=2
So maximum reuse is done for the board files for zoom3 and sdp3630

Patch History:
V1: Review comments incorporated:
http://marc.info/?l=linux-omap&m=125632676504364&w=2
http://marc.info/?l=linux-omap&m=125632720804869&w=2
http://marc.info/?l=linux-omap&m=125633994320138&w=2
V2: Review comments by Nishanth Menon
http://marc.info/?l=linux-omap&m=125728617825678&w=2
http://marc.info/?l=linux-omap&m=125728665226332&w=2
http://marc.info/?l=linux-omap&m=125728729027309&w=2
http://marc.info/?l=linux-omap&m=125728749327603&w=2
V3: Added review comments from Tony
Use git-format-patch -M option
Introduce zoom-peripheral file with just code move from zoom2.c
Introduce i2c speed fix for zoom boards

Pending:
Handling 8250 patch for 3630

Vikram Pandita (8):
  omap: zoom2: split board file for software reuse
  omap: zoom: rename zoom2 name to generic zoom
  omap: zoom: drop i2c-1 speed to 2400
  omap: zoom3: introduce zoom3 board support
  omap: 3630sdp: introduce 3630 sdp board support
  omap: zoom2: update defconfig for LL_DEBUG_NONE
  omap: zoom3: defconfig creation
  omap: 3630sdp: defconfig creation

 arch/arm/configs/omap_3630sdp_defconfig| 1606 
 arch/arm/configs/omap_zoom2_defconfig  |3 +-
 arch/arm/configs/omap_zoom3_defconfig  | 1605 +++
 arch/arm/mach-omap2/Kconfig|8 +
 arch/arm/mach-omap2/Makefile   |8 +
 arch/arm/mach-omap2/board-3630sdp.c|  101 ++
 arch/arm/mach-omap2/board-zoom-peripherals.c   |  259 
 arch/arm/mach-omap2/board-zoom2.c  |  236 +---
 arch/arm/mach-omap2/board-zoom3.c  |   60 +
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   51 +
 10 files changed, 3703 insertions(+), 234 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c
 create mode 100755 arch/arm/mach-omap2/board-zoom-peripherals.c
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.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 v3 1/8] omap: zoom2: split board file for software reuse

2009-11-11 Thread Vikram Pandita
Split zoom2 board file into:
base board file and a board-zoom-peripherals.c file

that way the same peripherals file can be reused for: zoom3 and sdp3630

Following list shows the commonality across the three platforms and hence the
case for software reuse:

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (present on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Makefile |1 +
 arch/arm/mach-omap2/board-zoom-peripherals.c |  259 ++
 arch/arm/mach-omap2/board-zoom2.c|  236 +---
 3 files changed, 263 insertions(+), 233 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..4d66b42 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -72,6 +72,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-peripherals.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-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
new file mode 100644
index 000..1bb4a8a
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -0,0 +1,259 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * Modified from mach-omap2/board-zoom2.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 "mmc-twl4030.h"
+
+/* Zoom2 has Qwerty keyboard*/
+static int board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1  */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2  */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3  */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4  */
+   0
+};
+
+static struct matrix_keymap_data board_map_data = {
+   .keymap = board_keymap,
+   .keymap_size= ARRAY_SIZE(board_keymap),
+};
+
+static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
+   .keymap_data= &board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct regulator_consumer_supply zoom2_vmmc1_supply = {
+   .supply = "vmmc",
+};
+
+static struct regulator_consumer_supply zoom2_vsim_supply = {
+   .supply = "vmmc_aux",
+};
+
+static struct regulator_consumer_supply zoom2_vmmc2_supply = {
+   .supply = "vmmc",
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
+s

[PATCH v2 6/8] omap: zoom3: defconfig creation

2009-11-10 Thread Vikram Pandita
Create zoom3 defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom3_defconfig | 1605 +
 1 files changed, 1605 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig

diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
new file mode 100644
index 000..989cedd
--- /dev/null
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -0,0 +1,1605 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 09:50:40 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 is not set
+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=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_A

[PATCH v2 8/8] omap: 3630sdp: defconfig creation

2009-11-10 Thread Vikram Pandita
Create 3630sdp defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_3630sdp_defconfig | 1606 +++
 1 files changed, 1606 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig

diff --git a/arch/arm/configs/omap_3630sdp_defconfig 
b/arch/arm/configs/omap_3630sdp_defconfig
new file mode 100644
index 000..eb96b1a
--- /dev/null
+++ b/arch/arm/configs/omap_3630sdp_defconfig
@@ -0,0 +1,1606 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 14:18:44 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 is not set
+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 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH

[PATCH v2 5/8] omap: zoom3: introduce zoom3 board support

2009-11-10 Thread Vikram Pandita
Zoom3 is the next versoin of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.
Zoom2 has OMAP34xx
Zoom3 has OMAP3630 [1]
Zoom3 = OMAP3630 SOM board [2] + same zoom2 main board [3] + same debugboard

Zoom3 has a SDRAM part from Hynix
Zoom2 had SDRAM part from micron

Hynix memory timings are contributed by:
Chalhoub, Nicole and Bour, Vincent

Reuse the zoom2 files as much for zoom3, as at board level,
there is no change at all.

References: (courtesy Nishant Menon)
[1] OMAP3630
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

[2] SOM boards
http://logicpd.com/products/system-modules/texas-instruments-omap35x-som-lv

[3] Zoom2 boards
http://logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp
OMAP3630:

Signed-off-by: Vikram Pandita 
Cc: Chalhoub, Nicole 
Cc: Bour, Vincent 
---
 arch/arm/mach-omap2/Kconfig|4 +
 arch/arm/mach-omap2/Makefile   |4 +
 arch/arm/mach-omap2/board-zoom3.c  |   60 
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   51 +
 4 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..9824775 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -101,6 +101,10 @@ config MACH_CM_T35
bool "CompuLab CM-T35 module"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_ZOOM3
+   bool "OMAP3630 Zoom3 board"
+   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 4d66b42..712e7fc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -75,6 +75,10 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2)+= 
board-zoom2.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_ZOOM3)  += board-zoom3.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o \
+  board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
new file mode 100644
index 000..b031eaa
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+static void __init omap_zoom_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel zoom_config[] __initdata = {
+};
+
+static void __init omap_zoom_init_irq(void)
+{
+   omap_board_config = zoom_config;
+   omap_board_config_size = ARRAY_SIZE(zoom_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern int __init omap_zoom2_debugboard_init(void);
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_zoom_init(void)
+{
+   zoom_peripherals_init();
+   omap_zoom2_debugboard_init();
+}
+
+MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_zoom_map_io,
+   .init_irq   = omap_zoom_init_irq,
+   .init_machine   = omap_zoom_init,
+   .timer  = &omap_timer,
+MACHINE_END
diff --git a/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h 
b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
new file mode 100644
index 000..8bfaf34
--- /dev/null
+++ b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
@@ -0,0 +1,51 @@
+/*
+ * SDRC register values for the Hynix H8MBX00U0MER-0EM
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Pu

[PATCH v2 3/8] omap: zoom2: split board file for software reuse

2009-11-10 Thread Vikram Pandita
Split zoom2 board file into:
base board file and a board-zoom-peripherals.c file

that way the same peripherals file can be reused for: zoom3 and sdp3630

Following list shows the commonality across the three platforms and hence the
case for software reuse:

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (present on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Makefile |1 +
 arch/arm/mach-omap2/board-zoom-peripherals.c |  278 ++
 arch/arm/mach-omap2/board-zoom2.c|  247 +--
 3 files changed, 286 insertions(+), 240 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..4d66b42 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -72,6 +72,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-peripherals.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-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
new file mode 100644
index 000..d872588
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -0,0 +1,278 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * Modified from mach-omap2/board-zoom2.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 "mmc-twl4030.h"
+
+/* Zoom2 has Qwerty keyboard*/
+static int zoom_board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1  */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2  */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3  */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4  */
+   0
+};
+
+static struct matrix_keymap_data zoom_board_map_data = {
+   .keymap = zoom_board_keymap,
+   .keymap_size= ARRAY_SIZE(zoom_board_keymap),
+};
+
+static struct twl4030_keypad_data zoom_kp_twl4030_data = {
+   .keymap_data= &zoom_board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct twl4030_madc_platform_data zoom_madc_data = {
+   .irq_line   = 1,
+};
+
+static struct twl4030_hsmmc_info zoom_mmc[] = {
+   {
+   .name   = "external",
+   .mmc= 1,
+   .wires  = 4,
+   .cover_only = true,
+   .gpio_cd= -EINVAL,

[PATCH v2 1/8] omap: 3630: update is_chip variable

2009-11-10 Thread Vikram Pandita
3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
"arch/arm/mach-omap2/powerdomains34xx.h"
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita 
Acked-by: Alexander Shishkin 
Acked-by: Ari Kauppi 
Acked-by: Nishanth Menon 
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/plat/cpu.h |7 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..189cf7a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err("Uninitialized omap_chip, please fix!\n");
}
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 7cb0556..05a0a33 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -454,6 +454,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1 << 4)
 #define CHIP_IS_OMAP3430ES3_0  (1 << 5)
 #define CHIP_IS_OMAP3430ES3_1  (1 << 6)
+#define CHIP_IS_OMAP3630ES1(1 << 7)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +466,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.1.69.g36942

--
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 v2 4/8] omap: zoom2: update defconfig for LL_DEBUG_NONE

2009-11-10 Thread Vikram Pandita
Update DEBUG_LL for zoom2 board as CONFIG_OMAP_LL_DEBUG_NONE

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom2_defconfig |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..2eec53b 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -202,7 +202,8 @@ CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_LL_DEBUG_UART1 is not set
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_LL_DEBUG_NONE=y
 CONFIG_ARCH_OMAP34XX=y
 CONFIG_ARCH_OMAP3430=y
 
-- 
1.6.5.1.69.g36942

--
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 v2 7/8] omap: 3630sdp: introduce 3630 sdp board support

2009-11-10 Thread Vikram Pandita
Add 3630SDP board support

The board shares the same peripherals as a zoom2 main.
So reuse the peripheral file of zoom platform.

Peripheralzoom2zoom3  sdp3630
---
Ethernetsmscsmscsmc
NOR n/a n/a B
Onenand n/a n/a B
HDMIA   A   B (persent on different i2c)
NANDA   A   A (same nand)
SDRAM   A   A   A (same sdram)
Keypad  A   A   A (same twl)
Camera  A   A   A (same sensor can be mounted)
LCD Display A   A   A (same wvga display)
OPPsA   A   A (same chip feature)
Audio   A   A   A (same audio via twl5030)

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

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Kconfig |4 ++
 arch/arm/mach-omap2/Makefile|3 +
 arch/arm/mach-omap2/board-3630sdp.c |  101 +++
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 9824775..83551a8 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,10 @@ config MACH_OMAP_ZOOM3
bool "OMAP3630 Zoom3 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool "OMAP3630 SDP board"
+   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 712e7fc..90cf2cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -79,6 +79,9 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
new file mode 100755
index 000..f0bc5c6
--- /dev/null
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+
+static struct omap_smc91x_platform_data board_smc91x_data = {
+   .cs = 3,
+   .flags  = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
+};
+
+static void __init board_smc91x_init(void)
+{
+   board_smc91x_data.gpio_irq = 158;
+   gpmc_smc91x_init(&board_smc91x_data);
+}
+
+#else
+
+static inline void board_smc91x_init(void)
+{
+}
+
+#endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
+
+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]  = 126,
+   .reset_gpio_port[1]  = 61,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap_sdp_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel sdp_config[] __initdata = {
+};
+
+static void __init omap_sdp_init_irq(void)
+{
+   omap_board_config = sdp_config;
+   omap_board_config_size = ARRAY_SIZE(sdp_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_sdp_init(void)
+{
+   zoom_peripherals_init();
+   board_smc91x_init();
+   enable_board_wakeup_source();
+   usb_ehci_init(&ehci_pdata);
+}
+
+MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
+   .ph

[PATCH v2 2/8] omap: introduce OMAP_LL_DEBUG_NONE DEBUG_LL config

2009-11-10 Thread Vikram Pandita
Zoom2/Zoom3 kind of boards do not use omap uarts for console.
These use external debug board for console.

So these boards should not have "Uncompressing Kernel"
log put on omap uarts.

By interoducing OMAP_LL_DEBUG_NONE option,
unnecessary writes to omap uarts is avoided.

In future, the DEBUG_LL interface will be enhanced
to use external debug board.

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/Kconfig   |5 -
 arch/arm/plat-omap/include/plat/uncompress.h |6 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 64b3f52..f348ddf 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -165,7 +165,7 @@ config OMAP_DM_TIMER
 choice
prompt "Low-level debug console UART"
depends on ARCH_OMAP
-   default OMAP_LL_DEBUG_UART1
+   default OMAP_LL_DEBUG_NONE
 
 config OMAP_LL_DEBUG_UART1
bool "UART1"
@@ -176,6 +176,9 @@ config OMAP_LL_DEBUG_UART2
 config OMAP_LL_DEBUG_UART3
bool "UART3"
 
+config OMAP_LL_DEBUG_NONE
+   bool "None"
+
 endchoice
 
 config OMAP_SERIAL_WAKE
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h 
b/arch/arm/plat-omap/include/plat/uncompress.h
index e22f575..13c305d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -44,8 +44,12 @@ static void putc(int c)
uart = (volatile u8 *)(OMAP_UART3_BASE);
 #elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
uart = (volatile u8 *)(OMAP_UART2_BASE);
-#else
+#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
uart = (volatile u8 *)(OMAP_UART1_BASE);
+#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
+   return;
+#else
+   return;
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1
-- 
1.6.5.1.69.g36942

--
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 v2 0/8] introduce 3630 boards

2009-11-10 Thread Vikram Pandita
Introducing 3630 boards: zoom3 and sdp3630

The peripherals are very similar for the two bards as per this discussion:
http://marc.info/?l=linux-omap&m=125676595710748&w=2

So maximum reuse is done for the board files for zoom3 and sdp3630

V1: Review comments incorporated:
http://marc.info/?l=linux-omap&m=125632676504364&w=2
http://marc.info/?l=linux-omap&m=125632720804869&w=2
http://marc.info/?l=linux-omap&m=125633994320138&w=2

V2: Review comments by Nishanth Menon
http://marc.info/?l=linux-omap&m=125728617825678&w=2
http://marc.info/?l=linux-omap&m=125728665226332&w=2
http://marc.info/?l=linux-omap&m=125728729027309&w=2
    http://marc.info/?l=linux-omap&m=125728749327603&w=2

Vikram Pandita (8):
  omap: 3630: update is_chip variable
  omap: DEBUG_LL: allow no omap uart configuration
  omap: zoom2: split board file for reuse
  omap: zoom2: update defconfig
  omap: zoom3: introduce zoom3 board support
  omap: zoom3: defconfig creation
  omap: 3630sdp: introduce 3630 sdp board support
  omap: 3630sdp: defconfig creation

 arch/arm/configs/omap_3630sdp_defconfig| 1606 
 arch/arm/configs/omap_zoom2_defconfig  |  231 ++--
 arch/arm/configs/omap_zoom3_defconfig  | 1605 +++
 arch/arm/mach-omap2/Kconfig|8 +
 arch/arm/mach-omap2/Makefile   |8 +
 arch/arm/mach-omap2/board-3630sdp.c|   96 ++
 arch/arm/mach-omap2/board-zoom-peripherals.c   |  403 +
 arch/arm/mach-omap2/board-zoom2.c  |  261 +---
 arch/arm/mach-omap2/board-zoom3.c  |   59 +
 arch/arm/mach-omap2/id.c   |2 +
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   52 +
 arch/arm/plat-omap/Kconfig |3 +
 arch/arm/plat-omap/include/plat/cpu.h  |7 +-
 arch/arm/plat-omap/include/plat/uncompress.h   |4 +-
 14 files changed, 4005 insertions(+), 340 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c
 create mode 100644 arch/arm/mach-omap2/board-zoom-peripherals.c
 create mode 100644 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.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] usbtest: make module param pattern writeable

2009-11-09 Thread Vikram Pandita
Allow module_param to be writeable. This allows us to change
the parameter if usbtest is built-in in the kernel.

Signed-off-by: Vikram Pandita 
Signed-off-by: Anand Gadiyar 
---
 drivers/usb/misc/usbtest.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index a9f06d7..0aa04b7 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -213,8 +213,9 @@ static struct urb *simple_alloc_urb (
 }
 
 static unsigned pattern = 0;
-module_param (pattern, uint, S_IRUGO);
-MODULE_PARM_DESC(pattern, "i/o pattern (0 == zeroes)");
+static unsigned mod_pattern = 0;
+module_param_named(pattern, mod_pattern, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(mod_pattern, "i/o pattern (0 == zeroes)");
 
 static inline void simple_fill_buf (struct urb *urb)
 {
@@ -1567,6 +1568,8 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int 
code, void *buf)
 
// FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is.
 
+   pattern = mod_pattern;
+
if (code != USBTEST_REQUEST)
return -EOPNOTSUPP;
 
-- 
1.6.5.1.69.g36942

--
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/8] omap: 3630sdp: introduce 3630 sdp board support

2009-11-03 Thread Vikram Pandita
Add 3630SDP board support

The board shares the same peripherals as a zoom2 main.
So reuse the peripheral file of zoom platform.

The RAM part is Hynix memory as as in zoom3.

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Kconfig |4 ++
 arch/arm/mach-omap2/Makefile|3 +
 arch/arm/mach-omap2/board-3630sdp.c |   96 +++
 3 files changed, 103 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 9824775..83551a8 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,10 @@ config MACH_OMAP_ZOOM3
bool "OMAP3630 Zoom3 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_3630SDP
+   bool "OMAP3630 SDP board"
+   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 712e7fc..90cf2cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -79,6 +79,9 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_3630SDP)+= board-3630sdp.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
new file mode 100755
index 000..450fcdd
--- /dev/null
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+static struct omap_smc91x_platform_data board_smc91x_data = {
+   .cs = 3,
+   .flags  = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
+};
+
+static void __init board_smc91x_init(void)
+{
+   board_smc91x_data.gpio_irq = 158;
+   gpmc_smc91x_init(&board_smc91x_data);
+}
+#else
+static inline void board_smc91x_init(void)
+{
+}
+#endif
+
+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]  = 126,
+   .reset_gpio_port[1]  = 61,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init omap_sdp_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel sdp_config[] __initdata = {
+};
+static void __init omap_sdp_init_irq(void)
+{
+   omap_board_config = sdp_config;
+   omap_board_config_size = ARRAY_SIZE(sdp_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_sdp_init(void)
+{
+zoom_peripherals_init();
+   board_smc91x_init();
+   enable_board_wakeup_source();
+   usb_ehci_init(&ehci_pdata);
+}
+
+MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_sdp_map_io,
+   .init_irq   = omap_sdp_init_irq,
+   .init_machine   = omap_sdp_init,
+   .timer  = &omap_timer,
+MACHINE_END
-- 
1.6.5.1.69.g36942

--
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 6/8] omap: zoom3: defconfig creation

2009-11-03 Thread Vikram Pandita
Create zoom3 defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom3_defconfig | 1605 +
 1 files changed, 1605 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig

diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
new file mode 100644
index 000..989cedd
--- /dev/null
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -0,0 +1,1605 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 09:50:40 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 is not set
+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=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_A

[PATCH 8/8] omap: 3630sdp: defconfig creation

2009-11-03 Thread Vikram Pandita
Create 3630sdp defconfig file

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_3630sdp_defconfig | 1606 +++
 1 files changed, 1606 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig

diff --git a/arch/arm/configs/omap_3630sdp_defconfig 
b/arch/arm/configs/omap_3630sdp_defconfig
new file mode 100644
index 000..eb96b1a
--- /dev/null
+++ b/arch/arm/configs/omap_3630sdp_defconfig
@@ -0,0 +1,1606 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 14:18:44 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 is not set
+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 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH

[PATCH 4/8] omap: zoom2: update defconfig

2009-11-03 Thread Vikram Pandita
Update DEBUG_LL for zoom2 board as CONFIG_OMAP_LL_DEBUG_NONE
Sync zoom2 defconfig with menuconfig

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom2_defconfig |  231 -
 1 files changed, 141 insertions(+), 90 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..db4fc1c 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -1,15 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-omap1
-# Fri Jun 12 17:25:46 2009
+# Linux kernel version: 2.6.32-rc5
+# Tue Nov  3 12:00:13 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_MMU=y
-# CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,13 +16,13 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_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
@@ -46,11 +44,12 @@ CONFIG_BSD_PROCESS_ACCT=y
 #
 # RCU Subsystem
 #
-CONFIG_CLASSIC_RCU=y
-# CONFIG_TREE_RCU is not set
-# CONFIG_PREEMPT_RCU is not set
+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_PREEMPT_RCU_TRACE is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_GROUP_SCHED=y
@@ -77,7 +76,6 @@ CONFIG_UID16=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
-# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
@@ -90,18 +88,25 @@ 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_MARKERS 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
@@ -114,7 +119,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -135,19 +140,22 @@ CONFIG_FREEZER=y
 #
 # 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_GEMINI 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_IMX 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
@@ -156,25 +164,27 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_KIRKWOOD is not set
-# CONFIG_ARCH_KS8695 is not set
-# CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_LOKI is not set
 # CONFIG_ARCH_MV78XX0 is not set
-# CONFIG_ARCH_MXC 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
+# CONFIG_ARCH_W90X900 is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_MSM is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
 # CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_S5PC1XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
-# CONFIG_ARCH_MSM is not set
-# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_BCMRING is not set
 
 #
 # TI OMAP Implementations
@@ -202,21 +212,26 @@ CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_LL_DEBUG_UART1 is not set
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_LL_DEBUG_NONE=y
+# CONFIG_OMAP_PM_NONE is not set
+CONFIG_OMAP_PM_NOOP=y
 CONFIG_

[PATCH 3/8] omap: zoom2: split baord file for reuse

2009-11-03 Thread Vikram Pandita
Split zoom2 board file into:
base board file and a board-zoom-peripherals.c file

that way the same peripherals file can be reused for: zoom3 and sdp3630

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Makefile |1 +
 arch/arm/mach-omap2/board-zoom-peripherals.c |  414 ++
 arch/arm/mach-omap2/board-zoom2.c|  261 +---
 3 files changed, 429 insertions(+), 247 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-zoom-peripherals.c
 mode change 100644 => 100755 arch/arm/mach-omap2/board-zoom2.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..4d66b42 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -72,6 +72,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-peripherals.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-zoom-peripherals.c 
b/arch/arm/mach-omap2/board-zoom-peripherals.c
new file mode 100755
index 000..c799eca
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -0,0 +1,414 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ * Modified from mach-omap2/board-ldp.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 "mmc-twl4030.h"
+
+/* Zoom2 has Qwerty keyboard*/
+static int board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1  */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2  */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3  */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4  */
+   0
+};
+
+static struct matrix_keymap_data board_map_data = {
+   .keymap = board_keymap,
+   .keymap_size= ARRAY_SIZE(board_keymap),
+};
+
+static struct twl4030_keypad_data zoom_kp_twl4030_data = {
+   .keymap_data= &board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct twl4030_madc_platform_data zoom_madc_data = {
+   .irq_line   = 1,
+};
+
+static struct twl4030_hsmmc_info mmc[] = {
+   {
+   .name   = "external",
+   .mmc= 1,
+   .wires  = 4,
+   .cover_only = true,
+   .gpio_cd= -EINVAL,
+   .gpio_wp= -EINVAL,
+   .power_saving   = true,
+   },
+   {
+   .name   = "internal",
+   .mmc= 2,
+   .wires  = 8,
+   .gpio_cd= -EINVAL,
+   .gpio_wp= -EINVAL,
+   .nonremovable   = true,
+   .power_saving   = true,
+   },
+   {}  /* Terminator */
+};
+
+static struct regulator_consumer_supply zoom_vmmc1_supply = {
+   .supply = "vmmc",
+};
+
+static struct regulator_consumer_supply zoom_vmmc2_supply = {
+   .supply = "vmmc",
+};
+

[PATCH 5/8] omap: zoom3: introduce zoom3 board support

2009-11-03 Thread Vikram Pandita
Zoom3 is the next versoin of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.
Zoom2 has OMAP34xx
Zoom3 has OMAP3630
Zoom3 = OMAP3630 SOM board + same zoom2 main board + same debugboard

Zoom3 has a different SDRAM part from Hynix
Zoom2 had SDRAM part from micron

Reuse the zoom2 files as much for zoom3, as at board level,
there is no change at all.

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Kconfig|4 +
 arch/arm/mach-omap2/Makefile   |4 +
 arch/arm/mach-omap2/board-zoom3.c  |   59 
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   54 ++
 4 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100755 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..9824775 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -101,6 +101,10 @@ config MACH_CM_T35
bool "CompuLab CM-T35 module"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_ZOOM3
+   bool "OMAP3630 Zoom3 board"
+   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 4d66b42..712e7fc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -75,6 +75,10 @@ obj-$(CONFIG_MACH_OMAP_ZOOM2)+= 
board-zoom2.o \
   board-zoom-peripherals.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_ZOOM3)  += board-zoom3.o \
+  board-zoom-peripherals.o \
+  mmc-twl4030.o \
+  board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-zoom3.c 
b/arch/arm/mach-omap2/board-zoom3.c
new file mode 100755
index 000..aebe7b8
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "sdram-hynix-h8mbx00u0mer-0em.h"
+
+static void __init omap_zoom_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+static struct omap_board_config_kernel zoom_config[] __initdata = {
+};
+static void __init omap_zoom_init_irq(void)
+{
+   omap_board_config = zoom_config;
+   omap_board_config_size = ARRAY_SIZE(zoom_config);
+   omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
+   h8mbx00u0mer0em_sdrc_params);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+extern int __init omap_zoom2_debugboard_init(void);
+extern void __init zoom_peripherals_init(void);
+
+static void __init omap_zoom_init(void)
+{
+zoom_peripherals_init();
+   omap_zoom2_debugboard_init();
+}
+
+MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
+   .boot_params= 0x8100,
+   .map_io = omap_zoom_map_io,
+   .init_irq   = omap_zoom_init_irq,
+   .init_machine   = omap_zoom_init,
+   .timer  = &omap_timer,
+MACHINE_END
diff --git a/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h 
b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
new file mode 100644
index 000..c469c48
--- /dev/null
+++ b/arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h
@@ -0,0 +1,54 @@
+/*
+ * SDRC register values for the Hynix H8MBX00U0MER-0EM
+ *
+ * Copyright (C) 2008-2009 Texas Instruments, Inc.
+ * Copyright (C) 2008-2009 Nokia Corporation
+ *
+ * Nicole Chalhoub / Vincent Bour
+ *
+ * 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.
+ */
+
+#ifndef ARCH_ARM_MACH_OMAP2_SDRAM_HYNIX_H8MBX00U0MER0EM
+#define ARCH_ARM_MACH_OMAP2_SDRAM_HYNIX_H8MBX00U0MER0EM
+
+#include 
+
+/* Hynix H8MBX00U0MER-0EM */
+static struct omap_sdrc_params h8mbx00u0mer0em_sdrc_params[] = {
+   [0] = {
+   .rate= 2,
+   .actim_ctrla = 0xa2e1b4c6,
+   .actim_ct

[PATCH 2/8] omap: DEBUG_LL: allow no omap uart configuration

2009-11-03 Thread Vikram Pandita
Zoom2/Zoom3 kind of boards do not use omap uarts
these boards should not have DEBUG_LL writing to omap uarts

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/Kconfig   |3 +++
 arch/arm/plat-omap/include/plat/uncompress.h |4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 64b3f52..c912e0e 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -176,6 +176,9 @@ config OMAP_LL_DEBUG_UART2
 config OMAP_LL_DEBUG_UART3
bool "UART3"
 
+config OMAP_LL_DEBUG_NONE
+   bool "None"
+
 endchoice
 
 config OMAP_SERIAL_WAKE
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h 
b/arch/arm/plat-omap/include/plat/uncompress.h
index e22f575..49b38f0 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -44,8 +44,10 @@ static void putc(int c)
uart = (volatile u8 *)(OMAP_UART3_BASE);
 #elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
uart = (volatile u8 *)(OMAP_UART2_BASE);
-#else
+#elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
uart = (volatile u8 *)(OMAP_UART1_BASE);
+#elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
+   return;
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1
-- 
1.6.5.1.69.g36942

--
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 1/8] omap: 3630: update is_chip variable

2009-11-03 Thread Vikram Pandita
3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
"arch/arm/mach-omap2/powerdomains34xx.h"
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita 
Acked-by: Alexander Shishkin 
Acked-by: Ari Kauppi 
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/plat/cpu.h |7 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..189cf7a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err("Uninitialized omap_chip, please fix!\n");
}
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 7cb0556..05a0a33 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -454,6 +454,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1 << 4)
 #define CHIP_IS_OMAP3430ES3_0  (1 << 5)
 #define CHIP_IS_OMAP3430ES3_1  (1 << 6)
+#define CHIP_IS_OMAP3630ES1(1 << 7)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +466,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.1.69.g36942

--
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/8] RFC: introduce 3630 boards

2009-11-03 Thread Vikram Pandita
Introducing 3630 boards: zoom3 and sdp3630

The peripherals are very similar for the two bards as per this discussion:
http://marc.info/?l=linux-omap&m=125676595710748&w=2

So maximum reuse is done for the board files for zoom3 and sdp3630

Review comments incorporated:
http://marc.info/?l=linux-omap&m=125632676504364&w=2
http://marc.info/?l=linux-omap&m=125632720804869&w=2
http://marc.info/?l=linux-omap&m=125633994320138&w=2

Vikram Pandita (8):
  omap: 3630: update is_chip variable
  omap: DEBUG_LL: allow no omap uart configuration
  omap: zoom2: split baord file for reuse
  omap: zoom2: update defconfig
  omap: zoom3: introduce zoom3 board support
  omap: zoom3: defconfig creation
  omap: 3630sdp: introduce 3630 sdp board support
  omap: 3630sdp: defconfig creation

 arch/arm/configs/omap_3630sdp_defconfig| 1606 
 arch/arm/configs/omap_zoom2_defconfig  |  231 ++--
 arch/arm/configs/omap_zoom3_defconfig  | 1605 +++
 arch/arm/mach-omap2/Kconfig|8 +
 arch/arm/mach-omap2/Makefile   |8 +
 arch/arm/mach-omap2/board-3630sdp.c|   96 ++
 arch/arm/mach-omap2/board-zoom-peripherals.c   |  414 +
 arch/arm/mach-omap2/board-zoom2.c  |  261 +---
 arch/arm/mach-omap2/board-zoom3.c  |   59 +
 arch/arm/mach-omap2/id.c   |2 +
 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.h |   54 +
 arch/arm/plat-omap/Kconfig |3 +
 arch/arm/plat-omap/include/plat/cpu.h  |7 +-
 arch/arm/plat-omap/include/plat/uncompress.h   |4 +-
 14 files changed, 4018 insertions(+), 340 deletions(-)
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c
 create mode 100755 arch/arm/mach-omap2/board-zoom-peripherals.c
 mode change 100644 => 100755 arch/arm/mach-omap2/board-zoom2.c
 create mode 100755 arch/arm/mach-omap2/board-zoom3.c
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8mbx00u0mer-0em.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 V3] omap: 3630: update is_chip variable

2009-11-02 Thread Vikram Pandita
From: vikram pandita 

3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
"arch/arm/mach-omap2/powerdomains34xx.h"
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita 
Acked-by: Alexander Shishkin 
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/plat/cpu.h |7 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..189cf7a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err("Uninitialized omap_chip, please fix!\n");
}
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 7cb0556..05a0a33 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -454,6 +454,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1 << 4)
 #define CHIP_IS_OMAP3430ES3_0  (1 << 5)
 #define CHIP_IS_OMAP3430ES3_1  (1 << 6)
+#define CHIP_IS_OMAP3630ES1(1 << 7)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +466,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.1.69.g36942

--
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] omap: zoom3: defconfig creation

2009-10-23 Thread Vikram Pandita
Create zoom3 defconfig file

Signed-off-by: Vikram Pandita 
---

Forgot to include the defconfig file.
consider this as [PATCH 4/4] of the previous zoom3 series

 arch/arm/configs/omap_zoom3_defconfig | 1605 +
 1 files changed, 1605 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/omap_zoom3_defconfig

diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
new file mode 100644
index 000..e94136b
--- /dev/null
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -0,0 +1,1605 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Fri Oct 23 14:02:02 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 is not set
+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=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+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 is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+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=y
+
+#
+# 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
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CON

[PATCH 3/3] omap: zoom3: add zoom3 board support

2009-10-23 Thread Vikram Pandita
Add machine type support for zoom3 board
Add board type in Kconfig and Makefile
Reused the zoom board file for zoom2 and zoom3

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Kconfig |4 
 arch/arm/mach-omap2/Makefile|3 +++
 arch/arm/mach-omap2/board-zoom2-zoom3.c |4 
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8685df5..fa20996 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -97,6 +97,10 @@ config MACH_OMAP_ZOOM2
bool "OMAP3 Zoom2 board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_OMAP_ZOOM3
+   bool "OMAP3630 Zoom3 board"
+   depends on ARCH_OMAP3 && ARCH_OMAP34XX
+
 config MACH_CM_T35
bool "CompuLab CM-T35 module"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 68f7419..fac13ba 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -74,6 +74,9 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
 obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2-zoom3.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
+obj-$(CONFIG_MACH_OMAP_ZOOM3)  += board-zoom2-zoom3.o \
+  mmc-twl4030.o \
+  board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
 
diff --git a/arch/arm/mach-omap2/board-zoom2-zoom3.c 
b/arch/arm/mach-omap2/board-zoom2-zoom3.c
index 4ad9b94..d806dbf 100644
--- a/arch/arm/mach-omap2/board-zoom2-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom2-zoom3.c
@@ -281,7 +281,11 @@ static void __init omap_zoom2_map_io(void)
omap2_map_common_io();
 }
 
+#ifdef CONFIG_MACH_OMAP_ZOOM3
+MACHINE_START(OMAP_ZOOM3, "OMAP ZOOM3 board")
+#else
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
+#endif
.phys_io= 0x4800,
.io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
.boot_params= 0x8100,
-- 
1.6.5.rc1.19.g8426

--
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/3] omap: zoom2: update makefile for boardfile name change

2009-10-23 Thread Vikram Pandita
Accomodate the board file change in Kconfig
arch/arm/mach-omap2/board-zoom2.c -> arch/arm/mach-omap2/board-zoom2-zoom3.c

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03cb4fc..68f7419 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -71,7 +71,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)  += board-rx51.o \
   board-rx51-peripherals.o \
   mmc-twl4030.o
-obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2.o \
+obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2-zoom3.o \
   mmc-twl4030.o \
   board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
-- 
1.6.5.rc1.19.g8426

--
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 1/3] omap: zoom: reuse zoom2 board file for zoom3

2009-10-23 Thread Vikram Pandita
Move:
arch/arm/mach-omap2/board-zoom2.c -> arch/arm/mach-omap2/board-zoom2-zoom3.c

Zoom2 has an omap3430 SOM board attached to a (main board + debug board)
Zoom3 has an omap3630 SOM board attached to same (main board + debug board)

The main board/peripherals/debug board remain exactly the same.
Only change is the omap silicon.

Hence reuse the board file for Zoom2 and Zoom3 boards.

This patch renames the board-zoom2 to board-zoom2-zoom3 to
reflect this reuse to avoid any confusion

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/board-zoom2-zoom3.c |  292 +++
 arch/arm/mach-omap2/board-zoom2.c   |  292 ---
 2 files changed, 292 insertions(+), 292 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom2-zoom3.c
 delete mode 100644 arch/arm/mach-omap2/board-zoom2.c

diff --git a/arch/arm/mach-omap2/board-zoom2-zoom3.c 
b/arch/arm/mach-omap2/board-zoom2-zoom3.c
new file mode 100644
index 000..4ad9b94
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom2-zoom3.c
@@ -0,0 +1,292 @@
+/*
+ * Copyright (C) 2009 Texas Instruments Inc.
+ * Mikkel Christensen 
+ *
+ * Modified from mach-omap2/board-ldp.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 "mmc-twl4030.h"
+#include "sdram-micron-mt46h32m32lf-6.h"
+
+/* Zoom2 has Qwerty keyboard*/
+static int board_keymap[] = {
+   KEY(0, 0, KEY_E),
+   KEY(1, 0, KEY_R),
+   KEY(2, 0, KEY_T),
+   KEY(3, 0, KEY_HOME),
+   KEY(6, 0, KEY_I),
+   KEY(7, 0, KEY_LEFTSHIFT),
+   KEY(0, 1, KEY_D),
+   KEY(1, 1, KEY_F),
+   KEY(2, 1, KEY_G),
+   KEY(3, 1, KEY_SEND),
+   KEY(6, 1, KEY_K),
+   KEY(7, 1, KEY_ENTER),
+   KEY(0, 2, KEY_X),
+   KEY(1, 2, KEY_C),
+   KEY(2, 2, KEY_V),
+   KEY(3, 2, KEY_END),
+   KEY(6, 2, KEY_DOT),
+   KEY(7, 2, KEY_CAPSLOCK),
+   KEY(0, 3, KEY_Z),
+   KEY(1, 3, KEY_KPPLUS),
+   KEY(2, 3, KEY_B),
+   KEY(3, 3, KEY_F1),
+   KEY(6, 3, KEY_O),
+   KEY(7, 3, KEY_SPACE),
+   KEY(0, 4, KEY_W),
+   KEY(1, 4, KEY_Y),
+   KEY(2, 4, KEY_U),
+   KEY(3, 4, KEY_F2),
+   KEY(4, 4, KEY_VOLUMEUP),
+   KEY(6, 4, KEY_L),
+   KEY(7, 4, KEY_LEFT),
+   KEY(0, 5, KEY_S),
+   KEY(1, 5, KEY_H),
+   KEY(2, 5, KEY_J),
+   KEY(3, 5, KEY_F3),
+   KEY(5, 5, KEY_VOLUMEDOWN),
+   KEY(6, 5, KEY_M),
+   KEY(4, 5, KEY_ENTER),
+   KEY(7, 5, KEY_RIGHT),
+   KEY(0, 6, KEY_Q),
+   KEY(1, 6, KEY_A),
+   KEY(2, 6, KEY_N),
+   KEY(3, 6, KEY_BACKSPACE),
+   KEY(6, 6, KEY_P),
+   KEY(7, 6, KEY_UP),
+   KEY(6, 7, KEY_SELECT),
+   KEY(7, 7, KEY_DOWN),
+   KEY(0, 7, KEY_PROG1),   /*MACRO 1  */
+   KEY(1, 7, KEY_PROG2),   /*MACRO 2  */
+   KEY(2, 7, KEY_PROG3),   /*MACRO 3  */
+   KEY(3, 7, KEY_PROG4),   /*MACRO 4  */
+   0
+};
+
+static struct matrix_keymap_data board_map_data = {
+   .keymap = board_keymap,
+   .keymap_size= ARRAY_SIZE(board_keymap),
+};
+
+static struct twl4030_keypad_data zoom2_kp_twl4030_data = {
+   .keymap_data= &board_map_data,
+   .rows   = 8,
+   .cols   = 8,
+   .rep= 1,
+};
+
+static struct omap_board_config_kernel zoom2_config[] __initdata = {
+};
+
+static struct regulator_consumer_supply zoom2_vmmc1_supply = {
+   .supply = "vmmc",
+};
+
+static struct regulator_consumer_supply zoom2_vsim_supply = {
+   .supply = "vmmc_aux",
+};
+
+static struct regulator_consumer_supply zoom2_vmmc2_supply = {
+   .supply = "vmmc",
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
+static struct regulator_init_data zoom2_vmmc1 = {
+   .constraints = {
+   .min_uV = 185,
+   .max_uV = 315,
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL
+   | REGULATOR_MODE_STANDBY,
+   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
+   | REGULATOR_CHANGE_MODE
+   | REGULATOR_CHANGE_STATUS,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = &zoom2_vmmc1_supply,
+};
+
+/* VMMC2 for MMC2 card */
+static struct regulator_init_data zoom2_vmmc2 = {
+   .constraints = {
+   .min_uV = 185,
+   .max_uV = 185,
+   .apply_uV   = true,
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL
+  

[PATCH 0/3] Introduce Zoom3 board

2009-10-23 Thread Vikram Pandita
Zoom3 is the next versoin of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.

Zoom2 has OMAP34xx
Zoom3 has OMAP3630

Zoom3 = OMAP3630 SOM board + same zoom2 main board + same debugboard

We want to reuse the zoom2 files as much for zoom3, as at board level, 
there is no change at all.

Vikram Pandita (3):
  omap: zoom: reuse zoom2 board file for zoom3
  omap: zoom2: update makefile for boardfile name change
  omap: zoom3: add zoom3 board support

 arch/arm/mach-omap2/Kconfig |4 +
 arch/arm/mach-omap2/Makefile|5 +-
 arch/arm/mach-omap2/board-zoom2-zoom3.c |  296 +++
 arch/arm/mach-omap2/board-zoom2.c   |  292 --
 4 files changed, 304 insertions(+), 293 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom2-zoom3.c
 delete mode 100644 arch/arm/mach-omap2/board-zoom2.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] updated mach-types file

2009-10-21 Thread Vikram Pandita
this patch updates the auto-generated mach-types file
to enable addition of 3630 boards:
1) zoom3
2) sdp3630

Signed-off-by: Vikram Pandita 
---
Tony:
Could you Temporarily host this patch on linux-omap tree till
rmk pulls in mach-types.
This would allow us to add 3630 board files

 arch/arm/tools/mach-types |   54 -
 1 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 94be7bb..0160378 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Fri Sep 18 21:42:00 2009
+# Last update: Wed Oct 21 15:33:08 2009
 #
 # machine_is_xxx   CONFIG_ MACH_TYPE_xxx   number
 #
@@ -2421,3 +2421,55 @@ liberty  MACH_LIBERTYLIBERTY 
2434
 mh355  MACH_MH355  MH355   2435
 pc7802 MACH_PC7802 PC7802  2436
 gnet_sgc   MACH_GNET_SGC   GNET_SGC2437
+einstein15 MACH_EINSTEIN15 EINSTEIN15  2438
+cmpd   MACH_CMPD   CMPD2439
+davinci_hase1  MACH_DAVINCI_HASE1  DAVINCI_HASE1   2440
+lgeincitephone MACH_LGEINCITEPHONE LGEINCITEPHONE  2441
+ea313x MACH_EA313X EA313X  2442
+fwbd_39064 MACH_FWBD_39064 FWBD_39064  2443
+fwbd_390128MACH_FWBD_390128FWBD_390128 2444
+pelco_moe  MACH_PELCO_MOE  PELCO_MOE   2445
+minimix27  MACH_MINIMIX27  MINIMIX27   2446
+omap3_thunder  MACH_OMAP3_THUNDER  OMAP3_THUNDER   2447
+passionc   MACH_PASSIONC   PASSIONC2448
+mx27amata  MACH_MX27AMATA  MX27AMATA   2449
+bgat1  MACH_BGAT1  BGAT1   2450
+buzz   MACH_BUZZ   BUZZ2451
+mb9g20 MACH_MB9G20 MB9G20  2452
+yushan MACH_YUSHAN YUSHAN  2453
+lizard MACH_LIZARD LIZARD  2454
+omap3polycom   MACH_OMAP3POLYCOM   OMAP3POLYCOM2455
+smdkv210   MACH_SMDKV210   SMDKV2102456
+bravo  MACH_BRAVO  BRAVO   2457
+siogentoo1 MACH_SIOGENTOO1 SIOGENTOO1  2458
+siogentoo2 MACH_SIOGENTOO2 SIOGENTOO2  2459
+sm3k   MACH_SM3K   SM3K2460
+acer_tempo_f900MACH_ACER_TEMPO_F900ACER_TEMPO_F900 
2461
+sst61vc010_dev MACH_SST61VC010_DEV SST61VC010_DEV  2462
+glittertindMACH_GLITTERTINDGLITTERTIND 2463
+omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3  2464
+omap_3630sdp   MACH_OMAP_3630SDP   OMAP_3630SDP2465
+cybook2440 MACH_CYBOOK2440 CYBOOK2440  2466
+torino_s   MACH_TORINO_S   TORINO_S2467
+havana MACH_HAVANA HAVANA  2468
+beaumont_11MACH_BEAUMONT_11BEAUMONT_11 2469
+vanguard   MACH_VANGUARD   VANGUARD2470
+s5pc110_draco  MACH_S5PC110_DRACO  S5PC110_DRACO   2471
+cartesio_two   MACH_CARTESIO_TWO   CARTESIO_TWO2472
+aster  MACH_ASTER  ASTER   2473
+voguesv210 MACH_VOGUESV210 VOGUESV210  2474
+acm500xMACH_ACM500XACM500X 
2475
+km9260 MACH_KM9260 KM9260  2476
+nideflexg1 MACH_NIDEFLEXG1 NIDEFLEXG1  2477
+ctera_plug_io  MACH_CTERA_PLUG_IO  CTERA_PLUG_IO   2478
+smartq7MACH_SMARTQ7SMARTQ7 
2479
+at91sam9g10ek2 MACH_AT91SAM9G10EK2 AT91SAM9G10EK2  2480
+asusp527   MACH_ASUSP527   ASUSP5272481
+at91sam9g20mpm2MACH_AT91SAM9G20MPM2AT91SAM9G20MPM2 
2482
+topasa900  MACH_TOPASA900  TOPASA900   2483
+electrum_100   MACH_ELECTRUM_100   ELECTRUM_1002484
+mx51grbMACH_MX51GRBMX51GRB 
2485
+xea300 MACH_XEA300 XEA300  2486
+htcstartrek

[PATCH v2 2/2] omap: 3630: update is_chip variable

2009-10-20 Thread Vikram Pandita
3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version
Provide space for 3430 future ES rev (bit7 to bit9)

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
"arch/arm/mach-omap2/powerdomains34xx.h"
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita 
Signed-off-by: Menon, Nishanth 
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/plat/cpu.h |8 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..189cf7a 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err("Uninitialized omap_chip, please fix!\n");
}
diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 922bf1c..5c95e4b 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -454,6 +454,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1 << 4)
 #define CHIP_IS_OMAP3430ES3_0  (1 << 5)
 #define CHIP_IS_OMAP3430ES3_1  (1 << 6)
+/* Space for future revisions of 3430: bit7 to bit9 */
+#define CHIP_IS_OMAP3630ES1(1 << 10)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +467,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.rc1.19.g8426

--
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 v2 1/2] omap: add bits for future 3430/3630 ES revisions

2009-10-20 Thread Vikram Pandita
Add bits for future expansion of omap_chip_id type field.
This is needed to accomodate 3630ES1 chip id which is bit10

Signed-off-by: Vikram Pandita 
Signed-off-by: Menon, Nishanth 
---
 arch/arm/plat-omap/include/plat/cpu.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
b/arch/arm/plat-omap/include/plat/cpu.h
index 7cb0556..922bf1c 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -45,7 +45,7 @@ int omap_type(void);
 
 struct omap_chip_id {
u8 oc;
-   u8 type;
+   u32 type;
 };
 
 #define OMAP_CHIP_INIT(x)  { .oc = x }
-- 
1.6.5.rc1.19.g8426

--
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] omap: 3630: update is_chip variable

2009-10-19 Thread Vikram Pandita
3630 is getting treated like next rev of 3430
omap_chip.oc variable has to be updated for 3630 version

Otherwise the Core power domain is not getting registered.

This gets used in the registration of power domains in:
"arch/arm/mach-omap2/powerdomains34xx.h"
core_34xx_es3_1_pwrdm
OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1)

Core power doman will get registered for 3630 only when .oc is pouplated
correctly.

Tested on Zoom3(3630) board

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/id.c  |2 ++
 arch/arm/plat-omap/include/mach/cpu.h |7 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 71d5568..ebf3654 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -359,6 +359,8 @@ void __init omap2_check_revision(void)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
else if (omap_rev() == OMAP3430_REV_ES3_1)
omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+   else if (omap_rev() == OMAP3630_REV_ES1_0)
+   omap_chip.oc |= CHIP_IS_OMAP3630ES1;
} else {
pr_err("Uninitialized omap_chip, please fix!\n");
}
diff --git a/arch/arm/plat-omap/include/mach/cpu.h 
b/arch/arm/plat-omap/include/mach/cpu.h
index 7cb0556..05a0a33 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -454,6 +454,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define CHIP_IS_OMAP3430ES2(1 << 4)
 #define CHIP_IS_OMAP3430ES3_0  (1 << 5)
 #define CHIP_IS_OMAP3430ES3_1  (1 << 6)
+#define CHIP_IS_OMAP3630ES1(1 << 7)
 
 #define CHIP_IS_OMAP24XX   (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
 
@@ -465,8 +466,10 @@ IS_OMAP_TYPE(3430, 0x3430)
  */
 #define CHIP_GE_OMAP3430ES2(CHIP_IS_OMAP3430ES2 | \
 CHIP_IS_OMAP3430ES3_0 | \
-CHIP_IS_OMAP3430ES3_1)
-#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1)
+CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
+#define CHIP_GE_OMAP3430ES3_1  (CHIP_IS_OMAP3430ES3_1 | \
+CHIP_IS_OMAP3630ES1)
 
 
 int omap_chip_is(struct omap_chip_id oci);
-- 
1.6.5.rc1.19.g8426

--
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] [RFC] omap: 3630: default cpu_is_omap3630 to zero

2009-10-12 Thread Vikram Pandita
make default cpu_is_omap3630() return zero

Signed-off-by: Vikram Pandita 
---
 arch/arm/plat-omap/include/mach/cpu.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/cpu.h 
b/arch/arm/plat-omap/include/mach/cpu.h
index da9e8f8..940946e 100644
--- a/arch/arm/plat-omap/include/mach/cpu.h
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -322,6 +322,7 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define cpu_is_omap2423()  0
 #define cpu_is_omap2430()  0
 #define cpu_is_omap3430()  0
+#define cpu_is_omap3630()  0
 
 /*
  * Whether we have MULTI_OMAP1 or not, we still need to distinguish
@@ -386,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
(omap3_has_sgx()) & \
(!omap3_has_iva()))
 # define cpu_is_omap3530   (cpu_is_omap3430())
+# undef cpu_is_omap3630()
 # define cpu_is_omap3630() is_omap363x()
 #endif
 
-- 
1.6.5.rc1.19.g8426

--
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 1/2] OMAP1/2/3/4: DEBUG_LL run time detection

2009-09-18 Thread Vikram Pandita
This patch cleans up the DEBUG_LL infrastructure for omap boards.

The decision of finding the physical address of debug uart is done
at runtime now, making possible to use a single defconfig for multiple boards.

This patch gets rid of  menuconfig options of choosing low level debug uarts.

Changes are:
Implement dynamic uart detection functions in a new file:
arch/arm/plat-omap/debug-low-level.c
Functions:
get_uart_base() Returns debug uart physical address
get_uart_virt_base()Returns debug uart virtual address
get_uart_shift()Returns debug uart register shift

The same functions get used in the uncompressing stage of kernel
as well as for debug low level functions of kernel

Following comments from Russell King have been incorporated:
http://marc.info/?l=linux-arm-kernel&m=125321699528719&w=2

Changes have been tested on:
SDP3430: UART1
Zoom1: UART3
Beagle: UART3
Zoom2: External Uart

Signed-off-by: Vikram Pandita 
Cc: Russell King 
Cc: Kevin Hilman 
---
 arch/arm/mach-omap2/board-zoom-debugboard.c   |5 +-
 arch/arm/plat-omap/Kconfig|   16 ---
 arch/arm/plat-omap/Makefile   |2 +-
 arch/arm/plat-omap/debug-low-level.c  |  123 +
 arch/arm/plat-omap/include/mach/debug-macro.S |   60 +
 arch/arm/plat-omap/include/mach/uncompress.h  |   27 +++---
 6 files changed, 164 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/plat-omap/debug-low-level.c

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c 
b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1f13e2a..70a4bba 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -82,9 +82,10 @@ static inline void __init zoom2_init_smsc911x(void)
 
 static struct plat_serial8250_port serial_platform_data[] = {
{
-   .mapbase= 0x1000,
+   .membase= IOMEM(ZOOM2_EXT_QUART_VIRT),
+   .mapbase= ZOOM2_EXT_QUART_PHYS,
.irq= OMAP_GPIO_IRQ(102),
-   .flags  = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+   .flags  = UPF_BOOT_AUTOCONF|UPF_SHARE_IRQ,
.irqflags   = IRQF_SHARED | IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM,
.regshift   = 1,
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 64b3f52..dc00780 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -162,22 +162,6 @@ config OMAP_DM_TIMER
help
 Select this option if you want to use OMAP Dual-Mode timers.
 
-choice
-   prompt "Low-level debug console UART"
-   depends on ARCH_OMAP
-   default OMAP_LL_DEBUG_UART1
-
-config OMAP_LL_DEBUG_UART1
-   bool "UART1"
-
-config OMAP_LL_DEBUG_UART2
-   bool "UART2"
-
-config OMAP_LL_DEBUG_UART3
-   bool "UART3"
-
-endchoice
-
 config OMAP_SERIAL_WAKE
bool "Enable wake-up events for serial ports"
depends on ARCH_OMAP1 && OMAP_MUX
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 98f0191..e205a06 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -4,7 +4,7 @@
 
 # Common support
 obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \
-usb.o fb.o io.o
+usb.o fb.o io.o debug-low-level.o
 obj-m :=
 obj-n :=
 obj-  :=
diff --git a/arch/arm/plat-omap/debug-low-level.c 
b/arch/arm/plat-omap/debug-low-level.c
new file mode 100644
index 000..c134694
--- /dev/null
+++ b/arch/arm/plat-omap/debug-low-level.c
@@ -0,0 +1,123 @@
+/*
+ * Common debug-low-level.c file
+ * This file is created by Vikram Pandita 
+ *
+ * Copyright (C) 2009 Texas Instruments
+ *
+ * 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 
+
+u32 get_uart_base(void)
+{
+   static u32  omap_uart_debug_ll_phy_addr;
+
+   if (omap_uart_debug_ll_phy_addr)
+   return omap_uart_debug_ll_phy_addr;
+
+   /* Add logic here for new platforms, using __machine_arch_type */
+
+   /* TODO: REVISIT -- Check Completeness
+* DEFINE PHY ADDRESS for EACH BOARD HERE: omap1/2/3/4 */
+#if defined(CONFIG_ARCH_OMAP1)
+   switch (__machine_arch_type) {
+   case MACH_TYPE_OMAP_PALMTT:
+   case MACH_TYPE_SX1:
+   /* UART2 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0800;
+   break;
+   default:
+   /* UART1 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0xfffb;
+   break;
+   }
+#endif
+
+#if defined(CONFIG_ARCH_OMAP2)
+   switch (__machine_arch_type) {
+   case MAC

[PATCH 2/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart

2009-09-18 Thread Vikram Pandita
This patch adds DEBUG_LL interface for Zoom2 board.
The low level debug uart now points corrctly to External Quad uart
controller on detachable debug board.

The Quad uart is available over GPMC chip select with physical address
0x1000.

This physical address has been mapped to virtual address 0xFB00
as per static mapping.

This patch is adapted from a version by Erik Gilling:
http://android.git.kernel.org/?p=kernel/omap.git;
a=commit;h=e9d72efdd88877d2d6ea74a08983ace0dcc771d3

Signed-off-by: Vikram Pandita 
Cc: Erik Gilling 
---
 arch/arm/mach-omap2/board-zoom2.c|   18 --
 arch/arm/plat-omap/debug-low-level.c |2 ++
 arch/arm/plat-omap/include/mach/io.h |6 ++
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom2.c 
b/arch/arm/mach-omap2/board-zoom2.c
index 324009e..abaee66 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -269,15 +270,28 @@ static void __init omap_zoom2_init(void)
usb_musb_init();
 }
 
+static struct map_desc zoom2_io_desc[] __initdata = {
+   {
+   .virtual= ZOOM2_EXT_QUART_VIRT,
+   .pfn= __phys_to_pfn(ZOOM2_EXT_QUART_PHYS),
+   .length = ZOOM2_EXT_QUART_SIZE,
+   .type   = MT_DEVICE
+   }
+};
+
 static void __init omap_zoom2_map_io(void)
 {
omap2_set_globals_343x();
+
+   /* Map external quad UART virt to phy mapping */
+   iotable_init(zoom2_io_desc, ARRAY_SIZE(zoom2_io_desc));
+
omap2_map_common_io();
 }
 
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= ZOOM2_EXT_QUART_PHYS,
+   .io_pg_offst= ((ZOOM2_EXT_QUART_VIRT) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_zoom2_map_io,
.init_irq   = omap_zoom2_init_irq,
diff --git a/arch/arm/plat-omap/debug-low-level.c 
b/arch/arm/plat-omap/debug-low-level.c
index c134694..ea68440 100644
--- a/arch/arm/plat-omap/debug-low-level.c
+++ b/arch/arm/plat-omap/debug-low-level.c
@@ -15,6 +15,8 @@ u32 get_uart_base(void)
 {
static u32  omap_uart_debug_ll_phy_addr;
 
+   omap_uart_debug_ll_phy_addr = 0;
+
if (omap_uart_debug_ll_phy_addr)
return omap_uart_debug_ll_phy_addr;
 
diff --git a/arch/arm/plat-omap/include/mach/io.h 
b/arch/arm/plat-omap/include/mach/io.h
index 8d32df3..d67f06c 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -169,6 +169,12 @@
 #define DSP_MMU_34XX_VIRT  0xe200
 #define DSP_MMU_34XX_SIZE  SZ_4K
 
+/* Map External Quad UART for Zoom2 board */
+#define ZOOM2_EXT_QUART_PHYS   0x1000 /* PHY address if fixed */
+#define ZOOM2_EXT_QUART_PHY_TO_VIRT_OFF0xEB00
+#define ZOOM2_EXT_QUART_VIRT   0xFB00
+#define ZOOM2_EXT_QUART_SIZE   SZ_16
+
 /*
  * 
  * Omap4 specific IO mapping
-- 
1.6.5.rc0

--
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 0/2] Cleanup DEBUG_LL infrastructure

2009-09-18 Thread Vikram Pandita
Patch1: clean up the DEBUG_LL infrastructure for run time detection
Patch2: add DEBUG_LL support for Zoom2 board that has external UART

Patchs are also hosted at:
git://dev.omapzoom.org/pub/scm/vikram/omap3.git debug-ll-ver3

Tested on OMAP3: SDP3430/Zoom2/Zoom1/Beagleboard
Will appreciate if some can verify for OMAP2 and OMAP1 boards

Vikram Pandita (2):
  OMAP1/2/3/4: DEBUG_LL run time detection
  OMAP: Zoom2: Add DEBUG_LL interface using Quart

 arch/arm/mach-omap2/board-zoom-debugboard.c   |5 +-
 arch/arm/mach-omap2/board-zoom2.c |   18 +++-
 arch/arm/plat-omap/Kconfig|   16 ---
 arch/arm/plat-omap/Makefile   |2 +-
 arch/arm/plat-omap/debug-low-level.c  |  125 +
 arch/arm/plat-omap/include/mach/debug-macro.S |   60 +---
 arch/arm/plat-omap/include/mach/io.h  |6 +
 arch/arm/plat-omap/include/mach/uncompress.h  |   27 +++---
 8 files changed, 188 insertions(+), 71 deletions(-)
 create mode 100644 arch/arm/plat-omap/debug-low-level.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 v2 2/2] OMAP1/2/3/4: DEBUG_LL run time detection

2009-09-11 Thread Vikram Pandita
This patch cleans up the DEBUG_LL infrastructure for omap boards.

The decision of finding the physical address of debug uart is done
at runtime now, making possible to use a single defconfig for multiple boards.

This patch gets rid of  menuconfig options of choosing low level debug uarts.

Changes are:
1) Implement get_uart_[virt_]base in arch/arm/boot/compressed/misc.c
These functions do a run time detection of debug uart address

2) arch/arm/boot/compressed/head.S
calls get_uart_base to get the phy address and stores in r13^ user mode ARM reg
calls get_uart_virt_base to get the virtual address and stores in r14^ user 
mode ARM reg

3) arch/arm/plat-omap/include/mach/debug-macro.S: addruart
 This function gets the debug uart phy/virtual address from r13^ and r14^ 
respectively
 Stores them in a variables, __phy_uart_addr and __virt_uart_addr
 so that subsiquent access get the address from variables

Changes have been tested on:
SDP3430: UART1
Zoom1: UART3
Beagle: UART3
Zoom2: External Uart

Signed-off-by: Vikram Pandita 
---
 arch/arm/boot/compressed/head.S   |   17 
 arch/arm/boot/compressed/misc.c   |  108 -
 arch/arm/plat-omap/Kconfig|   16 
 arch/arm/plat-omap/include/mach/debug-macro.S |   74 +
 arch/arm/plat-omap/include/mach/uncompress.h  |   22 +++---
 5 files changed, 176 insertions(+), 61 deletions(-)

diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 4515728..7fcc21a 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -277,6 +277,20 @@ not_relocated: mov r0, #0
blo 1b
add sp, r1, #128@ relocate the stack
 
+   mov r9, r0
+
+   bl  get_uart_base   @ get uart phy address
+   adr r2, __dummy
+   str r0, [r2]@save uart phy adder in memory
+   ldm r2, {r13}^  @save phyadder in usermode reg
+
+   bl  get_uart_virt_base  @ get uart virtual address
+   adr r2, __dummy
+   str r0, [r2]@save uart phy adder in memory
+   ldm r2, {r14}^  @save phyadder in usermode reg
+
+   mov r0, r9
+
bl  cache_clean_flush
add pc, r5, r0  @ call relocation code
 
@@ -303,6 +317,9 @@ LC0:.word   LC0 @ r1
 LC1:   .word   reloc_end - reloc_start
.size   LC0, . - LC0
 
+   .type   __dummy, #object
+__dummy:   .word   __dummy
+
 #ifdef CONFIG_ARCH_RPC
.globl  params
 params:ldr r0, =params_phys
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 17153b5..0758656 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -22,6 +22,15 @@ unsigned int __machine_arch_type;
 #include/* for size_t */
 #include   /* for NULL */
 #include 
+#include 
+/* TODO:
+ * Include of this header is not working.
+ * Gives Error: undefined reference to `omap_rev'
+ * This header is needed for constant:
+ * ZOOM2_EXT_QUART_VIRT = 0xFB00
+ * ZOOM2_EXT_QUART_PHYS = 0x1000
+ */
+/* #include  */
 
 #ifdef STANDALONE_DEBUG
 #define putstr printf
@@ -316,6 +325,103 @@ static void error(char *x)
 
 #ifndef STANDALONE_DEBUG
 
+u32  *omap_uart_debug_ll_phy_addr;
+
+static void find_debug_ll_uart_port(unsigned int arch_type)
+{
+   omap_uart_debug_ll_phy_addr = 0;
+
+   /* Add logic here for new platforms, using __macine_arch_type */
+
+   /* TODO: REVISIT -- Check Completeness
+* DEFINE PHY ADDRESS for EACH BOARD HERE: omap1/2/3/4 */
+#if defined(CONFIG_ARCH_OMAP1)
+   switch (arch_type) {
+   case MACH_TYPE_OMAP_PALMTT:
+   case MACH_TYPE_SX1:
+   /* UART2 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0xfffb0800;
+   break;
+   default:
+   /* UART1 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0xfffb;
+   break;
+   }
+#endif
+
+#if defined(CONFIG_ARCH_OMAP2)
+   switch (arch_type) {
+   case MACH_TYPE_NOKIA_N800:
+   case MACH_TYPE_NOKIA_N810:
+   case MACH_TYPE_NOKIA_N810_WIMAX:
+   /* UART3 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0x4806e000;
+   break;
+   default:
+   /* UART1 */
+   omap_uart_debug_ll_phy_addr = (u32 *)0x4806a000;
+   break;
+   }
+#endif
+
+#if defined(CONFIG_ARCH_OMAP3)
+   switch (arch_type) {
+   case MACH_TYPE_OMAP_LDP:
+   case MACH_TYPE_OVERO:
+   case MACH_TYPE_OMAP3_PANDORA:
+   case MACH_TYPE_NOKIA_RX51:
+   case MACH_TYPE_OMAP3_BEAGLE:
+   /* 

[PATCH v2 1/2] OMAP: Zoom2: Add DEBUG_LL interface using Quart

2009-09-11 Thread Vikram Pandita
This patch adds DEBUG_LL interface for Zoom2 board.
The low level debug uart now points corrctly to External Quad uart
controller on detachable debug board.

The Quad uart is available over GPMC chip select with physical address
0x1000.

This physical address has been mapped to virtual address 0xFB00
as per static mapping.

This patch is adapted from a version by Erik Gilling:
http://android.git.kernel.org/?p=kernel/omap.git;
a=commit;h=e9d72efdd88877d2d6ea74a08983ace0dcc771d3

Signed-off-by: Vikram Pandita 
Cc: Erik Gilling 
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |5 +++--
 arch/arm/mach-omap2/board-zoom2.c   |   19 +--
 arch/arm/plat-omap/include/mach/io.h|6 ++
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c 
b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1f13e2a..70a4bba 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -82,9 +82,10 @@ static inline void __init zoom2_init_smsc911x(void)
 
 static struct plat_serial8250_port serial_platform_data[] = {
{
-   .mapbase= 0x1000,
+   .membase= IOMEM(ZOOM2_EXT_QUART_VIRT),
+   .mapbase= ZOOM2_EXT_QUART_PHYS,
.irq= OMAP_GPIO_IRQ(102),
-   .flags  = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+   .flags  = UPF_BOOT_AUTOCONF|UPF_SHARE_IRQ,
.irqflags   = IRQF_SHARED | IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM,
.regshift   = 1,
diff --git a/arch/arm/mach-omap2/board-zoom2.c 
b/arch/arm/mach-omap2/board-zoom2.c
index 324009e..467e961 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -19,10 +19,12 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
+#include 
 
 #include "mmc-twl4030.h"
 
@@ -269,15 +271,28 @@ static void __init omap_zoom2_init(void)
usb_musb_init();
 }
 
+static struct map_desc zoom2_io_desc[] __initdata = {
+   {
+   .virtual= ZOOM2_EXT_QUART_VIRT,
+   .pfn= __phys_to_pfn(ZOOM2_EXT_QUART_PHYS),
+   .length = ZOOM2_EXT_QUART_SIZE,
+   .type   = MT_DEVICE
+   }
+};
+
 static void __init omap_zoom2_map_io(void)
 {
omap2_set_globals_343x();
+
+   /* Map external quad UART virt to phy mapping */
+   iotable_init(zoom2_io_desc, ARRAY_SIZE(zoom2_io_desc));
+
omap2_map_common_io();
 }
 
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= ZOOM2_EXT_QUART_PHYS,
+   .io_pg_offst= ((ZOOM2_EXT_QUART_VIRT) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_zoom2_map_io,
.init_irq   = omap_zoom2_init_irq,
diff --git a/arch/arm/plat-omap/include/mach/io.h 
b/arch/arm/plat-omap/include/mach/io.h
index 8d32df3..d67f06c 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -169,6 +169,12 @@
 #define DSP_MMU_34XX_VIRT  0xe200
 #define DSP_MMU_34XX_SIZE  SZ_4K
 
+/* Map External Quad UART for Zoom2 board */
+#define ZOOM2_EXT_QUART_PHYS   0x1000 /* PHY address if fixed */
+#define ZOOM2_EXT_QUART_PHY_TO_VIRT_OFF0xEB00
+#define ZOOM2_EXT_QUART_VIRT   0xFB00
+#define ZOOM2_EXT_QUART_SIZE   SZ_16
+
 /*
  * 
  * Omap4 specific IO mapping
-- 
1.6.3.3.334.g916e1

--
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 v2 0/2] Cleanup DEBUG_LL infrastructure

2009-09-11 Thread Vikram Pandita
Patch1: add DEBUG_LL support for Zoom2 board that has external UART
Patch2: clean up the DEBUG_LL infrastructure for run time detection

Patchs are also hosted at:
git://dev.omapzoom.org/pub/scm/vikram/omap3.git runtime-debug-ll

Tested on OMAP3: SDP3430/Zoom2/Zoom1/Beagleboard
Will appreciate if some can verify for OMAP2 and OMAP1 boards

Vikram Pandita (2):
  OMAP: Zoom2: Add DEBUG_LL interface using Quart
  OMAP1/2/3/4: DEBUG_LL run time detection

 arch/arm/boot/compressed/head.S   |   17 
 arch/arm/boot/compressed/misc.c   |  108 -
 arch/arm/mach-omap2/board-zoom-debugboard.c   |5 +-
 arch/arm/mach-omap2/board-zoom2.c |   19 -
 arch/arm/plat-omap/Kconfig|   16 
 arch/arm/plat-omap/include/mach/debug-macro.S |   74 +
 arch/arm/plat-omap/include/mach/io.h  |6 ++
 arch/arm/plat-omap/include/mach/uncompress.h  |   22 +++---
 8 files changed, 202 insertions(+), 65 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


[PATCH 3/3] USB: musb: omap: Enable MUSB clocks before xceiver resume

2009-09-04 Thread Vikram Pandita
Enable MUSB clocks before the xceiver resume is called.
As soon as xceiver resume is called, xceiver communicates an
interrupt to MUSB over ULPI bus and the interrupt handler crashes
as the clocks are not enabled on going to resume.

So enable the MUSB clocks so that its ready to handle interrupts
from the xceiver

Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/omap2430.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ea7a798..67dabe1 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -286,13 +286,18 @@ int musb_platform_resume(struct musb *musb)
if (!musb->clock)
return 0;
 
-   otg_set_suspend(otg_get_transceiver(), 0);
-
+   /* Keep MUSB clock enabled
+* this is needed when phy xvr is enabled, MUSB gets
+* an interrupt and system crashes.
+* So enable clock before calling phy resume
+*/
if (musb->set_clock)
musb->set_clock(musb->clock, 1);
else
clk_enable(musb->clock);
 
+   otg_set_suspend(otg_get_transceiver(), 0);
+
l = omap_readl(OTG_SYSCONFIG);
l &= ~ENABLEWAKEUP; /* disable wakeup */
omap_writel(l, OTG_SYSCONFIG);
-- 
1.6.3.3.334.g916e1

--
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/3] USB: musb: omap: Fix wrong xceivr passing to twl4030

2009-09-04 Thread Vikram Pandita
Wrong pointer was getting passed to twl4030 transceiver.

Call path is:
otg_set_suspend -> twl4030_set_suspend

drivers/usb/otg/twl4030-usb.c: twl4030_set_suspend() uses:
struct twl4030_usb *twl = xceiv_to_twl(x);

and xceiv_to_twl is container_of()

So the same pointer needs to be passed to otg_set_suspend() as has
been used for otg_set_transceiver.

A crash is seen without this patch, as twl pointer access is worng

Signed-off-by: Vikram Pandita 
---
 drivers/usb/musb/omap2430.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index b957575..ea7a798 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -269,7 +269,7 @@ int musb_platform_suspend(struct musb *musb)
l |= ENABLEWAKEUP;  /* enable wakeup */
omap_writel(l, OTG_SYSCONFIG);
 
-   otg_set_suspend(musb->xceiv, 1);
+   otg_set_suspend(otg_get_transceiver(), 1);
 
if (musb->set_clock)
musb->set_clock(musb->clock, 0);
@@ -286,7 +286,7 @@ int musb_platform_resume(struct musb *musb)
if (!musb->clock)
return 0;
 
-   otg_set_suspend(musb->xceiv, 0);
+   otg_set_suspend(otg_get_transceiver(), 0);
 
if (musb->set_clock)
musb->set_clock(musb->clock, 1);
-- 
1.6.3.3.334.g916e1

--
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 1/3] USB: musb: All each platform to have power hooks

2009-09-04 Thread Vikram Pandita
This patch allows each MUSB platform (Davinci/TUSB/OMAP/Blackfin)
to have their own musb_platform_suspend/musb_platform_resume hooks

Each platform has its own power handling requirements and hence
distribute the suspend/resume functionality per platform

No new functionality is added for other platforms (blackfin/davinci/tusb)
In future these platforms can optimize their suspend/resume routines for
power.

Signed-off-by: Vikram Pandita 
Cc: Ajay Kumar Gupta 
---
 drivers/usb/musb/blackfin.c  |   15 +++
 drivers/usb/musb/davinci.c   |   24 
 drivers/usb/musb/musb_core.c |   15 +++
 drivers/usb/musb/omap2430.c  |4 +---
 drivers/usb/musb/tusb6010.c  |   24 
 include/linux/usb/musb.h |5 +
 6 files changed, 72 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index f2f66eb..9a716b2 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -305,11 +305,26 @@ int __init musb_platform_init(struct musb *musb)
 
 int musb_platform_suspend(struct musb *musb)
 {
+   if (!musb->clock)
+   return 0;
+
+   if (musb->set_clock)
+   musb->set_clock(musb->clock, 0);
+   else
+   clk_disable(musb->clock);
+
return 0;
 }
 
 int musb_platform_resume(struct musb *musb)
 {
+   if (!musb->clock)
+   return 0;
+
+   if (musb->set_clock)
+   musb->set_clock(musb->clock, 1);
+   else
+   clk_enable(musb->clock);
return 0;
 }
 
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index e16ff60..684e769 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -499,3 +499,27 @@ int musb_platform_exit(struct musb *musb)
 
return 0;
 }
+
+int musb_platform_suspend(struct musb *musb)
+{
+   if (!musb->clock)
+   return 0;
+
+   if (musb->set_clock)
+   musb->set_clock(musb->clock, 0);
+   else
+   clk_disable(musb->clock);
+   return 0;
+}
+
+int musb_platform_resume(struct musb *musb)
+{
+   if (!musb->clock)
+   return 0;
+
+   if (musb->set_clock)
+   musb->set_clock(musb->clock, 1);
+   else
+   clk_enable(musb->clock);
+   return 0;
+}
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c7c1ca0..ef97a0c 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2186,13 +2186,9 @@ static int musb_suspend(struct platform_device *pdev, 
pm_message_t message)
 * they will even be wakeup-enabled.
 */
}
-
-   if (musb->set_clock)
-   musb->set_clock(musb->clock, 0);
-   else
-   clk_disable(musb->clock);
spin_unlock_irqrestore(&musb->lock, flags);
-   return 0;
+
+   return musb_platform_suspend(musb);
 }
 
 static int musb_resume_early(struct platform_device *pdev)
@@ -2202,16 +2198,11 @@ static int musb_resume_early(struct platform_device 
*pdev)
if (!musb->clock)
return 0;
 
-   if (musb->set_clock)
-   musb->set_clock(musb->clock, 1);
-   else
-   clk_enable(musb->clock);
-
/* for static cmos like DaVinci, register values were preserved
 * unless for some reason the whole soc powered down or the USB
 * module got reset through the PSC (vs just being disabled).
 */
-   return 0;
+   return musb_platform_resume(musb);
 }
 
 #else
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 3487520..b957575 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -188,8 +188,6 @@ static void omap_set_vbus(struct musb *musb, int is_on)
musb_readb(musb->mregs, MUSB_DEVCTL));
 }
 
-static int musb_platform_resume(struct musb *musb);
-
 int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
 {
u8  devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
@@ -281,7 +279,7 @@ int musb_platform_suspend(struct musb *musb)
return 0;
 }
 
-static int musb_platform_resume(struct musb *musb)
+int musb_platform_resume(struct musb *musb)
 {
u32 l;
 
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 88b587c..7da5272 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1169,3 +1169,27 @@ int musb_platform_exit(struct musb *musb)
usb_nop_xceiv_unregister();
return 0;
 }
+
+int musb_platform_suspend(struct musb *musb)
+{
+   if (!musb->clock)
+   return 0;
+
+   if (musb->set_clock)
+   musb->set_clock(musb->clock, 0);
+   else
+   clk_disable(musb->clock);
+   return 0;
+}
+
+int musb_plat

[PATCH 0/3] USB: MUSB: Provide Platform specific suspend/resume hooks

2009-09-04 Thread Vikram Pandita
Patch 1:
This patch series creates MUSB platform specific power hooks for different
MUSB platforms (OMAP/Blackfin/Davinci/TUSB)

Patch 2 and 3:
This fixes issues with musb omap file for xceivr pointer passing and clock
enable race

Series is tested for MUSB:OMAP on Zoom2 platform.

Vikram Pandita (3):
  USB: musb: All each platform to have power hooks
  USB: musb: omap: Fix wrong xceivr passing to twl4030
  USB: musb: omap: Enable MUSB clocks before xceiver resume

 drivers/usb/musb/blackfin.c  |   15 +++
 drivers/usb/musb/davinci.c   |   24 
 drivers/usb/musb/musb_core.c |   15 +++
 drivers/usb/musb/omap2430.c  |   15 +--
 drivers/usb/musb/tusb6010.c  |   24 
 include/linux/usb/musb.h |5 +
 6 files changed, 80 insertions(+), 18 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


[PATCH-v2 3/3] OMAP: Zoom2: Enable NAND in defconfig

2009-09-03 Thread Vikram Pandita
Enable NAND options by default in zoom2_defconfig file
Other changes in defconfig come from make menuconfig syncup

Signed-off-by: Vikram Pandita 
---
 arch/arm/configs/omap_zoom2_defconfig |  224 +++--
 1 files changed, 160 insertions(+), 64 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index f1739fa..b16a38c 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.30-omap1
-# Fri Jun 12 17:25:46 2009
+# Linux kernel version: 2.6.31-rc8-omap1
+# Thu Sep  3 13:52:59 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -9,7 +9,6 @@ CONFIG_GENERIC_GPIO=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_MMU=y
-# CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,13 +17,12 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
 
 #
 # General setup
@@ -77,7 +75,6 @@ CONFIG_UID16=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
-# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
@@ -90,7 +87,12 @@ CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+
+#
+# Performance Counters
+#
 CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_COMPAT_BRK=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
@@ -102,6 +104,10 @@ CONFIG_HAVE_OPROFILE=y
 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
@@ -114,7 +120,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -141,13 +147,14 @@ CONFIG_FREEZER=y
 # 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_GEMINI 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_IMX is not set
 # CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IOP32X is not set
 # CONFIG_ARCH_IOP33X is not set
@@ -156,25 +163,25 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_KIRKWOOD is not set
-# CONFIG_ARCH_KS8695 is not set
-# CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_LOKI is not set
 # CONFIG_ARCH_MV78XX0 is not set
-# CONFIG_ARCH_MXC 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
+# CONFIG_ARCH_W90X900 is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_MSM is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 # CONFIG_ARCH_S3C2410 is not set
 # CONFIG_ARCH_S3C64XX is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_U300 is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
-# CONFIG_ARCH_MSM is not set
-# CONFIG_ARCH_W90X900 is not set
 
 #
 # TI OMAP Implementations
@@ -209,13 +216,13 @@ CONFIG_ARCH_OMAP3430=y
 #
 # OMAP Board Type
 #
-# CONFIG_MACH_NOKIA_RX51 is not set
-# CONFIG_MACH_OMAP_LDP is not set
-# CONFIG_MACH_OMAP_3430SDP is not set
-# CONFIG_MACH_OMAP3EVM is not set
 # CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_OMAP_LDP is not set
 # CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3EVM is not set
 # CONFIG_MACH_OMAP3_PANDORA is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
 CONFIG_MACH_OMAP_ZOOM2=y
 
 #
@@ -244,7 +251,6 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_DCACHE_DISABLE is not set
 # CONFIG_CPU_BPREDICT_DISABLE is not set
 CONFIG_HAS_TLS_REG=y
-# CONFIG_OUTER_CACHE is not set
 # CONFIG_ARM_ERRATA_430973 is not set
 # CONFIG_ARM_ERRATA_458693 is not set
 # CONFIG_ARM_ERRATA_460075 is not set
@@ -272,7 +278,6 @@ CONFIG_PAGE_OFFSET=0xC000
 CONFIG_HZ=128
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
 # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
 # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 # CONFIG_HIGHMEM is not set
@@ -287,11 +292,12 @@ CONFIG_SPLI

[PATCH-v2 2/3] OMAP3: Add support for NAND on ZOOM2/LDP boards

2009-09-03 Thread Vikram Pandita
From: Vimal Singh 

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.

Singned-off-by: Vimal Singh 
Singned-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/mach/board-zoom.h |   36 +
 arch/arm/plat-omap/include/mach/nand.h   |1 +
 6 files changed, 239 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-zoom-flash.c
 create mode 100644 arch/arm/plat-omap/include/mach/board-zoom.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index ebe882b..182861d 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -54,6 +54,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
@@ -69,6 +70,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
 
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 4a4b300..88bd54f 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(&ldp_uart_config);
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..1007e5d
--- /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_zoom_nand_unlock(struct mtd_info *mtd, loff_t ofs, size_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_unlock: Start address must be"
+   "beginning of nand page!\n");
+   ret = -EINVAL;
+   goto out;
+   }
+
+   if (len == 0 || (len & (mtd->writesize - 1)) != 0) {
+   printk(KERN_ERR "nand_unlock: Length must be a multiple of "
+   "nand page 

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

2009-09-03 Thread Vikram Pandita
From: Vimal Singh 

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 
Signed-off-by: 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/mach-omap2/board-sdp.h|   15 ++
 arch/arm/plat-omap/include/mach/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/mach-omap2/board-sdp.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index abaaead..ebe882b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -48,6 +48,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 \
@@ -61,6 +62,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 c693668..39fcb36 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 
+#include "board-sdp.h"
 #include "mmc-twl4030.h"
 
 #define SDP2430_CS0_BASE   0x0400
@@ -210,6 +211,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 c71417f..1675c02 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -41,6 +41,7 @@
 #include 
 #include 
 
+#include "board-sdp.h"
 #include "sdram-qimonda-hyb18m512160af-6.h"
 #include "mmc-twl4030.h"
 
@@ -494,6 +495,7 @@ static void __init omap_3430sdp_init(void)
omap_serial_init(&sdp3430_uart_config);
usb_musb_init();
board_smc91x_init();
+   sdp_flash_init();
usb_ehci_init(EHCI_HCD_OMAP_MODE_PHY, true, true, 57, 61);
 }
 
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..1b992cc
--- /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) 2009 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_CONFIG  3
+
+/* various memory sizes */
+#define FLASH_SIZE_SDPV1   SZ_64M
+#define FLASH_SIZE_SDPV2   SZ_128M
+
+#define FLASH_BASE_SDPV1   0x0400 /* NOR flash (64 Meg aligned) */
+#define FLASH_BASE_SDPV2   0x1000 /* NOR flash (256 Meg aligned) */
+
+#define DEBUG_BASE 0x0800 /* debug board */
+
+#define PDC_NOR1
+#define PDC_NAND   2
+#define PDC_ONENAND3
+#define DBG_MPDB   4
+
+/* REVISIT: Does for some x, chip_sel_sdp[x] maches for 2430 SDP ? */
+
+/* S

[PATCH-v2 0/3] OMAP: Adding flash support to SDP, ZOOM2 and LDP boards

2009-09-03 Thread Vikram Pandita
This patch series adds flash support for NAND (in sdp, zoom2 and ldp),
OneNAND and NOR (in sdp)

Tested on Zoom2 by Vikram, On SDP by Vimal

Vikram Pandita (1):
  OMAP: Zoom2: Enable NAND in defconfig

Vimal Singh (2):
  OMAP2/3: Add support for flash on SDP boards
  OMAP3: Add support for NAND on ZOOM2/LDP boards

 arch/arm/configs/omap_zoom2_defconfig|  224 +-
 arch/arm/mach-omap2/Makefile |4 +
 arch/arm/mach-omap2/board-2430sdp.c  |2 +
 arch/arm/mach-omap2/board-3430sdp.c  |2 +
 arch/arm/mach-omap2/board-ldp.c  |2 +
 arch/arm/mach-omap2/board-sdp-flash.c|  326 ++
 arch/arm/mach-omap2/board-sdp.h  |   15 ++
 arch/arm/mach-omap2/board-zoom-flash.c   |  196 
 arch/arm/mach-omap2/board-zoom2.c|2 +
 arch/arm/plat-omap/include/mach/board-zoom.h |   36 +++
 arch/arm/plat-omap/include/mach/gpmc.h   |2 +
 arch/arm/plat-omap/include/mach/nand.h   |1 +
 12 files changed, 748 insertions(+), 64 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-sdp-flash.c
 create mode 100644 arch/arm/mach-omap2/board-sdp.h
 create mode 100644 arch/arm/mach-omap2/board-zoom-flash.c
 create mode 100644 arch/arm/plat-omap/include/mach/board-zoom.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 5/5] OMAP: Zoom2: Release Dbg board detect gpio

2009-08-21 Thread Vikram Pandita
Release the Dbg board detection gpio once its purpose is served

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c 
b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 4dd714d..d80e448 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -130,6 +130,7 @@ static inline void __init zoom2_init_quaduart(void)
 static inline int omap_zoom2_debugboard_detect(void)
 {
int debug_board_detect = 0;
+   int ret = 1;
 
debug_board_detect = ZOOM2_SMSC911X_GPIO;
 
@@ -141,10 +142,10 @@ static inline int omap_zoom2_debugboard_detect(void)
gpio_direction_input(debug_board_detect);
 
if (!gpio_get_value(debug_board_detect)) {
-   gpio_free(debug_board_detect);
-   return 0;
+   ret = 0;
}
-   return 1;
+   gpio_free(debug_board_detect);
+   return ret;
 }
 
 static struct platform_device *zoom2_devices[] __initdata = {
-- 
1.6.3.3.334.g916e1

--
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/5] OMAP: Zoom2: Fix serial break

2009-08-21 Thread Vikram Pandita
Fix the break in Zoom2 Quad uart debug port support.

Patch by Kevin Hilman fd455ea899b5a14 caused a break as it introuduced
per port PLATFORM id and Zoom2 was not tested with this change.

For Zoom2 serial port, add platform id as 4

Signed-off-by: Vikram Pandita 
cc: Kevin Hilman 
---
 arch/arm/mach-omap2/board-zoom-debugboard.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c 
b/arch/arm/mach-omap2/board-zoom-debugboard.c
index f8b0726..4dd714d 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -97,7 +97,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
 
 static struct platform_device zoom2_debugboard_serial_device = {
.name   = "serial8250",
-   .id = PLAT8250_DEV_PLATFORM1,
+   .id = PLAT8250_DEV_FOURPORT,
.dev= {
.platform_data  = serial_platform_data,
},
-- 
1.6.3.3.334.g916e1

--
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/5] OMAP: Zoom2: Add DEBUG_LL interface using external Quart

2009-08-21 Thread Vikram Pandita
This patch adds DEBUG_LL interface for Zoom2 board.
The low level debug uart now points corrctly to External Quad uart
controller on detachable debug board.

The Quad uart is available over GPMC chip select with physical address
0x1000.

This physical address has been mapped to virtual address 0xFB00
as per static mapping.

Also the register accesses to Quad uart have a requirement of shift=1
based on the h/w mapping of the registers

This patch is adapted from a version by Erik Gilling:
http://android.git.kernel.org/?p=kernel/omap.git;
a=commit;h=e9d72efdd88877d2d6ea74a08983ace0dcc771d3

Signed-off-by: Vikram Pandita 
Cc: Erik Gilling 
---
 arch/arm/mach-omap2/board-zoom-debugboard.c   |5 +++--
 arch/arm/mach-omap2/board-zoom2.c |   15 +++
 arch/arm/plat-omap/include/mach/debug-macro.S |   14 --
 arch/arm/plat-omap/include/mach/io.h  |6 ++
 arch/arm/plat-omap/include/mach/uncompress.h  |7 +++
 5 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c 
b/arch/arm/mach-omap2/board-zoom-debugboard.c
index f546063..f8b0726 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -82,9 +82,10 @@ static inline void __init zoom2_init_smsc911x(void)
 
 static struct plat_serial8250_port serial_platform_data[] = {
{
-   .mapbase= 0x1000,
+   .membase= IOMEM(ZOOM2_EXT_QUART_VIRT),
+   .mapbase= ZOOM2_EXT_QUART_PHYS,
.irq= OMAP_GPIO_IRQ(102),
-   .flags  = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ,
+   .flags  = UPF_BOOT_AUTOCONF|UPF_SHARE_IRQ,
.irqflags   = IRQF_SHARED | IRQF_TRIGGER_RISING,
.iotype = UPIO_MEM,
.regshift   = 1,
diff --git a/arch/arm/mach-omap2/board-zoom2.c 
b/arch/arm/mach-omap2/board-zoom2.c
index 58baee3..fc27b07 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -16,9 +16,11 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -273,9 +275,22 @@ static void __init omap_zoom2_init(void)
usb_musb_init();
 }
 
+static struct map_desc zoom2_io_desc[] __initdata = {
+   {
+   .virtual= ZOOM2_EXT_QUART_VIRT,
+   .pfn= __phys_to_pfn(ZOOM2_EXT_QUART_PHYS),
+   .length = ZOOM2_EXT_QUART_SIZE,
+   .type   = MT_DEVICE
+   }
+};
+
 static void __init omap_zoom2_map_io(void)
 {
omap2_set_globals_343x();
+
+   /* Map external quad UART virt to phy mapping */
+   iotable_init(zoom2_io_desc, ARRAY_SIZE(zoom2_io_desc));
+
omap2_map_common_io();
 }
 
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S 
b/arch/arm/plat-omap/include/mach/debug-macro.S
index f546d6c..a97f2fb 100644
--- a/arch/arm/plat-omap/include/mach/debug-macro.S
+++ b/arch/arm/plat-omap/include/mach/debug-macro.S
@@ -12,6 +12,14 @@
 */
 #include "io.h"
 
+#if (CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR == 0x1000)
+#define REGSHIFT 1
+#define UART_VIRT_TO_PHY_OFFSET ZOOM2_EXT_QUART_PHY_TO_VIRT_OFF
+#else
+#define REGSHIFT 2
+#define UART_VIRT_TO_PHY_OFFSET OMAP2_IO_OFFSET
+#endif
+
.macro  addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
@@ -22,7 +30,7 @@
 #else
/* omap2/omap3/omap4 */
ldr \rx, =CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR @ physical 
base address
-   orrne   \rx, \rx, #OMAP2_IO_OFFSET   @ virtual base
+   orrne   \rx, \rx, #UART_VIRT_TO_PHY_OFFSET   @ virtual base
 #endif
.endm
 
@@ -31,13 +39,15 @@
.endm
 
.macro  busyuart,rd,rx
-1001:  ldrb\rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
+1001:  ldrb\rd, [\rx, #(0x5 << REGSHIFT)] @ OMAP-1510 and friends
and \rd, \rd, #0x60
teq \rd, #0x60
+#if (CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR != 0x1000)
beq 1002f
ldrb\rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
and \rd, \rd, #0x60
teq \rd, #0x60
+#endif
bne 1001b
 1002:
.endm
diff --git a/arch/arm/plat-omap/include/mach/io.h 
b/arch/arm/plat-omap/include/mach/io.h
index 8d32df3..97702e6 100644
--- a/arch/arm/plat-omap/include/mach/io.h
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -169,6 +169,12 @@
 #define DSP_MMU_34XX_VIRT  0xe200
 #define DSP_MMU_34XX_SIZE  SZ_4K
 
+/* Map External Quad UART for Zoom2 board */
+#define ZOOM2_EXT_QUART_PHYS   0x1000 /* PHY address if fixed */
+#define ZOOM2_EXT_QUART_PHY_T

[PATCH 2/5] OMAP1/2/3/4: Adapt board files for cleand DEBUG_LL interface

2009-08-21 Thread Vikram Pandita
This patch assigns the physical address of debug uart as defined
in menucoinfig item CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR to phys_io

The virtual address for io_pg_offset is calculated as per static
mapping

CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR is a hex value and for boards
like Zoom2, the phy address can be zero, in case debug board
is not attached.

Signed-off-by: Vikram Pandita 
---
 arch/arm/mach-omap2/board-2430sdp.c  |4 ++--
 arch/arm/mach-omap2/board-3430sdp.c  |4 ++--
 arch/arm/mach-omap2/board-4430sdp.c  |4 ++--
 arch/arm/mach-omap2/board-apollon.c  |4 ++--
 arch/arm/mach-omap2/board-generic.c  |4 ++--
 arch/arm/mach-omap2/board-h4.c   |4 ++--
 arch/arm/mach-omap2/board-ldp.c  |4 ++--
 arch/arm/mach-omap2/board-n8x0.c |   12 ++--
 arch/arm/mach-omap2/board-omap3beagle.c  |4 ++--
 arch/arm/mach-omap2/board-omap3evm.c |4 ++--
 arch/arm/mach-omap2/board-omap3pandora.c |4 ++--
 arch/arm/mach-omap2/board-overo.c|4 ++--
 arch/arm/mach-omap2/board-rx51.c |4 ++--
 arch/arm/mach-omap2/board-zoom2.c|4 ++--
 14 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index c693668..9ed2f2c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -225,8 +225,8 @@ static void __init omap_2430sdp_map_io(void)
 
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
/* Maintainer: Syed Khasim - Texas Instruments Inc */
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR,
+   .io_pg_offst= ((CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR + 
OMAP2_IO_OFFSET) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_2430sdp_map_io,
.init_irq   = omap_2430sdp_init_irq,
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index c71417f..f085eee 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -505,8 +505,8 @@ static void __init omap_3430sdp_map_io(void)
 
 MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
/* Maintainer: Syed Khasim - Texas Instruments Inc */
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR,
+   .io_pg_offst= ((CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR + 
OMAP2_IO_OFFSET) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_3430sdp_map_io,
.init_irq   = omap_3430sdp_init_irq,
diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index 646079f..4c1a166 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -83,8 +83,8 @@ static void __init omap_4430sdp_map_io(void)
 
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR,
+   .io_pg_offst= ((CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR + 
OMAP2_IO_OFFSET) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_4430sdp_map_io,
.init_irq   = omap_4430sdp_init_irq,
diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index e2947fd..61da659 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -336,8 +336,8 @@ static void __init omap_apollon_map_io(void)
 
 MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
/* Maintainer: Kyungmin Park  */
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR,
+   .io_pg_offst= ((CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR + 
OMAP2_IO_OFFSET) >> 18) & 0xfffc,
.boot_params= 0x8100,
.map_io = omap_apollon_map_io,
.init_irq   = omap_apollon_init_irq,
diff --git a/arch/arm/mach-omap2/board-generic.c 
b/arch/arm/mach-omap2/board-generic.c
index fc9eccb..6d39eaa 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -59,8 +59,8 @@ static void __init omap_generic_map_io(void)
 
 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
/* Maintainer: Paul Mundt  */
-   .phys_io= 0x4800,
-   .io_pg_offst= ((0xd800) >> 18) & 0xfffc,
+   .phys_io= CONFIG_OMAP_DEBUG_LL_UART_PHY_ADDR,
+   .io_pg_offst= ((CONFIG_OMAP_DEB

  1   2   >