Re: linux-next: manual merge of the omap_dss2 tree with the omap tree

2009-11-17 Thread Tomi Valkeinen
On Mon, 2009-11-16 at 19:34 +0100, ext Tony Lindgren wrote:
 Tomi, please update your patch by leaving out the now unnecessary
 TWL4030 and regulator sections. See also the updated version of
 your patch attached.

Thanks, updated. Now I'm able to merge linux-omap/for-next and
dss/for-next without conflicts.

 Tomi


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


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

2009-11-17 Thread Tero.Kristo
 

-Original Message-
From: ext Kevin Hilman [mailto:khil...@deeprootsystems.com] 
Sent: 16 November, 2009 21:42
To: Kristo Tero (Nokia-D/Tampere)
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/6] OMAP3: PM: Added support for INACTIVE 
and ON states for powerdomains

Tero Kristo tero.kri...@nokia.com writes:

 From: Tero Kristo tero.kri...@nokia.com

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

This changelog needs an update.

This patch changes makes the IO-chain arming conditional and removes
the clockdomain idle calls.

IO-chain arming is already conditional, the condition needs to be changed a bit 
due to changed powerdomain states.

- previously: less than PWRDM_POWER_ON = RET and OFF
- now: less than or equal to PWRDM_POWER_RET = RET and OFF

What is changed actually is that if CORE or PER is going INACTIVE, we will 
disable UART clocks which will allow CORE and UART to go inactive. Previously 
this did not happen.

While I understand the clkdm idle call removal, It's not clear from
the changelog how these are related to the new handling of INACTIVE
states.

Yes, I can try to fix the changelog a bit regarding this.


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

 diff --git a/arch/arm/mach-omap2/pm34xx.c 
b/arch/arm/mach-omap2/pm34xx.c
 index 9d0a9b4..7b52f30 100644
 --- a/arch/arm/mach-omap2/pm34xx.c
 +++ b/arch/arm/mach-omap2/pm34xx.c
 @@ -383,6 +383,7 @@ void omap_sram_idle(void)
  mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
  switch (mpu_next_state) {
  case PWRDM_POWER_ON:
 +case PWRDM_POWER_INACTIVE:
  case PWRDM_POWER_RET:
  /* No need to save context */
  save_state = 0;
 @@ -448,9 +449,11 @@ void omap_sram_idle(void)
  OMAP3430_GR_MOD,
  
OMAP3_PRM_VOLTCTRL_OFFSET);
  }
 -/* Enable IO-PAD and IO-CHAIN wakeups */
 -prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
 -omap3_enable_io_chain();
 +if (core_next_state = PWRDM_POWER_RET) {
 +/* Enable IO-PAD and IO-CHAIN wakeups */
 +prm_set_mod_reg_bits(OMAP3430_EN_IO, 
WKUP_MOD, PM_WKEN);
 +omap3_enable_io_chain();
 +}
  }
  omap3_intc_prepare_idle();
  
 @@ -542,15 +545,13 @@ void omap_sram_idle(void)
  }
  
  /* Disable IO-PAD and IO-CHAIN wakeup */
 -if (core_next_state  PWRDM_POWER_ON) {
 +if (core_next_state = PWRDM_POWER_ON) {

Hmm, did you mean = RET here?   

True, this is a bug. Should be RET.

Otherwise, you can just remove the conditional.

  prm_clear_mod_reg_bits(OMAP3430_EN_IO, 
WKUP_MOD, PM_WKEN);
  omap3_disable_io_chain();
  }
  
  
  pwrdm_post_transition();
 -
 -omap2_clkdm_allow_idle(mpu_pwrdm-pwrdm_clkdms[0]);
  }
  
  int omap3_can_sleep(void)
 @@ -598,7 +599,6 @@ int set_pwrdm_state(struct powerdomain 
*pwrdm, u32 state)
  }
  
  if (sleep_switch) {
 -omap2_clkdm_allow_idle(pwrdm-pwrdm_clkdms[0]);
  pwrdm_wait_transition(pwrdm);
  pwrdm_state_switch(pwrdm);
  }
 -- 
 1.5.4.3

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


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

2009-11-17 Thread Tero.Kristo
 

-Original Message-
From: ext Kevin Hilman [mailto:khil...@deeprootsystems.com] 
Sent: 16 November, 2009 21:45
To: Kristo Tero (Nokia-D/Tampere)
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 4/6] OMAP3: PM: Removed PER + CORE state 
hacking from omap_sram_idle

Tero Kristo tero.kri...@nokia.com writes:

 From: Tero Kristo tero.kri...@nokia.com

A more descriptive changelog would be nice here.

 This should be moved inside cpuidle to simplify design.

And this should probably say ... and will be moved into CPUidle in
subsequent patch.

I'll update this.


Kevin

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

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


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

2009-11-17 Thread Tero.Kristo
 

-Original Message-
From: ext Kevin Hilman [mailto:khil...@deeprootsystems.com] 
Sent: 16 November, 2009 21:59
To: Kristo Tero (Nokia-D/Tampere)
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 6/6] OMAP3: CPUidle: Added peripheral 
pwrdm checks into bm check

Tero Kristo tero.kri...@nokia.com writes:

 From: Tero Kristo tero.kri...@nokia.com

 Following checks are made (and their reasoning):

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

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

 Signed-off-by: Tero Kristo tero.kri...@nokia.com

Some questions and a couple minor style comments below...

Will do the style changes, answers below.


 ---
  arch/arm/mach-omap2/cpuidle34xx.c |  105 
++---
  1 files changed, 98 insertions(+), 7 deletions(-)

 diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
b/arch/arm/mach-omap2/cpuidle34xx.c
 index e46345f..4654e87 100644
 --- a/arch/arm/mach-omap2/cpuidle34xx.c
 +++ b/arch/arm/mach-omap2/cpuidle34xx.c
 @@ -58,7 +58,8 @@ struct omap3_processor_cx {
  
  struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
  struct omap3_processor_cx current_cx_state;
 -struct powerdomain *mpu_pd, *core_pd;
 +struct powerdomain *mpu_pd, *core_pd, *per_pd, *iva2_pd;
 +struct powerdomain *sgx_pd, *usb_pd, *cam_pd, *dss_pd;
  
  /*
   * The latencies/thresholds for various C states have
 @@ -91,6 +92,13 @@ static int omap3_idle_bm_check(void)
  return 0;
  }

 +static int pwrdm_get_idle_state(struct powerdomain *pwrdm)

could use a function comment

Ok.


 +{
 +if (pwrdm_can_idle(pwrdm))
 +return pwrdm_read_next_pwrst(pwrdm);
 +return PWRDM_POWER_ON;
 +}
 +

Possible candidate for powerdomain API?

Candidate yes, if we would need this somewhere else. I did not want to make an 
API change that is not needed anywhere else at the moment. Maybe Paul has some 
comments on this?


  /**
   * omap3_enter_idle - Programs OMAP3 to enter the specified state
   * @dev: cpuidle device
 @@ -153,14 +161,90 @@ static int omap3_enter_idle_bm(struct 
cpuidle_device *dev,
 struct cpuidle_state *state)
  {
  struct cpuidle_state *new_state = state;
 -
 -if ((state-flags  CPUIDLE_FLAG_CHECK_BM)  
omap3_idle_bm_check()) {
 -BUG_ON(!dev-safe_state);
 -new_state = dev-safe_state;
 +u32 per_state = 0, saved_per_state = 0, cam_state, usb_state;
 +u32 iva2_state, sgx_state, dss_state, new_core_state;
 +struct omap3_processor_cx *cx;
 +int ret;
 +
 +if (state-flags  CPUIDLE_FLAG_CHECK_BM) {
 +if (omap3_idle_bm_check()) {
 +BUG_ON(!dev-safe_state);
 +new_state = dev-safe_state;
 +goto select_state;
 +}
 +cx = cpuidle_get_statedata(state);
 +new_core_state = cx-core_state;
 +
 +/* Check if CORE is active, if yes, fallback to 
inactive */
 +if (!pwrdm_can_idle(core_pd))
 +new_core_state = PWRDM_POWER_INACTIVE;
 +
 +/*
 + * Prevent idle completely if CAM is active.
 + * CAM does not have wakeup capability in OMAP3.
 + */
 +cam_state = pwrdm_get_idle_state(cam_pd);
 +if (cam_state == PWRDM_POWER_ON) {
 +new_state = dev-safe_state;
 +goto select_state;
 +}
 +
 +/*
 + * Check if PER can idle or not. If we are not likely
 + * to idle, deny PER off. This prevents unnecessary
 + * context save/restore.
 + */
 +saved_per_state = pwrdm_read_next_pwrst(per_pd);
 +if (pwrdm_can_idle(per_pd)) {
 +per_state = saved_per_state;
 +/*
 + * Prevent PER off if CORE is active as this
 + * would disable PER wakeups completely
 + */
 +if (per_state == PWRDM_POWER_OFF 
 +new_core_state  PWRDM_POWER_RET)
 +per_state = PWRDM_POWER_RET;
 +
 +} else if (saved_per_state == PWRDM_POWER_OFF)
 +per_state = PWRDM_POWER_RET;
 +
 +/*
 + * If we are attempting CORE off, check if any other
 + * powerdomains are at retention or higher. 
CORE off causes
 + * chipwide reset which would reset these domains also.
 + */
 +if (new_core_state == PWRDM_POWER_OFF) {
 +

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

2009-11-17 Thread Tero.Kristo
 

-Original Message-
From: ext Kevin Hilman [mailto:khil...@deeprootsystems.com] 
Sent: 16 November, 2009 22:13
To: Kristo Tero (Nokia-D/Tampere)
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 5/6] OMAP: Powerdomains: Add support for 
checking if pwrdm can idle

Tero Kristo tero.kri...@nokia.com writes:

 From: Tero Kristo tero.kri...@nokia.com

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

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

 Signed-off-by: Tero Kristo tero.kri...@nokia.com

In your initial implementatio, you were checking all (most) of the
fclks in a given powerdomain.  In this version, you're currently only
checking masks in CORE (UART1 and 2) and PER (UART3.)

The masks are negative masks, we are checking whether all the rest of the 
clocks are inactive or not. UART clocks are currently masked away because we 
are controlling those inside omap_sram_idle, thus they are always on when we do 
the check, and the system assumes we can enter idle after they are disabled.


I'll assume it's just to propose the idea and we can add more fclks
later.  

There might be some sort of need to add or change the masks on some boards. 
Some of the UARTs might be controlled by some other drivers, in which case 
their FCLK should actually be checked against, and not masked, because they 
would no longer be controlled inside omap_sram_idle().


That being said, I'm a little reluctant to add another list of FCLK
masks. This seems like something that clock/clockdomain code should be
handling.

In terms of cleanness, it seems that pwrdm_can_idle() should call some
sort of clkdm_can_idle() call for all the clockdomains associated with
it (pwrdm-pwrdm_clkdms[].)

The clockdomain code already tracks its usecount, so clkdm_can_idle()
might be as simple as checking clkdm-usecount.  Just a thought
without digging into the clkdm code.

I did think and experiment with this usecount option a bit. The problem with 
usecounts is that you will have some interesting usecount numbers due to 
always_on clocks, uart clocks, and interface clocks. For example per_clkdm 
usecount is currently 9 on my rx51 board when we are entering omap_sram_idle 
and there is nothing but UART3 active. This number is most likely something 
else if we have a different board which has e.g. different number of interface 
clocks active. Interface clocks do not matter in the idle equation because we 
have autoidle enabled for all of those when we are entering idle and they will 
be turned off by hw. It might be possible to somehow keep a separate usecount 
for FCLKs and all clocks inside clock framework, but this sounds awfully 
complex, as you can simply read this from HW.

However, the part where this idle check would be moved inside clockdomain code 
is simple, I could just move the FCLK check bit there, and move the fclk_reg 
and mask definitions from pwrdm to clkdm.

How does the option of moving the FCLK checks inside clkdm code sound like, but 
keeping the implementation similar otherwise?



Kevin

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

 diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
 index 1237717..bf2b97a 100644
 --- a/arch/arm/mach-omap2/powerdomain.c
 +++ b/arch/arm/mach-omap2/powerdomain.c
 @@ -1217,6 +1217,28 @@ int pwrdm_wait_transition(struct 
powerdomain *pwrdm)
  return 0;
  }
  
 +/**
 + * pwrdm_can_idle - check if the powerdomain can enter idle
 + * @pwrdm: struct powerdomain * the powerdomain to check status of
 + *
 + * Does a functional clock check for the powerdomain and 
returns 1 if the
 + * powerdomain can enter idle, 0 if not.
 + */
 +int pwrdm_can_idle(struct powerdomain *pwrdm)
 +{
 +int i;
 +const int fclk_regs[] = { CM_FCLKEN, OMAP3430ES2_CM_FCLKEN3 };
 +
 +if (!pwrdm)
 +return -EINVAL;
 +
 +for (i = 0; i  pwrdm-fclk_reg_amt; i++)
 +if (cm_read_mod_reg(pwrdm-prcm_offs, fclk_regs[i]) 
 +(0x ^ pwrdm-fclk_masks[i]))
 +return 0;
 +return 1;
 +}
 +
  int pwrdm_state_switch(struct powerdomain *pwrdm)
  {
  return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
 diff --git a/arch/arm/mach-omap2/powerdomains34xx.h 
b/arch/arm/mach-omap2/powerdomains34xx.h
 index 9eb2dc5..c8cd297 100644
 --- a/arch/arm/mach-omap2/powerdomains34xx.h
 +++ b/arch/arm/mach-omap2/powerdomains34xx.h
 @@ -180,6 +180,7 @@ static struct powerdomain iva2_pwrdm = {
  [2] = PWRSTS_OFF_ON,
  [3] = PWRDM_POWER_ON,
  },

Re: [PATCH v4, for-next] OMAP: DMA: Use some define rather than a hexadecimal constant for LCD register

2009-11-17 Thread Janusz Krzysztofik
Tuesday 17 November 2009 11:45:53 Janusz Krzysztofik napisał(a):
 Tuesday 17 November 2009 02:24:35 Tony Lindgren napisał(a):
  * Janusz Krzysztofik jkrzy...@tis.icnet.pl [091116 16:38]:
   Tuesday 17 November 2009 01:16:58 Tony Lindgren napisał(a):
* Janusz Krzysztofik jkrzy...@tis.icnet.pl [091116 15:13]:
 diff -uprN a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
 --- a/arch/arm/plat-omap/dma.c2009-11-14 23:48:41.0 
 +0100
 +++ b/arch/arm/plat-omap/dma.c2009-11-16 23:49:30.0 
 +0100
 @@ -36,6 +36,10 @@

  #include plat/tc.h

 +#ifdef CONFIG_ARCH_OMAP1
 +#include mach/lcdc.h
 +#endif
 +
  #undef DEBUG

  #ifndef CONFIG_ARCH_OMAP1
 @@ -1124,9 +1128,11 @@ int omap_dma_running(void)
* On OMAP1510, internal LCD controller will start the transfer
* when it gets enabled, so assume DMA running if LCD enabled.
*/
 +#ifdef CONFIG_ARCH_OMAP1
   if (cpu_is_omap1510())
 - if (omap_readw(0xfffec000 + 0x00)  (1  0))
 + if (omap_readw(OMAP_LCDC_CONTROL)  
 OMAP_LCDC_CTRL_LCD_EN)
   return 1;
 +#endif

   /* Check if LCD DMA is running */
   if (cpu_is_omap16xx())
   
Hmm, this is getting complicated... How about just add function to
drivers/video/omap/lcdc.c for something like omap_lcdc_get_status()
or similar?
  
   Good idea.

 ... for a function itself, but not for putting it there, since omapfb, that
 lcdc is a part of, can be build as a module :).

Hmm, looks like building omapfb as a module is broken (Kconfig/Makefile allow 
for this), at least for OMAP1. Anyway, I don't like the idea of putting 
something that depends on drivers into arch (even if it happened to be one of 
my initial concepts).

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


RE: [PATCH 7/10] omap mailbox: expose omap_mbox_enable()/disable_irq()

2009-11-17 Thread C.A, Subramaniam
 -Original Message-
 From: Tony Lindgren [mailto:t...@atomide.com] 
 Sent: Saturday, November 14, 2009 6:10 AM
 To: C.A, Subramaniam
 Cc: linux-omap@vger.kernel.org; Gupta, Ramesh; Kanigeri, 
 Hari; Hiroshi DOYU
 Subject: Re: [PATCH 7/10] omap mailbox: expose 
 omap_mbox_enable()/disable_irq()
 
 * C.A, Subramaniam subramaniam...@ti.com [091113 04:32]:
  From 177e2efb7384c03ac445b55e2e4ccf44e2160051 Mon Sep 17 
 00:00:00 2001
  From: C A Subramaniam subramaniam...@ti.com
  Date: Fri, 13 Nov 2009 15:04:57 +0530
  Subject: [PATCH 7/10] omap mailbox: expose 
  omap_mbox_enable()/disable_irq()
  
  Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com
 
 Is this missing a Signed-off-by: C A Subramaniam 
 subramaniam...@ti.com, or should this be From: Hiroshi DOYU 
 hiroshi.d...@nokia.com?
 
Hi Tony,
The patch is given by Hiroshi. Since it was sent as part of the OMAP4
Mailbox patch series the From has C A Subramaniam subramaniam...@ti.com


 Regards,
 
 Tony
 
  ---
   arch/arm/plat-omap/include/plat/mailbox.h |   12 
   arch/arm/plat-omap/mailbox.c  |   12 ++--
   2 files changed, 14 insertions(+), 10 deletions(-)
  
  diff --git a/arch/arm/plat-omap/include/plat/mailbox.h 
  b/arch/arm/plat-omap/include/plat/mailbox.h
  index 8260a3f..bf06953 100644
  --- a/arch/arm/plat-omap/include/plat/mailbox.h
  +++ b/arch/arm/plat-omap/include/plat/mailbox.h
  @@ -92,4 +92,16 @@ static inline void 
 omap_mbox_restore_ctx(struct omap_mbox *mbox)
  mbox-ops-restore_ctx(mbox);
   }
   
  +static inline void omap_mbox_enable_irq(struct omap_mbox *mbox,
  +   omap_mbox_irq_t irq)
  +{
  +   mbox-ops-enable_irq(mbox, irq);
  +}
  +
  +static inline void omap_mbox_disable_irq(struct omap_mbox *mbox,
  +omap_mbox_irq_t irq)
  +{
  +   mbox-ops-disable_irq(mbox, irq);
  +}
  +
   #endif /* MAILBOX_H */
  diff --git a/arch/arm/plat-omap/mailbox.c 
  b/arch/arm/plat-omap/mailbox.c index eb76df2..d5377a3 100644
  --- a/arch/arm/plat-omap/mailbox.c
  +++ b/arch/arm/plat-omap/mailbox.c
  @@ -50,14 +50,6 @@ static inline int mbox_fifo_full(struct 
 omap_mbox 
  *mbox)  }
   
   /* Mailbox IRQ handle functions */
  -static inline void enable_mbox_irq(struct omap_mbox *mbox, 
  omap_mbox_irq_t irq) -{
  -   mbox-ops-enable_irq(mbox, irq);
  -}
  -static inline void disable_mbox_irq(struct omap_mbox *mbox, 
  omap_mbox_irq_t irq) -{
  -   mbox-ops-disable_irq(mbox, irq);
  -}
   static inline void ack_mbox_irq(struct omap_mbox *mbox, 
  omap_mbox_irq_t irq)  {
  if (mbox-ops-ack_irq)
  @@ -144,7 +136,7 @@ static void mbox_tx_work(struct 
 work_struct *work)
   
  ret = __mbox_msg_send(mbox, tx_data-msg);
  if (ret) {
  -   enable_mbox_irq(mbox, IRQ_TX);
  +   omap_mbox_enable_irq(mbox, IRQ_TX);
  spin_lock(q-queue_lock);
  blk_requeue_request(q, rq);
  spin_unlock(q-queue_lock);
  @@ -196,7 +188,7 @@ static void mbox_rxq_fn(struct request_queue *q)
   
   static void __mbox_tx_interrupt(struct omap_mbox *mbox)  {
  -   disable_mbox_irq(mbox, IRQ_TX);
  +   omap_mbox_disable_irq(mbox, IRQ_TX);
  ack_mbox_irq(mbox, IRQ_TX);
  schedule_work(mbox-txq-work);
   }
  --
  1.5.3.2
 
 --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2009-11-17 Thread C.A, Subramaniam
 

 -Original Message-
 From: Tony Lindgren [mailto:t...@atomide.com] 
 Sent: Saturday, November 14, 2009 6:16 AM
 To: C.A, Subramaniam
 Cc: linux-omap@vger.kernel.org; Gupta, Ramesh; Kanigeri, 
 Hari; Hiroshi DOYU
 Subject: Re: [PATCH 8/10] omap mailbox: OMAP4-Mailbox - Adds 
 code changes to support OMAP4 mailbox
 
 Hi,
 
 Just noticed all the iffdef else stuff here, that should be 
 easy to remove.
 
Hi Tony,
I will send a revised patch for this as 8/10 v2.

 * C.A, Subramaniam subramaniam...@ti.com [091113 04:33]:
  From 1a5865e67ce5fae94ae283882411cd01f48e07a7 Mon Sep 17 
 00:00:00 2001
  From: C A Subramaniam subramaniam...@ti.com
  Date: Fri, 13 Nov 2009 16:42:40 +0530
  Subject: [PATCH 8/10] omap mailbox: OMAP4-Mailbox - Adds 
 code changes to support OMAP4 mailbox.
  
  This patch adds code changes in the mailbox driver module to add 
  support for OMAP4 mailbox.
  
  Signed-off-by: Hari Kanigeri h-kanige...@ti.com
  Signed-off-by: C A Subramaniam subramaniam...@ti.com
  Signed-off-by: Ramesh Gupta G grgu...@ti.com
  ---
   arch/arm/mach-omap2/mailbox.c |  118 
 +++--
   arch/arm/plat-omap/mailbox.c  |   25 +++--
   2 files changed, 122 insertions(+), 21 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/mailbox.c 
  b/arch/arm/mach-omap2/mailbox.c index 5ba3aa6..3b21a5d 100644
  --- a/arch/arm/mach-omap2/mailbox.c
  +++ b/arch/arm/mach-omap2/mailbox.c
  @@ -18,17 +18,26 @@
   #include plat/mailbox.h
   #include mach/irqs.h
   
  +#define DRV_NAME omap2-mailbox
  +
   #define MAILBOX_REVISION   0x000
   #define MAILBOX_SYSCONFIG  0x010
   #define MAILBOX_SYSSTATUS  0x014
   #define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
   #define MAILBOX_FIFOSTATUS(m)  (0x080 + 4 * (m))
   #define MAILBOX_MSGSTATUS(m)   (0x0c0 + 4 * (m))
  +
  +#ifdef CONFIG_ARCH_OMAP4
  +#define MAILBOX_IRQSTATUS(u)   (0x104 + 10 * (u))
  +#define MAILBOX_IRQENABLE(u)   (0x108 + 10 * (u))
  +#define MAILBOX_IRQENABLE_CLR(u)   (0x10c + 10 * (u))
  +#else
   #define MAILBOX_IRQSTATUS(u)   (0x100 + 8 * (u))
   #define MAILBOX_IRQENABLE(u)   (0x104 + 8 * (u))
  +#endif
 
 How about just have separate defines for OMAP4:
 
 #define OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 10 * (u))
 #define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 10 * (u))
 #define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 10 * (u))
 
 
  -#define MAILBOX_IRQ_NEWMSG(u)  (1  (2 * (u)))
  -#define MAILBOX_IRQ_NOTFULL(u) (1  (2 * (u) + 1))
  +#define MAILBOX_IRQ_NEWMSG(m)  (1  (2 * (m)))
  +#define MAILBOX_IRQ_NOTFULL(m) (1  (2 * (m) + 1))
   
   /* SYSCONFIG: register bit definition */
   #define AUTOIDLE   (1  0)
  @@ -38,7 +47,12 @@
   /* SYSSTATUS: register bit definition */
   #define RESETDONE  (1  0)
   
  +#ifdef CONFIG_ARCH_OMAP4
  +#define MBOX_REG_SIZE  0x130
  +#else
   #define MBOX_REG_SIZE  0x120
  +#endif
  +
 
 #define OMAP4_MBOX_REG_SIZE   0x130
 
 
   #define MBOX_NR_REGS   (MBOX_REG_SIZE 
 / sizeof(u32))
   
   static void __iomem *mbox_base;
  @@ -57,6 +71,9 @@ struct omap_mbox2_priv {
  u32 newmsg_bit;
  u32 notfull_bit;
  u32 ctx[MBOX_NR_REGS];
  +#ifdef CONFIG_ARCH_OMAP4
  +   unsigned long irqdisable;
  +#endif
   };
   
   static struct clk *mbox_ick_handle;
  @@ -82,8 +99,9 @@ static int omap2_mbox_startup(struct omap_mbox 
  *mbox)
   
  mbox_ick_handle = clk_get(NULL, mailboxes_ick);
  if (IS_ERR(mbox_ick_handle)) {
  -   pr_err(Can't get mailboxes_ick\n);
  -   return -ENODEV;
  +   printk(KERN_ERR Could not get mailboxes_ick: %d\n,
  +   PTR_ERR(mbox_ick_handle));
  +   return PTR_ERR(mbox_ick_handle);
  }
  clk_enable(mbox_ick_handle);
   
  @@ -115,6 +133,7 @@ static void omap2_mbox_shutdown(struct 
 omap_mbox 
  *mbox)  {
  clk_disable(mbox_ick_handle);
  clk_put(mbox_ick_handle);
  +   mbox_ick_handle = NULL;
   }
   
   /* Mailbox FIFO handle functions */
  @@ -143,7 +162,7 @@ static int omap2_mbox_fifo_full(struct 
 omap_mbox 
  *mbox)  {
  struct omap_mbox2_fifo *fifo =
  ((struct omap_mbox2_priv *)mbox-priv)-tx_fifo;
  -   return (mbox_read_reg(fifo-fifo_stat));
  +   return mbox_read_reg(fifo-fifo_stat);
   }
   
   /* Mailbox IRQ handle functions */
  @@ -163,10 +182,9 @@ static void omap2_mbox_disable_irq(struct 
  omap_mbox *mbox,  {
  struct omap_mbox2_priv *p = (struct omap_mbox2_priv 
 *)mbox-priv;
  u32 l, bit = (irq == IRQ_TX) ? p-notfull_bit : p-newmsg_bit;
  -
  -   l = mbox_read_reg(p-irqenable);
  +   l = mbox_read_reg(p-irqdisable);
  l = ~bit;
  -   mbox_write_reg(l, p-irqenable);
  +   mbox_write_reg(l, p-irqdisable);
   }
   
   static void omap2_mbox_ack_irq(struct omap_mbox *mbox, @@ -189,7 
  +207,7 @@ static int 

RE: Artifacts present in AIC23 capture for 48 KHz sampling rate

2009-11-17 Thread Aggarwal, Anuj
 -Original Message-
 From: Aggarwal, Anuj
 Sent: Friday, November 06, 2009 6:28 PM
 To: alsa-de...@alsa-project.org; 'linux-omap@vger.kernel.org'
 Subject: Artifacts present in AIC23 capture for 48 KHz sampling rate
 
 Hi,
 
 I am observing artifacts (sharp spikes at fixed intervals) while
 capturing audio on AM3517 EVM and AIC23 codec. They are present only
 in one of the channels when I am capturing at 48 KHz. All other
 sampling rates are working fine with the above said combination.
 
 I have also attached the screenshot taken with the help of Audacity
 utility. Here, I tried recording silence but artifacts were observed
 on one channel.
 
 Has anyone also observed the similar behavior with AIC23 codec? Any
 hints on what could be the root cause?
[Aggarwal, Anuj] On further debugging, I found that the function
find_rate() in sound/soc/codecs/tlv320aic23.c is not returning 
the correct value for capture in 48KHz sample rate. In USB mode
(MCLK=12MHz), for 48KHz, it returns 0x7D (CLKOUT=0, CLKIN=1, 
SR[3:0]=0xF, BOSR=1, Normal=1) whereas as per the AIC23B spec, 
it should have been 0x5D (CLKOUT=0, CLKIN=1, SR[3:0]=0x7, 
BOSR=1, Normal=1). When I forcefully write the above said value
to the Sample Rate Control register, things work fine for me
for 48KHz capture.
Is my understanding correct for this problem? Can someone help
me understand how the function calculates the appropriate value?
 
 Regards,
 Anuj Aggarwal

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


Is the OMAP patch process badly flawed?

2009-11-17 Thread Sid Boyce
I'm curious - I download, build and test kernels on x86 and x86_64
platforms, -rc, -rc-git and -git all build and run.
On the OMAP platform I have so far not been able to do that with
omap-git, omap-dss2-git trees and snapshots all missing basic hardware
support, e.g:- I get the latest from gitorious.org, make
omap3_beagle_defconfg, make xconfig, but there is no EHCI config
available. I hunt down the patch and hand apply default y if
ARCH_OMAP34XX to drivers/usb/Kconfig, next the build complains that
drivers/usb/host/ehci-hcd.c: 1143:2: error: #error missing bus glue for
ehci-hcd

The bus glue patch ... ehci-omap.c no longer exists.
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1108,6 +1108,11 @@ MODULE_LICENSE (GPL);
 #definePLATFORM_DRIVER ehci_hcd_au1xxx_driver
 #endif

+#ifdef CONFIG_ARCH_OMAP34XX
+#include ehci-omap.c
+#definePLATFORM_DRIVER ehci_hcd_omap_driver
+#endif
+
 #ifdef CONFIG_PPC_PS3
 #include ehci-ps3.c
 #definePS3_SYSTEM_BUS_DRIVER   ps3_ehci_driver

I would expect patches sent upstream would result in all the basics for
long established platforms to be fully covered. Appreciating that
development is quite fast paced with mods and supporting new platforms.
Could someone please enlighten me?
Regards
Sid.
-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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


RE: Is the OMAP patch process badly flawed?

2009-11-17 Thread Gadiyar, Anand
Sid Boyce wrote: 
 I'm curious - I download, build and test kernels on x86 and x86_64
 platforms, -rc, -rc-git and -git all build and run.
 On the OMAP platform I have so far not been able to do that with
 omap-git, omap-dss2-git trees and snapshots all missing basic hardware
 support, e.g:- I get the latest from gitorious.org, make
 omap3_beagle_defconfg, make xconfig, but there is no EHCI config
 available. I hunt down the patch and hand apply default y if
 ARCH_OMAP34XX to drivers/usb/Kconfig, next the build complains that
 drivers/usb/host/ehci-hcd.c: 1143:2: error: #error missing 
 bus glue for
 ehci-hcd
 
 The bus glue patch ... ehci-omap.c no longer exists.
 --- a/drivers/usb/host/ehci-hcd.c
 +++ b/drivers/usb/host/ehci-hcd.c
 @@ -1108,6 +1108,11 @@ MODULE_LICENSE (GPL);
  #definePLATFORM_DRIVER ehci_hcd_au1xxx_driver
  #endif
 
 +#ifdef CONFIG_ARCH_OMAP34XX
 +#include ehci-omap.c
 +#definePLATFORM_DRIVER ehci_hcd_omap_driver
 +#endif
 +
  #ifdef CONFIG_PPC_PS3
  #include ehci-ps3.c
  #definePS3_SYSTEM_BUS_DRIVER   ps3_ehci_driver
 
 I would expect patches sent upstream would result in all the basics for
 long established platforms to be fully covered. Appreciating that
 development is quite fast paced with mods and supporting new platforms.
 Could someone please enlighten me?

Sid,

Speaking purely for EHCI, this is now queued up in Greg's USB queue
for upstream and will get merged in the next cycle.

Until then, the linux-omap code does have working EHCI support
on beagle, evm and the other boards. If you're cloning from
gitorious, you're probably picking the wrong tree.

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


RE: OMAP3515 vs 3525 inversion

2009-11-17 Thread Premi, Sanjeev
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Sergey Lapin
 Sent: Monday, November 16, 2009 3:59 PM
 To: linux-omap@vger.kernel.org
 Subject: OMAP3515 vs 3525 inversion
 
 Hi, all!
 I think I found a bug in processor detection code.
 as I see,
   + /* OMAP3430 and OMAP3530 are assumed to be same.
   +  *
   +  * OMAP3525, OMAP3515 and OMAP3503 can be detected only based
   +  * on available features. Upon detection, update the CPU id
   +  * and CPU class bits.
   +  */
   + if (omap3_has_iva()  omap3_has_sgx()) {
   + strcpy(cpu_name, 3430/3530);
   + }
   + else if (omap3_has_sgx()) {
   + omap_revision = OMAP3525_REV (rev);
   + strcpy(cpu_name, 3525);
   + }
   + else if (omap3_has_iva()) {
   + omap_revision = OMAP3515_REV (rev);
   + strcpy(cpu_name, 3515);
   + }
   + else {
   + omap_revision = OMAP3503_REV (rev);
   + strcpy(cpu_name, 3503);
   + }
 
 But, actually, 3515 has no DSP, but has PowerVR,
 and 3525 has no PowerVR but has DSP. In-tree code inverses 
 this detection.

This error seems to have crept in while reworking the patch. I
believe the patch can be minimized to:

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..e5a0747 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -270,11 +270,11 @@ void __init omap3_cpuinfo(void)
strcpy(cpu_name, 3630);
else if (omap3_has_iva()  omap3_has_sgx())
strcpy(cpu_name, 3430/3530);
-   else if (omap3_has_sgx()) {
+   else if (omap3_has_iva()) {
omap_revision = OMAP3525_REV(rev);
strcpy(cpu_name, 3525);
}
-   else if (omap3_has_iva()) {
+   else if (omap3_has_sgx()) {
omap_revision = OMAP3515_REV(rev);
strcpy(cpu_name, 3515);
}

I can submit this on your behalf.

Best regards,
Sanjeev

 
 Please consider applying attached patch. (sorry, no git-send-email
 available here).
 --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP3515 vs 3525 inversion

2009-11-17 Thread Sergey Lapin
On Tue, Nov 17, 2009 at 4:39 PM, Premi, Sanjeev pr...@ti.com wrote:
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Sergey Lapin
 Sent: Monday, November 16, 2009 3:59 PM
 To: linux-omap@vger.kernel.org
 Subject: OMAP3515 vs 3525 inversion

 Hi, all!
 I think I found a bug in processor detection code.
 as I see,
   + /* OMAP3430 and OMAP3530 are assumed to be same.
   +  *
   +  * OMAP3525, OMAP3515 and OMAP3503 can be detected only based
   +  * on available features. Upon detection, update the CPU id
   +  * and CPU class bits.
   +  */
   + if (omap3_has_iva()  omap3_has_sgx()) {
   + strcpy(cpu_name, 3430/3530);
   + }
   + else if (omap3_has_sgx()) {
   + omap_revision = OMAP3525_REV (rev);
   + strcpy(cpu_name, 3525);
   + }
   + else if (omap3_has_iva()) {
   + omap_revision = OMAP3515_REV (rev);
   + strcpy(cpu_name, 3515);
   + }
   + else {
   + omap_revision = OMAP3503_REV (rev);
   + strcpy(cpu_name, 3503);
   + }

 But, actually, 3515 has no DSP, but has PowerVR,
 and 3525 has no PowerVR but has DSP. In-tree code inverses
 this detection.

 This error seems to have crept in while reworking the patch. I
 believe the patch can be minimized to:

 diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
 index 1c15112..e5a0747 100644
 --- a/arch/arm/mach-omap2/id.c
 +++ b/arch/arm/mach-omap2/id.c
 @@ -270,11 +270,11 @@ void __init omap3_cpuinfo(void)
strcpy(cpu_name, 3630);
else if (omap3_has_iva()  omap3_has_sgx())
strcpy(cpu_name, 3430/3530);
 -   else if (omap3_has_sgx()) {
 +   else if (omap3_has_iva()) {
omap_revision = OMAP3525_REV(rev);
strcpy(cpu_name, 3525);
}
 -   else if (omap3_has_iva()) {
 +   else if (omap3_has_sgx()) {
omap_revision = OMAP3515_REV(rev);
strcpy(cpu_name, 3515);
}

 I can submit this on your behalf.

Fine by me.

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


insmod on beagleboard

2009-11-17 Thread tarek attia
How can I compile modules and insert it to the kernel on the beagleboard??

After I wrote the C files and tried to compile , it failed and don't
know hot to deal with this ??

Any help will be appreciated

Thanks in advance.

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


Re: Is the OMAP patch process badly flawed?

2009-11-17 Thread Sid Boyce
On 17/11/09 13:34, Gadiyar, Anand wrote:
 Sid Boyce wrote: 
 I'm curious - I download, build and test kernels on x86 and x86_64
 platforms, -rc, -rc-git and -git all build and run.
 On the OMAP platform I have so far not been able to do that with
 omap-git, omap-dss2-git trees and snapshots all missing basic hardware
 support, e.g:- I get the latest from gitorious.org, make
 omap3_beagle_defconfg, make xconfig, but there is no EHCI config
 available. I hunt down the patch and hand apply default y if
 ARCH_OMAP34XX to drivers/usb/Kconfig, next the build complains that
 drivers/usb/host/ehci-hcd.c: 1143:2: error: #error missing 
 bus glue for
 ehci-hcd

 The bus glue patch ... ehci-omap.c no longer exists.
 --- a/drivers/usb/host/ehci-hcd.c
 +++ b/drivers/usb/host/ehci-hcd.c
 @@ -1108,6 +1108,11 @@ MODULE_LICENSE (GPL);
  #definePLATFORM_DRIVER ehci_hcd_au1xxx_driver
  #endif

 +#ifdef CONFIG_ARCH_OMAP34XX
 +#include ehci-omap.c
 +#definePLATFORM_DRIVER ehci_hcd_omap_driver
 +#endif
 +
  #ifdef CONFIG_PPC_PS3
  #include ehci-ps3.c
  #definePS3_SYSTEM_BUS_DRIVER   ps3_ehci_driver

 I would expect patches sent upstream would result in all the basics for
 long established platforms to be fully covered. Appreciating that
 development is quite fast paced with mods and supporting new platforms.
 Could someone please enlighten me?
 
 Sid,
 
 Speaking purely for EHCI, this is now queued up in Greg's USB queue
 for upstream and will get merged in the next cycle.
 
 Until then, the linux-omap code does have working EHCI support
 on beagle, evm and the other boards. If you're cloning from
 gitorious, you're probably picking the wrong tree.
 
 - Anand
 
 

Thanks, that explains a lot as I can't remember seeing those patches on
the linux-usb list for submission upstream.
What tree is best to clone?
Regards
Sid.
-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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


[RFC] [PATCH] omap_vout: default colorspace for RGB565 set to SRGB

2009-11-17 Thread Y, Kishore
This patch is dependent on the patch
[PATCH 4/4] OMAP2/3 V4L2: Add support for OMAP2/3 V4L2 driver on top of DSS2

From 41b85f02f441771ace6c42ee08475ab7be04eb90 Mon Sep 17 00:00:00 2001
From: Kishore Y kishor...@ti.com
Date: Wed, 11 Nov 2009 19:47:14 +0530
Subject: [PATCH] omap_vout: default colorspace for RGB565 set to SRGB

Default video format is set to RGB565 and the colorspace is set to
JPEG. Best colorspace for RGB565 is SRGB and hence changed to it.

Signed-off-by: Kishore Y kishor...@ti.com
---
 drivers/media/video/omap/omap_vout.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/omap/omap_vout.c 
b/drivers/media/video/omap/omap_vout.c
index 6118665..7092ef2 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -2078,7 +2078,7 @@ static int __init omap_vout_setup_video_data(struct 
omap_vout_device *vout)
pix-bytesperline = pix-width * 2;
pix-sizeimage = pix-bytesperline * pix-height;
pix-priv = 0;
-   pix-colorspace = V4L2_COLORSPACE_JPEG;
+   pix-colorspace = V4L2_COLORSPACE_SRGB;
 
vout-bpp = RGB565_BPP;
vout-fbuf.fmt.width  =  display-panel.timings.x_res;
-- 
1.5.4.3


Regards,
Kishore Y
Ph:- +918039813085

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


[RFC] [PATCH] omap_vout: Change allocated buffer to only needed size

2009-11-17 Thread Y, Kishore
This patch is dependent on the patch
[PATCH 4/4] OMAP2/3 V4L2: Add support for OMAP2/3 V4L2 driver on top of DSS2

From eb4302232f15e0af075604a9cf24fcaa9688e8a5 Mon Sep 17 00:00:00 2001
From: Kishore Y kishor...@ti.com
Date: Tue, 10 Nov 2009 21:44:10 +0530
Subject: [PATCH] omap_vout: Change allocated buffer to only needed size
 This patch change allocation size of IO buffers to allocate
 only needed size depending on pix.width, pix.height and bytes
 per pixel. The buffer size is rounded to allocate always a PAGE_SIZE multiple

Signed-off-by:  Kishore Y kishor...@ti.com
---
 drivers/media/video/omap/omap_vout.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap/omap_vout.c 
b/drivers/media/video/omap/omap_vout.c
index a13f65e..8064c2d 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -855,6 +855,8 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, 
unsigned int *count,
 
/* Now allocated the V4L2 buffers */
*size = vout-buffer_size;
+   *size = vout-pix.width * vout-pix.height * vout-bpp;
+   *size = PAGE_ALIGN(*size);
startindex = (vout-vid == OMAP_VIDEO1) ?
video1_numbuffers : video2_numbuffers;
for (i = startindex; i  *count; i++) {
-- 
1.5.4.3


Regards,
Kishore Y
Ph:- +918039813085

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


[RFC] [PATCH] V4L2: Allow rotation between stream off-on

2009-11-17 Thread Y, Kishore
This patch is dependent on the patch
[PATCH 4/4] OMAP2/3 V4L2: Add support for OMAP2/3 V4L2 driver on top of DSS2

From cda5b97d02784318d89a029a2fde97903610d2b2 Mon Sep 17 00:00:00 2001
From: Kishore Y kishor...@ti.com
Date: Wed, 11 Nov 2009 19:22:46 +0530
Subject: [PATCH] V4L2: Allow rotation between stream off-on

This patch configures vrfb buffers when streamon ioctl is called
in order to allow changing video rotation among streamoff/streamon
sequences without calling reqbuf ioctl

Signed-off-by: Kishore Y kishor...@ti.com
---
 drivers/media/video/omap/omap_vout.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap/omap_vout.c 
b/drivers/media/video/omap/omap_vout.c
index c39c8a7..6118665 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -1800,6 +1800,7 @@ static int vidioc_streamon(struct file *file, void *fh,
struct omap_vout_device *vout = fh;
struct videobuf_queue *q = vout-vbq;
u32 addr = 0;
+   unsigned int count;
int r = 0;
int t;
struct omapvideo_info *ovid = vout-vid_info;
@@ -1837,6 +1838,9 @@ static int vidioc_streamon(struct file *file, void *fh,
 
vout-first_int = 1;
 
+   count = vout-buffer_allocated;
+   omap_vout_vrfb_buffer_setup(vout, count, 0);
+
if (omap_vout_calculate_offset(vout)) {
mutex_unlock(vout-lock);
return -EINVAL;
-- 
1.5.4.3


Regards,
Kishore Y
Ph:- +918039813085

--
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 8/10 v2] omap mailbox: OMAP4-Mailbox - Adds code changes to support OMAP4 mailbox.

2009-11-17 Thread C.A, Subramaniam
Hi Tony,
Following is the version 2 of Patch 8/10 (removing all #fidefs)

Regards
Subbu
 
From 775dde65217785f519efe2a202489a791460f861 Mon Sep 17 00:00:00 2001
From: C A Subramaniam subramaniam...@ti.com
Date: Fri, 13 Nov 2009 16:42:40 +0530
Subject: [PATCH 8/10 v2] omap mailbox: OMAP4-Mailbox - Adds code changes to 
support OMAP4 mailbox.

This patch adds code changes in the mailbox driver module to
add support for OMAP4 mailbox.
Removed #ifdef CONFIG_ARCH_OMAP4

Signed-off-by: Hari Kanigeri h-kanige...@ti.com
Signed-off-by: C A Subramaniam subramaniam...@ti.com
Signed-off-by: Ramesh Gupta G grgu...@ti.com
---
 arch/arm/mach-omap2/mailbox.c |  140 ++---
 arch/arm/plat-omap/mailbox.c  |   25 ++--
 2 files changed, 136 insertions(+), 29 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 5ba3aa6..d20550f 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -18,6 +18,8 @@
 #include plat/mailbox.h
 #include mach/irqs.h
 
+#define DRV_NAME omap2-mailbox
+
 #define MAILBOX_REVISION   0x000
 #define MAILBOX_SYSCONFIG  0x010
 #define MAILBOX_SYSSTATUS  0x014
@@ -27,8 +29,12 @@
 #define MAILBOX_IRQSTATUS(u)   (0x100 + 8 * (u))
 #define MAILBOX_IRQENABLE(u)   (0x104 + 8 * (u))
 
-#define MAILBOX_IRQ_NEWMSG(u)  (1  (2 * (u)))
-#define MAILBOX_IRQ_NOTFULL(u) (1  (2 * (u) + 1))
+#define OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 10 * (u))
+#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 10 * (u))
+#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 10 * (u))
+
+#define MAILBOX_IRQ_NEWMSG(m)  (1  (2 * (m)))
+#define MAILBOX_IRQ_NOTFULL(m) (1  (2 * (m) + 1))
 
 /* SYSCONFIG: register bit definition */
 #define AUTOIDLE   (1  0)
@@ -39,7 +45,11 @@
 #define RESETDONE  (1  0)
 
 #define MBOX_REG_SIZE  0x120
+
+#define OMAP4_MBOX_REG_SIZE0x130
+
 #define MBOX_NR_REGS   (MBOX_REG_SIZE / sizeof(u32))
+#define OMAP4_MBOX_NR_REGS (OMAP4_MBOX_REG_SIZE / sizeof(u32))
 
 static void __iomem *mbox_base;
 
@@ -56,7 +66,8 @@ struct omap_mbox2_priv {
unsigned long irqstatus;
u32 newmsg_bit;
u32 notfull_bit;
-   u32 ctx[MBOX_NR_REGS];
+   u32 ctx[OMAP4_MBOX_REG_SIZE];
+   unsigned long irqdisable;
 };
 
 static struct clk *mbox_ick_handle;
@@ -82,8 +93,9 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
 
mbox_ick_handle = clk_get(NULL, mailboxes_ick);
if (IS_ERR(mbox_ick_handle)) {
-   pr_err(Can't get mailboxes_ick\n);
-   return -ENODEV;
+   printk(KERN_ERR Could not get mailboxes_ick: %d\n,
+   PTR_ERR(mbox_ick_handle));
+   return PTR_ERR(mbox_ick_handle);
}
clk_enable(mbox_ick_handle);
 
@@ -115,6 +127,7 @@ static void omap2_mbox_shutdown(struct omap_mbox *mbox)
 {
clk_disable(mbox_ick_handle);
clk_put(mbox_ick_handle);
+   mbox_ick_handle = NULL;
 }
 
 /* Mailbox FIFO handle functions */
@@ -143,7 +156,7 @@ static int omap2_mbox_fifo_full(struct omap_mbox *mbox)
 {
struct omap_mbox2_fifo *fifo =
((struct omap_mbox2_priv *)mbox-priv)-tx_fifo;
-   return (mbox_read_reg(fifo-fifo_stat));
+   return mbox_read_reg(fifo-fifo_stat);
 }
 
 /* Mailbox IRQ handle functions */
@@ -163,10 +176,9 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
 {
struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox-priv;
u32 l, bit = (irq == IRQ_TX) ? p-notfull_bit : p-newmsg_bit;
-
-   l = mbox_read_reg(p-irqenable);
+   l = mbox_read_reg(p-irqdisable);
l = ~bit;
-   mbox_write_reg(l, p-irqenable);
+   mbox_write_reg(l, p-irqdisable);
 }
 
 static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
@@ -189,15 +201,19 @@ static int omap2_mbox_is_irq(struct omap_mbox *mbox,
u32 enable = mbox_read_reg(p-irqenable);
u32 status = mbox_read_reg(p-irqstatus);
 
-   return (enable  status  bit);
+   return (int)(enable  status  bit);
 }
 
 static void omap2_mbox_save_ctx(struct omap_mbox *mbox)
 {
int i;
struct omap_mbox2_priv *p = mbox-priv;
-
-   for (i = 0; i  MBOX_NR_REGS; i++) {
+   int nr_regs;
+   if (cpu_is_omap44xx())
+   nr_regs = OMAP4_MBOX_NR_REGS;
+   else
+   nr_regs = MBOX_NR_REGS;
+   for (i = 0; i  nr_regs; i++) {
p-ctx[i] = mbox_read_reg(i * sizeof(u32));
 
dev_dbg(mbox-dev, %s: [%02x] %08x\n, __func__,
@@ -209,8 +225,12 @@ static void omap2_mbox_restore_ctx(struct omap_mbox *mbox)
 {
int i;
struct omap_mbox2_priv *p = mbox-priv;
-
-   for (i = 0; i  MBOX_NR_REGS; i++) {
+   int nr_regs;
+   if (cpu_is_omap44xx())
+   nr_regs = OMAP4_MBOX_NR_REGS;
+   else
+   nr_regs = 

RE: Is the OMAP patch process badly flawed?

2009-11-17 Thread Gadiyar, Anand
Sid Boyce wrote:

snip

 
  I would expect patches sent upstream would result in all the basics for
  long established platforms to be fully covered. Appreciating that
  development is quite fast paced with mods and supporting new platforms.
  Could someone please enlighten me?
  
  Sid,
  
  Speaking purely for EHCI, this is now queued up in Greg's USB queue
  for upstream and will get merged in the next cycle.
  
  Until then, the linux-omap code does have working EHCI support
  on beagle, evm and the other boards. If you're cloning from
  gitorious, you're probably picking the wrong tree.
  
  - Anand
  
  
 
 Thanks, that explains a lot as I can't remember seeing those patches on
 the linux-usb list for submission upstream.
 What tree is best to clone?


Not sure which is best - I suppose that depends on what all you need.
The canonical linux-omap tree maintained by Tony is at [1].

For EHCI, Felipe sent the driver to Greg who queued it up for .33 [2].
Tony lined up the board files and mach-omap2/usb-ehci.c in the for-next
branch.



[1] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
[2] 
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-07-usb-2.6.32-rc6.patch
 --
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] musb: Add structure 'musb_hdrc_board_data'

2009-11-17 Thread Ajay Kumar Gupta
Hi,

This patch set adds a new structure 'musb_hdrc_board_data' to get all
board specific data from board files.

It is actually done to accomodate ULPI_VBUSCONTROL programming required
for OMAP3EVM Rev =E which uses external Vbus supply to support 500mA.

Necessarly changes have been done in all the OMAP, Davinci and Blackfin
platform based boards.

[patches created against linus's tree and tested on OMAP3EVM]

Regards,
Ajay

Ajay Kumar Gupta (8):
  musb: Add structure to get board specific data
  musb: Get power (mA) from board data
  musb: Update musb_init() call for all OMAP3 boards
  musb: Update setup_usb() call for all Davinci boards
  musb: Add 'extvbus' in musb_hdrc_board_data
  musb: set 'extvbus = 0' for OMAP3 boards
  musb: set 'extvbus = 0' for Davinci boards
  musb: set 'extvbus = 0' for Blackfin boards

 arch/arm/mach-davinci/board-dm355-evm.c |   10 +-
 arch/arm/mach-davinci/board-dm355-leopard.c |   10 +-
 arch/arm/mach-davinci/board-dm644x-evm.c|9 -
 arch/arm/mach-davinci/board-sffsdr.c|   10 +-
 arch/arm/mach-davinci/include/mach/common.h |7 +--
 arch/arm/mach-davinci/usb.c |8 
 arch/arm/mach-omap2/board-2430sdp.c |8 +++-
 arch/arm/mach-omap2/board-3430sdp.c |9 -
 arch/arm/mach-omap2/board-ldp.c |8 +++-
 arch/arm/mach-omap2/board-omap3beagle.c |9 -
 arch/arm/mach-omap2/board-omap3evm.c|9 -
 arch/arm/mach-omap2/board-omap3pandora.c|9 -
 arch/arm/mach-omap2/board-overo.c   |9 -
 arch/arm/mach-omap2/board-rx51.c|8 +++-
 arch/arm/mach-omap2/board-zoom2.c   |8 +++-
 arch/arm/mach-omap2/usb-musb.c  |   13 +
 arch/arm/plat-omap/include/mach/usb.h   |3 ++-
 arch/blackfin/mach-bf527/boards/cm_bf527.c  |6 ++
 arch/blackfin/mach-bf527/boards/ezbrd.c |6 ++
 arch/blackfin/mach-bf527/boards/ezkit.c |6 ++
 arch/blackfin/mach-bf548/boards/cm_bf548.c  |6 ++
 arch/blackfin/mach-bf548/boards/ezkit.c |6 ++
 drivers/usb/musb/musb_core.c|   14 +-
 drivers/usb/musb/musb_regs.h|5 +
 include/linux/usb/musb.h|   19 +--
 25 files changed, 180 insertions(+), 35 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 5/8] musb: Add 'extvbus' in musb_hdrc_board_data

2009-11-17 Thread Ajay Kumar Gupta
Some of the board might use external Vbus power supply on musb
interface which would require to program ULPI_BUSCONTROL register.

Adding 'extvbus' flag which can be set from such boards which will
be checked at musb driver files before programming ULPI_BUSCONTROL.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 drivers/usb/musb/musb_core.c |   12 +++-
 drivers/usb/musb/musb_regs.h |5 +
 include/linux/usb/musb.h |3 ++-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 818ccda..c0a6760 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2027,15 +2027,25 @@ bad_config:
/* host side needs more setup */
if (is_host_enabled(musb)) {
struct usb_hcd  *hcd = musb_to_hcd(musb);
+   u8 busctl;
 
otg_set_host(musb-xceiv, hcd-self);
 
if (is_otg_enabled(musb))
hcd-self.otg_port = 1;
musb-xceiv-host = hcd-self;
-   if (plat-board_data)
+   if (plat-board_data) {
hcd-power_budget =
2 * (plat-board_data-power ? : 250);
+   /* program PHY to use external vBus if required */
+   if (plat-board_data-extvbus) {
+   busctl = musb_readb(musb-mregs,
+   MUSB_ULPI_BUSCONTROL);
+   busctl |= ULPI_USE_EXTVBUS;
+   musb_writeb(musb-mregs,
+   MUSB_ULPI_BUSCONTROL, busctl);
+   }
+   }
}
 
/* For the host-only role, we can activate right away.
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h
index cc1d71b..a0314df 100644
--- a/drivers/usb/musb/musb_regs.h
+++ b/drivers/usb/musb/musb_regs.h
@@ -72,6 +72,10 @@
 #define MUSB_DEVCTL_HR 0x02
 #define MUSB_DEVCTL_SESSION0x01
 
+/* ULPI VBUSCONTROL */
+#define ULPI_USE_EXTVBUS   0x01
+#define ULPI_USE_EXTVBUSIND0x02
+
 /* TESTMODE */
 #define MUSB_TEST_FORCE_HOST   0x80
 #define MUSB_TEST_FIFO_ACCESS  0x40
@@ -246,6 +250,7 @@
 
 /* REVISIT: vctrl/vstatus: optional vendor utmi+phy register at 0x68 */
 #define MUSB_HWVERS0x6C/* 8 bit */
+#define MUSB_ULPI_BUSCONTROL   0x70/* 8 bit */
 
 #define MUSB_EPINFO0x78/* 8 bit */
 #define MUSB_RAMINFO   0x79/* 8 bit */
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 6e1426c..45fd7d1 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -33,7 +33,8 @@ struct musb_hdrc_board_data {
u8  power;
/* (HOST or OTG) msec/2 after VBUS on till power good */
u8  potpgt;
-
+   /* flag to program PHY to use external Vbus */
+   unsignedextvbus:1;
 };
 
 struct musb_hdrc_config {
-- 
1.6.2.4

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


[PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards

2009-11-17 Thread Ajay Kumar Gupta
Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all OMAP3 musb boards.

This flag should be set to '1' for boards using external vbus
supply such as, OMAP3EVM Rev =E.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 arch/arm/mach-omap2/board-2430sdp.c  |1 +
 arch/arm/mach-omap2/board-3430sdp.c  |1 +
 arch/arm/mach-omap2/board-ldp.c  |1 +
 arch/arm/mach-omap2/board-omap3beagle.c  |1 +
 arch/arm/mach-omap2/board-omap3evm.c |1 +
 arch/arm/mach-omap2/board-omap3pandora.c |1 +
 arch/arm/mach-omap2/board-overo.c|1 +
 arch/arm/mach-omap2/board-rx51.c |1 +
 8 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 970dcab..0a2abf1 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -197,6 +197,7 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
 
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap_2430sdp_init(void)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 85cd24f..8dbb03a 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -488,6 +488,7 @@ static void enable_board_wakeup_source(void)
 /* musb board specific details */
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap_3430sdp_init(void)
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index a8338a4..dfee4c5 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -377,6 +377,7 @@ static struct platform_device *ldp_devices[] __initdata = {
 
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap_ldp_init(void)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 113bcfe..34ec334 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -404,6 +404,7 @@ static void __init omap3beagle_flash_init(void)
 /* musb board specific details */
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap3_beagle_init(void)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 9e2656a..0066bee 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -301,6 +301,7 @@ static struct platform_device *omap3_evm_devices[] 
__initdata = {
 /* musb board specific details */
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap3_evm_init(void)
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 9bcd324..bf387b8 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -391,6 +391,7 @@ static struct platform_device *omap3pandora_devices[] 
__initdata = {
 /* musb board specific details */
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init omap3pandora_init(void)
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index e2acb91..d53c61d 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -388,6 +388,7 @@ static struct platform_device *overo_devices[] __initdata = 
{
 /* musb board specific details */
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init overo_init(void)
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 839d7a8..1b2ece0 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -56,6 +56,7 @@ static struct omap_board_config_kernel rx51_config[] = {
 
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 50,
+   .extvbus = 0,
 };
 
 static void __init rx51_init_irq(void)
-- 
1.6.2.4

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


[PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

2009-11-17 Thread Ajay Kumar Gupta
setup_usb() has been modified to pass board specific data so updating
this function call from all Davinci based boards.

Added struct device; to fix below compilation warning for Davinci boards.
musb.h: struct device, defined within parameter list

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 arch/arm/mach-davinci/board-dm355-evm.c |9 -
 arch/arm/mach-davinci/board-dm355-leopard.c |9 -
 arch/arm/mach-davinci/board-dm644x-evm.c|8 +++-
 arch/arm/mach-davinci/board-sffsdr.c|9 -
 arch/arm/mach-davinci/include/mach/common.h |7 +--
 arch/arm/mach-davinci/usb.c |8 
 6 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm355-evm.c 
b/arch/arm/mach-davinci/board-dm355-evm.c
index 77e8067..31c5741 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -24,6 +24,7 @@
 #include media/tvp514x.h
 #include linux/spi/spi.h
 #include linux/spi/eeprom.h
+#include linux/usb/musb.h
 
 #include asm/setup.h
 #include asm/mach-types.h
@@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[] 
__initconst = {
},
 };
 
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 250,   /* (power in mA)/2 */
+   .potpgt = 4,/* (potpgt in msec)/2 */
+};
+
 static __init void dm355_evm_init(void)
 {
struct clk *aemif;
@@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
gpio_request(2, usb_id_toggle);
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
-   setup_usb(500, 8);
+   setup_usb(musb_bdata);
 
davinci_setup_mmc(0, dm355evm_mmc_config);
davinci_setup_mmc(1, dm355evm_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c 
b/arch/arm/mach-davinci/board-dm355-leopard.c
index 84ad5d1..2c534f1 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -21,6 +21,7 @@
 #include linux/clk.h
 #include linux/spi/spi.h
 #include linux/spi/eeprom.h
+#include linux/usb/musb.h
 
 #include asm/setup.h
 #include asm/mach-types.h
@@ -243,6 +244,12 @@ static struct spi_board_info dm355_leopard_spi_info[] 
__initconst = {
},
 };
 
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 250,   /* (power in mA)/2 */
+   .potpgt = 4,/* (potpgt in msec)/2 */
+};
+
 static __init void dm355_leopard_init(void)
 {
struct clk *aemif;
@@ -270,7 +277,7 @@ static __init void dm355_leopard_init(void)
gpio_request(2, usb_id_toggle);
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
-   setup_usb(500, 8);
+   setup_usb(musb_bdata);
 
davinci_setup_mmc(0, dm355leopard_mmc_config);
davinci_setup_mmc(1, dm355leopard_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c 
b/arch/arm/mach-davinci/board-dm644x-evm.c
index 1213a00..307520e 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -29,6 +29,7 @@
 #include linux/phy.h
 #include linux/clk.h
 #include linux/videodev2.h
+#include linux/usb/musb.h
 
 #include media/tvp514x.h
 
@@ -438,6 +439,11 @@ static struct pcf857x_platform_data pcf_data_u18 = {
.teardown   = evm_u18_teardown,
 };
 
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 250,   /* (power in mA)/2 */
+   .potpgt = 4,/* (potpgt in msec)/2 */
+};
 
 /* U35 - various I/O signals used to manage USB, CF, ATA, etc */
 
@@ -477,7 +483,7 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned 
ngpio, void *c)
/* irlml6401 switches over 1A, in under 8 msec;
 * now it can be managed by nDRV_VBUS ...
 */
-   setup_usb(500, 8);
+   setup_usb(musb_bdata);
 
return 0;
 }
diff --git a/arch/arm/mach-davinci/board-sffsdr.c 
b/arch/arm/mach-davinci/board-sffsdr.c
index 7acdfd8..e61d7d7 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -38,6 +38,7 @@
 #include linux/mtd/partitions.h
 #include linux/mtd/physmap.h
 #include linux/io.h
+#include linux/usb/musb.h
 
 #include asm/setup.h
 #include asm/mach-types.h
@@ -149,6 +150,12 @@ static struct davinci_uart_config uart_config __initdata = 
{
.enabled_uarts = (1  0),
 };
 
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 0, /* (power in mA)/2 */
+   .potpgt = 0,/* (potpgt in msec)/2 */
+};
+
 static void __init davinci_sffsdr_map_io(void)
 {
dm644x_init();
@@ -164,7 +171,7 @@ static __init void davinci_sffsdr_init(void)
davinci_serial_init(uart_config);
soc_info-emac_pdata-phy_mask = 

[PATCH 8/8] musb: set 'extvbus = 0' for Blackfin boards

2009-11-17 Thread Ajay Kumar Gupta
Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all Blackfin musb boards.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 arch/blackfin/mach-bf527/boards/cm_bf527.c |6 ++
 arch/blackfin/mach-bf527/boards/ezbrd.c|6 ++
 arch/blackfin/mach-bf527/boards/ezkit.c|6 ++
 arch/blackfin/mach-bf548/boards/cm_bf548.c |6 ++
 arch/blackfin/mach-bf548/boards/ezkit.c|6 ++
 5 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c 
b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index f1996b1..48e1591 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -104,6 +104,11 @@ static struct musb_hdrc_config musb_config = {
.gpio_vrsel = GPIO_PF11,
 };
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata = {
+   .extvbus = 0,
+};
+
 static struct musb_hdrc_platform_data musb_plat = {
 #if defined(CONFIG_USB_MUSB_OTG)
.mode   = MUSB_OTG,
@@ -113,6 +118,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.mode   = MUSB_PERIPHERAL,
 #endif
.config = musb_config,
+   .board_data = musb_bdata,
 };
 
 static u64 musb_dmamask = ~(u32)0;
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c 
b/arch/blackfin/mach-bf527/boards/ezbrd.c
index cad23b1..bc56ea9 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -64,6 +64,11 @@ static struct musb_hdrc_config musb_config = {
.gpio_vrsel = GPIO_PG13,
 };
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata = {
+   .extvbus = 0,
+};
+
 static struct musb_hdrc_platform_data musb_plat = {
 #if defined(CONFIG_USB_MUSB_OTG)
.mode   = MUSB_OTG,
@@ -73,6 +78,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.mode   = MUSB_PERIPHERAL,
 #endif
.config = musb_config,
+   .board_data = musb_bdata,
 };
 
 static u64 musb_dmamask = ~(u32)0;
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c 
b/arch/blackfin/mach-bf527/boards/ezkit.c
index f09665f..c99e8f2 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -102,6 +102,11 @@ static struct musb_hdrc_config musb_config = {
.gpio_vrsel = GPIO_PG13,
 };
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata = {
+   .extvbus = 0,
+};
+
 static struct musb_hdrc_platform_data musb_plat = {
 #if defined(CONFIG_USB_MUSB_OTG)
.mode   = MUSB_OTG,
@@ -111,6 +116,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.mode   = MUSB_PERIPHERAL,
 #endif
.config = musb_config,
+   .board_data = musb_bdata,
 };
 
 static u64 musb_dmamask = ~(u32)0;
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c 
b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index ccdcd6d..f745ab3 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -333,6 +333,11 @@ static struct musb_hdrc_config musb_config = {
.gpio_vrsel = GPIO_PH6,
 };
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata = {
+   .extvbus = 0,
+};
+
 static struct musb_hdrc_platform_data musb_plat = {
 #if defined(CONFIG_USB_MUSB_OTG)
.mode   = MUSB_OTG,
@@ -342,6 +347,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.mode   = MUSB_PERIPHERAL,
 #endif
.config = musb_config,
+   .board_data = musb_bdata,
 };
 
 static u64 musb_dmamask = ~(u32)0;
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c 
b/arch/blackfin/mach-bf548/boards/ezkit.c
index 1a5286b..00995e8 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -435,6 +435,11 @@ static struct musb_hdrc_config musb_config = {
.gpio_vrsel = GPIO_PE7,
 };
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata = {
+   .extvbus = 0,
+};
+
 static struct musb_hdrc_platform_data musb_plat = {
 #if defined(CONFIG_USB_MUSB_OTG)
.mode   = MUSB_OTG,
@@ -444,6 +449,7 @@ static struct musb_hdrc_platform_data musb_plat = {
.mode   = MUSB_PERIPHERAL,
 #endif
.config = musb_config,
+   .board_data = musb_bdata,
 };
 
 static u64 musb_dmamask = ~(u32)0;
-- 
1.6.2.4

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


[PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards

2009-11-17 Thread Ajay Kumar Gupta
Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all Davinci musb boards.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 arch/arm/mach-davinci/board-dm355-evm.c |1 +
 arch/arm/mach-davinci/board-dm355-leopard.c |1 +
 arch/arm/mach-davinci/board-dm644x-evm.c|1 +
 arch/arm/mach-davinci/board-sffsdr.c|1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm355-evm.c 
b/arch/arm/mach-davinci/board-dm355-evm.c
index 31c5741..ed011ae 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -322,6 +322,7 @@ static struct spi_board_info dm355_evm_spi_info[] 
__initconst = {
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 250,   /* (power in mA)/2 */
.potpgt = 4,/* (potpgt in msec)/2 */
+   .extvbus = 0,
 };
 
 static __init void dm355_evm_init(void)
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c 
b/arch/arm/mach-davinci/board-dm355-leopard.c
index 2c534f1..4ab8ab5 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -248,6 +248,7 @@ static struct spi_board_info dm355_leopard_spi_info[] 
__initconst = {
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 250,   /* (power in mA)/2 */
.potpgt = 4,/* (potpgt in msec)/2 */
+   .extvbus = 0,
 };
 
 static __init void dm355_leopard_init(void)
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c 
b/arch/arm/mach-davinci/board-dm644x-evm.c
index 307520e..9e99882 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -443,6 +443,7 @@ static struct pcf857x_platform_data pcf_data_u18 = {
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 250,   /* (power in mA)/2 */
.potpgt = 4,/* (potpgt in msec)/2 */
+   .extvbus = 0,
 };
 
 /* U35 - various I/O signals used to manage USB, CF, ATA, etc */
diff --git a/arch/arm/mach-davinci/board-sffsdr.c 
b/arch/arm/mach-davinci/board-sffsdr.c
index e61d7d7..c6c9b20 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -154,6 +154,7 @@ static struct davinci_uart_config uart_config __initdata = {
 static struct musb_hdrc_board_data musb_bdata __initdata = {
.power = 0, /* (power in mA)/2 */
.potpgt = 0,/* (potpgt in msec)/2 */
+   .extvbus = 0,
 };
 
 static void __init davinci_sffsdr_map_io(void)
-- 
1.6.2.4

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


[PATCH 1/8] musb: Add structure to get board specific data

2009-11-17 Thread Ajay Kumar Gupta
Adding 'musb_hdrc_board_data' which will have all the board specific
parameters such as; mA power, potpgt, extvbus, gpios etc.

Currently only 'power' and 'potpgt' is being moved from existing
'musb_hdrc_platform_data' to 'musb_hdrc_board_data' but any further
board specific functions or parameter can be added to this structure
later.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 include/linux/usb/musb.h |   18 --
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index d437556..6e1426c 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -27,6 +27,15 @@ struct musb_hdrc_eps_bits {
u8  bits;
 };
 
+/* MUSB board-specific details */
+struct musb_hdrc_board_data {
+   /* power (mA/2) sourcing capability */
+   u8  power;
+   /* (HOST or OTG) msec/2 after VBUS on till power good */
+   u8  potpgt;
+
+};
+
 struct musb_hdrc_config {
/* MUSB configuration-specific details */
unsignedmultipoint:1;   /* multipoint device */
@@ -67,15 +76,9 @@ struct musb_hdrc_platform_data {
/* (HOST or OTG) switch VBUS on/off */
int (*set_vbus)(struct device *dev, int is_on);
 
-   /* (HOST or OTG) mA/2 power supplied on (default = 8mA) */
-   u8  power;
-
/* (PERIPHERAL) mA/2 max power consumed (default = 100mA) */
u8  min_power;
 
-   /* (HOST or OTG) msec/2 after VBUS on till power good */
-   u8  potpgt;
-
/* Power the device on or off */
int (*set_power)(int state);
 
@@ -84,6 +87,9 @@ struct musb_hdrc_platform_data {
 
/* MUSB configuration-specific details */
struct musb_hdrc_config *config;
+
+   /* MUSB board-specific details */
+   struct musb_hdrc_board_data *board_data;
 };
 
 
-- 
1.6.2.4

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


[PATCH 2/8] musb: Get power (mA) from board data

2009-11-17 Thread Ajay Kumar Gupta
Different board may have different power sourcing capability and
now with 'struct musb_hdrc_board_data' in place; pass this data
from board files and also modify musb_core.c to get 'power' data
from 'plat-board_data'.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 drivers/usb/musb/musb_core.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3a61ddb..818ccda 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2033,7 +2033,9 @@ bad_config:
if (is_otg_enabled(musb))
hcd-self.otg_port = 1;
musb-xceiv-host = hcd-self;
-   hcd-power_budget = 2 * (plat-power ? : 250);
+   if (plat-board_data)
+   hcd-power_budget =
+   2 * (plat-board_data-power ? : 250);
}
 
/* For the host-only role, we can activate right away.
-- 
1.6.2.4

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


[PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards

2009-11-17 Thread Ajay Kumar Gupta
musb_init() has been modified to pass board specific data so updating
this function call from all OMAP3 boards.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 arch/arm/mach-omap2/board-2430sdp.c  |7 ++-
 arch/arm/mach-omap2/board-3430sdp.c  |8 +++-
 arch/arm/mach-omap2/board-ldp.c  |7 ++-
 arch/arm/mach-omap2/board-omap3beagle.c  |8 +++-
 arch/arm/mach-omap2/board-omap3evm.c |8 +++-
 arch/arm/mach-omap2/board-omap3pandora.c |8 +++-
 arch/arm/mach-omap2/board-overo.c|8 +++-
 arch/arm/mach-omap2/board-rx51.c |7 ++-
 arch/arm/mach-omap2/board-zoom2.c|8 +++-
 arch/arm/mach-omap2/usb-musb.c   |   13 +
 arch/arm/plat-omap/include/mach/usb.h|3 ++-
 11 files changed, 67 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 42217b3..970dcab 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -23,6 +23,7 @@
 #include linux/err.h
 #include linux/clk.h
 #include linux/io.h
+#include linux/usb/musb.h
 
 #include mach/hardware.h
 #include asm/mach-types.h
@@ -194,6 +195,10 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
{}  /* Terminator */
 };
 
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 50,
+};
+
 static void __init omap_2430sdp_init(void)
 {
int ret;
@@ -203,7 +208,7 @@ static void __init omap_2430sdp_init(void)
platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
omap_serial_init();
twl4030_mmc_init(mmc);
-   usb_musb_init();
+   usb_musb_init(musb_bdata);
board_smc91x_init();
 
/* Turn off secondary LCD backlight */
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 0acb556..85cd24f 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -24,6 +24,7 @@
 #include linux/regulator/machine.h
 #include linux/io.h
 #include linux/gpio.h
+#include linux/usb/musb.h
 
 #include mach/hardware.h
 #include asm/mach-types.h
@@ -484,6 +485,11 @@ static void enable_board_wakeup_source(void)
omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */
 }
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 50,
+};
+
 static void __init omap_3430sdp_init(void)
 {
omap3430_i2c_init();
@@ -497,7 +503,7 @@ static void __init omap_3430sdp_init(void)
ARRAY_SIZE(sdp3430_spi_board_info));
ads7846_dev_init();
omap_serial_init();
-   usb_musb_init();
+   usb_musb_init(musb_bdata);
board_smc91x_init();
enable_board_wakeup_source();
 }
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d57ec2f..a8338a4 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -27,6 +27,7 @@
 #include linux/i2c/twl4030.h
 #include linux/io.h
 #include linux/smsc911x.h
+#include linux/usb/musb.h
 
 #include mach/hardware.h
 #include asm/mach-types.h
@@ -374,6 +375,10 @@ static struct platform_device *ldp_devices[] __initdata = {
ldp_gpio_keys_device,
 };
 
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 50,
+};
+
 static void __init omap_ldp_init(void)
 {
omap_i2c_init();
@@ -384,7 +389,7 @@ static void __init omap_ldp_init(void)
ARRAY_SIZE(ldp_spi_board_info));
ads7846_dev_init();
omap_serial_init();
-   usb_musb_init();
+   usb_musb_init(musb_bdata);
 
twl4030_mmc_init(mmc);
/* link regulators to MMC adapters */
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 08b0816..113bcfe 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,6 +30,7 @@
 
 #include linux/regulator/machine.h
 #include linux/i2c/twl4030.h
+#include linux/usb/musb.h
 
 #include mach/hardware.h
 #include asm/mach-types.h
@@ -400,6 +401,11 @@ static void __init omap3beagle_flash_init(void)
}
 }
 
+/* musb board specific details */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 50,
+};
+
 static void __init omap3_beagle_init(void)
 {
omap3_beagle_i2c_init();
@@ -412,7 +418,7 @@ static void __init omap3_beagle_init(void)
/* REVISIT leave DVI powered down until it's needed ... */
gpio_direction_output(170, true);
 
-   usb_musb_init();
+   usb_musb_init(musb_bdata);
omap3beagle_flash_init();
 
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 4c4d7f8..9e2656a 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ 

Re: [PATCH 1/8] musb: Add structure to get board specific data

2009-11-17 Thread Sergei Shtylyov

Hello.

Ajay Kumar Gupta wrote:


Adding 'musb_hdrc_board_data' which will have all the board specific
parameters such as; mA power, potpgt, extvbus, gpios etc.



Currently only 'power' and 'potpgt' is being moved from existing
'musb_hdrc_platform_data' to 'musb_hdrc_board_data' but any further
board specific functions or parameter can be added to this structure
later.



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
---
 include/linux/usb/musb.h |   18 --
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index d437556..6e1426c 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -27,6 +27,15 @@ struct musb_hdrc_eps_bits {
u8  bits;
 };
 
+/* MUSB board-specific details */

+struct musb_hdrc_board_data {
+   /* power (mA/2) sourcing capability */
+   u8  power;
+   /* (HOST or OTG) msec/2 after VBUS on till power good */
+   u8  potpgt;


   Uneven indentation, either too many or too little tabs here.

WBR, Sergei

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


Re: [PATCH 2/8] musb: Get power (mA) from board data

2009-11-17 Thread Sergei Shtylyov

Hello.

Ajay Kumar Gupta wrote:


Different board may have different power sourcing capability and
now with 'struct musb_hdrc_board_data' in place; pass this data
from board files and also modify musb_core.c to get 'power' data
from 'plat-board_data'.


   This should be part of the patch 1/8 to keep the code compiling.


Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com



diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3a61ddb..818ccda 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2033,7 +2033,9 @@ bad_config:
if (is_otg_enabled(musb))
hcd-self.otg_port = 1;
musb-xceiv-host = hcd-self;
-   hcd-power_budget = 2 * (plat-power ? : 250);
+   if (plat-board_data)
+   hcd-power_budget =
+   2 * (plat-board_data-power ? : 250);


   Shouldn't it be:

+
+   hcd-power_budget = 2 * (plat-board_data 
+plat-board_data-power ?
+plat-board_data-power : 250);

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


Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


setup_usb() has been modified to pass board specific data so updating
this function call from all Davinci based boards.



Added struct device; to fix below compilation warning for Davinci boards.
musb.h: struct device, defined within parameter list


   You should fix the missing #include in the musb.h, not band-aid it here...


Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com



diff --git a/arch/arm/mach-davinci/board-dm355-evm.c 
b/arch/arm/mach-davinci/board-dm355-evm.c
index 77e8067..31c5741 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -24,6 +24,7 @@
 #include media/tvp514x.h
 #include linux/spi/spi.h
 #include linux/spi/eeprom.h
+#include linux/usb/musb.h
 
 #include asm/setup.h

 #include asm/mach-types.h
@@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[] 
__initconst = {
},
 };
 
+/* musb board specific data */

+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 250,   /* (power in mA)/2 */
+   .potpgt = 4,/* (potpgt in msec)/2 */
+};
+
 static __init void dm355_evm_init(void)
 {
struct clk *aemif;
@@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
gpio_request(2, usb_id_toggle);
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
-   setup_usb(500, 8);
+   setup_usb(musb_bdata);


   Unfortunately, this will conflict with a patch queued for 2.6.33 in 
linux-davinci. Though in fact, it will render the part of this patch 
useless... :-/



diff --git a/arch/arm/mach-davinci/include/mach/common.h 
b/arch/arm/mach-davinci/include/mach/common.h
index 1fd3917..dab784c 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -20,11 +20,14 @@ extern void davinci_irq_init(void);
 extern void __iomem *davinci_intc_base;
 extern int davinci_intc_type;
 
+struct device;


   NAK. linux/usb/musb.h should be fixed instead.


+#include linux/usb/musb.h
+
 /* parameters describe VBUS sourcing for host mode */
-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);
 
 /* parameters describe VBUS sourcing for host mode */

-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);


   Don't you see -- these are duplicate? You could kill the second one. :-)

   BTW, the mentioned linux-davinci patch moved the declaration to 
mach/usb.h (and renamed the function too).


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


Re: [PATCH 1/8] musb: Add structure to get board specific data

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


Adding 'musb_hdrc_board_data' which will have all the board specific
parameters such as; mA power, potpgt, extvbus, gpios etc.

Currently only 'power' and 'potpgt' is being moved from existing
'musb_hdrc_platform_data' to 'musb_hdrc_board_data' but any further
board specific functions or parameter can be added to this structure
later.

Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


[...]


diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index d437556..6e1426c 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h

[...]

@@ -67,15 +76,9 @@ struct musb_hdrc_platform_data {
/* (HOST or OTG) switch VBUS on/off */
int (*set_vbus)(struct device *dev, int is_on);
 
-	/* (HOST or OTG) mA/2 power supplied on (default = 8mA) */

-   u8  power;
-


   Oh, this will break compilation of the existing code! This patch 
shouldn't be separated from patch 2/8.


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


Re: [PATCH 6/8] musb: set 'extvbus = 0' for OMAP3 boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all OMAP3 musb boards.



This flag should be set to '1' for boards using external vbus
supply such as, OMAP3EVM Rev =E.


  This patch is rather pointless as the struct fieds not explictily 
initialized will be default to 0 anyway. You should only need to explicitly 
init to 1.



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


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


Re: [PATCH 7/8] musb: set 'extvbus = 0' for Davinci boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all Davinci musb boards.



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


   Pointless patch again...

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


Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


setup_usb() has been modified to pass board specific data so updating
this function call from all Davinci based boards.



Added struct device; to fix below compilation warning for Davinci boards.
musb.h: struct device, defined within parameter list



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


[...]


diff --git a/arch/arm/mach-davinci/board-sffsdr.c 
b/arch/arm/mach-davinci/board-sffsdr.c
index 7acdfd8..e61d7d7 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -38,6 +38,7 @@
 #include linux/mtd/partitions.h
 #include linux/mtd/physmap.h
 #include linux/io.h
+#include linux/usb/musb.h
 
 #include asm/setup.h

 #include asm/mach-types.h
@@ -149,6 +150,12 @@ static struct davinci_uart_config uart_config __initdata = 
{
.enabled_uarts = (1  0),
 };
 
+/* musb board specific data */

+static struct musb_hdrc_board_data musb_bdata __initdata = {
+   .power = 0, /* (power in mA)/2 */
+   .potpgt = 0,/* (potpgt in msec)/2 */


   You can leave the structure unixitialized here, it will default to all 
zeros anyway.



+};
+
 static void __init davinci_sffsdr_map_io(void)
 {
dm644x_init();


WBR, Sergei

--
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] rx51: add wl1251 wlan driver support

2009-11-17 Thread Kalle Valo
From: Kalle Valo kalle.v...@nokia.com

wl1251 is connected to the SPI bus in rx51, add support for this.

Signed-off-by: Kalle Valo kalle.v...@nokia.com
---

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

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
b/arch/arm/mach-omap2/board-rx51-peripherals.c
index e34d96a..2417193 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -14,6 +14,7 @@
 #include linux/input.h
 #include linux/input/matrix_keypad.h
 #include linux/spi/spi.h
+#include linux/spi/wl12xx.h
 #include linux/i2c.h
 #include linux/i2c/twl4030.h
 #include linux/clk.h
@@ -36,6 +37,37 @@
 #define SYSTEM_REV_B_USES_VAUX30x1699
 #define SYSTEM_REV_S_USES_VAUX3 0x8
 
+#define RX51_WL1251_POWER_GPIO 87
+#define RX51_WL1251_IRQ_GPIO   42
+
+static void rx51_wl1251_set_power(bool enable);
+
+static struct wl12xx_platform_data wl1251_pdata = {
+   .set_power = rx51_wl1251_set_power,
+};
+
+static struct omap2_mcspi_device_config wl1251_mcspi_config = {
+   .turbo_mode = 0,
+   .single_channel = 1,
+};
+
+/* list all spi devices here */
+enum {
+   RX51_SPI_WL1251,
+};
+
+static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
+   [RX51_SPI_WL1251] = {
+   .modalias   = wl1251,
+   .bus_num= 4,
+   .chip_select= 0,
+   .max_speed_hz   = 4800,
+   .mode   = SPI_MODE_2,
+   .controller_data= wl1251_mcspi_config,
+   .platform_data  = wl1251_pdata,
+   },
+};
+
 static int board_keymap[] = {
KEY(0, 0, KEY_Q),
KEY(0, 1, KEY_O),
@@ -257,6 +289,55 @@ static struct regulator_init_data rx51_vdac = {
},
 };
 
+static void rx51_wl1251_set_power(bool enable)
+{
+   gpio_set_value(RX51_WL1251_POWER_GPIO, enable);
+}
+
+static void __init rx51_init_wl1251(void)
+{
+   int irq, ret;
+
+   ret = gpio_request(RX51_WL1251_POWER_GPIO, wl1251 power);
+   if (ret  0)
+   goto error;
+
+   ret = gpio_direction_output(RX51_WL1251_POWER_GPIO, 0);
+   if (ret  0)
+   goto err_power;
+
+   ret = gpio_request(RX51_WL1251_IRQ_GPIO, wl1251 irq);
+   if (ret  0)
+   goto err_power;
+
+   ret = gpio_direction_input(RX51_WL1251_IRQ_GPIO);
+   if (ret  0)
+   goto err_irq;
+
+   irq = gpio_to_irq(RX51_WL1251_IRQ_GPIO);
+   if (irq  0)
+   goto err_irq;
+
+   rx51_peripherals_spi_board_info[RX51_SPI_WL1251].irq = irq;
+
+   return;
+
+err_irq:
+   gpio_free(RX51_WL1251_IRQ_GPIO);
+
+err_power:
+   gpio_free(RX51_WL1251_POWER_GPIO);
+
+error:
+   printk(KERN_ERR wl1251 board initialisation failed\n);
+   wl1251_pdata.set_power = NULL;
+
+   /*
+* Now rx51_peripherals_spi_board_info[1].irq is zero and
+* set_power is null, and wl1251_probe() will fail.
+*/
+}
+
 static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
 {
/* FIXME this gpio setup is just a placeholder for now */
@@ -538,6 +619,10 @@ static inline void board_smc91x_init(void)
 
 void __init rx51_peripherals_init(void)
 {
+   rx51_init_wl1251();
+
+   spi_register_board_info(rx51_peripherals_spi_board_info,
+   ARRAY_SIZE(rx51_peripherals_spi_board_info));
rx51_i2c_init();
board_onenand_init();
board_smc91x_init();

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


Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


setup_usb() has been modified to pass board specific data so updating
this function call from all Davinci based boards.



Added struct device; to fix below compilation warning for Davinci boards.
musb.h: struct device, defined within parameter list



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


[...]


diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 06f5593..1b164dc 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -85,10 +85,10 @@ static struct platform_device usb_dev = {
.num_resources  = ARRAY_SIZE(usb_resources),
 };
 
-void __init setup_usb(unsigned mA, unsigned potpgt_msec)

+void __init setup_usb(struct musb_hdrc_board_data *board_data)
 {
-   usb_data.power = mA / 2;
-   usb_data.potpgt = potpgt_msec / 2;


   Hm, again, you can't separate this patch from patch 1/8 to keep the code 
compiling between the patches.  It looks like you have no choice but lump 
most of your patches together (and get rid of some others :-). Either that 
or better separate your change to the struct musb_hdrc_platfrpom_data and 
your change to setup_usb() prototype.


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


Re: [PATCH 8/8] musb: set 'extvbus = 0' for Blackfin boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


Default value of 'extvbus' is being set as '0' to maintain the
current programming state of all Blackfin musb boards.


   Again, you could keep the structures unitialized so that they default to 
all zeros (which they do anyway for the 'power' and 'potpgt' fields with 
your patch).



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


WBR, Sergei
--
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] ASoC: Correcting the config options in soc/omap/Makefile

2009-11-17 Thread Anuj Aggarwal
Wrong config options were being used in the soc/omap/Makefile
for OMAP2  OMAP3 and AM3517 EVMs.

Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com
---
 sound/soc/omap/Makefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 02d6947..a69bd04 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -21,8 +21,8 @@ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_AMS_DELTA) += snd-soc-ams-delta.o
 obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
 obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
-obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
-obj-$(CONFIG_MACH_OMAP3EVM) += snd-soc-omap3evm.o
+obj-$(CONFIG_SND_OMAP_SOC_OMAP2EVM) += snd-soc-omap2evm.o
+obj-$(CONFIG_SND_SOC_OMAP_OMAP3EVM) += snd-soc-omap3evm.o
 obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
-- 
1.6.2.4

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


[PATCH 2/2] ASoC: Modifying the license string GPLv2 for OMAP3 EVM

2009-11-17 Thread Anuj Aggarwal
Correcting the license string from GPLv2 - GPL v2.
Found the problem while building OMAP3 ASoC driver as
module.

Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com
---
 sound/soc/omap/omap3evm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
index 41a91b5..627fadb 100644
--- a/sound/soc/omap/omap3evm.c
+++ b/sound/soc/omap/omap3evm.c
@@ -144,4 +144,4 @@ module_exit(omap3evm_soc_exit);
 
 MODULE_AUTHOR(Anuj Aggarwal anuj.aggar...@ti.com);
 MODULE_DESCRIPTION(ALSA SoC OMAP3 EVM);
-MODULE_LICENSE(GPLv2);
+MODULE_LICENSE(GPL v2);
-- 
1.6.2.4

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


Win FREE OMAP L 138 based HawkBoard !!!

2009-11-17 Thread Syed Mohammed, Khasim
FYI,

 -Original Message-
 From: Khasim Syed Mohammed [mailto:kha...@beagleboard.org]
 Sent: Tuesday, November 17, 2009 9:43 PM
 To: beaglebo...@googlegroups.com; hawkbo...@googlegroups.com
 Subject: [beagleboard] Win FREE OMAP L 138 based HawkBoard !!!
 
 Hello,
 
 Today we will be announcing Early Adopter Program for Hawkboards.
 
 Join us at http://wiki.omap.com/index.php/ETechDays_Community_Lightning_Talks 

 @ 1 PM CST  to know more
 
 Regards,
 Khasim
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP3 : Enable TWL4030 Keypad for Zoom2 and Zoom3 boards

2009-11-17 Thread Manjunatha GK
The TWL4030 keypad driver is not enabled by default for zoom2 and zoom3
boards.

This patch will enable the same for both zoom2 and zoom3 boards.

Tested on zoom2(3430) and zoom3(3630) boards.

Signed-off-by: Manjunatha GK manj...@ti.com
---
 arch/arm/configs/omap_zoom2_defconfig |3 ++-
 arch/arm/configs/omap_zoom3_defconfig |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/omap_zoom2_defconfig 
b/arch/arm/configs/omap_zoom2_defconfig
index eef9362..4b00a43 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -610,7 +610,8 @@ CONFIG_INPUT_EVDEV=y
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_TWL4030=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
diff --git a/arch/arm/configs/omap_zoom3_defconfig 
b/arch/arm/configs/omap_zoom3_defconfig
index f0e7d0f..0d7e37a 100644
--- a/arch/arm/configs/omap_zoom3_defconfig
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -629,7 +629,8 @@ CONFIG_INPUT_EVDEV=y
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_TWL4030=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
-- 
1.6.0.4

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


Re: [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards

2009-11-17 Thread Sergei Shtylyov

Ajay Kumar Gupta wrote:


musb_init() has been modified to pass board specific data so updating
this function call from all OMAP3 boards.



Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com


[...]


diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 1145a25..0e9380c 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -124,12 +124,6 @@ static struct musb_hdrc_platform_data musb_plat = {
/* .clock is set dynamically */
.set_clock  = musb_set_clock,
.config = musb_config,
-
-   /* REVISIT charge pump on TWL4030 can supply up to
-* 100 mA ... but this value is board-specific, like
-* mode, and should be passed to usb_musb_init().
-*/
-   .power  = 50,   /* up to 100 mA */


   That should obviously be a part of patch 1/8...

WBR, Sergei
--
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


Scalling_setspeed doesn't work

2009-11-17 Thread tarek attia
When I try to change the value of (scalling_setspeed) file ,it doesn't
change however it doesn't rise errors as well,,but after changing it
and trying to rereading it ,I found that nothing is changed
!!!?


BTW:-I'm using Linux kernel(2.6.29) on the beagleboard with the power
management branch



Any help will be appreciated .

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


Re: [PATCH 7/10] omap mailbox: expose omap_mbox_enable()/disable_irq()

2009-11-17 Thread Tony Lindgren
* C.A, Subramaniam subramaniam...@ti.com [091117 05:06]:
  -Original Message-
  From: Tony Lindgren [mailto:t...@atomide.com] 
  Sent: Saturday, November 14, 2009 6:10 AM
  To: C.A, Subramaniam
  Cc: linux-omap@vger.kernel.org; Gupta, Ramesh; Kanigeri, 
  Hari; Hiroshi DOYU
  Subject: Re: [PATCH 7/10] omap mailbox: expose 
  omap_mbox_enable()/disable_irq()
  
  * C.A, Subramaniam subramaniam...@ti.com [091113 04:32]:
   From 177e2efb7384c03ac445b55e2e4ccf44e2160051 Mon Sep 17 
  00:00:00 2001
   From: C A Subramaniam subramaniam...@ti.com
   Date: Fri, 13 Nov 2009 15:04:57 +0530
   Subject: [PATCH 7/10] omap mailbox: expose 
   omap_mbox_enable()/disable_irq()
   
   Signed-off-by: Hiroshi DOYU hiroshi.d...@nokia.com
  
  Is this missing a Signed-off-by: C A Subramaniam 
  subramaniam...@ti.com, or should this be From: Hiroshi DOYU 
  hiroshi.d...@nokia.com?
  
 Hi Tony,
 The patch is given by Hiroshi. Since it was sent as part of the OMAP4
 Mailbox patch series the From has C A Subramaniam subramaniam...@ti.com

OK, I'll change the From: field to be from Hiroshi then.

Regards,

Tony 
 
  Regards,
  
  Tony
  
   ---
arch/arm/plat-omap/include/plat/mailbox.h |   12 
arch/arm/plat-omap/mailbox.c  |   12 ++--
2 files changed, 14 insertions(+), 10 deletions(-)
   
   diff --git a/arch/arm/plat-omap/include/plat/mailbox.h 
   b/arch/arm/plat-omap/include/plat/mailbox.h
   index 8260a3f..bf06953 100644
   --- a/arch/arm/plat-omap/include/plat/mailbox.h
   +++ b/arch/arm/plat-omap/include/plat/mailbox.h
   @@ -92,4 +92,16 @@ static inline void 
  omap_mbox_restore_ctx(struct omap_mbox *mbox)
 mbox-ops-restore_ctx(mbox);
}

   +static inline void omap_mbox_enable_irq(struct omap_mbox *mbox,
   + omap_mbox_irq_t irq)
   +{
   + mbox-ops-enable_irq(mbox, irq);
   +}
   +
   +static inline void omap_mbox_disable_irq(struct omap_mbox *mbox,
   +  omap_mbox_irq_t irq)
   +{
   + mbox-ops-disable_irq(mbox, irq);
   +}
   +
#endif /* MAILBOX_H */
   diff --git a/arch/arm/plat-omap/mailbox.c 
   b/arch/arm/plat-omap/mailbox.c index eb76df2..d5377a3 100644
   --- a/arch/arm/plat-omap/mailbox.c
   +++ b/arch/arm/plat-omap/mailbox.c
   @@ -50,14 +50,6 @@ static inline int mbox_fifo_full(struct 
  omap_mbox 
   *mbox)  }

/* Mailbox IRQ handle functions */
   -static inline void enable_mbox_irq(struct omap_mbox *mbox, 
   omap_mbox_irq_t irq) -{
   - mbox-ops-enable_irq(mbox, irq);
   -}
   -static inline void disable_mbox_irq(struct omap_mbox *mbox, 
   omap_mbox_irq_t irq) -{
   - mbox-ops-disable_irq(mbox, irq);
   -}
static inline void ack_mbox_irq(struct omap_mbox *mbox, 
   omap_mbox_irq_t irq)  {
 if (mbox-ops-ack_irq)
   @@ -144,7 +136,7 @@ static void mbox_tx_work(struct 
  work_struct *work)

 ret = __mbox_msg_send(mbox, tx_data-msg);
 if (ret) {
   - enable_mbox_irq(mbox, IRQ_TX);
   + omap_mbox_enable_irq(mbox, IRQ_TX);
 spin_lock(q-queue_lock);
 blk_requeue_request(q, rq);
 spin_unlock(q-queue_lock);
   @@ -196,7 +188,7 @@ static void mbox_rxq_fn(struct request_queue *q)

static void __mbox_tx_interrupt(struct omap_mbox *mbox)  {
   - disable_mbox_irq(mbox, IRQ_TX);
   + omap_mbox_disable_irq(mbox, IRQ_TX);
 ack_mbox_irq(mbox, IRQ_TX);
 schedule_work(mbox-txq-work);
}
   --
   1.5.3.2
  
  
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Tony Lindgren
* Vikram Pandita vikram.pand...@ti.com [091116 15:00]:
 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

This should go to linux-ser...@vger.kernel.org and Alan Cox.

Regards,

Tony
 
 Signed-off-by: Vikram Pandita vikram.pand...@ti.com
 Cc: Shilimkar, Santosh santosh.shilim...@ti.com
 ---
  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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] omap: serial: fix non-empty rx uart fifo abort

2009-11-17 Thread Tony Lindgren
* Vikram Pandita vikram.pand...@ti.com [091116 15:00]:
 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

This too as it depends on the 1/2 patch.

Tony
 
 Signed-off-by: Vikram Pandita vikram.pand...@ti.com
 ---
  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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP3: PM: Force write last pad config register into save area

2009-11-17 Thread Nishanth Menon

Tero Kristo had written, on 11/17/2009 10:34 AM, the following:

From: Tero Kristo tero.kri...@nokia.com

Due to OMAP3 errata XYZ, the save of the last pad register (ETK_D14 and
ETK_D15) can fail sometimes when there is simultaneous OCP access to the
SCM register area. Fixed by writing the last register to the save area.

Also, optimized the delay loop for the HW save to include an udelay(1),
which limits the number of unnecessary HW accesses to SCM register area
during the save.

Nitpicky minor comment: Should we split this out?

Also, this replaces the patch discussed under: 
http://marc.info/?t=12547419204r=1w=2




Signed-off-by: Tero Kristo tero.kri...@nokia.com

Acked-by: Nishanth Menon n...@ti.com


---
 arch/arm/mach-omap2/pm34xx.c |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 4b01303..4ead40e 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -155,7 +155,15 @@ static void omap3_core_save_context(void)
/* wait for the save to complete */
while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS)
 PADCONF_SAVE_DONE))
-   ;
+   udelay(1);
+
+   /*
+* Force write last pad into memory, as this can fail in some
+* cases according to errata XYZ
+*/
+   omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14),
+   OMAP343X_CONTROL_MEM_WKUP + 0x2a0);
+
/* Save the Interrupt controller context */
omap_intc_save_context();
/* Save the GPMC context */



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


RE: [PATCH] OMAP3: PM: Force write last pad config register into save area

2009-11-17 Thread Gadiyar, Anand
Tero Kristo wrote:
 From: Tero Kristo tero.kri...@nokia.com
 
 Due to OMAP3 errata XYZ, the save of the last pad register (ETK_D14 and

XYZ is 1.157

 ETK_D15) can fail sometimes when there is simultaneous OCP access to the
 SCM register area. Fixed by writing the last register to the save area.
 
 Also, optimized the delay loop for the HW save to include an udelay(1),
 which limits the number of unnecessary HW accesses to SCM register area
 during the save.
 
 Signed-off-by: Tero Kristo tero.kri...@nokia.com
 ---
  arch/arm/mach-omap2/pm34xx.c |   10 +-
  1 files changed, 9 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
 index 4b01303..4ead40e 100644
 --- a/arch/arm/mach-omap2/pm34xx.c
 +++ b/arch/arm/mach-omap2/pm34xx.c
 @@ -155,7 +155,15 @@ static void omap3_core_save_context(void)
 /* wait for the save to complete */
 while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS)
  PADCONF_SAVE_DONE))
 -   ;
 +   udelay(1);
 +
 +   /*
 +* Force write last pad into memory, as this can fail in some
 +* cases according to errata XYZ

And here too.

 +*/
 +   omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14),
 +   OMAP343X_CONTROL_MEM_WKUP + 0x2a0);
 +
 /* Save the Interrupt controller context */
 omap_intc_save_context();
 /* Save the GPMC context */
 --
 1.5.4.3
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[APPLIED] [PATCH 10/10] omap mailbox: OMAP4 Mailbox-driver Patch to support tasklet implementation

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

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 02a9bc601402df9544f35820fbef72c1b096344c

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

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


--
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 (for-next)] ASoC: Add support for IGEP v2

2009-11-17 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com


Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/mach-omap2/Kconfig |2 +-
 sound/soc/omap/Kconfig  |7 ++
 sound/soc/omap/Makefile |2 +
 sound/soc/omap/igep0020.c   |  148 +++
 4 files changed, 158 insertions(+), 1 deletions(-)
 create mode 100644 sound/soc/omap/igep0020.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 68866f3..6922198 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -114,7 +114,7 @@ config MACH_OMAP_3630SDP
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
 config MACH_IGEP0020
-   bool IGEP0020
+   bool IGEP v2 board
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
 config MACH_OMAP_4430SDP
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 653a362..5cc8a63 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -99,3 +99,10 @@ config SND_OMAP_SOC_ZOOM2
help
  Say Y if you want to add support for Soc audio on Zoom2 board.
 
+config SND_OMAP_SOC_IGEP0020
+   tristate SoC Audio support for IGEP v2
+   depends on TWL4030_CORE  SND_OMAP_SOC  MACH_IGEP0020
+   select SND_OMAP_SOC_MCBSP
+   select SND_SOC_TWL4030
+   help
+ Say Y if you want to add support for Soc audio on IGEP v2 board.
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 02d6947..d4ed23a 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -16,6 +16,7 @@ snd-soc-sdp3430-objs := sdp3430.o
 snd-soc-omap3pandora-objs := omap3pandora.o
 snd-soc-omap3beagle-objs := omap3beagle.o
 snd-soc-zoom2-objs := zoom2.o
+snd-soc-igep0020-objs := igep0020.o
 
 obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
 obj-$(CONFIG_SND_OMAP_SOC_AMS_DELTA) += snd-soc-ams-delta.o
@@ -27,3 +28,4 @@ obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
 obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
 obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
+obj-$(CONFIG_SND_OMAP_SOC_IGEP0020) += snd-soc-igep0020.o
diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c
new file mode 100644
index 000..3583c42
--- /dev/null
+++ b/sound/soc/omap/igep0020.c
@@ -0,0 +1,148 @@
+/*
+ * igep0020.c  --  SoC audio for IGEP v2
+ *
+ * Based on sound/soc/omap/overo.c by Steve Sakoman
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include linux/clk.h
+#include linux/platform_device.h
+#include sound/core.h
+#include sound/pcm.h
+#include sound/soc.h
+#include sound/soc-dapm.h
+
+#include asm/mach-types.h
+#include mach/hardware.h
+#include mach/gpio.h
+#include plat/mcbsp.h
+
+#include omap-mcbsp.h
+#include omap-pcm.h
+#include ../codecs/twl4030.h
+
+static int igep2_hw_params(struct snd_pcm_substream *substream,
+   struct snd_pcm_hw_params *params)
+{
+   struct snd_soc_pcm_runtime *rtd = substream-private_data;
+   struct snd_soc_dai *codec_dai = rtd-dai-codec_dai;
+   struct snd_soc_dai *cpu_dai = rtd-dai-cpu_dai;
+   int ret;
+
+   /* Set codec DAI configuration */
+   ret = snd_soc_dai_set_fmt(codec_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   if (ret  0) {
+   printk(KERN_ERR can't set codec DAI configuration\n);
+   return ret;
+   }
+
+   /* Set cpu DAI configuration */
+   ret = snd_soc_dai_set_fmt(cpu_dai,
+ SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM);
+   if (ret  0) {
+   printk(KERN_ERR can't set cpu DAI configuration\n);
+   return ret;
+   }
+
+   /* Set the codec system clock for DAC and ADC */
+   ret = snd_soc_dai_set_sysclk(codec_dai, 0, 2600,
+   SND_SOC_CLOCK_IN);
+   if (ret  0) {
+   printk(KERN_ERR can't set codec system clock\n);
+   return ret;
+   }
+
+   return 0;
+}
+
+static struct snd_soc_ops igep2_ops = {
+   .hw_params = igep2_hw_params,
+};
+
+/* Digital audio interface 

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

2009-11-17 Thread Tony Lindgren
* C.A, Subramaniam subramaniam...@ti.com [091117 06:50]:
 Hi Tony,
 Following is the version 2 of Patch 8/10 (removing all #fidefs)

Thanks, I have now them all in the for-next branch.
 
 +/* OMAP4 specific data structure. Use the cpu_is_omap4xxx()
 +to use this*/

I've updated the patch to have this comment is on one line now.

Regards,

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


[APPLIED] [PATCH v2] rx51: add wl1251 wlan driver support

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

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 342dd6ea3d2067e84c0fdee5e07e264ce40827e0

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

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


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


Re: [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors

2009-11-17 Thread Paul Walmsley
Hi Russell,

On Mon, 16 Nov 2009, Russell King - ARM Linux wrote:

 On Mon, Nov 16, 2009 at 06:36:55AM -0700, Paul Walmsley wrote:
  Fix loop bailout off-by-one bugs reported by Juha Leppänen
  juha_motorsport...@luukku.com.
 
 I'm not sure the new code is any easier to read than the old code.
 And what with some checks post-loop being = and others being , it's
 a recipe for cut'n'paste errors happening.

...

 How about:
 
   for (c = 0; c = MAX_MODULE_RESET_WAIT; c++) {
   if (omap_hwmod_readl(oh, oh-sysconfig-syss_offs) 
   SYSS_RESETDONE_MASK) {
   pr_debug(omap_hwmod: %s: reset in %d usec\n,
   oh-name, c);
   return 0;
   }
   }
 
   WARN(1, omap_hwmod: %s: failed to reset in %d usec\n,
  oh-name, c - 1);
   return -ETIMEDOUT;
 
 ?
 
 Even better would be to turn this into a helper much like wait_event(),
 which would stop silly mistakes happening.

Agreed.  How about this?  

arch/arm/plat-omap/include/plat/common.h probably isn't the right place 
for it, since it's not OMAP-specific...


- Paul


From 972b3bbf2c210086b862aedb35587484bcefe998 Mon Sep 17 00:00:00 2001
From: Paul Walmsley p...@pwsan.com
Date: Mon, 16 Nov 2009 06:13:15 -0700
Subject: [PATCH] OMAP clock/hwmod: fix off-by-one errors
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix loop bailout off-by-one bugs reported by Juha Leppänen
juha_motorsport...@luukku.com.

This second version incorporates comments from Russell King
rmk+ker...@arm.linux.org.uk.  A new macro, 'omap_test_timeout', has
been created, with cleaner code, and existing code has been converted
to use it.

Signed-off-by: Paul Walmsley p...@pwsan.com
Cc: Juha Leppänen juha_motorsport...@luukku.com
Cc: Russell King rmk+ker...@arm.linux.org.uk
---
 arch/arm/mach-omap2/cm.c |7 ---
 arch/arm/mach-omap2/omap_hwmod.c |   13 +
 arch/arm/mach-omap2/prcm.c   |5 ++---
 arch/arm/plat-omap/include/plat/common.h |   20 
 4 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 8eb2dab..58e4a1c 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -21,6 +21,8 @@
 
 #include asm/atomic.h
 
+#include plat/common.h
+
 #include cm.h
 #include cm-regbits-24xx.h
 #include cm-regbits-34xx.h
@@ -61,9 +63,8 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 
idlest_shift)
mask = 1  idlest_shift;
 
/* XXX should be OMAP2 CM */
-   while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg)  mask) != ena) 
-  (i++  MAX_MODULE_READY_TIME))
-   udelay(1);
+   omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg)  mask) == 
ena),
+ MAX_MODULE_READY_TIME, i);
 
return (i  MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
 }
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 633b216..7aaf5f1 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -45,6 +45,7 @@
 #include linux/mutex.h
 #include linux/bootmem.h
 
+#include plat/common.h
 #include plat/cpu.h
 #include plat/clockdomain.h
 #include plat/powerdomain.h
@@ -736,7 +737,7 @@ static int _wait_target_ready(struct omap_hwmod *oh)
 static int _reset(struct omap_hwmod *oh)
 {
u32 r, v;
-   int c;
+   int c = 0;
 
if (!oh-sysconfig ||
!(oh-sysconfig-sysc_flags  SYSC_HAS_SOFTRESET) ||
@@ -758,13 +759,9 @@ static int _reset(struct omap_hwmod *oh)
return r;
_write_sysconfig(v, oh);
 
-   c = 0;
-   while (c  MAX_MODULE_RESET_WAIT 
-  !(omap_hwmod_readl(oh, oh-sysconfig-syss_offs) 
-SYSS_RESETDONE_MASK)) {
-   udelay(1);
-   c++;
-   }
+   omap_test_timeout((omap_hwmod_readl(oh, oh-sysconfig-syss_offs) 
+  SYSS_RESETDONE_MASK),
+ MAX_MODULE_RESET_WAIT, c);
 
if (c == MAX_MODULE_RESET_WAIT)
WARN(1, omap_hwmod: %s: failed to reset in %d usec\n,
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 029d376..7acd03d 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -247,9 +247,8 @@ int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const 
char *name)
BUG();
 
/* Wait for lock */
-   while (((__raw_readl(reg)  mask) != ena) 
-  (i++  MAX_MODULE_ENABLE_WAIT))
-   udelay(1);
+   omap_test_timeout(((__raw_readl(reg)  mask) == ena),
+ MAX_MODULE_ENABLE_WAIT, i);
 
if (i  MAX_MODULE_ENABLE_WAIT)
pr_debug(cm: Module associated with clock %s ready after %d 
diff --git a/arch/arm/plat-omap/include/plat/common.h 

RE: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Pandita, Vikram
Tony

From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Tony
Lindgren
Sent: Tuesday, November 17, 2009 11:06 AM
To: Pandita, Vikram
Cc: linux-omap@vger.kernel.org; Shilimkar, Santosh
Subject: Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

* Vikram Pandita vikram.pand...@ti.com [091116 15:00]:
 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

This should go to linux-ser...@vger.kernel.org and Alan Cox.

Patches were posted to l-o for review. Next step was to get it to the right 
subsystem.

I thought Alan Cox stepped down from the maintainership of serial/tty subsystem.
Not sure if Andrew Morton is taking these patches to MM tree for now.
Any idea?


Regards,

Tony
snip

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


Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Tony Lindgren
* Pandita, Vikram vikram.pand...@ti.com [091117 09:39]:
 Tony
 
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Tony
 Lindgren
 Sent: Tuesday, November 17, 2009 11:06 AM
 To: Pandita, Vikram
 Cc: linux-omap@vger.kernel.org; Shilimkar, Santosh
 Subject: Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag
 
 * Vikram Pandita vikram.pand...@ti.com [091116 15:00]:
  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
 
 This should go to linux-ser...@vger.kernel.org and Alan Cox.
 
 Patches were posted to l-o for review. Next step was to get it to the right 
 subsystem.
 
 I thought Alan Cox stepped down from the maintainership of serial/tty 
 subsystem.
 Not sure if Andrew Morton is taking these patches to MM tree for now.
 Any idea?

OK, no idea who's dealing with 8250 now :)

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


RE: [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors

2009-11-17 Thread Pandita, Vikram
Paul

-Original Message-
From: linux-omap-ow...@vger.kernel.org 
[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Paul
Walmsley
Sent: Tuesday, November 17, 2009 11:39 AM
To: Russell King - ARM Linux
Cc: linux-arm-ker...@lists.infradead.org; Juha Leppänen; 
linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors
snip

+/**
+ * omap_test_timeout - busy-loop, testing a condition
+ * @cond: condition to test until it evaluates to true
+ * @timeout: maximum number of microseconds in the timeout
+ * @index: loop index (integer)
+ *
+ * Loop waiting for @cond to become true or until at least @timeout
+ * microseconds have passed.  To use, define some integer @index in the
+ * calling code.  After running, if @index == @timeout, then the loop has
+ * timed out.
+ */
+#define omap_test_timeout(cond, timeout, index)   \
+({\
+  for (index = 0; index  timeout; index++) { \
+  if (cond)   \
+  break;  \
+  udelay(1);  \
+  }   \
+})
+

There is a similar kind of function implemented in USB host, that returns 
-ETIMEDOUT
Which makes more sense for failure case.

Maybe such a generic function for all omaps is needed.

Refer:
drivers/usb/host/ehci-hcd.c
static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
  u32 mask, u32 done, int usec)
{
u32 result;

do {
result = ehci_readl(ehci, ptr);
if (result == ~(u32)0)  /* card removed */
return -ENODEV;
result = mask;
if (result == done)
return 0;
udelay (1);
usec--;
} while (usec  0);
return -ETIMEDOUT;
}


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


Re: [PATCH] OMAP3: PM: Force write last pad config register into save area

2009-11-17 Thread Kevin Hilman
Tero Kristo tero.kri...@nokia.com writes:

 From: Tero Kristo tero.kri...@nokia.com

 Due to OMAP3 errata XYZ, the save of the last pad register (ETK_D14 and
 ETK_D15) can fail sometimes when there is simultaneous OCP access to the
 SCM register area. Fixed by writing the last register to the save area.

 Also, optimized the delay loop for the HW save to include an udelay(1),
 which limits the number of unnecessary HW accesses to SCM register area
 during the save.

 Signed-off-by: Tero Kristo tero.kri...@nokia.com

I certainly like this fix much better than the original proposal:

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

Pulling into PM branch after s/XYZ/1.157/

Kevin

 ---
  arch/arm/mach-omap2/pm34xx.c |   10 +-
  1 files changed, 9 insertions(+), 1 deletions(-)

 diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
 index 4b01303..4ead40e 100644
 --- a/arch/arm/mach-omap2/pm34xx.c
 +++ b/arch/arm/mach-omap2/pm34xx.c
 @@ -155,7 +155,15 @@ static void omap3_core_save_context(void)
   /* wait for the save to complete */
   while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS)
PADCONF_SAVE_DONE))
 - ;
 + udelay(1);
 +
 + /*
 +  * Force write last pad into memory, as this can fail in some
 +  * cases according to errata XYZ
 +  */
 + omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14),
 + OMAP343X_CONTROL_MEM_WKUP + 0x2a0);
 +
   /* Save the Interrupt controller context */
   omap_intc_save_context();
   /* Save the GPMC context */
 -- 
 1.5.4.3

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


Re: [alsa-devel] Artifacts present in AIC23 capture for 48 KHz sampling rate

2009-11-17 Thread Troy Kisky
Aggarwal, Anuj wrote:
 -Original Message-
 From: Aggarwal, Anuj
 Sent: Friday, November 06, 2009 6:28 PM
 To: alsa-de...@alsa-project.org; 'linux-omap@vger.kernel.org'
 Subject: Artifacts present in AIC23 capture for 48 KHz sampling rate

 Hi,

 I am observing artifacts (sharp spikes at fixed intervals) while
 capturing audio on AM3517 EVM and AIC23 codec. They are present only
 in one of the channels when I am capturing at 48 KHz. All other
 sampling rates are working fine with the above said combination.

 I have also attached the screenshot taken with the help of Audacity
 utility. Here, I tried recording silence but artifacts were observed
 on one channel.

 Has anyone also observed the similar behavior with AIC23 codec? Any
 hints on what could be the root cause?
 [Aggarwal, Anuj] On further debugging, I found that the function
 find_rate() in sound/soc/codecs/tlv320aic23.c is not returning 
 the correct value for capture in 48KHz sample rate. In USB mode
 (MCLK=12MHz), for 48KHz, it returns 0x7D (CLKOUT=0, CLKIN=1, 
 SR[3:0]=0xF, BOSR=1, Normal=1) whereas as per the AIC23B spec, 

0x7D would be BOSR = 0, USB/NORMAL = 1, SR=0xff, div2 = 1

The bug is with sr_valid_mask,

static const unsigned short sr_valid_mask[] = {
LOWER_GROUP|UPPER_GROUP,/* Normal, bosr - 0*/
LOWER_GROUP|UPPER_GROUP,/* Normal, bosr - 1*/
LOWER_GROUP,/* Usb, bosr - 0*/
UPPER_GROUP,/* Usb, bosr - 1*/
};

should be

static const unsigned short sr_valid_mask[] = {
LOWER_GROUP|UPPER_GROUP,/* Normal, bosr - 0*/
LOWER_GROUP,/* Usb, bosr - 0*/
LOWER_GROUP|UPPER_GROUP,/* Normal, bosr - 1*/
UPPER_GROUP,/* Usb, bosr - 1*/
};


Can you give this a try and let me know?

Thanks
Troy

--
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 santosh.shilim...@ti.com
Signed-off-by: Vikram Pandita vikram.pand...@ti.com
---
 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-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 vikram.pand...@ti.com
---
 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


Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Alan Cox
On Tue, 17 Nov 2009 15:16:55 -0600
Vikram Pandita vikram.pand...@ti.com wrote:

 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.

Nothing wrong with the requirement but I think it would keep 8250.c a lot
cleaner if you implemented that in the serial_in method for the
OMAP3630/4430. It would also mean anyone adding a UART_RX or any cases
you miss don't break in future

This is especially true now as you can pass a private
serial_in/serial_out method in the port register function.

Care to submit an alternate patch doing it that way, or see any reason
for not ?

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


RE: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

2009-11-17 Thread Pandita, Vikram


-Original Message-
From: Alan Cox [mailto:a...@lxorguk.ukuu.org.uk]
Sent: Tuesday, November 17, 2009 3:26 PM
To: Pandita, Vikram
Cc: linux-ser...@vger.kernel.org; a...@linux-foundation.org; 
linux-omap@vger.kernel.org; Pandita,
Vikram; Shilimkar, Santosh
Subject: Re: [PATCH 1/2] serial: 8250: add UPF_NO_EMPTY_FIFO_READ flag

On Tue, 17 Nov 2009 15:16:55 -0600
Vikram Pandita vikram.pand...@ti.com wrote:

 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.

Nothing wrong with the requirement but I think it would keep 8250.c a lot
cleaner if you implemented that in the serial_in method for the
OMAP3630/4430. It would also mean anyone adding a UART_RX or any cases
you miss don't break in future

Agree. Was contemplating this change in beginning, but lost that train of 
thought.
Thx for your review time.


This is especially true now as you can pass a private
serial_in/serial_out method in the port register function.

Our requirement is to over-right the serial_in for now.
Is it fine to just add serial_in over-load or do you suggest both in/out?


Care to submit an alternate patch doing it that way, or see any reason
for not ?

Working on it right away. See my patch in an hours time.


Alan

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


Re: Is the OMAP patch process badly flawed?

2009-11-17 Thread Sid Boyce
On 17/11/09 14:51, Gadiyar, Anand wrote:
 Sid Boyce wrote:
 
 snip
 

 I would expect patches sent upstream would result in all the basics for
 long established platforms to be fully covered. Appreciating that
 development is quite fast paced with mods and supporting new platforms.
 Could someone please enlighten me?

 Sid,

 Speaking purely for EHCI, this is now queued up in Greg's USB queue
 for upstream and will get merged in the next cycle.

 Until then, the linux-omap code does have working EHCI support
 on beagle, evm and the other boards. If you're cloning from
 gitorious, you're probably picking the wrong tree.

 - Anand



 Thanks, that explains a lot as I can't remember seeing those patches on
 the linux-usb list for submission upstream.
 What tree is best to clone?
 
 
 Not sure which is best - I suppose that depends on what all you need.
 The canonical linux-omap tree maintained by Tony is at [1].
 
 For EHCI, Felipe sent the driver to Greg who queued it up for .33 [2].
 Tony lined up the board files and mach-omap2/usb-ehci.c in the for-next
 branch.
 
 
 
 [1] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
 [2] 
 http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-07-usb-2.6.32-rc6.patch
  
 

Thanks for the update and the patch. I downloaded the launchpad 2.6.31
kernel which I have currently running. Finally found one that outputs to
the LCD.
Regards
Sid.

-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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


Re: Is the OMAP patch process badly flawed?

2009-11-17 Thread Felipe Contreras
On Tue, Nov 17, 2009 at 3:30 PM, Sid Boyce sbo...@blueyonder.co.uk wrote:
 I'm curious - I download, build and test kernels on x86 and x86_64
 platforms, -rc, -rc-git and -git all build and run.

[...]

 I would expect patches sent upstream would result in all the basics for
 long established platforms to be fully covered. Appreciating that
 development is quite fast paced with mods and supporting new platforms.
 Could someone please enlighten me?

Previously all the linux-omap work had to be queued through the
linux-arm tree, that made it a bit difficult to push things to the
mainline, but now Tony is sending the pull requests directly to Linus,
so maybe kernels post 2.6.32 will be much better.

However, the only way to make sure that there's good OMAP support in
Linux is for the community to actively test the mainline and make sure
the patches are properly pushed and queued, and regressions are found
quickly, not only on the linux-omap tree, but linux-usb, fbdev, etc.
Unfortunately we haven't done such a great job on that, perhaps
because many people use old stable aka frozen kernels, but things
are improving.

Cheers.

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


[APPLIED] [PATCH 1/3] OMAP3 clock: Fix the DPLL freqsel computations

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

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): 8c3b128f6b50f9b8a6b015afeead77fd6de366a6

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

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


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


[APPLIED] [PATCH 2/3] OMAP3: Clock: Fixed dpll3_m2x2 rate calculation

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

Branch in linux-omap: omap-fixes

Initial commit ID (Likely to change): 2dcbc9ebbe46c92e748e6180133d10cce69acb4d

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

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


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


Re: [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors

2009-11-17 Thread Tony Lindgren
* Pandita, Vikram vikram.pand...@ti.com [091117 09:50]:
 Paul
 
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Paul
 Walmsley
 Sent: Tuesday, November 17, 2009 11:39 AM
 To: Russell King - ARM Linux
 Cc: linux-arm-ker...@lists.infradead.org; Juha Leppänen; 
 linux-omap@vger.kernel.org
 Subject: Re: [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors
 snip
 
 +/**
 + * omap_test_timeout - busy-loop, testing a condition
 + * @cond: condition to test until it evaluates to true
 + * @timeout: maximum number of microseconds in the timeout
 + * @index: loop index (integer)
 + *
 + * Loop waiting for @cond to become true or until at least @timeout
 + * microseconds have passed.  To use, define some integer @index in the
 + * calling code.  After running, if @index == @timeout, then the loop has
 + * timed out.
 + */
 +#define omap_test_timeout(cond, timeout, index) \
 +({  \
 +for (index = 0; index  timeout; index++) { \
 +if (cond)   \
 +break;  \
 +udelay(1);  \
 +}   \
 +})
 +
 
 There is a similar kind of function implemented in USB host, that returns 
 -ETIMEDOUT
 Which makes more sense for failure case.
 
 Maybe such a generic function for all omaps is needed.
 
 Refer:
 drivers/usb/host/ehci-hcd.c
 static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
   u32 mask, u32 done, int usec)
 {
 u32 result;
 
 do {
 result = ehci_readl(ehci, ptr);
 if (result == ~(u32)0)  /* card removed */
 return -ENODEV;
 result = mask;
 if (result == done)
 return 0;
 udelay (1);
 usec--;
 } while (usec  0);
 return -ETIMEDOUT;
 }
 
 
  #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */

Well we need to stick to minimal changes if we plan to send this in as a fix.
Anything more complex we should do the next merge window.

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


[PATCH 00/12] New omap boards and rx51/n900 updates for 2.6.33

2009-11-17 Thread Tony Lindgren
Hi all,

Here are some omap patches for review for the 2.6.33 merge window.

This series mostly adds support for new boards, and updates the
rx51/n900 devices.

Regards,

Tony

---

Cory Maccarrone (2):
  omap1: Add board support and LCD for HTC Herald
  omap1: Add default kernel configuration for Herald

Enric Balletbo i Serra (2):
  omap3: Add minimal IGEP v2 support
  omap3: Add defconfig for IGEP v2 board

Kalle Valo (1):
  omap3: rx51: Add wl1251 wlan driver support

Mike Rapoport (2):
  omap3: Add CompuLab CM-T35 board support
  omap3: Add CompuLab CM-T35 defconfig

Ranjith Lohithakshan (2):
  AM35xx: Add support for AM3517 EVM board
  AM35xx: Defconfig for AM3517 EVM board

Tero Kristo (1):
  omap3: rx51: Add SDRAM init

vikram pandita (2):
  omap: 3630sdp: introduce 3630 sdp board support
  omap: 3630sdp: defconfig creation


 arch/arm/configs/am3517_evm_defconfig| 1207 ++
 arch/arm/configs/cm_t35_defconfig| 1733 ++
 arch/arm/configs/htcherald_defconfig | 1142 +
 arch/arm/configs/igep0020_defconfig  | 1554 +++
 arch/arm/configs/omap_3630sdp_defconfig  | 1611 
 arch/arm/mach-omap1/Kconfig  |6 
 arch/arm/mach-omap1/Makefile |1 
 arch/arm/mach-omap1/board-htcherald.c|  247 
 arch/arm/mach-omap2/Kconfig  |   16 
 arch/arm/mach-omap2/Makefile |   10 
 arch/arm/mach-omap2/board-3630sdp.c  |  101 ++
 arch/arm/mach-omap2/board-am3517evm.c|   86 +
 arch/arm/mach-omap2/board-cm-t35.c   |  507 
 arch/arm/mach-omap2/board-igep0020.c |  251 
 arch/arm/mach-omap2/board-rx51-peripherals.c |   85 +
 arch/arm/mach-omap2/board-rx51-sdram.c   |  221 +++
 arch/arm/mach-omap2/board-rx51.c |7 
 drivers/video/omap/Makefile  |1 
 drivers/video/omap/lcd_htcherald.c   |  130 ++
 19 files changed, 8915 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/configs/am3517_evm_defconfig
 create mode 100644 arch/arm/configs/cm_t35_defconfig
 create mode 100644 arch/arm/configs/htcherald_defconfig
 create mode 100644 arch/arm/configs/igep0020_defconfig
 create mode 100644 arch/arm/configs/omap_3630sdp_defconfig
 create mode 100644 arch/arm/mach-omap1/board-htcherald.c
 create mode 100755 arch/arm/mach-omap2/board-3630sdp.c
 create mode 100644 arch/arm/mach-omap2/board-am3517evm.c
 create mode 100644 arch/arm/mach-omap2/board-cm-t35.c
 create mode 100644 arch/arm/mach-omap2/board-igep0020.c
 create mode 100644 arch/arm/mach-omap2/board-rx51-sdram.c
 create mode 100644 drivers/video/omap/lcd_htcherald.c

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


[PATCH 01/12] omap1: Add board support and LCD for HTC Herald

2009-11-17 Thread Tony Lindgren
From: Cory Maccarrone darkstar6...@gmail.com

This patch introduces support for the HTC Herald (T-Mobile
Wing, etc.) series of smart phones -- board support and LCD
panel settings.

Signed-off-by: Cory Maccarrone darkstar6...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/Kconfig   |6 +
 arch/arm/mach-omap1/Makefile  |1 
 arch/arm/mach-omap1/board-htcherald.c |  247 +
 drivers/video/omap/Makefile   |1 
 drivers/video/omap/lcd_htcherald.c|  130 +
 5 files changed, 385 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap1/board-htcherald.c
 create mode 100644 drivers/video/omap/lcd_htcherald.c

diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 3232726..27f4897 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -57,6 +57,12 @@ config MACH_OMAP_HTCWIZARD
help
  HTC Wizard smartphone support (AKA QTEK 9100, ...)
 
+config MACH_HERALD
+   bool HTC Herald
+   depends on ARCH_OMAP850
+   help
+ HTC Herald smartphone support (AKA T-Mobile Wing, ...)
+
 config MACH_OMAP_OSK
bool TI OSK Support
depends on ARCH_OMAP1  ARCH_OMAP16XX
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 6867cd3..87e539a 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_MACH_OMAP_PALMTT)+= 
board-palmtt.o
 obj-$(CONFIG_MACH_NOKIA770)+= board-nokia770.o
 obj-$(CONFIG_MACH_AMS_DELTA)   += board-ams-delta.o
 obj-$(CONFIG_MACH_SX1) += board-sx1.o board-sx1-mmc.o
+obj-$(CONFIG_MACH_HERALD)  += board-htcherald.o
 
 ifeq ($(CONFIG_ARCH_OMAP15XX),y)
 # Innovator-1510 FPGA
diff --git a/arch/arm/mach-omap1/board-htcherald.c 
b/arch/arm/mach-omap1/board-htcherald.c
new file mode 100644
index 000..5f28a5c
--- /dev/null
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -0,0 +1,247 @@
+/*
+ * HTC Herald board configuration
+ * Copyright (C) 2009 Cory Maccarrone darkstar6...@gmail.com
+ * Copyright (C) 2009 Wing Linux
+ *
+ * Based on the board-htcwizard.c file from the linwizard project:
+ * Copyright (C) 2006 Unai Uribarri
+ * Copyright (C) 2008 linwizard.sourceforge.net
+ *
+ * This  program is  free  software; you  can  redistribute it  and/or
+ * modify  it under the  terms of  the GNU  General Public  License as
+ * published by the Free Software  Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
+ * MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
+ * General Public License for more details.
+ *
+ * You should have  received a copy of the  GNU General Public License
+ * along  with  this program;  if  not,  write  to the  Free  Software
+ * Foundation,  Inc.,  51 Franklin  Street,  Fifth  Floor, Boston,  MA
+ * 02110-1301, USA.
+ *
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/bootmem.h
+#include linux/io.h
+#include linux/gpio.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/omap7xx.h
+#include plat/common.h
+#include plat/board.h
+#include plat/keypad.h
+
+#include mach/irqs.h
+
+#include linux/delay.h
+
+/* LCD register definition */
+#define   OMAP_LCDC_CONTROL   (0xfffec000 + 0x00)
+#define   OMAP_LCDC_STATUS(0xfffec000 + 0x10)
+#define   OMAP_DMA_LCD_CCR(0xfffee300 + 0xc2)
+#define   OMAP_DMA_LCD_CTRL   (0xfffee300 + 0xc4)
+#define   OMAP_LCDC_CTRL_LCD_EN   (1  0)
+#define   OMAP_LCDC_STAT_DONE (1  0)
+
+static struct omap_lcd_config htcherald_lcd_config __initdata = {
+   .ctrl_name  = internal,
+};
+
+static struct omap_board_config_kernel htcherald_config[] __initdata = {
+   { OMAP_TAG_LCD, htcherald_lcd_config },
+};
+
+/* Keyboard definition */
+
+static int htc_herald_keymap[] = {
+   KEY(0, 0, KEY_RECORD), /* Mail button */
+   KEY(0, 1, KEY_CAMERA), /* Camera */
+   KEY(0, 2, KEY_PHONE), /* Send key */
+   KEY(0, 3, KEY_VOLUMEUP), /* Volume up */
+   KEY(0, 4, KEY_F2),  /* Right bar (landscape) */
+   KEY(0, 5, KEY_MAIL), /* Win key (portrait) */
+   KEY(0, 6, KEY_DIRECTORY), /* Right bar (protrait) */
+   KEY(1, 0, KEY_LEFTCTRL), /* Windows key */
+   KEY(1, 1, KEY_COMMA),
+   KEY(1, 2, KEY_M),
+   KEY(1, 3, KEY_K),
+   KEY(1, 4, KEY_SLASH), /* OK key */
+   KEY(1, 5, KEY_I),
+   KEY(1, 6, KEY_U),
+   KEY(2, 0, KEY_LEFTALT),
+   KEY(2, 1, KEY_TAB),
+   KEY(2, 2, KEY_N),
+   KEY(2, 3, KEY_J),
+   KEY(2, 4, KEY_ENTER),
+   KEY(2, 5, KEY_H),
+   

[PATCH 02/12] omap1: Add default kernel configuration for Herald

2009-11-17 Thread Tony Lindgren
From: Cory Maccarrone darkstar6...@gmail.com

This adds a new defconfig for the HTC Herald series of devices.

Signed-off-by: Cory Maccarrone darkstar6...@gmail.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/htcherald_defconfig | 1142 ++
 1 files changed, 1142 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/htcherald_defconfig

diff --git a/arch/arm/configs/htcherald_defconfig 
b/arch/arm/configs/htcherald_defconfig
new file mode 100644
index 000..3382676
--- /dev/null
+++ b/arch/arm/configs/htcherald_defconfig
@@ -0,0 +1,1142 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc6
+# Sat Nov 14 10:56:01 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_LOCK_KERNEL=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 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 is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+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 is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=cfq
+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
+# 

[PATCH 03/12] omap3: rx51: Add SDRAM init

2009-11-17 Thread Tony Lindgren
From: Tero Kristo tero.kri...@nokia.com

This patch adds board specific SDRAM init for RX51. This patch is a
collaboration of work from following people:

Juha Yrjola: Original code
Lauri Leukkunen: Port to RX51
Tero Kristo: Support for multiple OPP:s, merge of patches
Samu Onkalo: Fixed SDRAM parameters according to specs
Kalle Jokiniemi: A fix for rounding error

Signed-off-by: Tero Kristo tero.kri...@nokia.com
Cc: Samu Onkalo samu.p.onk...@nokia.com
Cc: Kalle Jokiniemi kalle.jokini...@digia.com
Cc: Lauri Leukkunen lauri.leukku...@nokia.com
Cc: Juha Yrjola juha.yrj...@solidboot.com
Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Makefile   |1 
 arch/arm/mach-omap2/board-rx51-sdram.c |  221 
 arch/arm/mach-omap2/board-rx51.c   |7 +
 3 files changed, 228 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-rx51-sdram.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f40619e..d56fb2b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)   += 
board-3430sdp.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)  += board-n8x0.o
 obj-$(CONFIG_MACH_NOKIA_RX51)  += board-rx51.o \
+  board-rx51-sdram.o \
   board-rx51-peripherals.o \
   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)  += board-zoom2.o \
diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c 
b/arch/arm/mach-omap2/board-rx51-sdram.c
new file mode 100644
index 000..f392844
--- /dev/null
+++ b/arch/arm/mach-omap2/board-rx51-sdram.c
@@ -0,0 +1,221 @@
+/*
+ * SDRC register values for RX51
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ *
+ * Lauri Leukkunen lauri.leukku...@nokia.com
+ *
+ * Original code by Juha Yrjola juha.yrj...@solidboot.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/clk.h
+#include linux/err.h
+#include linux/io.h
+
+#include plat/io.h
+#include plat/common.h
+#include plat/clock.h
+#include plat/sdrc.h
+
+
+/* In picoseconds, except for tREF (ns), tXP, tCKE, tWTR (clks) */
+struct sdram_timings {
+   u32 casl;
+   u32 tDAL;
+   u32 tDPL;
+   u32 tRRD;
+   u32 tRCD;
+   u32 tRP;
+   u32 tRAS;
+   u32 tRC;
+   u32 tRFC;
+   u32 tXSR;
+
+   u32 tREF; /* in ns */
+
+   u32 tXP;
+   u32 tCKE;
+   u32 tWTR;
+};
+
+struct omap_sdrc_params rx51_sdrc_params[4];
+
+static const struct sdram_timings rx51_timings[] = {
+   {
+   .casl = 3,
+   .tDAL = 33000,
+   .tDPL = 15000,
+   .tRRD = 12000,
+   .tRCD = 22500,
+   .tRP = 18000,
+   .tRAS = 42000,
+   .tRC = 66000,
+   .tRFC = 138000,
+   .tXSR = 20,
+
+   .tREF = 7800,
+
+   .tXP = 2,
+   .tCKE = 2,
+   .tWTR = 2
+   },
+};
+
+static unsigned long sdrc_get_fclk_period(long rate)
+{
+   /* In picoseconds */
+   return 10 / rate;
+}
+
+static unsigned int sdrc_ps_to_ticks(unsigned int time_ps, long rate)
+{
+   unsigned long tick_ps;
+
+   /* Calculate in picosecs to yield more exact results */
+   tick_ps = sdrc_get_fclk_period(rate);
+
+   return (time_ps + tick_ps - 1) / tick_ps;
+}
+#undef DEBUG
+#ifdef DEBUG
+static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit,
+   int ticks, long rate, const char *name)
+#else
+static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit,
+  int ticks)
+#endif
+{
+   int mask, nr_bits;
+
+   nr_bits = end_bit - st_bit + 1;
+   if (ticks = 1  nr_bits)
+   return -1;
+   mask = (1  nr_bits) - 1;
+   *regval = ~(mask  st_bit);
+   *regval |= ticks  st_bit;
+#ifdef DEBUG
+   printk(KERN_INFO SDRC %s: %i ticks %i ns\n, name, ticks,
+   (unsigned int)sdrc_get_fclk_period(rate) * ticks /
+   1000);
+#endif
+
+   return 0;
+}
+
+#ifdef DEBUG
+#define SDRC_SET_ONE(reg, st, end, field, rate) \
+   if (set_sdrc_timing_regval((reg), (st), (end), \
+   rx51_timings-field, (rate), #field)  0) \
+   err = -1;
+#else
+#define SDRC_SET_ONE(reg, st, end, field, rate) \
+   if (set_sdrc_timing_regval((reg), (st), (end), \
+   rx51_timings-field)  0) \
+   err = -1;
+#endif
+
+#ifdef DEBUG
+static int set_sdrc_timing_regval_ps(u32 

[PATCH 04/12] omap3: rx51: Add wl1251 wlan driver support

2009-11-17 Thread Tony Lindgren
From: Kalle Valo kalle.v...@nokia.com

wl1251 is connected to the SPI bus in rx51, add support for this.

Signed-off-by: Kalle Valo kalle.v...@nokia.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   85 ++
 1 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c 
b/arch/arm/mach-omap2/board-rx51-peripherals.c
index cf4583a..caaeadc 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -14,6 +14,7 @@
 #include linux/input.h
 #include linux/input/matrix_keypad.h
 #include linux/spi/spi.h
+#include linux/spi/wl12xx.h
 #include linux/i2c.h
 #include linux/i2c/twl4030.h
 #include linux/clk.h
@@ -36,6 +37,37 @@
 #define SYSTEM_REV_B_USES_VAUX30x1699
 #define SYSTEM_REV_S_USES_VAUX3 0x8
 
+#define RX51_WL1251_POWER_GPIO 87
+#define RX51_WL1251_IRQ_GPIO   42
+
+static void rx51_wl1251_set_power(bool enable);
+
+static struct wl12xx_platform_data wl1251_pdata = {
+   .set_power = rx51_wl1251_set_power,
+};
+
+static struct omap2_mcspi_device_config wl1251_mcspi_config = {
+   .turbo_mode = 0,
+   .single_channel = 1,
+};
+
+/* list all spi devices here */
+enum {
+   RX51_SPI_WL1251,
+};
+
+static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
+   [RX51_SPI_WL1251] = {
+   .modalias   = wl1251,
+   .bus_num= 4,
+   .chip_select= 0,
+   .max_speed_hz   = 4800,
+   .mode   = SPI_MODE_2,
+   .controller_data= wl1251_mcspi_config,
+   .platform_data  = wl1251_pdata,
+   },
+};
+
 static int board_keymap[] = {
KEY(0, 0, KEY_Q),
KEY(0, 1, KEY_O),
@@ -257,6 +289,55 @@ static struct regulator_init_data rx51_vdac = {
},
 };
 
+static void rx51_wl1251_set_power(bool enable)
+{
+   gpio_set_value(RX51_WL1251_POWER_GPIO, enable);
+}
+
+static void __init rx51_init_wl1251(void)
+{
+   int irq, ret;
+
+   ret = gpio_request(RX51_WL1251_POWER_GPIO, wl1251 power);
+   if (ret  0)
+   goto error;
+
+   ret = gpio_direction_output(RX51_WL1251_POWER_GPIO, 0);
+   if (ret  0)
+   goto err_power;
+
+   ret = gpio_request(RX51_WL1251_IRQ_GPIO, wl1251 irq);
+   if (ret  0)
+   goto err_power;
+
+   ret = gpio_direction_input(RX51_WL1251_IRQ_GPIO);
+   if (ret  0)
+   goto err_irq;
+
+   irq = gpio_to_irq(RX51_WL1251_IRQ_GPIO);
+   if (irq  0)
+   goto err_irq;
+
+   rx51_peripherals_spi_board_info[RX51_SPI_WL1251].irq = irq;
+
+   return;
+
+err_irq:
+   gpio_free(RX51_WL1251_IRQ_GPIO);
+
+err_power:
+   gpio_free(RX51_WL1251_POWER_GPIO);
+
+error:
+   printk(KERN_ERR wl1251 board initialisation failed\n);
+   wl1251_pdata.set_power = NULL;
+
+   /*
+* Now rx51_peripherals_spi_board_info[1].irq is zero and
+* set_power is null, and wl1251_probe() will fail.
+*/
+}
+
 static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
 {
/* FIXME this gpio setup is just a placeholder for now */
@@ -538,6 +619,10 @@ static inline void board_smc91x_init(void)
 
 void __init rx51_peripherals_init(void)
 {
+   rx51_init_wl1251();
+
+   spi_register_board_info(rx51_peripherals_spi_board_info,
+   ARRAY_SIZE(rx51_peripherals_spi_board_info));
rx51_i2c_init();
board_onenand_init();
board_smc91x_init();

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


[PATCH 05/12] omap3: Add CompuLab CM-T35 board support

2009-11-17 Thread Tony Lindgren
From: Mike Rapoport m...@compulab.co.il

This patch adds basic support for CompuLab CM-T35 module.

Signed-off-by: Mike Rapoport m...@compulab.co.il
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Kconfig|4 
 arch/arm/mach-omap2/Makefile   |2 
 arch/arm/mach-omap2/board-cm-t35.c |  507 
 3 files changed, 513 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-cm-t35.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 0d14dde..fa20996 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -101,6 +101,10 @@ 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
+
 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 d56fb2b..1b37f2a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -83,6 +83,8 @@ 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
 
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o
 
diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
b/arch/arm/mach-omap2/board-cm-t35.c
new file mode 100644
index 000..22c4529
--- /dev/null
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -0,0 +1,507 @@
+/*
+ * board-cm-t35.c (CompuLab CM-T35 module)
+ *
+ * Copyright (C) 2009 CompuLab, Ltd.
+ * Author: Mike Rapoport m...@compulab.co.il
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/input/matrix_keypad.h
+#include linux/delay.h
+#include linux/gpio.h
+
+#include linux/i2c/at24.h
+#include linux/i2c/twl4030.h
+#include linux/regulator/machine.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/mux.h
+#include plat/nand.h
+#include plat/gpmc.h
+#include plat/usb.h
+
+#include mach/hardware.h
+
+#include sdram-micron-mt46h32m32lf-6.h
+#include mmc-twl4030.h
+
+#define CM_T35_GPIO_PENDOWN57
+
+#define CM_T35_SMSC911X_CS 5
+#define CM_T35_SMSC911X_GPIO   163
+#define SB_T35_SMSC911X_CS 4
+#define SB_T35_SMSC911X_GPIO   65
+
+#define NAND_BLOCK_SIZESZ_128K
+#define GPMC_CS0_BASE  0x60
+#define GPMC_CS0_BASE_ADDR (OMAP34XX_GPMC_VIRT + GPMC_CS0_BASE)
+
+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
+#include linux/smsc911x.h
+
+static struct smsc911x_platform_config cm_t35_smsc911x_config = {
+   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+   .flags  = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
+   .phy_interface  = PHY_INTERFACE_MODE_MII,
+};
+
+static struct resource cm_t35_smsc911x_resources[] = {
+   {
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = OMAP_GPIO_IRQ(CM_T35_SMSC911X_GPIO),
+   .end= OMAP_GPIO_IRQ(CM_T35_SMSC911X_GPIO),
+   .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
+   },
+};
+
+static struct platform_device cm_t35_smsc911x_device = {
+   .name   = smsc911x,
+   .id = 0,
+   .num_resources  = ARRAY_SIZE(cm_t35_smsc911x_resources),
+   .resource   = cm_t35_smsc911x_resources,
+   .dev= {
+   .platform_data = cm_t35_smsc911x_config,
+   },
+};
+
+static struct resource sb_t35_smsc911x_resources[] = {
+   {
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO),
+   .end= OMAP_GPIO_IRQ(SB_T35_SMSC911X_GPIO),
+   .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
+   },
+};
+
+static struct 

[PATCH 06/12] omap3: Add CompuLab CM-T35 defconfig

2009-11-17 Thread Tony Lindgren
From: Mike Rapoport m...@compulab.co.il

Add CompuLab CM-T35 defconfig

Signed-off-by: Mike Rapoport m...@compulab.co.il
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/cm_t35_defconfig | 1733 +
 1 files changed, 1733 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/cm_t35_defconfig

diff --git a/arch/arm/configs/cm_t35_defconfig 
b/arch/arm/configs/cm_t35_defconfig
new file mode 100644
index 000..e42c5c8
--- /dev/null
+++ b/arch/arm/configs/cm_t35_defconfig
@@ -0,0 +1,1733 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc4
+# Tue Oct 13 17:10: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=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
+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_GCOV_KERNEL is not set
+# 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 is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_FREEZER=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
+# 

[PATCH 07/12] omap3: Add minimal IGEP v2 support

2009-11-17 Thread Tony Lindgren
From: Enric Balletbo i Serra eballe...@iseebcn.com

The IGEP v2 board is a low-cost, fan-less and industrial temperature
range single board computer that unleashes laptop-like performance and
expandability without the bulk, expense, or noise of typical desktop
machines. Its architecture shares much in common with other OMAP3 boards.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Kconfig  |4 +
 arch/arm/mach-omap2/Makefile |2 
 arch/arm/mach-omap2/board-igep0020.c |  251 ++
 3 files changed, 257 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0020.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fa20996..119e7b0 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -105,6 +105,10 @@ config MACH_CM_T35
bool CompuLab CM-T35 module
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_IGEP0020
+   bool IGEP0020
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP_4430SDP
bool OMAP 4430 SDP board
depends on ARCH_OMAP4
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 1b37f2a..c2f3de9 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -85,6 +85,8 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \
   board-zoom-debugboard.o
 obj-$(CONFIG_MACH_CM_T35)  += board-cm-t35.o \
   mmc-twl4030.o
+obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
+  mmc-twl4030.o
 
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o
 
diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
new file mode 100644
index 000..fa62e80
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2009 Integration Software and Electronic Engineering.
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/interrupt.h
+
+#include linux/regulator/machine.h
+#include linux/i2c/twl4030.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/gpmc.h
+#include plat/mux.h
+#include plat/usb.h
+
+#include mmc-twl4030.h
+
+#define IGEP2_SMSC911X_CS   5
+#define IGEP2_SMSC911X_GPIO 176
+#define IGEP2_GPIO_USBH_NRESET  24
+#define IGEP2_GPIO_LED0_RED26
+#define IGEP2_GPIO_LED0_GREEN  27
+#define IGEP2_GPIO_LED1_RED28
+
+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
+
+#include linux/smsc911x.h
+
+static struct smsc911x_platform_config igep2_smsc911x_config = {
+   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+   .flags  = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS  ,
+   .phy_interface  = PHY_INTERFACE_MODE_MII,
+};
+
+static struct resource igep2_smsc911x_resources[] = {
+   {
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO),
+   .end= OMAP_GPIO_IRQ(IGEP2_SMSC911X_GPIO),
+   .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
+   },
+};
+
+static struct platform_device igep2_smsc911x_device = {
+   .name   = smsc911x,
+   .id = 0,
+   .num_resources  = ARRAY_SIZE(igep2_smsc911x_resources),
+   .resource   = igep2_smsc911x_resources,
+   .dev= {
+   .platform_data = igep2_smsc911x_config,
+   },
+};
+
+static inline void __init igep2_init_smsc911x(void)
+{
+   unsigned long cs_mem_base;
+
+   if (gpmc_cs_request(IGEP2_SMSC911X_CS, SZ_16M, cs_mem_base)  0) {
+   pr_err(IGEP v2: Failed request for GPMC mem for smsc911x\n);
+   gpmc_cs_free(IGEP2_SMSC911X_CS);
+   return;
+   }
+
+   igep2_smsc911x_resources[0].start = cs_mem_base + 0x0;
+   igep2_smsc911x_resources[0].end   = cs_mem_base + 0xff;
+
+   if ((gpio_request(IGEP2_SMSC911X_GPIO, SMSC911X IRQ) == 0) 
+   (gpio_direction_input(IGEP2_SMSC911X_GPIO) == 0)) {
+   gpio_export(IGEP2_SMSC911X_GPIO, 0);
+   } else {
+   pr_err(IGEP v2: Could not obtain gpio for for SMSC911X IRQ\n);
+   return;
+   }
+
+   platform_device_register(igep2_smsc911x_device);
+}
+
+#else
+static 

[PATCH 08/12] omap: 3630sdp: introduce 3630 sdp board support

2009-11-17 Thread Tony Lindgren
From: vikram pandita vikram.pand...@ti.com

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=6123navigationId=12836contentId=52606

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 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 119e7b0..b271a65 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -109,6 +109,10 @@ config MACH_IGEP0020
bool IGEP0020
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 c2f3de9..3e1b45f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -83,6 +83,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
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.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..348b70b
--- /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 linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/input.h
+#include linux/gpio.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/common.h
+#include plat/board.h
+#include plat/gpmc-smc91x.h
+#include plat/mux.h
+#include plat/usb.h
+
+#include mach/board-zoom.h
+
+#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();
+}
+
+static void __init omap_sdp_init(void)
+{
+   

[PATCH 09/12] omap: 3630sdp: defconfig creation

2009-11-17 Thread Tony Lindgren
From: vikram pandita vikram.pand...@ti.com

Create 3630sdp defconfig file

Signed-off-by: Vikram Pandita vikram.pand...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/omap_3630sdp_defconfig | 1611 +++
 1 files changed, 1611 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..e836c8a
--- /dev/null
+++ b/arch/arm/configs/omap_3630sdp_defconfig
@@ -0,0 +1,1611 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc6
+# Thu Nov 12 12:21:37 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 

[PATCH 10/12] omap3: Add defconfig for IGEP v2 board

2009-11-17 Thread Tony Lindgren
From: Enric Balletbo i Serra eballe...@iseebcn.com

Add defconfig for IGEP v2 board

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/igep0020_defconfig | 1554 +++
 1 files changed, 1554 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/igep0020_defconfig

diff --git a/arch/arm/configs/igep0020_defconfig 
b/arch/arm/configs/igep0020_defconfig
new file mode 100644
index 000..c97f8d0
--- /dev/null
+++ b/arch/arm/configs/igep0020_defconfig
@@ -0,0 +1,1554 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc6
+# Fri Nov 13 12:01:17 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 is not set
+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=17
+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 is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBDAF=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# 

[PATCH 11/12] AM35xx: Add support for AM3517 EVM board

2009-11-17 Thread Tony Lindgren
From: Ranjith Lohithakshan ranji...@ti.com

This patch creates a minimal AM3517 EVM board support.

Signed-off-by: Ranjith Lohithakshan ranji...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Kconfig   |4 ++
 arch/arm/mach-omap2/Makefile  |2 +
 arch/arm/mach-omap2/board-am3517evm.c |   86 +
 3 files changed, 92 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517evm.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b271a65..034d990 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -65,6 +65,10 @@ config MACH_OMAP3EVM
bool OMAP 3530 EVM board
depends on ARCH_OMAP3  ARCH_OMAP34XX
 
+config MACH_OMAP3517EVM
+   bool OMAP3517/ AM3517 EVM board
+   depends on ARCH_OMAP3  ARCH_OMAP34XX
+
 config MACH_OMAP3_PANDORA
bool OMAP3 Pandora
depends on ARCH_OMAP3  ARCH_OMAP34XX
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 3e1b45f..59b0ccc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -93,6 +93,8 @@ obj-$(CONFIG_MACH_IGEP0020)   += board-igep0020.o \
 
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o
 
+obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
+
 # Platform specific device init code
 obj-y  += usb-musb.o
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
diff --git a/arch/arm/mach-omap2/board-am3517evm.c 
b/arch/arm/mach-omap2/board-am3517evm.c
new file mode 100644
index 000..415a13d
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -0,0 +1,86 @@
+/*
+ * linux/arch/arm/mach-omap2/board-am3517evm.c
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated
+ * Author: Ranjith Lohithakshan ranji...@ti.com
+ *
+ * Based on mach-omap2/board-omap3evm.c
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as  published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed as is WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/gpio.h
+
+#include mach/hardware.h
+#include asm/mach-types.h
+#include asm/mach/arch.h
+#include asm/mach/map.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/usb.h
+
+/*
+ * Board initialization
+ */
+static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
+};
+
+static struct platform_device *am3517_evm_devices[] __initdata = {
+};
+
+static void __init am3517_evm_init_irq(void)
+{
+   omap_board_config = am3517_evm_config;
+   omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
+
+   omap2_init_common_hw(NULL, NULL);
+   omap_init_irq();
+   omap_gpio_init();
+}
+
+static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset  = true,
+   .reset_gpio_port[0]  = 57,
+   .reset_gpio_port[1]  = -EINVAL,
+   .reset_gpio_port[2]  = -EINVAL
+};
+
+static void __init am3517_evm_init(void)
+{
+   platform_add_devices(am3517_evm_devices,
+   ARRAY_SIZE(am3517_evm_devices));
+
+   omap_serial_init();
+   usb_ehci_init(ehci_pdata);
+}
+
+static void __init am3517_evm_map_io(void)
+{
+   omap2_set_globals_343x();
+   omap2_map_common_io();
+}
+
+MACHINE_START(OMAP3517EVM, OMAP3517/AM3517 EVM)
+   .phys_io= 0x4800,
+   .io_pg_offst= ((0xd800)  18)  0xfffc,
+   .boot_params= 0x8100,
+   .map_io = am3517_evm_map_io,
+   .init_irq   = am3517_evm_init_irq,
+   .init_machine   = am3517_evm_init,
+   .timer  = omap_timer,
+MACHINE_END

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


[PATCH 12/12] AM35xx: Defconfig for AM3517 EVM board

2009-11-17 Thread Tony Lindgren
From: Ranjith Lohithakshan ranji...@ti.com

This patch adds a minimal defconfig for AM3517 EVM board.

Signed-off-by: Ranjith Lohithakshan ranji...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/configs/am3517_evm_defconfig | 1207 +
 1 files changed, 1207 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/configs/am3517_evm_defconfig

diff --git a/arch/arm/configs/am3517_evm_defconfig 
b/arch/arm/configs/am3517_evm_defconfig
new file mode 100644
index 000..ad54e92
--- /dev/null
+++ b/arch/arm/configs/am3517_evm_defconfig
@@ -0,0 +1,1207 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.32-rc5
+# Wed Oct 28 15:47:47 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 is not set
+
+#
+# System Type
+#
+CONFIG_MMU=y
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_STMP3XXX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# 

[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 vikram.pand...@ti.com
Cc: Alan Cox a...@lxorguk.ukuu.org.uk
---
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 v2] OMAP: timekeeping: time should not stop during suspend

2009-11-17 Thread Kevin Hilman
During suspend, the kernel timekeeping subsystem is shut down.  Before
suspend and upon resume, it uses a weak function
read_persistent_clock() to determine the amount of time that elapsed
during suspend.

This function was not implemented on OMAP, so from the timekeeping
subsystem perspective (and thus userspace as well) it appeared that no
time elapsed during suspend.

This patch uses the 32k sync timer as a the persistent clock the 32k
sync timer value converted to seconds.

NOTE: This does *NOT* handle wrapping of the 32k sync timer, so
  wrapping of the 32k sync timer during suspend may cause
  problems.  Also, there are not interrupts when the 32k sync
  timer wraps, so something else has to be done.

Reported-by: Jon Hunter jon-hun...@ti.com
Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
Since v1 of this patch, the signature of this function changed.

Also note that forthcoming omap_device patches will depend on this
function instead of getnstimeofday() since the timekeeping subsystem
is suspended when we want to do omap_device timing measurements.

 arch/arm/plat-omap/common.c |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index cc050b3..8057966 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -172,6 +172,25 @@ unsigned long long sched_clock(void)
  clocksource_32k.mult, clocksource_32k.shift);
 }
 
+/**
+ * read_persistent_clock -  Return time from the persistent clock.
+ *
+ * Reads the time from a source which isn't disabled during PM: 32k sync
+ * Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.
+ *
+ */
+void read_persistent_clock(struct timespec *ts)
+{
+   unsigned long long nsecs;
+   cycle_t cycles;
+
+   ts-tv_sec = ts-tv_nsec = 0;
+   cycles = clocksource_32k.read(clocksource_32k);
+   nsecs = clocksource_cyc2ns(cycles,
+  clocksource_32k.mult, clocksource_32k.shift);
+   timespec_add_ns(ts, nsecs);
+}
+
 static int __init omap_init_clocksource_32k(void)
 {
static char err[] __initdata = KERN_ERR
-- 
1.6.5.1

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


Re: linux-next: manual merge of the omap_dss2 tree with the omap tree

2009-11-17 Thread Stephen Rothwell
Hi Tomi,

On Tue, 17 Nov 2009 12:00:31 +0200 Tomi Valkeinen tomi.valkei...@nokia.com 
wrote:

 On Mon, 2009-11-16 at 19:34 +0100, ext Tony Lindgren wrote:
  Tomi, please update your patch by leaving out the now unnecessary
  TWL4030 and regulator sections. See also the updated version of
  your patch attached.
 
 Thanks, updated. Now I'm able to merge linux-omap/for-next and
 dss/for-next without conflicts.

Great, thanks.

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


pgptnHK7MbGr0.pgp
Description: PGP signature


Re: [PATCH v2 1/1] omap: serial: fix non-empty uart fifo read abort

2009-11-17 Thread Kevin Hilman
Vikram Pandita vikram.pand...@ti.com writes:

 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 vikram.pand...@ti.com
 Cc: Alan Cox a...@lxorguk.ukuu.org.uk
 ---
 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())) {

Rather than the cpu_is_* here, why not just override the function 
for these platforms and leave the default for 34xx/35xx.

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


Re: [PATCH v2 1/1] omap: serial: fix non-empty uart fifo read abort

2009-11-17 Thread Nishanth Menon

Pandita, Vikram had written, on 11/17/2009 05:39 PM, the following:

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()

   - I am just being a nuisance, but I think you mean override


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 vikram.pand...@ti.com
Cc: Alan Cox a...@lxorguk.ukuu.org.uk
---
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()

  ^ - same here

+ * 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())) {
Do we want to use FEATURE here? I can expect to see more silicons use 
this new UART IP, so using the OMAP FEATURE framework might make sense.
I wonder if you can at least use MVR_REG to detect if we want to enable 
this?

or better still we could even skip the check.. might save cpu cycles..

+
+   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
}



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


Re: [PATCH v2 1/1] omap: serial: fix non-empty uart fifo read abort

2009-11-17 Thread Alan Cox
On Tue, 17 Nov 2009 17:39:11 -0600
Vikram Pandita vikram.pand...@ti.com wrote:

 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

Acked-by: Alan Cox a...@linux.intel.com

(Please push it via the OMAP tree as its now OMAP specific)


Alan
--
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] omap_hwmod/omap_device prep work

2009-11-17 Thread Kevin Hilman
In converting the UART drivers over to omap_hwmod/omap_device, I
found a few issues. 

Kevin Hilman (7):
  OMAP3: clock: add clockdomains for UART1  2
  OMAP: hwmod: warn on missing clockdomain
  OMAP: omap_device: deactivate latency typo
  OMAP: omap_device: add usecounting
  OMAP: omap_device: use read_persistent_clock() instead of
getnstimeofday()
  OMAP: omap_device: warn about expected latencies only if non-zero
  OMAP: omap_device: use UINT_MAX for default wakeup latency limit

Paul Walmsley (1):
  OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling

 arch/arm/mach-omap2/clock34xx.h   |2 +
 arch/arm/mach-omap2/omap_hwmod.c  |   53 ++--
 arch/arm/plat-omap/include/plat/omap_device.h |1 +
 arch/arm/plat-omap/include/plat/omap_hwmod.h  |8 +++-
 arch/arm/plat-omap/omap_device.c  |   43 +---
 5 files changed, 86 insertions(+), 21 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 1/8] OMAP3: clock: add clockdomains for UART1 2

2009-11-17 Thread Kevin Hilman
UART1  2 were missing clockdomains resulting in broken omap_hwmod
init for these devices.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/mach-omap2/clock34xx.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index a1b3de7..cbc3d8a 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1507,6 +1507,7 @@ static struct clk uart2_fck = {
.parent = core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_UART2_SHIFT,
+   .clkdm_name = core_l4_clkdm,
.recalc = followparent_recalc,
 };
 
@@ -1516,6 +1517,7 @@ static struct clk uart1_fck = {
.parent = core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_UART1_SHIFT,
+   .clkdm_name = core_l4_clkdm,
.recalc = followparent_recalc,
 };
 
-- 
1.6.5.1

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


[PATCH 4/8] OMAP: omap_device: deactivate latency typo

2009-11-17 Thread Kevin Hilman
The deactivate hook should use 'deactivate_lat' instead of
'activate_lat' when doing checking on expected latency values.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/plat-omap/omap_device.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index bb16e62..da649f2 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -186,7 +186,7 @@ static int _omap_device_deactivate(struct omap_device *od, 
u8 ignore_lat)
odpl = od-pm_lats + od-pm_lat_level;
 
if (!ignore_lat 
-   ((od-dev_wakeup_lat + odpl-activate_lat) 
+   ((od-dev_wakeup_lat + odpl-deactivate_lat) 
 od-_dev_wakeup_lat_limit))
break;
 
@@ -209,7 +209,7 @@ static int _omap_device_deactivate(struct omap_device *od, 
u8 ignore_lat)
 (%llu  %d)\n, od-pdev.name, od-pdev.id,
 od-pm_lat_level, deact_lat, odpl-deactivate_lat);
 
-   od-dev_wakeup_lat += odpl-activate_lat;
+   od-dev_wakeup_lat += odpl-deactivate_lat;
 
od-pm_lat_level++;
}
-- 
1.6.5.1

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


[PATCH 5/8] OMAP: omap_device: add usecounting

2009-11-17 Thread Kevin Hilman
Add use counters to omap_device to enable multiple potential users of
an omap_device.  This is needed if ever there are multiple users or
multiple instances of a driver with a single omap_device.

Without usecounting, with multiple users, the first one to call idle
may forcibly idle the device while other users are still active.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/plat-omap/include/plat/omap_device.h |1 +
 arch/arm/plat-omap/omap_device.c  |9 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/omap_device.h 
b/arch/arm/plat-omap/include/plat/omap_device.h
index d939246..c504780 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -71,6 +71,7 @@ struct omap_device {
s8  pm_lat_level;
u8  hwmods_cnt;
u8  _state;
+   u32 _usecount;
 };
 
 /* Device driver interface (call via platform_data fn ptrs) */
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index da649f2..6a8b0ce 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -388,6 +388,8 @@ struct omap_device *omap_device_build_ss(const char 
*pdev_name, int pdev_id,
od-pm_lats = pm_lats;
od-pm_lats_cnt = pm_lats_cnt;
 
+   od-_usecount = 0;
+
ret = omap_device_register(od);
if (ret)
goto odbs_exit4;
@@ -446,6 +448,9 @@ int omap_device_enable(struct platform_device *pdev)
 
od = _find_by_pdev(pdev);
 
+   if (od-_usecount++)
+   return 0;
+
if (od-_state == OMAP_DEVICE_STATE_ENABLED) {
WARN(1, omap_device: %s.%d: omap_device_enable() called from 
 invalid state\n, od-pdev.name, od-pdev.id);
@@ -485,6 +490,9 @@ int omap_device_idle(struct platform_device *pdev)
 
od = _find_by_pdev(pdev);
 
+   if (--od-_usecount)
+   return 0;
+
if (od-_state != OMAP_DEVICE_STATE_ENABLED) {
WARN(1, omap_device: %s.%d: omap_device_idle() called from 
 invalid state\n, od-pdev.name, od-pdev.id);
@@ -530,6 +538,7 @@ int omap_device_shutdown(struct platform_device *pdev)
omap_hwmod_shutdown(oh);
 
od-_state = OMAP_DEVICE_STATE_SHUTDOWN;
+   od-_usecount = 0;
 
return ret;
 }
-- 
1.6.5.1

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


[PATCH 6/8] OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday()

2009-11-17 Thread Kevin Hilman
During suspend and resume, when omap_device deactivation and
activation is happening, the timekeeping subsystem has likely already
been suspended.  Thus getnstimeofday() will fail and trigger a WARN().

Use read_persistent_clock() instead of getnstimeofday() to avoid this.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/plat-omap/omap_device.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 6a8b0ce..f6cdf1a 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -134,12 +134,12 @@ static int _omap_device_activate(struct omap_device *od, 
u8 ignore_lat)
(od-dev_wakeup_lat = od-_dev_wakeup_lat_limit))
break;
 
-   getnstimeofday(a);
+   read_persistent_clock(a);
 
/* XXX check return code */
odpl-activate_func(od);
 
-   getnstimeofday(b);
+   read_persistent_clock(b);
 
c = timespec_sub(b, a);
act_lat = timespec_to_ns(c) * NSEC_PER_USEC;
@@ -190,12 +190,12 @@ static int _omap_device_deactivate(struct omap_device 
*od, u8 ignore_lat)
 od-_dev_wakeup_lat_limit))
break;
 
-   getnstimeofday(a);
+   read_persistent_clock(a);
 
/* XXX check return code */
odpl-deactivate_func(od);
 
-   getnstimeofday(b);
+   read_persistent_clock(b);
 
c = timespec_sub(b, a);
deact_lat = timespec_to_ns(c) * NSEC_PER_USEC;
-- 
1.6.5.1

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


[PATCH 3/8] OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling

2009-11-17 Thread Kevin Hilman
From: Paul Walmsley p...@pwsan.com

This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP
hwmod code.

After this patch, the hwmod code will set the module AUTOIDLE bit (generally
module.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon enable, and 1 upon
disable.  If the hwmod flag HWMOD_NO_AUTOIDLE is set, AUTOIDLE will be
set to 0 upon enable.

Enabling module autoidle should save some power.  The only reason to
not set the OCP_SYSCONFIG.AUTOIDLE bit is if there is a bug in the
module RTL, e.g., the MPUINTC block on OMAP3.

Comments from Kevin Hilman khil...@deeprootsystems.com inspired this patch.

Signed-off-by: Paul Walmsley p...@pwsan.com
Tested-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/mach-omap2/omap_hwmod.c |   50 +++---
 arch/arm/plat-omap/include/plat/omap_hwmod.h |8 -
 2 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7d7b3b8..25d9484 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -210,6 +210,29 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
 }
 
 /**
+ * _set_module_autoidle: set the OCP_SYSCONFIG AUTOIDLE field in @v
+ * @oh: struct omap_hwmod *
+ * @autoidle: desired AUTOIDLE bitfield value (0 or 1)
+ * @v: pointer to register contents to modify
+ *
+ * Update the module autoidle mode bit in @v to be @autoidle for the
+ * @oh hwmod.  Does not write to the hardware.  Returns -EINVAL upon
+ * error or 0 upon success.
+ */
+static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
+   u32 *v)
+{
+   if (!oh-sysconfig ||
+   !(oh-sysconfig-sysc_flags  SYSC_HAS_AUTOIDLE))
+   return -EINVAL;
+
+   *v = ~SYSC_AUTOIDLE_MASK;
+   *v |= autoidle  SYSC_AUTOIDLE_SHIFT;
+
+   return 0;
+}
+
+/**
  * _enable_wakeup: set OCP_SYSCONFIG.ENAWAKEUP bit in the hardware
  * @oh: struct omap_hwmod *
  *
@@ -560,7 +583,13 @@ static void _sysc_enable(struct omap_hwmod *oh)
_set_master_standbymode(oh, idlemode, v);
}
 
-   /* XXX OCP AUTOIDLE bit? */
+   if (oh-sysconfig-sysc_flags  SYSC_HAS_AUTOIDLE) {
+   idlemode = (oh-flags  HWMOD_NO_AUTOIDLE) ?
+   0 : 1;
+   _set_module_autoidle(oh, idlemode, v);
+   }
+
+   /* XXX OCP ENAWAKEUP bit? */
 
if (oh-flags  HWMOD_SET_DEFAULT_CLOCKACT 
oh-sysconfig-sysc_flags  SYSC_HAS_CLOCKACTIVITY)
@@ -625,7 +654,8 @@ static void _sysc_shutdown(struct omap_hwmod *oh)
if (oh-sysconfig-sysc_flags  SYSC_HAS_MIDLEMODE)
_set_master_standbymode(oh, HWMOD_IDLEMODE_FORCE, v);
 
-   /* XXX clear OCP AUTOIDLE bit? */
+   if (oh-sysconfig-sysc_flags  SYSC_HAS_AUTOIDLE)
+   _set_module_autoidle(oh, 1, v);
 
_write_sysconfig(v, oh);
 }
@@ -951,11 +981,21 @@ static int _setup(struct omap_hwmod *oh)
 
_enable(oh);
 
-   if (!(oh-flags  HWMOD_INIT_NO_RESET))
+   if (!(oh-flags  HWMOD_INIT_NO_RESET)) {
_reset(oh);
 
-   /* XXX OCP AUTOIDLE bit? */
-   /* XXX OCP ENAWAKEUP bit? */
+   /*
+* XXX Do the OCP_SYSCONFIG bits need to be
+* reprogrammed after a reset?  If not, then this can
+* be removed.  If it does, then probably the
+* _enable() function should be split to avoid the
+* rewrite of the OCP_SYSCONFIG register.
+*/
+   if (oh-sysconfig) {
+   _update_sysc_cache(oh);
+   _sysc_enable(oh);
+   }
+   }
 
if (!(oh-flags  HWMOD_INIT_NO_IDLE))
_idle(oh);
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h 
b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index dbdd123..ec140b0 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -50,6 +50,8 @@ struct omap_device;
 #define SYSC_ENAWAKEUP_MASK(1  SYSC_ENAWAKEUP_SHIFT)
 #define SYSC_SOFTRESET_SHIFT   1
 #define SYSC_SOFTRESET_MASK(1  SYSC_SOFTRESET_SHIFT)
+#define SYSC_AUTOIDLE_SHIFT0
+#define SYSC_AUTOIDLE_MASK (1  SYSC_AUTOIDLE_SHIFT)
 
 /* OCP SYSSTATUS bit shifts/masks */
 #define SYSS_RESETDONE_SHIFT   0
@@ -294,13 +296,17 @@ struct omap_hwmod_omap4_prcm {
  * SDRAM controller, etc.
  * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM
  * controller, etc.
+ * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE)
+ * when module is enabled, rather than the default, which is to
+ * enable autoidle
  * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup
  */
 #define HWMOD_SWSUP_SIDLE  (1  0)
 #define HWMOD_SWSUP_MSTANDBY   (1  1)
 #define 

[PATCH 8/8] OMAP: omap_device: use UINT_MAX for default wakeup latency limit

2009-11-17 Thread Kevin Hilman
The _dev_wakeup_lat_limit field of struct omap_device is u32, so use
UINT_MAX instead of INT_MAX for the default maximum.

Signed-off-by: Kevin Hilman khil...@deeprootsystems.com
---
 arch/arm/plat-omap/omap_device.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 83bee1c..9ec3735 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -468,7 +468,7 @@ int omap_device_enable(struct platform_device *pdev)
ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT);
 
od-dev_wakeup_lat = 0;
-   od-_dev_wakeup_lat_limit = INT_MAX;
+   od-_dev_wakeup_lat_limit = UINT_MAX;
od-_state = OMAP_DEVICE_STATE_ENABLED;
 
return ret;
-- 
1.6.5.1

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


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

2009-11-17 Thread Nishanth Menon

Menon, Nishanth had written, on 11/15/2009 08:54 AM, the following:
[...]

b) Improvements of the omap accessor functions, I will send out few of
the proposals I can think of later when I get some free time.. we can
discuss that too.

Here is my initial proposal, do feel free to comment/add/modify etc:

In the accessor functions listed here, I have followed:
a) The function will return 0 if success else appropriate error values, 
all values are passed by pointer params.
b) Overall, the idea is to transition from exposing omap_opp to users 
currently to a system where opp handling logic will be blackboxed from 
the rest of the system - giving us options to optimize and scale 
internal logic and storage mechanism without impacting the rest of the 
system.
c) resultant code should be readable - this is one of the issues I see 
with my previous implementation.


Files: Introduce opp.c and opp.h

A) Data Structures:
Interim:
opp.h
struct omap_opp {
bool enabled;
unsigned long rate; /* in hz */
u8 opp_id; /* int */
u16 vsel; /* T2 voltage value */
};
typedef struct omap_opp omap_opp_def;

Final, once resource34xx.c and all direct accesses are cleaned up:

opp.h:
struct omap_opp;

/* initial definitions of OPP, will be used by all */
struct omap_opp_def {
bool enabled; /* true/false */
unsigned long rate; /* in hz */
u16 vsel; /* in millivolts */
};

opp.c:
struct omap_opp {
bool enabled;
unsigned long rate;
u16 vsel;
};

or what ever implementation it needs. can be array, list, hash 
implementation or what ever we choose it to be.


B) Accessor functions to be used:

B.1) These functions should be removed once SRF is replaced/cleaned up:

int opp_id_to_freq(unsigned long *freq, const struct omap_opp *opps, u8 
opp_id);
int opp_freq_to_id(u8 *opp_id, const struct omap_opp *opps, unsigned 
long freq);



B.2) initialization functions:

/* Register the OPP list for the silicon */
int opp_register(struct omap_opp *opp_list,
 const struct omap_opp_def *opp_reg);


/* Enable a specific frequency */
int opp_enable(struct omap_opp *opp_list,
unsigned long freq, bool enable);

Users:
opp_register will be called by pm34xx.c based on silicon type.
opp_enable will be called by board file/ has_feature based logic etc.. 
on a need basis


B.3) verification functions:

/* Check if we have a  frequency in the list(enabled/disabled)
 * this is needed by users who would like to enable a disabled
 * frequency
 */
int opp_has_freq(struct omap_opp *opp_list, unsigned long freq);

/* Check if we have a enabled frequency - this is what most users
 * will need
 */
int opp_is_freq_valid(struct omap_opp *opp_list, unsigned long freq);

Users:
files who'd want to use opp_enable,
validation paths.

B.4) Limit functions:

/* To get a number of frequencies enabled */
int opp_get_freq_count(const struct omap_opp *opp_list, u8 *num);

/* Get highest enabled frequency */
int opp_get_highest_freq(struct omap_opp *opp_list,
unsigned long *freq);

/* Get lowest enabled frequency */
int opp_get_lowest_freq(struct omap_opp *opp_list, unsigned long *freq);

Users:
Obvious user is the current cpufreq

B.5) Search functions - these will check only enabled frequencies. This 
will not check if the start freq provided in *freq is an enabled 
frequency or not. Assumption I am making is: if you are searching for a 
frequency that is disabled in the opp list, you are not trying something 
generic -hence wont support.


/* Get higher enabled frequency than the provided one */
int opp_get_higher_freq(struct omap_opp *opp_list, unsigned long *freq);

/* Get lower enabled frequency than the provided one */
int opp_get_lower_freq(struct omap_opp *opp_list, unsigned long *freq);

Users:
current srf, future scale logic

B.6) voltage functions - opp layer will not trigger voltage transition, 
it is upto other users of opp layer to make a decision.


/* get voltage corresponding to a frequency */
int opp_freq_to_voltage(u16 *voltage, struct omap_opp *opp_list,
unsigned long *freq);

Users:
current SR/SRF, future voltage framework.

--
Regards,
Nishanth Menon

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


RE: [PATCH 3/8] musb: Update musb_init() call for all OMAP3 boards

2009-11-17 Thread Gupta, Ajay Kumar
Hi,
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Sergei Shtylyov
 Sent: Tuesday, November 17, 2009 10:01 PM
 To: Gupta, Ajay Kumar
 Cc: linux-...@vger.kernel.org; davinci-linux-open-
 sou...@linux.davincidsp.com; coolo...@kernel.org; felipe.ba...@nokia.com;
 linux-omap@vger.kernel.org; Gadiyar, Anand
 Subject: Re: [PATCH 3/8] musb: Update musb_init() call for all OMAP3
 boards
 
 Ajay Kumar Gupta wrote:
 
  musb_init() has been modified to pass board specific data so updating
  this function call from all OMAP3 boards.
 
  Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
 
 [...]
 
  diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-
 musb.c
  index 1145a25..0e9380c 100644
  --- a/arch/arm/mach-omap2/usb-musb.c
  +++ b/arch/arm/mach-omap2/usb-musb.c
  @@ -124,12 +124,6 @@ static struct musb_hdrc_platform_data musb_plat = {
  /* .clock is set dynamically */
  .set_clock  = musb_set_clock,
  .config = musb_config,
  -
  -   /* REVISIT charge pump on TWL4030 can supply up to
  -* 100 mA ... but this value is board-specific, like
  -* mode, and should be passed to usb_musb_init().
  -*/
  -   .power  = 50,   /* up to 100 mA */
 
 That should obviously be a part of patch 1/8...

It was actually a part of 1/8 earlier but as this is OMAP specific and
[1/8] is generic so moved it to OMAP specific patch here.

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

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


RE: [PATCH 4/8] musb: Update setup_usb() call for all Davinci boards

2009-11-17 Thread Gupta, Ajay Kumar
Hi,
 -Original Message-
 From: Sergei Shtylyov [mailto:sshtyl...@ru.mvista.com]
 Sent: Tuesday, November 17, 2009 9:24 PM
 To: Gupta, Ajay Kumar
 Cc: linux-...@vger.kernel.org; davinci-linux-open-
 sou...@linux.davincidsp.com; coolo...@kernel.org; felipe.ba...@nokia.com;
 linux-omap@vger.kernel.org; Gadiyar, Anand
 Subject: Re: [PATCH 4/8] musb: Update setup_usb() call for all Davinci
 boards
 
 Ajay Kumar Gupta wrote:
 
  setup_usb() has been modified to pass board specific data so updating
  this function call from all Davinci based boards.
 
  Added struct device; to fix below compilation warning for Davinci
 boards.
  musb.h: struct device, defined within parameter list
 
 You should fix the missing #include in the musb.h, not band-aid it
 here...

Ok fine, As the error was only with Davinci and not with OMAP/Blackfin
So added here.

 
  Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
 
  diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-
 davinci/board-dm355-evm.c
  index 77e8067..31c5741 100644
  --- a/arch/arm/mach-davinci/board-dm355-evm.c
  +++ b/arch/arm/mach-davinci/board-dm355-evm.c
  @@ -24,6 +24,7 @@
   #include media/tvp514x.h
   #include linux/spi/spi.h
   #include linux/spi/eeprom.h
  +#include linux/usb/musb.h
 
   #include asm/setup.h
   #include asm/mach-types.h
  @@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[]
 __initconst = {
  },
   };
 
  +/* musb board specific data */
  +static struct musb_hdrc_board_data musb_bdata __initdata = {
  +   .power = 250,   /* (power in mA)/2 */
  +   .potpgt = 4,/* (potpgt in msec)/2 */
  +};
  +
   static __init void dm355_evm_init(void)
   {
  struct clk *aemif;
  @@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
  gpio_request(2, usb_id_toggle);
  gpio_direction_output(2, USB_ID_VALUE);
  /* irlml6401 switches over 1A in under 8 msec */
  -   setup_usb(500, 8);
  +   setup_usb(musb_bdata);
 
 Unfortunately, this will conflict with a patch queued for 2.6.33 in
 linux-davinci. Though in fact, it will render the part of this patch
 useless... :-/
 
  diff --git a/arch/arm/mach-davinci/include/mach/common.h
 b/arch/arm/mach-davinci/include/mach/common.h
  index 1fd3917..dab784c 100644
  --- a/arch/arm/mach-davinci/include/mach/common.h
  +++ b/arch/arm/mach-davinci/include/mach/common.h
  @@ -20,11 +20,14 @@ extern void davinci_irq_init(void);
   extern void __iomem *davinci_intc_base;
   extern int davinci_intc_type;
 
  +struct device;
 
 NAK. linux/usb/musb.h should be fixed instead.
 
  +#include linux/usb/musb.h
  +
   /* parameters describe VBUS sourcing for host mode */
  -extern void setup_usb(unsigned mA, unsigned potpgt_msec);
  +extern void setup_usb(struct musb_hdrc_board_data *board_data);
 
   /* parameters describe VBUS sourcing for host mode */
  -extern void setup_usb(unsigned mA, unsigned potpgt_msec);
  +extern void setup_usb(struct musb_hdrc_board_data *board_data);
 
 Don't you see -- these are duplicate? You could kill the second one.
 :-)

I saw, but though it could be some Davinci hack. I will remove it
in next version.

-Ajay
 
 BTW, the mentioned linux-davinci patch moved the declaration to
 mach/usb.h (and renamed the function too).
 
 WBR, Sergei

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


RE: [PATCH 2/8] musb: Get power (mA) from board data

2009-11-17 Thread Gupta, Ajay Kumar
Hi,
 -Original Message-
 From: Sergei Shtylyov [mailto:sshtyl...@ru.mvista.com]
 Sent: Tuesday, November 17, 2009 9:12 PM
 To: Gupta, Ajay Kumar
 Cc: linux-...@vger.kernel.org; davinci-linux-open-
 sou...@linux.davincidsp.com; coolo...@kernel.org; felipe.ba...@nokia.com;
 linux-omap@vger.kernel.org; Gadiyar, Anand
 Subject: Re: [PATCH 2/8] musb: Get power (mA) from board data
 
 Hello.
 
 Ajay Kumar Gupta wrote:
 
  Different board may have different power sourcing capability and
  now with 'struct musb_hdrc_board_data' in place; pass this data
  from board files and also modify musb_core.c to get 'power' data
  from 'plat-board_data'.
 
 This should be part of the patch 1/8 to keep the code compiling.
 
  Signed-off-by: Ajay Kumar Gupta ajay.gu...@ti.com
 
  diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
  index 3a61ddb..818ccda 100644
  --- a/drivers/usb/musb/musb_core.c
  +++ b/drivers/usb/musb/musb_core.c
  @@ -2033,7 +2033,9 @@ bad_config:
  if (is_otg_enabled(musb))
  hcd-self.otg_port = 1;
  musb-xceiv-host = hcd-self;
  -   hcd-power_budget = 2 * (plat-power ? : 250);
  +   if (plat-board_data)
  +   hcd-power_budget =
  +   2 * (plat-board_data-power ? : 250);
 
 Shouldn't it be:
 
 +
 + hcd-power_budget = 2 * (plat-board_data 
 +  plat-board_data-power ?
 +  plat-board_data-power : 250);

But the next patch on 'extvbus' would again need a check for
' plat-board_data ' so added both in same 'if' check.

-Ajay
 
 WBR, Sergei

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


RE: [PATCH v2 1/1] omap: serial: fix non-empty uart fifo read abort

2009-11-17 Thread Gadiyar, Anand
On Tue, 17 Nov 2009 17:39:11 -0600
Vikram Pandita vikram.pand...@ti.com wrote:

 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.

Minor nitpicking for the changelog.

OMAP3430 is better instead of OMAP3 here, since the 3630 also qualifies
as OMAP3


 Overrigt the default 8250 read handler: mem_serial_in()

s/Overrigt/Overwrite

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


  1   2   >