[PATCH] OMAP3 clock: fix DPLL jitter correction and rate programming

2008-06-24 Thread Paul Walmsley

Fix DPLL jitter correction programming.  Previously, 
omap3_noncore_dpll_program() stored the FREQSEL jitter correction 
parameter to the wrong register.  This caused jitter correction to be set 
incorrectly and also caused the DPLL divider to be programmed incorrectly.

Also, fix DPLL divider programming.  An off-by-one error existed in 
omap3_noncore_dpll_program(), causing DPLLs to be programmed with a higher 
divider than intended.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
---

 arch/arm/mach-omap2/clock34xx.c |   13 -
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 408b51a..8fdf8f3 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -346,14 +346,17 @@ static int omap3_noncore_dpll_program(struct clk *clk, 
u16 m, u8 n, u16 freqsel)
/* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
_omap3_noncore_dpll_bypass(clk);
 
+   /* Set jitter correction */
+   v = __raw_readl(dd->control_reg);
+   v &= ~dd->freqsel_mask;
+   v |= freqsel << __ffs(dd->freqsel_mask);
+   __raw_writel(v, dd->control_reg);
+
+   /* Set DPLL multiplier, divider */
v = __raw_readl(dd->mult_div1_reg);
v &= ~(dd->mult_mask | dd->div1_mask);
-
-   /* Set mult (M), div1 (N), freqsel */
v |= m << __ffs(dd->mult_mask);
-   v |= n << __ffs(dd->div1_mask);
-   v |= freqsel << __ffs(dd->freqsel_mask);
-
+   v |= (n - 1) << __ffs(dd->div1_mask);
__raw_writel(v, dd->mult_div1_reg);
 
/* We let the clock framework set the other output dividers later */
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP3 clock: DPLL{1,2}_FCLK clksel can divide by 4

2008-06-24 Thread Paul Walmsley

OMAP34xx ES2 TRM Delta G to H states that the divider for DPLL1_FCLK and 
DPLL2_FCLK can divide by 4 in addition to dividing by 1 and 2. Encode this 
into the OMAP3 clock framework.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
---

 arch/arm/mach-omap2/clock34xx.h |   20 
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index b4dceea..9605744 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1029,8 +1029,15 @@ static struct clk corex2_fck = {
 
 /* DPLL power domain clock controls */
 
-static const struct clksel div2_core_clksel[] = {
-   { .parent = &core_ck, .rates = div2_rates },
+static const struct clksel_rate div4_rates[] = {
+   { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
+   { .div = 2, .val = 2, .flags = RATE_IN_343X },
+   { .div = 4, .val = 4, .flags = RATE_IN_343X },
+   { .div = 0 }
+};
+
+static const struct clksel div4_core_clksel[] = {
+   { .parent = &core_ck, .rates = div4_rates },
{ .parent = NULL }
 };
 
@@ -1044,7 +1051,7 @@ static struct clk dpll1_fck = {
.init   = &omap2_init_clksel_parent,
.clksel_reg = _OMAP34XX_CM_REGADDR(MPU_MOD, 
OMAP3430_CM_CLKSEL1_PLL),
.clksel_mask= OMAP3430_MPU_CLK_SRC_MASK,
-   .clksel = div2_core_clksel,
+   .clksel = div4_core_clksel,
.flags  = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
PARENT_CONTROLS_CLOCK,
.recalc = &omap2_clksel_recalc,
@@ -1119,7 +1126,7 @@ static struct clk dpll2_fck = {
.init   = &omap2_init_clksel_parent,
.clksel_reg = _OMAP34XX_CM_REGADDR(OMAP3430_IVA2_MOD, 
OMAP3430_CM_CLKSEL1_PLL),
.clksel_mask= OMAP3430_IVA2_CLK_SRC_MASK,
-   .clksel = div2_core_clksel,
+   .clksel = div4_core_clksel,
.flags  = CLOCK_IN_OMAP343X | RATE_PROPAGATES |
PARENT_CONTROLS_CLOCK,
.recalc = &omap2_clksel_recalc,
@@ -1155,6 +1162,11 @@ static struct clk iva2_ck = {
 
 /* Common interface clocks */
 
+static const struct clksel div2_core_clksel[] = {
+   { .parent = &core_ck, .rates = div2_rates },
+   { .parent = NULL }
+};
+
 static struct clk l3_ick = {
.name   = "l3_ick",
.parent = &core_ck,
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/8] PRCM: Workaround for pwrdn_x control

2008-06-24 Thread Paul Walmsley
Hello Jouni,

On Tue, 17 Jun 2008, Jouni Hogander wrote:

> Clock path should be powered down only after all it's clients are
> properly disabled. Generally we don't have working implementation for
> checking wether some clock is enabled or disabled.

Just wanted to revisit this again briefly.  Is this patch intended to fix 
DPLL output powerdown paths?  Or do all clocks need this for some reason?

If the former, what do you think instead about adding a custom disable 
function for the DPLL outputs which would include the udelay()?
That way we might be able to avoid adding the udelay() to all clock 
disable calls.

- Paul

>  arch/arm/mach-omap2/clock.c |   11 ++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
> index ed15868..9099ba6 100644
> --- a/arch/arm/mach-omap2/clock.c
> +++ b/arch/arm/mach-omap2/clock.c
> @@ -329,6 +329,9 @@ void omap2_clk_disable(struct clk *clk)
>  {
>   if (clk->usecount > 0 && !(--clk->usecount)) {
>   _omap2_clk_disable(clk);
> + /* XXX Currently we don't have working code for
> +  * checking wether clock is really disabled */
> + udelay(10);
>   if (clk->parent)
>   omap2_clk_disable(clk->parent);
>   if (clk->clkdm)
> @@ -974,6 +977,12 @@ void omap2_clk_disable_unused(struct clk *clk)
>   return;
>  
>   printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
> - _omap2_clk_disable(clk);
> + /* XXX In case of omap3 we need to make sure that sequence is
> +  * correct when disabling clocks */
> + if (cpu_is_omap34xx()) {
> + omap2_clk_enable(clk);
> + omap2_clk_disable(clk);
> + } else
> + _omap2_clk_disable(clk);
>  }
>  #endif
> -- 
> 1.5.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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


Re: [PATCH] OMAP2/3 PM: Add OMAP PM no-op layer

2008-06-24 Thread Paul Walmsley
Hello Ramesh, 

On Wed, 18 Jun 2008, Ramesh Gupta G wrote:

> Will this interface provides information of max number if OPPs supported and
> the frequency corresponding to eah OPP level?

It could be added.  This is for DSPBridge use, not for the MPU, correct?  
Is the idea essentially to replace the vdd1_dsp_freq[] array in 
mpu_driver/src/rmgr/linux/common/drv_interface.c?  Can you tell me what 
each of the 4 fields in vdd1_dsp_freq[] means?

Perhaps something similar to an OMAP PM function 
"omap_pm_dsp_get_opp_table()" that DSPBridge could call on startup?

> MPU Bridge is required to inform the DSP about OPP level change for load 
> predictor use in DSP; this is done as part of in post notification in 
> dspbridge. Do we have support for Post Notification in this framework?

I just posted some patches for that a few days ago.  You should be able to 
use those to notify DSPBridge of changes to iva2_ck.


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


Re: [PATCH 2/8] PRCM: Workaround for pwrdn_x control

2008-06-24 Thread Högander Jouni
"ext Paul Walmsley" <[EMAIL PROTECTED]> writes:

> Hello Jouni,
>
> On Tue, 17 Jun 2008, Jouni Hogander wrote:
>
>> Clock path should be powered down only after all it's clients are
>> properly disabled. Generally we don't have working implementation for
>> checking wether some clock is enabled or disabled.
>
> Just wanted to revisit this again briefly.  Is this patch intended to fix 
> DPLL output powerdown paths?  Or do all clocks need this for some
> reason?

Delay is needed only between client disable and output path power
down.

>
> If the former, what do you think instead about adding a custom disable 
> function for the DPLL outputs which would include the udelay()?
> That way we might be able to avoid adding the udelay() to all clock 
> disable calls.

Yes, this sounds more reasonable. I'm preparing one more version of
of workaround set. I can do this also. What do you think, is this
still workaround or are we planning to implement wait_rdy which checks
also wether clock is disabled?

>
> - Paul
>
>>  arch/arm/mach-omap2/clock.c |   11 ++-
>>  1 files changed, 10 insertions(+), 1 deletions(-)
>> 
>> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
>> index ed15868..9099ba6 100644
>> --- a/arch/arm/mach-omap2/clock.c
>> +++ b/arch/arm/mach-omap2/clock.c
>> @@ -329,6 +329,9 @@ void omap2_clk_disable(struct clk *clk)
>>  {
>>  if (clk->usecount > 0 && !(--clk->usecount)) {
>>  _omap2_clk_disable(clk);
>> +/* XXX Currently we don't have working code for
>> + * checking wether clock is really disabled */
>> +udelay(10);
>>  if (clk->parent)
>>  omap2_clk_disable(clk->parent);
>>  if (clk->clkdm)
>> @@ -974,6 +977,12 @@ void omap2_clk_disable_unused(struct clk *clk)
>>  return;
>>  
>>  printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
>> -_omap2_clk_disable(clk);
>> +/* XXX In case of omap3 we need to make sure that sequence is
>> + * correct when disabling clocks */
>> +if (cpu_is_omap34xx()) {
>> +omap2_clk_enable(clk);
>> +omap2_clk_disable(clk);
>> +} else
>> +_omap2_clk_disable(clk);
>>  }
>>  #endif
>> -- 
>> 1.5.5
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to [EMAIL PROTECTED]
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
>
>
> - Paul
>
>

-- 
Jouni Högander

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


Re: [RFC/PATCH 1/2] Triton Battery charger interface driver for OMAP3430

2008-06-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080623 17:53]:
> Hi,
> 
> On Mon, 23 Jun 2008 19:04:51 +0530, "Madhusudhan Chikkature"
> <[EMAIL PROTECTED]> wrote:
> 
> >> On Fri, 20 Jun 2008 17:33:41 +0530 (IST), [EMAIL PROTECTED]
> >> wrote:
> >>
> >>> Index: linux-omap-2.6/arch/arm/mach-omap2/devices.c
> >>> ===
> >>> --- linux-omap-2.6.orig/arch/arm/mach-omap2/devices.c 2008-06-20
> >>> 15:39:56.0 +0530
> >>> +++ linux-omap-2.6/arch/arm/mach-omap2/devices.c 2008-06-20
> >>> 15:42:05.0
> >>> +0530
> >>> @@ -358,6 +358,22 @@
> >>>  static inline void omap_hdq_init(void) {}
> >>>  #endif
> >>>
> >>> +#ifdef CONFIG_TWL4030_BCI_BATTERY
> >>> +static struct platform_device omap_bci_battery_device = {
> >>> + .name   = "twl4030-bci-battery",
> >>> + .id = 1,
> >>> + .num_resources  = 0,
> >>> + .resource   = NULL,
> >>
> >> if you pass the struct resources you can use __raw_{read,write} which
> >> would simplify a lot for you, but if you really don't want it, you
> >> don't have to initialize it to NULL. Just because it's static, it's
> >> enough for it to get NULLed.
> > The battery driver uses twl4030_i2c_read_u8 and twl4030_i2c_write_u8 as
> > low level interface(I2C) with
> > standard twl4030.h defines. So no point of  _raw(read,write) and BASE
> > address getting initialized through resource structure. Right?.
> > I agree with your second point of no need to explicitely setting it to
> > NULL though.
> 
> The idea was to actually get rid of the i2c transfers and use
> __raw_read/write
> instead, but I suppose it's ok to use i2c transfers

Hmm, I guess the only way to access twl4030 is via i2c :) So
__raw_read/write would not work for the twl4030 registers.


> >>> +};
> >>> +
> >>> +static inline void omap_bci_battery_init(void)
> >>> +{
> >>> + (void) platform_device_register(&omap_bci_battery_device);
> >>> +}
> >>> +#else
> >>> +static inline void omap_bci_battery_init(void) {}
> >>> +#endif
> >>> +
> 
> don't remember if I said on last mail, but this ifdef should be in
> a header file. Maybe include/linux/i2c/twl4030.h
> 
> >> How about creating a special battery.c for this just like usb-musb.c,
> >> usb-ehci.c
> >> and hsmmc.c, so it's easier to reuse it and add such support only for
> >> boards that
> >> has twl4030.
> >>
> >> It would be useful for omap multiboot, I suppose.
> > I had put these under devices.c as there is not much board level
> > configurations for BCI unlike hsmmc.
> > I guess I can add a simple board file for battery that way it can used
> > based on TWL4030 if it is a good idea.
> 
> I would like to hear from Tony and the others what do they think?
> would it be worthy adding an extra file for bci ??
> 
> Tony, comments?

Well I guess some people are not using the bci, so it could be a
separate module.


> >>INIT_DELAYED_WORK_DEFERRABLE()???
> > Do you mean INIT_DELAYED_WORK_DEFERRABLE() is a better choice here??
> 
> Yes, as it could be deferred on suspend/resume. I think INIT_DELAYED_WORK
> also blocks dynamic pm ?!?
> 
> Maybe Jouni could clarify this one better. Jouni, any comments?
> 
> 
> -- 
> Best Regards,
> 
> Felipe Balbi
> http://felipebalbi.com
> [EMAIL PROTECTED]
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC/PATCH 1/2] Triton Battery charger interface driver forOMAP3430

2008-06-24 Thread Madhusudhan Chikkature

- Original Message - 
From: "Tony Lindgren" <[EMAIL PROTECTED]>
To: "Felipe Balbi" <[EMAIL PROTECTED]>
Cc: "Madhusudhan Chikkature" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; 

Sent: Tuesday, June 24, 2008 1:20 PM
Subject: Re: [RFC/PATCH 1/2] Triton Battery charger interface driver forOMAP3430


>* Felipe Balbi <[EMAIL PROTECTED]> [080623 17:53]:
>> Hi,
>> 
>> On Mon, 23 Jun 2008 19:04:51 +0530, "Madhusudhan Chikkature"
>> <[EMAIL PROTECTED]> wrote:
>> 
>> >> On Fri, 20 Jun 2008 17:33:41 +0530 (IST), [EMAIL PROTECTED]
>> >> wrote:
>> >>
>> >>> Index: linux-omap-2.6/arch/arm/mach-omap2/devices.c
>> >>> ===
>> >>> --- linux-omap-2.6.orig/arch/arm/mach-omap2/devices.c 2008-06-20
>> >>> 15:39:56.0 +0530
>> >>> +++ linux-omap-2.6/arch/arm/mach-omap2/devices.c 2008-06-20
>> >>> 15:42:05.0
>> >>> +0530
>> >>> @@ -358,6 +358,22 @@
>> >>>  static inline void omap_hdq_init(void) {}
>> >>>  #endif
>> >>>
>> >>> +#ifdef CONFIG_TWL4030_BCI_BATTERY
>> >>> +static struct platform_device omap_bci_battery_device = {
>> >>> + .name   = "twl4030-bci-battery",
>> >>> + .id = 1,
>> >>> + .num_resources  = 0,
>> >>> + .resource   = NULL,
>> >>
>> >> if you pass the struct resources you can use __raw_{read,write} which
>> >> would simplify a lot for you, but if you really don't want it, you
>> >> don't have to initialize it to NULL. Just because it's static, it's
>> >> enough for it to get NULLed.
>> > The battery driver uses twl4030_i2c_read_u8 and twl4030_i2c_write_u8 as
>> > low level interface(I2C) with
>> > standard twl4030.h defines. So no point of  _raw(read,write) and BASE
>> > address getting initialized through resource structure. Right?.
>> > I agree with your second point of no need to explicitely setting it to
>> > NULL though.
>> 
>> The idea was to actually get rid of the i2c transfers and use
>> __raw_read/write
>> instead, but I suppose it's ok to use i2c transfers
> 
> Hmm, I guess the only way to access twl4030 is via i2c :) So
> __raw_read/write would not work for the twl4030 registers.
> 
> 
>> >>> +};
>> >>> +
>> >>> +static inline void omap_bci_battery_init(void)
>> >>> +{
>> >>> + (void) platform_device_register(&omap_bci_battery_device);
>> >>> +}
>> >>> +#else
>> >>> +static inline void omap_bci_battery_init(void) {}
>> >>> +#endif
>> >>> +
>> 
>> don't remember if I said on last mail, but this ifdef should be in
>> a header file. Maybe include/linux/i2c/twl4030.h
>> 
>> >> How about creating a special battery.c for this just like usb-musb.c,
>> >> usb-ehci.c
>> >> and hsmmc.c, so it's easier to reuse it and add such support only for
>> >> boards that
>> >> has twl4030.
>> >>
>> >> It would be useful for omap multiboot, I suppose.
>> > I had put these under devices.c as there is not much board level
>> > configurations for BCI unlike hsmmc.
>> > I guess I can add a simple board file for battery that way it can used
>> > based on TWL4030 if it is a good idea.
>> 
>> I would like to hear from Tony and the others what do they think?
>> would it be worthy adding an extra file for bci ??
>> 
>> Tony, comments?
> 
> Well I guess some people are not using the bci, so it could be a
> separate module.
Okay. I will add a seperate file for BCI.

Regards,
Madhu
> 
> 
>> >>INIT_DELAYED_WORK_DEFERRABLE()???
>> > Do you mean INIT_DELAYED_WORK_DEFERRABLE() is a better choice here??
>> 
>> Yes, as it could be deferred on suspend/resume. I think INIT_DELAYED_WORK
>> also blocks dynamic pm ?!?
>> 
>> Maybe Jouni could clarify this one better. Jouni, any comments?
>> 
>> 
>> -- 
>> Best Regards,
>> 
>> Felipe Balbi
>> http://felipebalbi.com
>> [EMAIL PROTECTED]
>> 
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] usb: musb: musb on omap3 has 32 endpoints

2008-06-24 Thread Felipe Balbi
On Tue, Jun 24, 2008 at 09:52:05AM +0530, Gadiyar, Anand wrote:
> > > > Fix hdrc_cnf.h for omap3 configuration.
> > >
> > > Does this break the configuration for omap2?
> > >
> > > We should set these dynamically if different for omap2 and omap3
> > > so we can compile both into the same kernel.
> >
> > Should check omap2430 trm to be sure, maybe someone in TI
> > could help us with it ?
> 
> It won't break the 2430. The 2430 has 32 endpoints as well.

Good.

> > Maybe we could bring it via platform_data as well?
> 
> Yep. That would be good.

Cool, I'll start doing it.

Tony, maybe is safe to push this one so we can use all 32 endpoints ?

Meanwhile I'll create a way for different boards to tell musb driver its
configuration details.

-- 
Best Regards,

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


[PATCH 1/1] PM debug support for 34xx

2008-06-24 Thread Tero Kristo
This patch adds a few files to the debug file system for PM debugging
purposes. Enabled with kernel config options CONFIG_PM_DEBUG and
CONFIG_DEBUG_FS. Data available in debug filesystem after this patch:
- State enter counters for power domains (OFF, RET, ON)
- State timers for the above (in ns)
- PM register dumps with programmable save points

This patch depends on the PM workaround set from Jouni Hogander.

Signed-off-by: Tero Kristo <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/clockdomain.c   |   38 
 arch/arm/mach-omap2/pm-debug.c  |  353 +++
 arch/arm/mach-omap2/pm.c|2 +
 arch/arm/mach-omap2/pm.h|   18 ++
 arch/arm/mach-omap2/pm34xx.c|   11 +-
 arch/arm/mach-omap2/powerdomain.c   |   65 ++
 arch/arm/mach-omap2/serial.c|1 -
 include/asm-arm/arch-omap/powerdomain.h |7 +-
 8 files changed, 492 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 arch/arm/mach-omap2/clockdomain.c
 mode change 100644 => 100755 arch/arm/mach-omap2/pm-debug.c
 mode change 100644 => 100755 arch/arm/mach-omap2/pm.c
 mode change 100644 => 100755 arch/arm/mach-omap2/pm.h
 mode change 100644 => 100755 arch/arm/mach-omap2/pm34xx.c
 mode change 100644 => 100755 arch/arm/mach-omap2/powerdomain.c
 mode change 100644 => 100755 include/asm-arm/arch-omap/powerdomain.h

diff --git a/arch/arm/mach-omap2/clockdomain.c 
b/arch/arm/mach-omap2/clockdomain.c
old mode 100644
new mode 100755
index 6e5f892..c3c398e
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -36,6 +36,12 @@
 #include 
 #include 
 
+#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
+#include 
+#include 
+#include "pm.h"
+#endif
+
 /* clkdm_list contains all registered struct clockdomains */
 static LIST_HEAD(clkdm_list);
 
@@ -567,6 +573,13 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, 
struct clk *clk)
else
omap2_clkdm_wakeup(clkdm);
 
+#ifdef CONFIG_PM_DEBUG
+   if (clkdm != NULL && clkdm->pwrdm != NULL) {
+   pwrdm_wait_transition(clkdm->pwrdm);
+   pm_dbg_state_switch(clkdm->pwrdm);
+   }
+#endif
+
return 0;
 }
 
@@ -618,6 +631,31 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, 
struct clk *clk)
else
omap2_clkdm_sleep(clkdm);
 
+#ifdef CONFIG_PM_DEBUG
+   if (clkdm != NULL && clkdm->pwrdm != NULL) {
+   pwrdm_wait_transition(clkdm->pwrdm);
+   pm_dbg_state_switch(clkdm->pwrdm);
+   }
+#endif
+
return 0;
 }
 
+#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
+int clkdm_dbg_show_counters(struct seq_file *s, void *unused)
+{
+   struct clockdomain *clkdm;
+
+   list_for_each_entry(clkdm, &clkdm_list, node) {
+   if (strcmp(clkdm->name, "emu_clkdm") == 0 ||
+   strcmp(clkdm->name, "wkup_clkdm") == 0)
+   continue;
+   seq_printf(s, "%s->%s (%d)", clkdm->name, clkdm->pwrdm_name,
+   atomic_read(&clkdm->usecount));
+   seq_printf(s, "\n");
+   }
+
+   return 0;
+}
+
+#endif
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
old mode 100644
new mode 100755
index 61d4501..cf0b1b4
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -30,6 +30,8 @@
 #include 
 #include 
 
+#include 
+#include 
 #include "prm.h"
 #include "cm.h"
 #include "pm.h"
@@ -153,4 +155,367 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
printk("%-20s: 0x%08x\n", regs[i].name, regs[i].val);
 }
 
+#ifdef CONFIG_DEBUG_FS
+#include 
+#include 
+
+static void pm_dbg_regset_store(u32 *ptr);
+
+struct dentry *pm_dbg_reg_dir;
+
+static int pm_dbg_init_done;
+
+enum {
+   PM_DBG_STATE_NOW = 0,
+   PM_DBG_STATE_PREV,
+};
+
+struct pm_module_def {
+   char name[8]; /* Name of the module */
+   short type; /* CM or PRM */
+   unsigned short offset;
+   int low; /* First register address on this module */
+   int high; /* Last register address on this module */
+};
+
+#define MOD_CM 0
+#define MOD_PRM 1
+
+static const struct pm_module_def pm_dbg_reg_modules[] = {
+   { "OCP", MOD_CM, OCP_MOD, 0, 0x10 },
+   { "MPU", MOD_CM, MPU_MOD, 4, 0x4c },
+   { "CORE", MOD_CM, CORE_MOD, 0, 0x4c },
+   { "NEON", MOD_CM, OMAP3430_NEON_MOD, 0x20, 0x48 },
+   { "WKUP", MOD_CM, WKUP_MOD, 0, 0x40 },
+   { "EMU", MOD_CM, OMAP3430_EMU_MOD, 0x40, 0x54 },
+   { "CCR", MOD_CM, PLL_MOD, 0, 0x70 },
+   { "DSS", MOD_CM, OMAP3430_DSS_MOD, 0, 0x4c },
+   { "PER", MOD_CM, OMAP3430_PER_MOD, 0, 0x4c },
+   { "USB", MOD_CM, OMAP3430ES2_USBHOST_MOD, 0, 0x4c },
+
+   { "OCP", MOD_PRM, OCP_MOD, 0x1c },
+   { "MPU", MOD_PRM, MPU_MOD, 0x58, 0xe8 },
+   { "CORE", MOD_PRM, CORE_MOD, 0x58, 0xf8 },
+   { "NEON", MOD_PRM, OMAP3430_NEON_MOD, 0x58, 0xe8 },
+   { "WKUP"

[PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
>From 58efa8d0019a7f777aaad2d43afb05170df25fae Mon Sep 17 00:00:00 2001
From: Arun KS <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 16:01:32 +0530
Subject: [PATCH] OMAP2EVM:  Adding ethernet support

OMAP2EVM: add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   37 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..e9a2cef 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,43 @@
 #include 
 #include 

+static struct resource omap2evm_smc911x_resources[] = {
+   [0] =   {
+   .start  = OMAP2EVM_ETHR_START,
+   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] =   {
+   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+   .name   = "smc911x",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+   .resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+if (omap_request_gpio(OMAP2EVM_ETHR_GPIO_IRQ) < 0) {
+   printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
+   OMAP2EVM_ETHR_GPIO_IRQ);
+   return;
+}
+
+omap_set_gpio_direction(OMAP2EVM_ETHR_GPIO_IRQ, 1);
+}
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
omap_init_irq();
omap_gpio_init();
+   omap2evm_init_smc911x();
 }

 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +85,13 @@ static int __init omap2_evm_i2c_init(void)
return 0;
 }

+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+   platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
omap_board_config = omap2_evm_config;
omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
omap_serial_init();
diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
b/include/asm-arm/arch-omap/board-omap2evm.h
index 98273a9..d770c58 100644
--- a/include/asm-arm/arch-omap/board-omap2evm.h
+++ b/include/asm-arm/arch-omap/board-omap2evm.h
@@ -30,7 +30,8 @@
 #define __ASM_ARCH_OMAP2_EVM_H

 /* Placeholder for OMAP2EVM specific defines */
-#define OMAP24XX_ETHR_START0x08000300
-#define OMAP24XX_ETHR_GPIO_IRQ 149
+#define OMAP2EVM_ETHR_START0x2c00
+#define OMAP2EVM_ETHR_SIZE 1024
+#define OMAP2EVM_ETHR_GPIO_IRQ 149

 #endif /* __ASM_ARCH_OMAP2_EVM_H */
--
1.5.3.4
From 58efa8d0019a7f777aaad2d43afb05170df25fae Mon Sep 17 00:00:00 2001
From: Arun KS <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 16:01:32 +0530
Subject: [PATCH] OMAP2EVM:	Adding ethernet support

OMAP2EVM: add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   37 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..e9a2cef 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,43 @@
 #include 
 #include 
 
+static struct resource omap2evm_smc911x_resources[] = {
+	[0] =   {
+		.start  = OMAP2EVM_ETHR_START,
+		.end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] =   {
+		.start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+	.name   = "smc911x",
+	.id = -1,
+	.num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+	.resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+if (omap_request_gpio(OMAP2EVM_ETHR_GPIO_IRQ) < 0) {
+		printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
+		OMAP2EVM_ETHR_GPIO_IRQ);
+		return;
+}
+
+omap_set_gpio_direction(OMAP2EVM_ETHR_GPIO_IRQ, 1);
+}
+
 static void __init omap2_evm_init_irq(void)
 {
 	omap2_init_common_hw();
 	omap_init_irq();
 	omap_gpio_init();
+	omap2evm_init_smc911x();
 }
 
 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +85,13 @@ static int __init omap2_evm_i2c_init(void)
 	return 0;
 }
 
+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+	platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
 	omap_boar

Re: [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Felipe Balbi


On Tue, 24 Jun 2008 17:34:59 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:
> From 58efa8d0019a7f777aaad2d43afb05170df25fae Mon Sep 17 00:00:00 2001
> From: Arun KS <[EMAIL PROTECTED]>
> Date: Tue, 24 Jun 2008 16:01:32 +0530
> Subject: [PATCH] OMAP2EVM:  Adding ethernet support
> 
> OMAP2EVM: add ethernet support (smc911x)
> 
> Signed-off-by: Arun KS <[EMAIL PROTECTED]>
> ---
>  arch/arm/mach-omap2/board-omap2evm.c   |   37
> 
>  include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
>  2 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap2evm.c
> b/arch/arm/mach-omap2/board-omap2evm.c
> index d00e502..e9a2cef 100644
> --- a/arch/arm/mach-omap2/board-omap2evm.c
> +++ b/arch/arm/mach-omap2/board-omap2evm.c
> @@ -27,11 +27,43 @@
>  #include 
>  #include 
> 
> +static struct resource omap2evm_smc911x_resources[] = {
> +   [0] =   {
> +   .start  = OMAP2EVM_ETHR_START,
> +   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
> +   .flags  = IORESOURCE_MEM,
> +   },
> +   [1] =   {
> +   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
> +   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
> +   .flags  = IORESOURCE_IRQ,

it looks like drivers/net/smc911x doesn't use IORESOURCE_IRQ, am I
misreading it ?

> +   },
> +};
> +
> +static struct platform_device omap2evm_smc911x_device = {
> +   .name   = "smc911x",
> +   .id = -1,
> +   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
> +   .resource   = &omap2evm_smc911x_resources [0],
> +};
> +
> +static inline void __init omap2evm_init_smc911x(void)
> +{
> +if (omap_request_gpio(OMAP2EVM_ETHR_GPIO_IRQ) < 0) {
> +   printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
> +   OMAP2EVM_ETHR_GPIO_IRQ);
> +   return;
> +}
> +
> +omap_set_gpio_direction(OMAP2EVM_ETHR_GPIO_IRQ, 1);

please use gpiolib ;-)

> +}
> +
>  static void __init omap2_evm_init_irq(void)
>  {
> omap2_init_common_hw();
> omap_init_irq();
> omap_gpio_init();
> +   omap2evm_init_smc911x();
>  }
> 
>  static struct omap_uart_config omap2_evm_uart_config __initdata = {
> @@ -53,8 +85,13 @@ static int __init omap2_evm_i2c_init(void)
> return 0;
>  }
> 
> +static struct platform_device *omap2_evm_devices[] __initdata = {
> +&omap2evm_smc911x_device,
> +};
> +
>  static void __init omap2_evm_init(void)
>  {
> +   platform_add_devices(omap2_evm_devices,
> ARRAY_SIZE(omap2_evm_devices));
> omap_board_config = omap2_evm_config;
> omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
> omap_serial_init();
> diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
> b/include/asm-arm/arch-omap/board-omap2evm.h
> index 98273a9..d770c58 100644
> --- a/include/asm-arm/arch-omap/board-omap2evm.h
> +++ b/include/asm-arm/arch-omap/board-omap2evm.h
> @@ -30,7 +30,8 @@
>  #define __ASM_ARCH_OMAP2_EVM_H
> 
>  /* Placeholder for OMAP2EVM specific defines */
> -#define OMAP24XX_ETHR_START0x08000300
> -#define OMAP24XX_ETHR_GPIO_IRQ 149
> +#define OMAP2EVM_ETHR_START0x2c00
> +#define OMAP2EVM_ETHR_SIZE 1024
> +#define OMAP2EVM_ETHR_GPIO_IRQ 149
> 
>  #endif /* __ASM_ARCH_OMAP2_EVM_H */
> --
> 1.5.3.4
-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

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


[ PATCH 2/3 ] net:smc911x Modify driver to also work with omap24xx

2008-06-24 Thread Arun KS
net:smc911x Modify driver to also work with omap24xx

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 drivers/net/Kconfig   |2 +-
 drivers/net/smc911x.h |5 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 61ecee7..17d0a9c 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -955,7 +955,7 @@ config SMC911X
tristate "SMSC LAN911[5678] support"
select CRC32
select MII
-   depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX
+   depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX || ARCH_OMAP24XX
help
  This is a driver for SMSC's LAN911x series of Ethernet chipsets
  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index dad93a8..0f406a0 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -47,6 +47,11 @@
   #define SMC_USE_32BIT1
   #define SMC_IRQ_SENSEIRQF_TRIGGER_LOW
   #define SMC_MEM_RESERVED 1
+#elif defined(CONFIG_ARCH_OMAP24XX)
+  #define SMC_USE_16BIT0
+  #define SMC_USE_32BIT1
+  #define SMC_IRQ_SENSEIRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED 1
 #endif


--
1.5.3.4
From 8b45bfd40aca7d5f89195f95d668bae78e2dbba9 Mon Sep 17 00:00:00 2001
From: Arun KS <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 17:33:08 +0530
Subject: [PATCH] net:smc911x Modify driver to also work with omap24xx

net:smc911x Modify driver to also work with omap24xx

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 drivers/net/Kconfig   |2 +-
 drivers/net/smc911x.h |5 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 61ecee7..17d0a9c 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -955,7 +955,7 @@ config SMC911X
 	tristate "SMSC LAN911[5678] support"
 	select CRC32
 	select MII
-	depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX
+	depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX || ARCH_OMAP24XX
 	help
 	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
 	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index dad93a8..0f406a0 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -47,6 +47,11 @@
   #define SMC_USE_32BIT		1
   #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
   #define SMC_MEM_RESERVED	1
+#elif defined(CONFIG_ARCH_OMAP24XX)
+  #define SMC_USE_16BIT		0
+  #define SMC_USE_32BIT		1
+  #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED	1
 #endif
 
 
-- 
1.5.3.4



[PATCH 3/3] OMAP2EVM: add ethernet support in defconfig

2008-06-24 Thread Arun KS
Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/configs/omap2_evm_defconfig |  489 --
 1 files changed, 349 insertions(+), 140 deletions(-)

diff --git a/arch/arm/configs/omap2_evm_defconfig
b/arch/arm/configs/omap2_evm_defconfig
index 38f37d9..09383f9 100644
--- a/arch/arm/configs/omap2_evm_defconfig
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-omap1
-# Wed Oct 10 12:21:32 2007
+# Linux kernel version: 2.6.26-rc7-omap1
+# Tue Jun 24 17:29:35 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -21,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_ZONE_DMA=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -37,13 +38,19 @@ 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_USER_NS is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -52,27 +59,38 @@ CONFIG_EMBEDDED=y
 CONFIG_UID16=y
 # CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 CONFIG_MODVERSIONS=y
@@ -96,6 +114,7 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y

 #
 # System Type
@@ -124,6 +143,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
@@ -133,10 +153,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM7X00A is not set

 #
 # TI OMAP Implementations
 #
+CONFIG_ARCH_OMAP_OTG=y
 # CONFIG_ARCH_OMAP1 is not set
 CONFIG_ARCH_OMAP2=y
 # CONFIG_ARCH_OMAP3 is not set
@@ -144,6 +166,8 @@ CONFIG_ARCH_OMAP2=y
 #
 # OMAP Feature Selections
 #
+# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
 # CONFIG_OMAP_RESET_CLOCKS is not set
 CONFIG_OMAP_BOOT_TAG=y
 # CONFIG_OMAP_BOOT_REASON is not set
@@ -152,18 +176,16 @@ CONFIG_OMAP_BOOT_TAG=y
 CONFIG_OMAP_MUX=y
 # CONFIG_OMAP_MUX_DEBUG is not set
 # CONFIG_OMAP_MUX_WARNINGS is not set
-# CONFIG_OMAP_STI is not set
 # CONFIG_OMAP_MCBSP is not set
 # CONFIG_OMAP_MMU_FWK is not set
 # CONFIG_OMAP_MBOX_FWK is not set
 CONFIG_OMAP_MPU_TIMER=y
 # CONFIG_OMAP_32K_TIMER is not set
 CONFIG_OMAP_DM_TIMER=y
-# CONFIG_OMAP_LL_DEBUG_UART1 is not set
+CONFIG_OMAP_LL_DEBUG_UART1=y
 # CONFIG_OMAP_LL_DEBUG_UART2 is not set
-CONFIG_OMAP_LL_DEBUG_UART3=y
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
 CONFIG_OMAP_SERIAL_WAKE=y
-# CONFIG_OMAP_DSP is not set
 # CONFIG_MACH_OMAP_GENERIC is not set

 #
@@ -176,10 +198,6 @@ CONFIG_ARCH_OMAP2430=y
 #
 # OMAP Board Type
 #
-# CONFIG_MACH_NOKIA_N800 is not set
-# CONFIG_MACH_OMAP_H4 is not set
-# CONFIG_MACH_OMAP_APOLLON is not set
-# CONFIG_MACH_OMAP_APOLLON_PLUS is not set
 # CONFIG_MACH_OMAP_2430SDP is not set
 CONFIG_MACH_OMAP2EVM=y

@@ -222,10 +240,6 @@ CONFIG_ARM_THUMB=y
 #
 # CONFIG_PCI_SYSCALL is not set
 # CONFIG_ARCH_SUPPORTS_MSI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set

 #
@@ -234,10 +248,10 @@ CONFIG_ARM_THUMB=y
 # CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_PREEMPT=y
 CONFIG_HZ=100
-CONFIG_AEABI=y
-CONFIG_OABI_COMPAT=y
+# CONFIG_AEABI is not set
 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not 

Re: [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
Hi Felipe,

I will do the changes and resend the patches.

Best Regards,
Arun

On Tue, Jun 24, 2008 at 5:42 PM, Felipe Balbi <[EMAIL PROTECTED]> wrote:
>
>
> On Tue, 24 Jun 2008 17:34:59 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:
>> From 58efa8d0019a7f777aaad2d43afb05170df25fae Mon Sep 17 00:00:00 2001
>> From: Arun KS <[EMAIL PROTECTED]>
>> Date: Tue, 24 Jun 2008 16:01:32 +0530
>> Subject: [PATCH] OMAP2EVM:  Adding ethernet support
>>
>> OMAP2EVM: add ethernet support (smc911x)
>>
>> Signed-off-by: Arun KS <[EMAIL PROTECTED]>
>> ---
>>  arch/arm/mach-omap2/board-omap2evm.c   |   37
>> 
>>  include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
>>  2 files changed, 40 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap2evm.c
>> b/arch/arm/mach-omap2/board-omap2evm.c
>> index d00e502..e9a2cef 100644
>> --- a/arch/arm/mach-omap2/board-omap2evm.c
>> +++ b/arch/arm/mach-omap2/board-omap2evm.c
>> @@ -27,11 +27,43 @@
>>  #include 
>>  #include 
>>
>> +static struct resource omap2evm_smc911x_resources[] = {
>> +   [0] =   {
>> +   .start  = OMAP2EVM_ETHR_START,
>> +   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
>> +   .flags  = IORESOURCE_MEM,
>> +   },
>> +   [1] =   {
>> +   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
>> +   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
>> +   .flags  = IORESOURCE_IRQ,
>
> it looks like drivers/net/smc911x doesn't use IORESOURCE_IRQ, am I
> misreading it ?
>
>> +   },
>> +};
>> +
>> +static struct platform_device omap2evm_smc911x_device = {
>> +   .name   = "smc911x",
>> +   .id = -1,
>> +   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
>> +   .resource   = &omap2evm_smc911x_resources [0],
>> +};
>> +
>> +static inline void __init omap2evm_init_smc911x(void)
>> +{
>> +if (omap_request_gpio(OMAP2EVM_ETHR_GPIO_IRQ) < 0) {
>> +   printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
>> +   OMAP2EVM_ETHR_GPIO_IRQ);
>> +   return;
>> +}
>> +
>> +omap_set_gpio_direction(OMAP2EVM_ETHR_GPIO_IRQ, 1);
>
> please use gpiolib ;-)
>
>> +}
>> +
>>  static void __init omap2_evm_init_irq(void)
>>  {
>> omap2_init_common_hw();
>> omap_init_irq();
>> omap_gpio_init();
>> +   omap2evm_init_smc911x();
>>  }
>>
>>  static struct omap_uart_config omap2_evm_uart_config __initdata = {
>> @@ -53,8 +85,13 @@ static int __init omap2_evm_i2c_init(void)
>> return 0;
>>  }
>>
>> +static struct platform_device *omap2_evm_devices[] __initdata = {
>> +&omap2evm_smc911x_device,
>> +};
>> +
>>  static void __init omap2_evm_init(void)
>>  {
>> +   platform_add_devices(omap2_evm_devices,
>> ARRAY_SIZE(omap2_evm_devices));
>> omap_board_config = omap2_evm_config;
>> omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
>> omap_serial_init();
>> diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
>> b/include/asm-arm/arch-omap/board-omap2evm.h
>> index 98273a9..d770c58 100644
>> --- a/include/asm-arm/arch-omap/board-omap2evm.h
>> +++ b/include/asm-arm/arch-omap/board-omap2evm.h
>> @@ -30,7 +30,8 @@
>>  #define __ASM_ARCH_OMAP2_EVM_H
>>
>>  /* Placeholder for OMAP2EVM specific defines */
>> -#define OMAP24XX_ETHR_START0x08000300
>> -#define OMAP24XX_ETHR_GPIO_IRQ 149
>> +#define OMAP2EVM_ETHR_START0x2c00
>> +#define OMAP2EVM_ETHR_SIZE 1024
>> +#define OMAP2EVM_ETHR_GPIO_IRQ 149
>>
>>  #endif /* __ASM_ARCH_OMAP2_EVM_H */
>> --
>> 1.5.3.4
> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> [EMAIL PROTECTED]
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
On Tue, Jun 24, 2008 at 5:42 PM, Felipe Balbi <[EMAIL PROTECTED]> wrote:
>
>
> On Tue, 24 Jun 2008 17:34:59 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:
>> From 58efa8d0019a7f777aaad2d43afb05170df25fae Mon Sep 17 00:00:00 2001
>> From: Arun KS <[EMAIL PROTECTED]>
>> Date: Tue, 24 Jun 2008 16:01:32 +0530
>> Subject: [PATCH] OMAP2EVM:  Adding ethernet support
>>
>> OMAP2EVM: add ethernet support (smc911x)
>>
>> Signed-off-by: Arun KS <[EMAIL PROTECTED]>
>> ---
>>  arch/arm/mach-omap2/board-omap2evm.c   |   37
>> 
>>  include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
>>  2 files changed, 40 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap2evm.c
>> b/arch/arm/mach-omap2/board-omap2evm.c
>> index d00e502..e9a2cef 100644
>> --- a/arch/arm/mach-omap2/board-omap2evm.c
>> +++ b/arch/arm/mach-omap2/board-omap2evm.c
>> @@ -27,11 +27,43 @@
>>  #include 
>>  #include 
>>
>> +static struct resource omap2evm_smc911x_resources[] = {
>> +   [0] =   {
>> +   .start  = OMAP2EVM_ETHR_START,
>> +   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
>> +   .flags  = IORESOURCE_MEM,
>> +   },
>> +   [1] =   {
>> +   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
>> +   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
>> +   .flags  = IORESOURCE_IRQ,
>
> it looks like drivers/net/smc911x doesn't use IORESOURCE_IRQ, am I
> misreading it ?
>

Yes this driver uses platform_get_irq(pdev, 0) to get its irq number.
>> +   },
>> +};
>> +
>> +static struct platform_device omap2evm_smc911x_device = {
>> +   .name   = "smc911x",
>> +   .id = -1,
>> +   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
>> +   .resource   = &omap2evm_smc911x_resources [0],
>> +};
>> +
>> +static inline void __init omap2evm_init_smc911x(void)
>> +{
>> +if (omap_request_gpio(OMAP2EVM_ETHR_GPIO_IRQ) < 0) {
>> +   printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
>> +   OMAP2EVM_ETHR_GPIO_IRQ);
>> +   return;
>> +}
>> +
>> +omap_set_gpio_direction(OMAP2EVM_ETHR_GPIO_IRQ, 1);
>
> please use gpiolib ;-)
>
>> +}
>> +
>>  static void __init omap2_evm_init_irq(void)
>>  {
>> omap2_init_common_hw();
>> omap_init_irq();
>> omap_gpio_init();
>> +   omap2evm_init_smc911x();
>>  }
>>
>>  static struct omap_uart_config omap2_evm_uart_config __initdata = {
>> @@ -53,8 +85,13 @@ static int __init omap2_evm_i2c_init(void)
>> return 0;
>>  }
>>
>> +static struct platform_device *omap2_evm_devices[] __initdata = {
>> +&omap2evm_smc911x_device,
>> +};
>> +
>>  static void __init omap2_evm_init(void)
>>  {
>> +   platform_add_devices(omap2_evm_devices,
>> ARRAY_SIZE(omap2_evm_devices));
>> omap_board_config = omap2_evm_config;
>> omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
>> omap_serial_init();
>> diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
>> b/include/asm-arm/arch-omap/board-omap2evm.h
>> index 98273a9..d770c58 100644
>> --- a/include/asm-arm/arch-omap/board-omap2evm.h
>> +++ b/include/asm-arm/arch-omap/board-omap2evm.h
>> @@ -30,7 +30,8 @@
>>  #define __ASM_ARCH_OMAP2_EVM_H
>>
>>  /* Placeholder for OMAP2EVM specific defines */
>> -#define OMAP24XX_ETHR_START0x08000300
>> -#define OMAP24XX_ETHR_GPIO_IRQ 149
>> +#define OMAP2EVM_ETHR_START0x2c00
>> +#define OMAP2EVM_ETHR_SIZE 1024
>> +#define OMAP2EVM_ETHR_GPIO_IRQ 149
>>
>>  #endif /* __ASM_ARCH_OMAP2_EVM_H */
>> --
>> 1.5.3.4
> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> [EMAIL PROTECTED]
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Felipe Balbi


On Tue, 24 Jun 2008 18:24:11 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:

>> it looks like drivers/net/smc911x doesn't use IORESOURCE_IRQ, am I
>> misreading it ?
>>
> 
> Yes this driver uses platform_get_irq(pdev, 0) to get its irq number.

Cool, thanks :-)

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

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


Re: [Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
OMAP2EVM: Add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   39 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..61f6b1e 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,45 @@
 #include 
 #include 

+static struct resource omap2evm_smc911x_resources[] = {
+   [0] =   {
+   .start  = OMAP2EVM_ETHR_START,
+   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] =   {
+   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+   .name   = "smc911x",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+   .resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+   int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+   int ret;
+
+   ret = gpio_request(gpio, "smc911x IRQ");
+   if (ret >= 0)
+   gpio_direction_input(gpio);
+   else
+   printk(KERN_ERR "Failed to request GPIO for smc911x IRQ\n");
+
+}
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
omap_init_irq();
omap_gpio_init();
+   omap2evm_init_smc911x();
 }

 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +87,13 @@ static int __init omap2_evm_i2c_init(void)
return 0;
 }

+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+   platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
omap_board_config = omap2_evm_config;
omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
omap_serial_init();
diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
b/include/asm-arm/arch-omap/board-omap2evm.h
index 98273a9..d770c58 100644
--- a/include/asm-arm/arch-omap/board-omap2evm.h
+++ b/include/asm-arm/arch-omap/board-omap2evm.h
@@ -30,7 +30,8 @@
 #define __ASM_ARCH_OMAP2_EVM_H

 /* Placeholder for OMAP2EVM specific defines */
-#define OMAP24XX_ETHR_START0x08000300
-#define OMAP24XX_ETHR_GPIO_IRQ 149
+#define OMAP2EVM_ETHR_START0x2c00
+#define OMAP2EVM_ETHR_SIZE 1024
+#define OMAP2EVM_ETHR_GPIO_IRQ 149

 #endif /* __ASM_ARCH_OMAP2_EVM_H */
--
1.5.3.4
From f7b330a88124c294204539cf8d1f471400a676b9 Mon Sep 17 00:00:00 2001
From: Arun KS <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 18:59:28 +0530
Subject: [PATCH] OMAP2EVM: Adding ethernet support

OMAP2EVM: Add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   39 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..61f6b1e 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,45 @@
 #include 
 #include 
 
+static struct resource omap2evm_smc911x_resources[] = {
+	[0] =   {
+		.start  = OMAP2EVM_ETHR_START,
+		.end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] =   {
+		.start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+	.name   = "smc911x",
+	.id = -1,
+	.num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+	.resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+	int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+	int ret;
+
+	ret = gpio_request(gpio, "smc911x IRQ");
+	if (ret >= 0)
+		gpio_direction_input(gpio);
+	else
+		printk(KERN_ERR "Failed to request GPIO for smc911x IRQ\n");
+
+}
+
 static void __init omap2_evm_init_irq(void)
 {
 	omap2_init_common_hw();
 	omap_init_irq();
 	omap_gpio_init();
+	omap2evm_init_smc911x();
 }
 
 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +87,13 @@ static int __init omap2_evm_i2c_init(void)
 	return 0;
 }
 
+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+	platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
 	omap_board_config = omap2_evm_config;
 	omap_bo

Re: [PATCH] OMAP2/3 PM: Add OMAP PM no-op layer

2008-06-24 Thread Ramesh Gupta G

Hello Paul,

Will this interface provides information of max number if OPPs supported 
and

the frequency corresponding to eah OPP level?


It could be added.  This is for DSPBridge use, not for the MPU, correct?
Is the idea essentially to replace the vdd1_dsp_freq[] array in
mpu_driver/src/rmgr/linux/common/drv_interface.c?


Yes, this is to replace the  table in drv_interface.c


Can you tell me what
each of the 4 fields in vdd1_dsp_freq[] means?


The 4 fileds of vdd1_freq[] are as below.

voltage
opp frequency
min frequency
max frequency

we are currently not using the field 'voltage', this is for future usage.
the min_frequency and max_frequency are threshold frequencies set by DSP and 
are configurable.




Perhaps something similar to an OMAP PM function
"omap_pm_dsp_get_opp_table()" that DSPBridge could call on startup?



Sure, we can call this function on startup.


MPU Bridge is required to inform the DSP about OPP level change for load
predictor use in DSP; this is done as part of in post notification in
dspbridge. Do we have support for Post Notification in this framework?


I just posted some patches for that a few days ago.  You should be able to
use those to notify DSPBridge of changes to iva2_ck.


Thanks for that, we will look into that.

Also can you please provide the tentative dates these patches are avialable 
with above changes.


Please let us know your comments.

regards
Ramesh Gupta G

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


[PATCH 1/3] OMAP3: EVM: Add twl4030 keypad driver support

2008-06-24 Thread Miguel Angel Aguilar Ulloa

Add twl4030 keypad driver support to OMAP3 EVM

Signed-off-by: Miguel Angel Aguilar <[EMAIL PROTECTED]>

--- a/arch/arm/mach-omap2/board-omap3evm.c2008-06-23 15:07:13.0 
-0600
+++ b/arch/arm/mach-omap2/board-omap3evm.c2008-06-23 14:32:29.0 
-0600
@@ -19,6 +19,7 @@
#include 
#include 
#include 
+#include 
#include 
#include 

@@ -28,6 +29,7 @@
#include 

#include 
+#include 
#include 
#include 
#include 
@@ -149,6 +151,56 @@ struct spi_board_info omap3evm_spi_board
   },
};

+static int omap3evm_keymap[] = {
+KEY(0, 0, KEY_LEFT),
+KEY(0, 1, KEY_RIGHT),
+KEY(0, 2, KEY_A),
+KEY(0, 3, KEY_B),
+KEY(0, 4, KEY_C),
+KEY(1, 0, KEY_DOWN),
+KEY(1, 1, KEY_UP),
+KEY(1, 2, KEY_E),
+KEY(1, 3, KEY_F),
+KEY(1, 4, KEY_G),
+KEY(2, 0, KEY_ENTER),
+KEY(2, 1, KEY_I),
+KEY(2, 2, KEY_J),
+KEY(2, 3, KEY_K),
+KEY(2, 4, KEY_3),
+KEY(3, 0, KEY_M),
+KEY(3, 1, KEY_N),
+KEY(3, 2, KEY_O),
+KEY(3, 3, KEY_P),
+KEY(3, 4, KEY_Q),
+KEY(4, 0, KEY_R),
+KEY(4, 1, KEY_4),
+KEY(4, 2, KEY_T),
+KEY(4, 3, KEY_U),
+KEY(4, 4, KEY_D),
+KEY(5, 0, KEY_V),
+KEY(5, 1, KEY_W),
+KEY(5, 2, KEY_L),
+KEY(5, 3, KEY_S),
+KEY(5, 4, KEY_H),
+0
+};
+
+static struct omap_kp_platform_data omap3evm_kp_data = {
+.rows= 4,
+.cols= 4,
+.keymap = omap3evm_keymap,
+.keymapsize= ARRAY_SIZE(omap3evm_keymap),
+.rep= 1,
+};
+
+static struct platform_device omap3evm_kp_device = {
+.name= "omap_twl4030keypad",
+.id= -1,
+.dev= {
+.platform_data = &omap3evm_kp_data,
+},
+};
+
static void __init omap3_evm_init_irq(void)
{
   omap2_init_common_hw();
@@ -165,6 +217,7 @@ static struct omap_board_config_kernel o

static struct platform_device *omap3_evm_devices[] __initdata = {
   &omap3_evm_lcd_device,
+&omap3evm_kp_device,
#ifdef CONFIG_RTC_DRV_TWL4030
   &omap3_evm_twl4030rtc_device,
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] OMAP3: EVM: KEYPAD: Fix Kconfig dependency

2008-06-24 Thread Miguel Angel Aguilar Ulloa

Add twl4030 keypad driver support to OMAP3 EVM

Signed-off-by: Miguel Angel Aguilar <[EMAIL PROTECTED]>

--- a/drivers/input/keyboard/Kconfig2008-06-23 15:06:17.0 -0600
+++ b/drivers/input/keyboard/Kconfig2008-06-23 14:32:29.0 -0600
@@ -261,7 +261,7 @@ config KEYBOARD_OMAP

config KEYBOARD_TWL4030
   tristate "TI TWL4030 keypad support"
-depends on TWL4030_CORE && (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP)
+depends on TWL4030_CORE && (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP || 
MACH_OMAP3EVM)
   help
 Say Y here if you want to use the OMAP TWL4030 keypad.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] OMAP3: EVM: KEYPAD: Add twl4030 keypad to defconfig

2008-06-24 Thread Miguel Angel Aguilar Ulloa

Enable twl4030 keypad driver in omap3_evm_defconfig

Signed-off-by: Miguel Angel Aguilar <[EMAIL PROTECTED]>

--- a/arch/arm/configs/omap3_evm_defconfig2008-06-11 08:32:45.0 
-0600
+++ b/arch/arm/configs/omap3_evm_defconfig2008-06-23 14:35:23.0 
-0600
@@ -601,7 +601,16 @@ CONFIG_INPUT=y
#
# Input Device Drivers
#
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_TWL4030=m
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Felipe Balbi
Hi,

On Tue, 24 Jun 2008 18:55:26 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:

> +static inline void __init omap2evm_init_smc911x(void)
> +{
> +   int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
> +   int ret;
> +
> +   ret = gpio_request(gpio, "smc911x IRQ");
> +   if (ret >= 0)
> +   gpio_direction_input(gpio);
> +   else
> +   printk(KERN_ERR "Failed to request GPIO for smc911x

this would look better like this:

  if (ret < 0) {
 printk(KERN_ERR "Failed to request GPIO %d for smc911x IRQ\n",
gpio);
 return;
  }

  gpio_direction_input(gpio);


besides this, it looks fine :-)

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

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


Re: [Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS

Hi Felipe,

Thanks for your comments. I will incorporate those changes
and will send back.

Regards
Arun
Felipe Balbi wrote:

Hi,

On Tue, 24 Jun 2008 18:55:26 +0530, "Arun KS" <[EMAIL PROTECTED]> wrote:

  

+static inline void __init omap2evm_init_smc911x(void)
+{
+   int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+   int ret;
+
+   ret = gpio_request(gpio, "smc911x IRQ");
+   if (ret >= 0)
+   gpio_direction_input(gpio);
+   else
+   printk(KERN_ERR "Failed to request GPIO for smc911x



this would look better like this:

  if (ret < 0) {
 printk(KERN_ERR "Failed to request GPIO %d for smc911x IRQ\n",
gpio);
 return;
  }

  gpio_direction_input(gpio);


besides this, it looks fine :-)

  



Please do not print this email unless it is absolutely necessary. Spread 
environmental awareness.

---DISCLAIMER--
The information transmitted herewith is confidential and proprietary 
information intended only for use by the individual or entity to which it is 
addressed. If the reader of this message is not the intended recipient, you are 
hereby notified that any review, retransmission, dissemination, distribution, 
copying or other use of, or taking of any action in reliance upon this 
information is strictly prohibited. If you have received this communication in 
error, please contact the sender and delete the material from your computer.




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


[Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
OMAP2EVM: Add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   41 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..0048775 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,47 @@
 #include 
 #include 

+static struct resource omap2evm_smc911x_resources[] = {
+   [0] =   {
+   .start  = OMAP2EVM_ETHR_START,
+   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] =   {
+   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+   .name   = "smc911x",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+   .resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+   int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+   int ret;
+
+   ret = gpio_request(gpio, "smc911x IRQ");
+   if (ret < 0) {
+   printk(KERN_ERR "Failed to request GPIO %d for smc911x IRQ\n",
+   gpio);
+   return;
+   }
+   gpio_direction_input(gpio);
+
+}
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
omap_init_irq();
omap_gpio_init();
+   omap2evm_init_smc911x();
 }

 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +89,13 @@ static int __init omap2_evm_i2c_init(void)
return 0;
 }

+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+   platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
omap_board_config = omap2_evm_config;
omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
omap_serial_init();
diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
b/include/asm-arm/arch-omap/board-omap2evm.h
index 98273a9..d770c58 100644
--- a/include/asm-arm/arch-omap/board-omap2evm.h
+++ b/include/asm-arm/arch-omap/board-omap2evm.h
@@ -30,7 +30,8 @@
 #define __ASM_ARCH_OMAP2_EVM_H

 /* Placeholder for OMAP2EVM specific defines */
-#define OMAP24XX_ETHR_START0x08000300
-#define OMAP24XX_ETHR_GPIO_IRQ 149
+#define OMAP2EVM_ETHR_START0x2c00
+#define OMAP2EVM_ETHR_SIZE 1024
+#define OMAP2EVM_ETHR_GPIO_IRQ 149

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


Re: [Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Felipe Balbi
Your patch came with spaces in place of tabs, please tabify and resend

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

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


[Resend] [PATCH 1/3] OMAP2EVM: add ethernet support (smc911x)

2008-06-24 Thread Arun KS
OMAP2EVM: Add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   41 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..0048775 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,47 @@
 #include 
 #include 

+static struct resource omap2evm_smc911x_resources[] = {
+   [0] =   {
+   .start  = OMAP2EVM_ETHR_START,
+   .end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] =   {
+   .start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+   .name   = "smc911x",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+   .resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+   int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+   int ret;
+
+   ret = gpio_request(gpio, "smc911x IRQ");
+   if (ret < 0) {
+   printk(KERN_ERR "Failed to request GPIO %d for smc911x IRQ\n",
+   gpio);
+   return;
+   }
+   gpio_direction_input(gpio);
+
+}
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
omap_init_irq();
omap_gpio_init();
+   omap2evm_init_smc911x();
 }

 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +89,13 @@ static int __init omap2_evm_i2c_init(void)
return 0;
 }

+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+   platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_devices));
omap_board_config = omap2_evm_config;
omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
omap_serial_init();
diff --git a/include/asm-arm/arch-omap/board-omap2evm.h
b/include/asm-arm/arch-omap/board-omap2evm.h
index 98273a9..d770c58 100644
--- a/include/asm-arm/arch-omap/board-omap2evm.h
+++ b/include/asm-arm/arch-omap/board-omap2evm.h
@@ -30,7 +30,8 @@
 #define __ASM_ARCH_OMAP2_EVM_H

 /* Placeholder for OMAP2EVM specific defines */
-#define OMAP24XX_ETHR_START0x08000300
-#define OMAP24XX_ETHR_GPIO_IRQ 149
+#define OMAP2EVM_ETHR_START0x2c00
+#define OMAP2EVM_ETHR_SIZE 1024
+#define OMAP2EVM_ETHR_GPIO_IRQ 149

 #endif /* __ASM_ARCH_OMAP2_EVM_H */
--
1.5.3.4
From 1b0e3551a0a352fc06cadec9c267e76a3884f3fc Mon Sep 17 00:00:00 2001
From: Arun KS <[EMAIL PROTECTED]>
Date: Tue, 24 Jun 2008 20:51:46 +0530
Subject: [PATCH] OMAP2EVM: Adding ethernet support

OMAP2EVM: Add ethernet support (smc911x)

Signed-off-by: Arun KS <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |   41 
 include/asm-arm/arch-omap/board-omap2evm.h |5 ++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c b/arch/arm/mach-omap2/board-omap2evm.c
index d00e502..0048775 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -27,11 +27,47 @@
 #include 
 #include 
 
+static struct resource omap2evm_smc911x_resources[] = {
+	[0] =   {
+		.start  = OMAP2EVM_ETHR_START,
+		.end= (OMAP2EVM_ETHR_START + OMAP2EVM_ETHR_SIZE - 1),
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] =   {
+		.start  = OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.end= OMAP_GPIO_IRQ(OMAP2EVM_ETHR_GPIO_IRQ),
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device omap2evm_smc911x_device = {
+	.name   = "smc911x",
+	.id = -1,
+	.num_resources  = ARRAY_SIZE(omap2evm_smc911x_resources),
+	.resource   = &omap2evm_smc911x_resources [0],
+};
+
+static inline void __init omap2evm_init_smc911x(void)
+{
+	int gpio = OMAP2EVM_ETHR_GPIO_IRQ;
+	int ret;
+
+	ret = gpio_request(gpio, "smc911x IRQ");
+	if (ret < 0) {
+		printk(KERN_ERR "Failed to request GPIO %d for smc911x IRQ\n",
+		gpio);
+		return;
+	}
+	gpio_direction_input(gpio);
+
+}
+
 static void __init omap2_evm_init_irq(void)
 {
 	omap2_init_common_hw();
 	omap_init_irq();
 	omap_gpio_init();
+	omap2evm_init_smc911x();
 }
 
 static struct omap_uart_config omap2_evm_uart_config __initdata = {
@@ -53,8 +89,13 @@ static int __init omap2_evm_i2c_init(void)
 	return 0;
 }
 
+static struct platform_device *omap2_evm_devices[] __initdata = {
+&omap2evm_smc911x_device,
+};
+
 static void __init omap2_evm_init(void)
 {
+	platform_add_devices(omap2_evm_devices, ARRAY_SIZE(omap2_evm_d

standalone osk

2008-06-24 Thread mohammed shareef
Dear all,

i want to make my OSK-omap5912 a standalone system. so i am trying to
flash the filessystem on to its flash. so far it was on a network. i
want an environment variable to be defined at startup and then run an
executable. i figured out that it goes to /etc/inittab and then
executes the script name given there. But i dont know how exactly to
do that. could some one please tell me how to do that? thank you.
regards,
Shareef
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Latest git kernel won't build with muru.com N8x0 patch 2

2008-06-24 Thread green
The latest git kernel (6604ac6c8a14d583a463159f3a1601427dab7e05) won't build 
with patch 2 applied of the muru.com n8x0-2008-05-20 patches.

The last bit is here:
  CC  drivers/cbus/retu.o
  CC  drivers/cbus/retu-pwrbutton.o
  CC  drivers/cbus/retu-rtc.o
  CC  drivers/cbus/retu-wdt.o
drivers/cbus/retu-wdt.c: In function ‘retu_wdt_ioctl’:
drivers/cbus/retu-wdt.c:204: error: implicit declaration of function 
‘omap_readw’
make[2]: *** [drivers/cbus/retu-wdt.o] Error 1
make[1]: *** [drivers/cbus] Error 2
make: *** [drivers] Error 2

The config is attached.

The device powers off sporadically and I'm hoping an kernel upgrade will fix 
it.  The kernel I'm having (the power) problem with is somewhere around 
2.6.26-rc2; I'd like to catch up and see if it remains.

Thanks.


signature.asc
Description: Digital signature


[PATCH] PRCM: 34XX: Fix wrong shift value used in dpll4_m4x2_ck enable bit

2008-06-24 Thread Jouni Hogander
Enable bit for dpll4_m4x2_ck is OMAP3430_PWRDN_DSS1_SHIFT instead of
OMAP3430_PWRDN_CAM_SHIFT.

Signed-off-by: Jouni Hogander <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/clock34xx.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index b4dceea..4a8729a 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -819,7 +819,7 @@ static struct clk dpll4_m4x2_ck = {
.name   = "dpll4_m4x2_ck",
.parent = &dpll4_m4_ck,
.enable_reg = _OMAP34XX_CM_REGADDR(PLL_MOD, CM_CLKEN),
-   .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
+   .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT,
.flags  = CLOCK_IN_OMAP343X | RATE_PROPAGATES | INVERT_ENABLE,
.recalc = &omap3_clkoutx2_recalc,
 };
-- 
1.5.5

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


Re: [PATCH] PRCM: 34XX: Fix wrong shift value used in dpll4_m4x2_ck enable bit

2008-06-24 Thread Paul Walmsley
On Wed, 25 Jun 2008, Jouni Hogander wrote:

> Enable bit for dpll4_m4x2_ck is OMAP3430_PWRDN_DSS1_SHIFT instead of
> OMAP3430_PWRDN_CAM_SHIFT.
> 
> Signed-off-by: Jouni Hogander <[EMAIL PROTECTED]>

Acked-by: Paul Walmsley <[EMAIL PROTECTED]>


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