Re: [PATCH v2 1/2] input: touchscreen: introduce tsc2005 driver

2009-11-13 Thread Dmitry Torokhov
Hi Aaro,

On Wed, Nov 04, 2009 at 03:23:01PM +0200, Aaro Koskinen wrote:
> +
> +static void tsc2005_ts_update_pen_state(struct tsc2005 *ts,
> + int x, int y, int pressure)
> +{
> + if (pressure) {
> + input_report_abs(ts->idev, ABS_X, x);
> + input_report_abs(ts->idev, ABS_Y, y);
> + input_report_abs(ts->idev, ABS_PRESSURE, pressure);
> + if (!ts->pen_down) {
> + input_report_key(ts->idev, BTN_TOUCH, 1);
> + ts->pen_down = 1;
> + }

Just report BTN_TOUCH always, input core will filter duplicates.

> + } else {
> + input_report_abs(ts->idev, ABS_PRESSURE, 0);
> + if (ts->pen_down) {
> + input_report_key(ts->idev, BTN_TOUCH, 0);
> + ts->pen_down = 0;
> + }
> + }
> +
> + input_sync(ts->idev);
> +}
> +
> +/*
> + * This function is called by the SPI framework after the coordinates
> + * have been read from TSC2005
> + */
> +static void tsc2005_ts_rx(void *arg)
> +{
> + struct tsc2005 *ts = arg;
> + unsigned long flags;
> + int inside_rect, pressure_limit;
> + int x, y, z1, z2, pressure;
> +
> + spin_lock_irqsave(&ts->lock, flags);
> +
> + if (ts->disable_depth) {
> + ts->spi_pending = 0;
> + goto out;
> + }
> +
> + x = ts->data[0];
> + y = ts->data[1];
> + z1 = ts->data[2];
> + z2 = ts->data[3];
> +
> + /* validate pressure and position */
> + if (x > MAX_12BIT || y > MAX_12BIT)
> + goto out;
> +
> + /* skip coords if the pressure-components are out of range */
> + if (z1 < 100 || z2 > MAX_12BIT || z1 >= z2)
> + goto out;
> +
> + /* skip point if this is a pen down with the exact same values as
> +  * the value before pen-up - that implies SPI fed us stale data
> +  */
> + if (!ts->pen_down &&
> + ts->in_x == x &&
> + ts->in_y == y &&
> + ts->in_z1 == z1 &&
> + ts->in_z2 == z2)
> + goto out;
> +
> + /* At this point we are happy we have a valid and useful reading.
> +  * Remember it for later comparisons. We may now begin downsampling
> +  */
> + ts->in_x = x;
> + ts->in_y = y;
> + ts->in_z1 = z1;
> + ts->in_z2 = z2;
> +
> + /* don't run average on the "pen down" event */
> + if (ts->sample_sent) {
> + ts->avg_x += x;
> + ts->avg_y += y;
> + ts->avg_z1 += z1;
> + ts->avg_z2 += z2;
> +
> + if (++ts->sample_cnt < TS_SAMPLES)
> + goto out;
> +
> + x = ts->avg_x / TS_SAMPLES;
> + y = ts->avg_y / TS_SAMPLES;
> + z1 = ts->avg_z1 / TS_SAMPLES;
> + z2 = ts->avg_z2 / TS_SAMPLES;
> + }
> 

Do we really need to do filtering and averaging in kernel? What about
tslib?

> + ts->sample_cnt = 0;
> + ts->avg_x = 0;
> + ts->avg_y = 0;
> + ts->avg_z1 = 0;
> + ts->avg_z2 = 0;
> +
> + pressure = x * (z2 - z1) / z1;
> + pressure = pressure * ts->x_plate_ohm / 4096;
> +
> + pressure_limit = ts->sample_sent ? ts->p_max : ts->touch_pressure;
> + if (pressure > pressure_limit)
> + goto out;
> +
> + /* Discard the event if it still is within the previous rect -
> +  * unless the pressure is clearly harder, but then use previous
> +  * x,y position. If any coordinate deviates enough, fudging
> +  * of all three will still take place in the input layer.
> +  */
> + inside_rect = (ts->sample_sent &&
> + x > (int)ts->out_x - ts->fudge_x &&
> + x < (int)ts->out_x + ts->fudge_x &&
> + y > (int)ts->out_y - ts->fudge_y &&
> + y < (int)ts->out_y + ts->fudge_y);
> + if (inside_rect)
> + x = ts->out_x, y = ts->out_y;
> +
> + if (!inside_rect || pressure < (ts->out_p - ts->fudge_p)) {
> + tsc2005_ts_update_pen_state(ts, x, y, pressure);
> + ts->sample_sent = 1;
> + ts->out_x = x;
> + ts->out_y = y;
> + ts->out_p = pressure;
> + }
> +out:
> + if (ts->spi_pending > 1) {
> + /* One or more interrupts (sometimes several dozens)
> +  * occured while waiting for the SPI read - get
> +  * another read going.
> +  */
> + ts->spi_pending = 1;
> + if (spi_async(ts->spi, &ts->read_msg)) {
> + dev_err(&ts->spi->dev, "ts: spi_async() failed");
> + ts->spi_pending = 0;
> + }
> + } else
> + ts->spi_pending = 0;
> +
> + /* kick pen up timer - to make sure it expires again(!) */
> + if (ts->sample_sent) {
> + mod_timer(&ts->penup_timer,
> +   jiffies + msecs_to_jiffies(TSC2005_TS_PENUP_TIME));
> + /* Also kick the watchd

Re: OMAP: DMA: Use some define rather than a hexadecimal constant for LCD register

2009-11-13 Thread Janusz Krzysztofik
Saturday 14 November 2009 01:57:10 Tony Lindgren napisał(a):
> * Janusz Krzysztofik  [091110 03:20]:
> > The patch corrects the issue introduced with my previous patch:
> > "OMAP: DMA: Fix omapfb/lcdc on OMAP1510 broken when PM set"
> > as pointed out by OMAP subsystem maintainer.
>
> Looks like this patch needs to be refreshed against linux-omap
> for-next branch.

OK, I'll take care of this.

Janusz

> Tony
>
> > Signed-off-by: Janusz Krzysztofik 
> >
> > ---
> > Hi,
> >
> > I'd really like to have the first one get in as a fix in the -rc series,
> > that's why I decided to correct the issue in a follow up.
> >
> > 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
> >
> > diff -upr linux-2.6.32-rc6.orig/arch/arm/plat-omap/dma.c
> > linux-2.6.32-rc6/arch/arm/plat-omap/dma.c ---
> > linux-2.6.32-rc6.orig/arch/arm/plat-omap/dma.c  2009-11-05
> > 19:30:39.0 +0100 +++
> > linux-2.6.32-rc6/arch/arm/plat-omap/dma.c   2009-11-10 03:57:06.0
> > +0100 @@ -34,6 +34,7 @@
> >  #include 
> >  #include 
> >
> > +#include 
> >  #include 
> >
> >  #undef DEBUG
> > @@ -1113,7 +1114,7 @@ int omap_dma_running(void)
> >  * when it gets enabled, so assume DMA running if LCD enabled.
> >  */
> > if (cpu_is_omap1510())
> > -   if (omap_readw(0xfffec000 + 0x00) & (1 << 0))
> > +   if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN)
> > return 1;
> >
> > /* Check if LCD DMA is running */
> > diff -upr linux-2.6.32-rc6.orig/arch/arm/plat-omap/include/mach/omapfb.h
> > linux-2.6.32-rc6/arch/arm/plat-omap/include/mach/omapfb.h ---
> > linux-2.6.32-rc6.orig/arch/arm/plat-omap/include/mach/omapfb.h  
> > 2009-11-03
> > 20:37:49.0 +0100 +++
> > linux-2.6.32-rc6/arch/arm/plat-omap/include/mach/omapfb.h   2009-11-10
> > 03:52:00.0 +0100 @@ -170,6 +170,38 @@ enum omapfb_update_mode {
> >
> >  #include 
> >
> > +#define OMAP_LCDC_BASE 0xfffec000
> > +#define OMAP_LCDC_SIZE 256
> > +#define OMAP_LCDC_IRQ  INT_LCD_CTRL
> > +
> > +#define OMAP_LCDC_CONTROL  (OMAP_LCDC_BASE + 0x00)
> > +#define OMAP_LCDC_TIMING0  (OMAP_LCDC_BASE + 0x04)
> > +#define OMAP_LCDC_TIMING1  (OMAP_LCDC_BASE + 0x08)
> > +#define OMAP_LCDC_TIMING2  (OMAP_LCDC_BASE + 0x0c)
> > +#define OMAP_LCDC_STATUS   (OMAP_LCDC_BASE + 0x10)
> > +#define OMAP_LCDC_SUBPANEL (OMAP_LCDC_BASE + 0x14)
> > +#define OMAP_LCDC_LINE_INT (OMAP_LCDC_BASE + 0x18)
> > +#define OMAP_LCDC_DISPLAY_STATUS   (OMAP_LCDC_BASE + 0x1c)
> > +
> > +#define OMAP_LCDC_STAT_DONE(1 << 0)
> > +#define OMAP_LCDC_STAT_VSYNC   (1 << 1)
> > +#define OMAP_LCDC_STAT_SYNC_LOST   (1 << 2)
> > +#define OMAP_LCDC_STAT_ABC (1 << 3)
> > +#define OMAP_LCDC_STAT_LINE_INT(1 << 4)
> > +#define OMAP_LCDC_STAT_FUF (1 << 5)
> > +#define OMAP_LCDC_STAT_LOADED_PALETTE  (1 << 6)
> > +
> > +#define OMAP_LCDC_CTRL_LCD_EN  (1 << 0)
> > +#define OMAP_LCDC_CTRL_LCD_TFT (1 << 7)
> > +#define OMAP_LCDC_CTRL_LINE_IRQ_CLR_SEL(1 << 10)
> > +
> > +#define OMAP_LCDC_IRQ_VSYNC(1 << 2)
> > +#define OMAP_LCDC_IRQ_DONE (1 << 3)
> > +#define OMAP_LCDC_IRQ_LOADED_PALETTE   (1 << 4)
> > +#define OMAP_LCDC_IRQ_LINE_NIRQ(1 << 5)
> > +#define OMAP_LCDC_IRQ_LINE (1 << 6)
> > +#define OMAP_LCDC_IRQ_MASK (((1 << 5) - 1) << 2)
> > +
> >  #define OMAP_LCDC_INV_VSYNC 0x0001
> >  #define OMAP_LCDC_INV_HSYNC 0x0002
> >  #define OMAP_LCDC_INV_PIX_CLOCK 0x0004
> > diff -upr linux-2.6.32-rc6.orig/drivers/video/omap/lcdc.c
> > linux-2.6.32-rc6/drivers/video/omap/lcdc.c ---
> > linux-2.6.32-rc6.orig/drivers/video/omap/lcdc.c 2009-11-03
> > 20:37:49.0 +0100 +++
> > linux-2.6.32-rc6/drivers/video/omap/lcdc.c  2009-11-10 03:51:16.0
> > +0100 @@ -38,38 +38,6 @@
> >
> >  #define MODULE_NAME"lcdc"
> >
> > -#define OMAP_LCDC_BASE 0xfffec000
> > -#define OMAP_LCDC_SIZE 256
> > -#define OMAP_LCDC_IRQ  INT_LCD_CTRL
> > -
> > -#define OMAP_LCDC_CONTROL  (OMAP_LCDC_BASE + 0x00)
> > -#define OMAP_LCDC_TIMING0  (OMAP_LCDC_BASE + 0x04)
> > -#define OMAP_LCDC_TIMING1  (OMAP_LCDC_BASE + 0x08)
> > -#define OMAP_LCDC_TIMING2  (OMAP_LCDC_BASE + 0x0c)
> > -#define OMAP_LCDC_STATUS   (OMAP_LCDC_BASE + 0x10)
> > -#define OMAP_LCDC_SUBPANEL (OMAP_LCDC_BASE + 0x14)
> > -#define OMAP_LCDC_LINE_INT (OMAP_LCDC_BASE + 0x18)
> > -#define OMAP_LCDC_DISPLAY_STATUS   (OMAP_LCDC_BASE + 0x1c)
> > -
> > -#define OMAP_LCDC_STAT_DONE(1 << 0)
> > -#define OMAP_LC

Re: [RFC][PATCH] ARM: OMAP: McBSP: Use register cache

2009-11-13 Thread Janusz Krzysztofik
Hi,

This patch got outdated and does not apply any more, but the idea still hangs 
in my queue. I am not sure why the patch has never been acknowledged nor 
rejected. Maybe it just got missed?

Could you please take a position on this idea?

Thanks,
Janusz

http://www.spinics.net/lists/linux-omap/msg16720.html

Wednesday 12 August 2009 12:39:25 Janusz Krzysztofik wrote:
> Change the way McBSP registers are updated: use cached values instead of
> relying upon those read back from the device.
>
> With this patch, I have finally managed to get rid of all random
> playback/recording hangups on my OMAP1510 based Amstrad Delta (buggy?)
> hardware. Before that, I could suspect that values read back from McBSP
> registers before updating them happened to be errornous.
>
> I think there is one important point that makes this patch worth of
> applying, apart from my hardware quality. With the current code, if it ever
> happens to any machine, no matter if OMAP1510 or newer, to read incorrect
> value from a McBSP register, this wrong value will get written back without
> any checking. That can lead to hardware damage if, for example, an input
> pin is turned into output as a result.
>
> Created against linux-2.6.31-rc5
>
> Tested on Amstrad Delta
>
> Signed-off-by: Janusz Krzysztofik
>
> ---
> ---
> linux-2.6.31-rc5/arch/arm/plat-omap/include/mach/mcbsp.h.orig 2009-08-11
> 23:43:25.0 +0200 +++
> linux-2.6.31-rc5/arch/arm/plat-omap/include/mach/mcbsp.h  2009-08-11
> 23:45:46.0 +0200 @@ -377,6 +377,8 @@ struct omap_mcbsp {
>   struct omap_mcbsp_platform_data *pdata;
>   struct clk *iclk;
>   struct clk *fclk;
> +
> + struct omap_mcbsp_reg_cfg reg_cache;
>  };
>  extern struct omap_mcbsp **mcbsp_ptr;
>  extern int omap_mcbsp_count;
> --- linux-2.6.31-rc5/arch/arm/plat-omap/mcbsp.c.orig  2009-08-11
> 23:43:25.0 +0200 +++
> linux-2.6.31-rc5/arch/arm/plat-omap/mcbsp.c   2009-08-11 23:45:35.0
> +0200 @@ -91,6 +91,7 @@ static void omap_mcbsp_dump_reg(u8 id)
>  static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
>  {
>   struct omap_mcbsp *mcbsp_tx = dev_id;
> + struct omap_mcbsp_reg_cfg *reg_cache = &mcbsp_tx->reg_cache;
>   u16 irqst_spcr2;
>
>   irqst_spcr2 = OMAP_MCBSP_READ(mcbsp_tx->io_base, SPCR2);
> @@ -101,7 +102,7 @@ static irqreturn_t omap_mcbsp_tx_irq_han
>   irqst_spcr2);
>   /* Writing zero to XSYNC_ERR clears the IRQ */
>   OMAP_MCBSP_WRITE(mcbsp_tx->io_base, SPCR2,
> - irqst_spcr2 & ~(XSYNC_ERR));
> + reg_cache->spcr2 &= ~(XSYNC_ERR));
>   } else {
>   complete(&mcbsp_tx->tx_irq_completion);
>   }
> @@ -112,6 +113,7 @@ static irqreturn_t omap_mcbsp_tx_irq_han
>  static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
>  {
>   struct omap_mcbsp *mcbsp_rx = dev_id;
> + struct omap_mcbsp_reg_cfg *reg_cache = &mcbsp_rx->reg_cache;
>   u16 irqst_spcr1;
>
>   irqst_spcr1 = OMAP_MCBSP_READ(mcbsp_rx->io_base, SPCR1);
> @@ -122,7 +124,7 @@ static irqreturn_t omap_mcbsp_rx_irq_han
>   irqst_spcr1);
>   /* Writing zero to RSYNC_ERR clears the IRQ */
>   OMAP_MCBSP_WRITE(mcbsp_rx->io_base, SPCR1,
> - irqst_spcr1 & ~(RSYNC_ERR));
> + reg_cache->spcr1 &= ~(RSYNC_ERR));
>   } else {
>   complete(&mcbsp_rx->tx_irq_completion);
>   }
> @@ -167,6 +169,7 @@ static void omap_mcbsp_rx_dma_callback(i
>  void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg
> *config) {
>   struct omap_mcbsp *mcbsp;
> + struct omap_mcbsp_reg_cfg *reg_cache;
>   void __iomem *io_base;
>
>   if (!omap_mcbsp_check_valid_id(id)) {
> @@ -174,26 +177,27 @@ void omap_mcbsp_config(unsigned int id,
>   return;
>   }
>   mcbsp = id_to_mcbsp_ptr(id);
> + reg_cache = &mcbsp->reg_cache;
>
>   io_base = mcbsp->io_base;
>   dev_dbg(mcbsp->dev, "Configuring McBSP%d  phys_base: 0x%08lx\n",
>   mcbsp->id, mcbsp->phys_base);
>
>   /* We write the given config */
> - OMAP_MCBSP_WRITE(io_base, SPCR2, config->spcr2);
> - OMAP_MCBSP_WRITE(io_base, SPCR1, config->spcr1);
> - OMAP_MCBSP_WRITE(io_base, RCR2, config->rcr2);
> - OMAP_MCBSP_WRITE(io_base, RCR1, config->rcr1);
> - OMAP_MCBSP_WRITE(io_base, XCR2, config->xcr2);
> - OMAP_MCBSP_WRITE(io_base, XCR1, config->xcr1);
> - OMAP_MCBSP_WRITE(io_base, SRGR2, config->srgr2);
> - OMAP_MCBSP_WRITE(io_base, SRGR1, config->srgr1);
> - OMAP_MCBSP_WRITE(io_base, MCR2, config->mcr2);
> - OMAP_MCBSP_WRITE(io_base, MCR1, config->mcr1);
> - OMAP_MCBSP_WRITE(io_base, PCR0, config->pcr0);
> + OMAP_MCBSP_WRITE(io_base, SPCR2, reg_cache->spcr2 = config->spcr2);
> + OMAP_MCBSP_WRITE(io_base, SPCR1, reg_cache->spcr1 = config->spcr1);
> + OMAP_MCBSP_WRITE(io_base, RCR2, reg_cache->rcr

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

2009-11-13 Thread Kevin Hilman
Nishanth Menon  writes:

> OPP tables have been used as static arrays till now this causes
> limitations in terms of ability to dynamically making decisions
> for cpu types and populating it with the right values. This
> implementation is based on the discussions in the thread:
> http://marc.info/?l=linux-omap&m=125482970102327&w=2
> inputs from Romit, Benoit, Kevin, Sanjeev, Santosh acked.
>
> omap3_pm_init_opp_table is introduced here, and the default omap3
> tables have been renamed to omap34xx_ tables, original omap3_xx
> tables are now dynamically allocated and populated.
>
> Corresponding board files calling omap2_init_common_hw with the
> active opp table params have been updated with this patch.
>
> This now paves way to introduce 3630 OPP tables.
>
> Tested on: SDP3430 - SDP3630 boot breaks with this patch
> (as SDP3630 needs corresponding correct VDD2 freq w.r.t SDRC clk.
> The next patch in this series fixes things)
>
> Cc: Benoit Cousson 
> Cc: Jon Hunter 
> Cc: Kevin Hilman 
> Cc: Madhusudhan Chikkature Rajashekar 
> Cc: Paul Walmsley 
> Cc: Romit Dasgupta 
> Cc: Sanjeev Premi 
> Cc: Santosh Shilimkar 
> Cc: Sergio Alberto Aguirre Rodriguez 
> Cc: SuiLun Lam 
> Cc: Thara Gopinath 
> Cc: Vishwanath Sripathy 
>
> Signed-off-by: Nishanth Menon 

[...]

> +void __init omap3_pm_init_opp_table(void)
> +{
> + /* Populate the base CPU rate tables here */
> + omap3_mpu_rate_table = kmalloc(sizeof(omap34xx_mpu_rate_table),
> + GFP_KERNEL);
> + omap3_dsp_rate_table = kmalloc(sizeof(omap34xx_dsp_rate_table),
> + GFP_KERNEL);
> + omap3_l3_rate_table = kmalloc(sizeof(omap34xx_l3_rate_table),
> + GFP_KERNEL);
> +
> + BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table ||
> + !omap3_l3_rate_table);
> +
> + memcpy(omap3_mpu_rate_table, omap34xx_mpu_rate_table,
> + sizeof(omap34xx_mpu_rate_table));
> + memcpy(omap3_dsp_rate_table, omap34xx_dsp_rate_table,
> + sizeof(omap34xx_dsp_rate_table));
> + memcpy(omap3_l3_rate_table, omap34xx_l3_rate_table,
> + sizeof(omap34xx_l3_rate_table));
> +}
> +

Minor issue, but FYI... rather than the kmalloc + memcpy, you can use
kmemdup() to do the same thing.

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: Some patches need reposting, inbox cleared, patchwork cleared

2009-11-13 Thread Tony Lindgren
* Pandita, Vikram  [091113 11:06]:
> Tony
> 
> >-Original Message-
> >From: linux-omap-ow...@vger.kernel.org 
> >[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of
> >Pandita, Vikram
> >>From: Tony Lindgren [mailto:t...@atomide.com]
> >>> I just verified booting zoom3 on l-o master, and its working fine.
> >>
> >>OK good. Can you also try booting this patch from Felipe on 3630:
> >>
> >>http://patchwork.kernel.org/patch/59540/
> >
> >Patch does not apply. Rebasing now and testing.
> 
> Rebased Patch (attached) boots up fine now on 3630 Zoom3 board.
> 
> Logs:
> CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> Machine: OMAP Zoom3 board
> Memory policy: ECC disabled, Data cache writeback
> OMAP3630 ES1.0 (l2cache iva sgx neon isp )
> 

OK, thanks applying it.

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: [build errro on for-next branch] RE: [1/3] omap3evm: ehci: Add EHCI padconfig for board Rev >= E

2009-11-13 Thread Tony Lindgren
* Gupta, Ajay Kumar  [091113 00:58]:
> Hi,
> > 
> > * Ajay Kumar Gupta  [091028 16:12]:
> > > OMAP3EVM (Rev >= E) has EHCI port on main board itself. Apart from this
> > > there is a slot to connect Mistral Daughter Card (MDC) to it which also
> > > has one EHCI port. Only one EHCI port can be used at a time and we can
> > > choose the port using GPIO61.
> > >
> > > These are the new GPIO lines used for different purpose on EHCI
> > interface.
> > >   - GPIO21 - EHCI phy reset
> > >   - GPIO22 - EHCI VBUS enable
> > >   - GPIO61 - Selects EHCI port either on main board or on Mistral
> > > Daughter Card (MDC).
> > 
> > Let's put this on hold until we have the new mux framework. Should be
> > trivial to do then.
> 
> Tony,
> 
> Another patch [1] which depends on this is already merged to 'for-next'
> branch causing a compilation error.
> 
> [1] omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E)
> 
> So either revert the above patch from 'for-next' or merge the pinmux
> patch also.

OK, merged the additional pinmux patch into the "Update EHCI support.."
patch.

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


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

2009-11-13 Thread Kevin Hilman
Nishanth Menon  writes:

> Modifies the initial patch From Sanjeev:
> http://patchwork.kernel.org/patch/50998/
>
> NOTE:
> The original opp_table introduced by Sanjeev is not needed anymore as
> we can use enabled flag to have better granularity in enable/disable
> of OPPs.
>
> This introduces the following accessor functions:
>
> freq_to_opp and opp_to_freq: Matching functions to convert OPP to freq
> and viceversa.
>
> freq_to_vsel: Converts a frequency to corresponding voltage.
>
> opp_enable: To enable/disable a specific OPP in a OPP table this allows
> granular runtime disable/enable of specific OPPs, esp when used in
> conjunction with search and mapping functions
>
> get_next_freq: A search function to get next matching frequency. This
> could possibly provide the basis for more complex OPP transition algos
> of the future.
>
> get_limit_freq: A search function to get the least or maximum
> frequency based on search criteria. Allows for independence from
> OPP_IDs in the future.
>
> Since the accessor functions hide the details of the table
> implementation, the opp table is now moved away from omap3-opp.h to
> pm34xx.c. The terminator entry is needed at the start and end of the
> table as it is still needed for reverse and forward search as the
> length of the table is unknown.
>
> Tests done: Accessor functions standalone tested on a PC host with
> dummy OPP table to simulate boundary, invalid and valid conditions,
> SDP3430, SDP3630 for system stability.
>
> Cc: Benoit Cousson 
> Cc: Jon Hunter 
> Cc: Kevin Hilman 
> Cc: Madhusudhan Chikkature Rajashekar 
> Cc: Paul Walmsley 
> Cc: Romit Dasgupta 
> Cc: Sanjeev Premi 
> Cc: Santosh Shilimkar 
> Cc: Sergio Alberto Aguirre Rodriguez 
> Cc: SuiLun Lam 
> Cc: Thara Gopinath 
> Cc: Vishwanath Sripathy 
>
> Signed-off-by: Sanjeev Premi 
> Signed-off-by: Nishanth Menon 

Some general style comments:

- Very good and throrough commenting, Nice!  Some minor changes needed
  - use kerneldoc style throughout (applies to other patches as well)
  - use standard multi-line comments

- overuse of BUG().  Failures should be more graceful, returning
  errors and checking errors in callers

- EXPORT_SYMBOL(): none of these OPP accessors should be exported to
  drivers.  This is PM core code only.

General design comments:

OPP accessor functions don't belong in omap-pm.h.  A new OPP header
should be used.  Maybe 

May be personal preference, but I'm not crazy about the implementation
of the accessor functions.  I think moving to a list and using the
standard list iterators will clean this up

I know we discussed this on the initial call and some said that
walking an array would be faster.  But looking at the code, I think
the readability would improve greatly and we don't need OPP tables
with dummy first and last entries etc.

A list implementation would also allow you make generalized iterators
like is done in the clkdm and pwrdm code (see pwrdm_for_each,
clkdm_for_each.)

At a high level, I'm not in line with the general direction here.  In
particular, this series continues the use of passing around OPP IDs
instead of real world values like frequencies.  I think a general
cleanup is needed to get rid of the OPP IDs, so either real world
values (frequencies and voltages) are passed around or pointers to OPP
structs are passed.

I know one of your goals was to make this less intrusive, but for me,
nothing in the current OPP layer and SRF is upstreamable anyways, so I
have no objectsion to intrusive changes to these layers. 

More detailed comments below...

> ---
>  arch/arm/mach-omap2/omap3-opp.h   |   40 +---
>  arch/arm/mach-omap2/pm.c  |  160 
> +
>  arch/arm/mach-omap2/pm34xx.c  |   42 
>  arch/arm/plat-omap/include/plat/omap-pm.h |  109 
>  4 files changed, 314 insertions(+), 37 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap3-opp.h b/arch/arm/mach-omap2/omap3-opp.h
> index 42557e1..27e2ca5 100644
> --- a/arch/arm/mach-omap2/omap3-opp.h
> +++ b/arch/arm/mach-omap2/omap3-opp.h
> @@ -21,42 +21,8 @@
>  #define S83M8300
>  #define S166M   16600
>  
> -static struct omap_opp omap3_mpu_rate_table[] = {
> - {0, 0, 0, 0},
> - /*OPP1*/
> - {true, S125M, VDD1_OPP1, 0x1E},
> - /*OPP2*/
> - {true, S250M, VDD1_OPP2, 0x26},
> - /*OPP3*/
> - {true, S500M, VDD1_OPP3, 0x30},
> - /*OPP4*/
> - {true, S550M, VDD1_OPP4, 0x36},
> - /*OPP5*/
> - {true, S600M, VDD1_OPP5, 0x3C},
> -};
> -
> -static struct omap_opp omap3_l3_rate_table[] = {
> - {0, 0, 0, 0},
> - /*OPP1*/
> - {false, 0, VDD2_OPP1, 0x1E},
> - /*OPP2*/
> - {true, S83M, VDD2_OPP2, 0x24},
> - /*OPP3*/
> - {true, S166M, VDD2_OPP3, 0x2C},
> -};
> -
> -static struct omap_opp omap3_dsp_rate_table[] = {
> - {0, 0, 0, 0},
> - /*OPP1*/
> - {true, S90M, VDD1_OPP1, 0x1E},
> - /*OPP2*/
> - {true, S180M, VDD1_OPP2, 0x26},
> -

Re: OMAP: DMA: Use some define rather than a hexadecimal constant for LCD register

2009-11-13 Thread Tony Lindgren
* Janusz Krzysztofik  [091110 03:20]:
> The patch corrects the issue introduced with my previous patch:
>   "OMAP: DMA: Fix omapfb/lcdc on OMAP1510 broken when PM set"
> as pointed out by OMAP subsystem maintainer.

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

Tony
 
> Signed-off-by: Janusz Krzysztofik 
> 
> ---
> Hi,
> 
> I'd really like to have the first one get in as a fix in the -rc series,
> that's why I decided to correct the issue in a follow up.
> 
> 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
> 
> diff -upr linux-2.6.32-rc6.orig/arch/arm/plat-omap/dma.c 
> linux-2.6.32-rc6/arch/arm/plat-omap/dma.c
> --- linux-2.6.32-rc6.orig/arch/arm/plat-omap/dma.c2009-11-05 
> 19:30:39.0 +0100
> +++ linux-2.6.32-rc6/arch/arm/plat-omap/dma.c 2009-11-10 03:57:06.0 
> +0100
> @@ -34,6 +34,7 @@
>  #include 
>  #include 
>  
> +#include 
>  #include 
>  
>  #undef DEBUG
> @@ -1113,7 +1114,7 @@ int omap_dma_running(void)
>* when it gets enabled, so assume DMA running if LCD enabled.
>*/
>   if (cpu_is_omap1510())
> - if (omap_readw(0xfffec000 + 0x00) & (1 << 0))
> + if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN)
>   return 1;
>  
>   /* Check if LCD DMA is running */
> diff -upr linux-2.6.32-rc6.orig/arch/arm/plat-omap/include/mach/omapfb.h 
> linux-2.6.32-rc6/arch/arm/plat-omap/include/mach/omapfb.h
> --- linux-2.6.32-rc6.orig/arch/arm/plat-omap/include/mach/omapfb.h
> 2009-11-03 20:37:49.0 +0100
> +++ linux-2.6.32-rc6/arch/arm/plat-omap/include/mach/omapfb.h 2009-11-10 
> 03:52:00.0 +0100
> @@ -170,6 +170,38 @@ enum omapfb_update_mode {
>  
>  #include 
>  
> +#define OMAP_LCDC_BASE   0xfffec000
> +#define OMAP_LCDC_SIZE   256
> +#define OMAP_LCDC_IRQINT_LCD_CTRL
> +
> +#define OMAP_LCDC_CONTROL(OMAP_LCDC_BASE + 0x00)
> +#define OMAP_LCDC_TIMING0(OMAP_LCDC_BASE + 0x04)
> +#define OMAP_LCDC_TIMING1(OMAP_LCDC_BASE + 0x08)
> +#define OMAP_LCDC_TIMING2(OMAP_LCDC_BASE + 0x0c)
> +#define OMAP_LCDC_STATUS (OMAP_LCDC_BASE + 0x10)
> +#define OMAP_LCDC_SUBPANEL   (OMAP_LCDC_BASE + 0x14)
> +#define OMAP_LCDC_LINE_INT   (OMAP_LCDC_BASE + 0x18)
> +#define OMAP_LCDC_DISPLAY_STATUS (OMAP_LCDC_BASE + 0x1c)
> +
> +#define OMAP_LCDC_STAT_DONE  (1 << 0)
> +#define OMAP_LCDC_STAT_VSYNC (1 << 1)
> +#define OMAP_LCDC_STAT_SYNC_LOST (1 << 2)
> +#define OMAP_LCDC_STAT_ABC   (1 << 3)
> +#define OMAP_LCDC_STAT_LINE_INT  (1 << 4)
> +#define OMAP_LCDC_STAT_FUF   (1 << 5)
> +#define OMAP_LCDC_STAT_LOADED_PALETTE(1 << 6)
> +
> +#define OMAP_LCDC_CTRL_LCD_EN(1 << 0)
> +#define OMAP_LCDC_CTRL_LCD_TFT   (1 << 7)
> +#define OMAP_LCDC_CTRL_LINE_IRQ_CLR_SEL  (1 << 10)
> +
> +#define OMAP_LCDC_IRQ_VSYNC  (1 << 2)
> +#define OMAP_LCDC_IRQ_DONE   (1 << 3)
> +#define OMAP_LCDC_IRQ_LOADED_PALETTE (1 << 4)
> +#define OMAP_LCDC_IRQ_LINE_NIRQ  (1 << 5)
> +#define OMAP_LCDC_IRQ_LINE   (1 << 6)
> +#define OMAP_LCDC_IRQ_MASK   (((1 << 5) - 1) << 2)
> +
>  #define OMAP_LCDC_INV_VSYNC 0x0001
>  #define OMAP_LCDC_INV_HSYNC 0x0002
>  #define OMAP_LCDC_INV_PIX_CLOCK 0x0004
> diff -upr linux-2.6.32-rc6.orig/drivers/video/omap/lcdc.c 
> linux-2.6.32-rc6/drivers/video/omap/lcdc.c
> --- linux-2.6.32-rc6.orig/drivers/video/omap/lcdc.c   2009-11-03 
> 20:37:49.0 +0100
> +++ linux-2.6.32-rc6/drivers/video/omap/lcdc.c2009-11-10 
> 03:51:16.0 +0100
> @@ -38,38 +38,6 @@
>  
>  #define MODULE_NAME  "lcdc"
>  
> -#define OMAP_LCDC_BASE   0xfffec000
> -#define OMAP_LCDC_SIZE   256
> -#define OMAP_LCDC_IRQINT_LCD_CTRL
> -
> -#define OMAP_LCDC_CONTROL(OMAP_LCDC_BASE + 0x00)
> -#define OMAP_LCDC_TIMING0(OMAP_LCDC_BASE + 0x04)
> -#define OMAP_LCDC_TIMING1(OMAP_LCDC_BASE + 0x08)
> -#define OMAP_LCDC_TIMING2(OMAP_LCDC_BASE + 0x0c)
> -#define OMAP_LCDC_STATUS (OMAP_LCDC_BASE + 0x10)
> -#define OMAP_LCDC_SUBPANEL   (OMAP_LCDC_BASE + 0x14)
> -#define OMAP_LCDC_LINE_INT   (OMAP_LCDC_BASE + 0x18)
> -#define OMAP_LCDC_DISPLAY_STATUS (OMAP_LCDC_BASE + 0x1c)
> -
> -#define OMAP_LCDC_STAT_DONE  (1 << 0)
> -#define OMAP_LCDC_STAT_VSYNC (1 << 1)
> -#define OMAP_LCDC_STAT_SYNC_LOST (1 << 2)
> -#define OMAP_LCDC_STAT_ABC   (1 << 3)
> -#define OMAP_LCDC_STAT_LINE_INT  (1 << 4)
> -#define OMAP_LCDC_STAT_FUF   (1 << 5)
> -#define OMAP_LC

[APPLIED] [PATCH v4] OMAP: GPIO module enable/disable

2009-11-13 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): e76818f60ec2d475b5f462e79651d8f09ad455d4

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

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


--
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] omap3evm: MIgrate to smsc911x ethernet driver.

2009-11-13 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): 265da0faeeb7e1b5b4ff98f6a6c0b65816051645

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

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=265da0faeeb7e1b5b4ff98f6a6c0b65816051645


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


[APPLIED] [PATCH 2/2 (for-next)] ARM: OMAP3: Add defconfig for IGEP v2 board

2009-11-13 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): 45ab940bff69daf16f8adf16840b0c9d2b194e81

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

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=45ab940bff69daf16f8adf16840b0c9d2b194e81


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


[APPLIED] [PATCH 1/2 (for-next)] ARM: OMAP3: Add support for the IGEP v2

2009-11-13 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): 2ae0133fbf28810f9e229c49817277c9220780ab

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

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=2ae0133fbf28810f9e229c49817277c9220780ab


--
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-13 Thread Tony Lindgren
Hi,

Just noticed all the iffdef else stuff here, that should be easy to
remove.

* C.A, Subramaniam  [091113 04:33]:
> From 1a5865e67ce5fae94ae283882411cd01f48e07a7 Mon Sep 17 00:00:00 2001
> From: C A Subramaniam 
> 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 
> Signed-off-by: C A Subramaniam 
> Signed-off-by: Ramesh Gupta G 
> ---
>  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 
>  #include 
>  
> +#define DRV_NAME "omap2-mailbox"
> +
>  #define MAILBOX_REVISION 0x000
>  #define MAILBOX_SYSCONFIG0x010
>  #define MAILBOX_SYSSTATUS0x014
>  #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_SIZE0x130
> +#else
>  #define MBOX_REG_SIZE0x120
> +#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 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)
> @@ -242,9 +260,12 @@ static struct omap_mbox_ops omap2_mbox_ops = {
>   */
>  
>  /* FIXME: the following structs should be filled automatically by the user 
> id */
> -

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

2009-11-13 Thread Tony Lindgren
* C.A, Subramaniam  [091113 04:32]:
> From 177e2efb7384c03ac445b55e2e4ccf44e2160051 Mon Sep 17 00:00:00 2001
> From: C A Subramaniam 
> 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 

Is this missing a Signed-off-by: C A Subramaniam ,
or should this be From: Hiroshi DOYU ?

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 12/14] omap3: move check_revision above check_features, v2

2009-11-13 Thread Tony Lindgren
* Tony Lindgren  [091112 16:09]:
> From: Tony Lindgren 

Looks like the From: got messed up. Here's a fixed version.

Tony
>From b6c79698403f9926fb43d7e5cef9503a30b5709f Mon Sep 17 00:00:00 2001
From: Nishanth Menon 
Date: Fri, 13 Nov 2009 12:41:25 -0800
Subject: [PATCH] omap3: move check_revision above check_features

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

Signed-off-by: Nishanth Menon 
Acked-by: Mika Westerberg 
Signed-off-by: Tony Lindgren 

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


RE: n800/810 boot log

2009-11-13 Thread Gadiyar, Anand
green wrote:
> Gadiyar, Anand wrote at 2009-11-13 00:58 -0600:
> > Could someone please send me a bootlog of n800/810 with CONFIG_DEBUG_LL 
> > enabled?
> > (any recent kernel will do, 2.6.29 and above. An older one is also okay)
> 
> Is it possible for me to do this without a serial connection?  Like say 
> booting
> Maemo with a recent kernel and grabbing dmesg...
> 

I suppose it should be good enough. I'm just looking for the MUSB revision
info on those boards (should have asked explicitly for that :) ).
That should show up in dmesg.

- 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: n800/810 boot log

2009-11-13 Thread green
Gadiyar, Anand wrote at 2009-11-13 00:58 -0600:
> Could someone please send me a bootlog of n800/810 with CONFIG_DEBUG_LL 
> enabled?
> (any recent kernel will do, 2.6.29 and above. An older one is also okay)

Is it possible for me to do this without a serial connection?  Like say booting 
Maemo with a recent kernel and grabbing dmesg...


signature.asc
Description: Digital signature


RE: CPUFREQ for beagle

2009-11-13 Thread Pandita, Vikram


>-Original Message-
>From: tarek attia [mailto:tarek.m.at...@gmail.com]
>Sent: Friday, November 13, 2009 12:12 PM
>To: Pandita, Vikram
>Subject: Re: CPUFREQ for beagle
>
>thnx for reply :)
>
>I tried it before but it downloaded kernel 2.6.32 which didn't work
>with the root file system of Angstrom wich relies on kernel 2.6.29
>!

$git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git
$git checkout -b pm-29 origin/pm-2.6.29

This will get you to 2.6.29 pm code for sure.


>
>Any idea ???
>
>any help will be appreciated
>
>Best Regards
>tarek
>On Fri, Nov 13, 2009 at 8:03 PM, Pandita, Vikram  wrote:
>>
>>
>>>-Original Message-
>>>From: linux-omap-ow...@vger.kernel.org 
>>>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of tarek
>>>attia
>>>Sent: Friday, November 13, 2009 11:09 AM
>>>To: linux-omap
>>>Subject: CPUFREQ for beagle
>>>
>>>I want the CPUFREQdriver for the beagleboard which can work with
>>>linux2.6.29 properly
>>
>> You should be able to find that in Kevin's git tree:
>> git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git 
>> pm-2.6.29
>>
>>>
>>>
>>>
>>>
>>>plz any one Help
>>>
>>>
>>>thnx in Advance
>>>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
>>
>>

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


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

2009-11-13 Thread Pandita, Vikram
Tony

>-Original Message-
>From: linux-omap-ow...@vger.kernel.org 
>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of
>Pandita, Vikram
>>From: Tony Lindgren [mailto:t...@atomide.com]
>>> I just verified booting zoom3 on l-o master, and its working fine.
>>
>>OK good. Can you also try booting this patch from Felipe on 3630:
>>
>>http://patchwork.kernel.org/patch/59540/
>
>Patch does not apply. Rebasing now and testing.

Rebased Patch (attached) boots up fine now on 3630 Zoom3 board.

Logs:
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP Zoom3 board
Memory policy: ECC disabled, Data cache writeback
OMAP3630 ES1.0 (l2cache iva sgx neon isp )




arm-omap-code-cleanup-to-id.c.patch
Description: arm-omap-code-cleanup-to-id.c.patch


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

2009-11-13 Thread Gadiyar, Anand
> 
> Hmm, it should be all merged into master branch also:
> 
> $ git log --pretty=oneline --grep=3630 -n100 master arch/arm/mach-omap2
> 1739bbc268aeffc8d3d040cf6493ef4399a1a181 omap: 3630sdp: introduce 3630 sdp 
> board support
> 13ac7e77f407e4c529eb1cb058031f896fd3e80c omap: zoom3: introduce zoom3 board 
> support
> 79c6fce9daa80936eba830c49b6c559f5ca6295d omap: zoom: drop i2c-1 speed to 2400
> 3efbe15e7755108268b9ed72d3b6c6539f671ebe omap: zoom: rename zoom2 name to 
> generic zoom
> 97bd76cf5e5c18ddcc8d38f997ae7aec4db3bb01 omap: zoom2: split board file for 
> software reuse
> 2c8681ac36b4247c26c5789f63de9f522436c1c5 omap3630: Set omap3630 MMC1 I/O 
> speed to 52Mhz
> 9283cf8a9d21889fb838634e7017e84acf69e79f omap3630: Configure HSMMC1 to 4-bit
> 1a309b7370e5aa6d703eded1afc53218a205a71f omap3630: Add HSMMC related checks
> 1e9e0b997c30b81b2165fa68cad4411e6136a8d2 omap3: 3630: update is_chip variable
> 6fb081fb525c05aed6fee28bf73fe4ee1fe2d5bd omap3: Introduce OMAP3630
> 
> Can you check and let me know if something is missing?
> 

Looks like I pulled too early. I did a git pull now and the files are back.

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


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

2009-11-13 Thread Pandita, Vikram


>-Original Message-
>From: Tony Lindgren [mailto:t...@atomide.com]
>> I just verified booting zoom3 on l-o master, and its working fine.
>
>OK good. Can you also try booting this patch from Felipe on 3630:
>
>http://patchwork.kernel.org/patch/59540/

Patch does not apply. Rebasing now and testing.

>
>> Only extra patch that I have to add is the 8250 patch, that needs posting 
>> separately.
>
>OK
>
>Regards,
>
>Tony

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


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

2009-11-13 Thread Tony Lindgren
* Pandita, Vikram  [091113 10:05]:
> 
> 
> >-Original Message-
> >From: linux-omap-ow...@vger.kernel.org 
> >[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Tony
> >Lindgren
> >Sent: Friday, November 13, 2009 12:03 PM
> >To: Gadiyar, Anand
> >Cc: linux-omap@vger.kernel.org
> >Subject: Re: Some patches need reposting, inbox cleared, patchwork cleared
> >
> >> > Tony,
> >> >
> >> > What happened to the 3630 support stuff that had been merged to
> >> > your master branch as of yesterday?
> >> >
> >> > - Anand
> >>
> >> I meant, I see these patches in for-next, but they're not present
> >> in the l-o master branch. Is this deliberate?
> >
> >Hmm, it should be all merged into master branch also:
> >
> >$ git log --pretty=oneline --grep=3630 -n100 master arch/arm/mach-omap2
> >1739bbc268aeffc8d3d040cf6493ef4399a1a181 omap: 3630sdp: introduce 3630 sdp 
> >board support
> >13ac7e77f407e4c529eb1cb058031f896fd3e80c omap: zoom3: introduce zoom3 board 
> >support
> >79c6fce9daa80936eba830c49b6c559f5ca6295d omap: zoom: drop i2c-1 speed to 2400
> >3efbe15e7755108268b9ed72d3b6c6539f671ebe omap: zoom: rename zoom2 name to 
> >generic zoom
> >97bd76cf5e5c18ddcc8d38f997ae7aec4db3bb01 omap: zoom2: split board file for 
> >software reuse
> >2c8681ac36b4247c26c5789f63de9f522436c1c5 omap3630: Set omap3630 MMC1 I/O 
> >speed to 52Mhz
> >9283cf8a9d21889fb838634e7017e84acf69e79f omap3630: Configure HSMMC1 to 4-bit
> >1a309b7370e5aa6d703eded1afc53218a205a71f omap3630: Add HSMMC related checks
> >1e9e0b997c30b81b2165fa68cad4411e6136a8d2 omap3: 3630: update is_chip variable
> >6fb081fb525c05aed6fee28bf73fe4ee1fe2d5bd omap3: Introduce OMAP3630
> >
> >Can you check and let me know if something is missing?
> 
> I just verified booting zoom3 on l-o master, and its working fine.

OK good. Can you also try booting this patch from Felipe on 3630:

http://patchwork.kernel.org/patch/59540/
 
> Only extra patch that I have to add is the 8250 patch, that needs posting 
> separately.

OK

Regards,

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


Re: [alsa-devel] [PATCH 1/2] OMAP3: MCBSP: Suspend/resume failure fix

2009-11-13 Thread Mark Brown

On 13 Nov 2009, at 17:52, "Wang, Jane"  wrote:





-Original Message-
From: alsa-devel-boun...@alsa-project.org [mailto:alsa-devel- 
boun...@alsa-

project.org] On Behalf Of Mark Brown
Sent: Friday, November 13, 2009 11:49 AM
To: Wang, Jane
Cc: alsa-de...@alsa-project.org; linux-omap@vger.kernel.org;
peter.ujfal...@nokia.com; Wang, Jane
Subject: Re: [alsa-devel] [PATCH 1/2] OMAP3: MCBSP: Suspend/resume  
failure

fix

On 13 Nov 2009, at 17:39, Jane Wang  wrote:

McBSP fucntional clock is not disabled when suspend is triggerd  
which

prevents PER domain entering target low-power state. To fix the
problem:

1. Disable/enable McBSP functional clock for suspend/resume.

2. In addition, reconfigure McBSP, this is needed when systerm comes
out of OFF state.



There is no need to resend your patches this iften - please allow at
least a week or so for review. You only need to repost if addressing
comments or it looks like the patch got missed.



Sorry for sending this again. Something is not set correctly with my
git send-email. The email did not reach the mailing lists, it only  
reached

people in cc.


No, your posts are making it through to the lists just fine. Note that  
alsa-devel is moderated for non-subscribers

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


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

2009-11-13 Thread Pandita, Vikram


>-Original Message-
>From: linux-omap-ow...@vger.kernel.org 
>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Tony
>Lindgren
>Sent: Friday, November 13, 2009 12:03 PM
>To: Gadiyar, Anand
>Cc: linux-omap@vger.kernel.org
>Subject: Re: Some patches need reposting, inbox cleared, patchwork cleared
>
>> > Tony,
>> >
>> > What happened to the 3630 support stuff that had been merged to
>> > your master branch as of yesterday?
>> >
>> > - Anand
>>
>> I meant, I see these patches in for-next, but they're not present
>> in the l-o master branch. Is this deliberate?
>
>Hmm, it should be all merged into master branch also:
>
>$ git log --pretty=oneline --grep=3630 -n100 master arch/arm/mach-omap2
>1739bbc268aeffc8d3d040cf6493ef4399a1a181 omap: 3630sdp: introduce 3630 sdp 
>board support
>13ac7e77f407e4c529eb1cb058031f896fd3e80c omap: zoom3: introduce zoom3 board 
>support
>79c6fce9daa80936eba830c49b6c559f5ca6295d omap: zoom: drop i2c-1 speed to 2400
>3efbe15e7755108268b9ed72d3b6c6539f671ebe omap: zoom: rename zoom2 name to 
>generic zoom
>97bd76cf5e5c18ddcc8d38f997ae7aec4db3bb01 omap: zoom2: split board file for 
>software reuse
>2c8681ac36b4247c26c5789f63de9f522436c1c5 omap3630: Set omap3630 MMC1 I/O speed 
>to 52Mhz
>9283cf8a9d21889fb838634e7017e84acf69e79f omap3630: Configure HSMMC1 to 4-bit
>1a309b7370e5aa6d703eded1afc53218a205a71f omap3630: Add HSMMC related checks
>1e9e0b997c30b81b2165fa68cad4411e6136a8d2 omap3: 3630: update is_chip variable
>6fb081fb525c05aed6fee28bf73fe4ee1fe2d5bd omap3: Introduce OMAP3630
>
>Can you check and let me know if something is missing?

I just verified booting zoom3 on l-o master, and its working fine.

Only extra patch that I have to add is the 8250 patch, that needs posting 
separately.

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

--
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: CPUFREQ for beagle

2009-11-13 Thread Pandita, Vikram


>-Original Message-
>From: linux-omap-ow...@vger.kernel.org 
>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of tarek
>attia
>Sent: Friday, November 13, 2009 11:09 AM
>To: linux-omap
>Subject: CPUFREQ for beagle
>
>I want the CPUFREQdriver for the beagleboard which can work with
>linux2.6.29 properly

You should be able to find that in Kevin's git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git 
pm-2.6.29

>
>
>
>
>plz any one Help
>
>
>thnx in Advance
>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

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


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

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

Hmm, it should be all merged into master branch also:

$ git log --pretty=oneline --grep=3630 -n100 master arch/arm/mach-omap2
1739bbc268aeffc8d3d040cf6493ef4399a1a181 omap: 3630sdp: introduce 3630 sdp 
board support
13ac7e77f407e4c529eb1cb058031f896fd3e80c omap: zoom3: introduce zoom3 board 
support
79c6fce9daa80936eba830c49b6c559f5ca6295d omap: zoom: drop i2c-1 speed to 2400
3efbe15e7755108268b9ed72d3b6c6539f671ebe omap: zoom: rename zoom2 name to 
generic zoom
97bd76cf5e5c18ddcc8d38f997ae7aec4db3bb01 omap: zoom2: split board file for 
software reuse
2c8681ac36b4247c26c5789f63de9f522436c1c5 omap3630: Set omap3630 MMC1 I/O speed 
to 52Mhz
9283cf8a9d21889fb838634e7017e84acf69e79f omap3630: Configure HSMMC1 to 4-bit
1a309b7370e5aa6d703eded1afc53218a205a71f omap3630: Add HSMMC related checks
1e9e0b997c30b81b2165fa68cad4411e6136a8d2 omap3: 3630: update is_chip variable
6fb081fb525c05aed6fee28bf73fe4ee1fe2d5bd omap3: Introduce OMAP3630

Can you check and let me know if something is missing?

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


[PATCH 2/2] ASoC: OMAP: reconfigure DMA to resume audio

2009-11-13 Thread Jane Wang
Reconfigure DMA transfer parameters to resume audio after system comming out of 
OFF state.

Signed-off-by: Jane Wang 
---
 sound/soc/omap/omap-pcm.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6a829ee..5e04390 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -215,8 +215,13 @@ static int omap_pcm_trigger(struct snd_pcm_substream 
*substream, int cmd)
 
spin_lock_irqsave(&prtd->lock, flags);
switch (cmd) {
-   case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
+   /* Reconfigure DMA transfer parameters
+* in order to come back from OFF mode
+*/
+   omap_pcm_prepare(substream);
+   /* fall through */
+   case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
prtd->period_index = 0;
/* Configure McBSP internal buffer usage */
-- 
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 00/19] OMAP: DSS2 v5 intro

2009-11-13 Thread Tony Lindgren
* Tomi Valkeinen  [091113 01:55]:
> Hi,
> 
> On Thu, 2009-11-12 at 21:48 +0100, ext Stephen Rothwell wrote:
> > Hi Tony, Tomi,
> > 
> > On Thu, 12 Nov 2009 10:14:57 -0800 Tony Lindgren  wrote:
> > >
> > > OK. The only dependency is the the move of the headers.
> > > 
> > > Tomi, can you please rebase your patches on top of the 
> > > "7xx-iosplit-plat-merge"
> > > branch in linux-omap tree? This is commit 
> > > 8171d88089ad63fc442b2bf32af7c18653adc5cb,
> > > and it should stay static.
> > 
> > OK, *if* you (Tony) guarantee that the base is stable (i.e. never
> > rebased, but may have things added to it) and in linux-next, then I can
> > take the DSS2 stuff separately if you want me to.

Thanks. Yes, there should not be any need to rebase that commit.

> > Tomi, you can, of course, merge that branch into your tree instead of
> > rebasing on top of it (which ever is easiest).
> 
> I rebased DSS2 on top of 8171d88089ad63fc442b2bf32af7c18653adc5cb. It
> can be found from git://gitorious.org/linux-omap-dss2/linux.git for-next
> branch.
> 
> I'm ok with Tony pulling DSS2 to his next-branch, or Stephen pulling
> directly, which ever works easier for you.

I'd rather see Stephen pulling directly from Tomi, that's a good long
term solution for maintaining the DSS2 code.

Regards,

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


RE: [alsa-devel] [PATCH 1/2] OMAP3: MCBSP: Suspend/resume failure fix

2009-11-13 Thread Wang, Jane


> -Original Message-
> From: alsa-devel-boun...@alsa-project.org [mailto:alsa-devel-boun...@alsa-
> project.org] On Behalf Of Mark Brown
> Sent: Friday, November 13, 2009 11:49 AM
> To: Wang, Jane
> Cc: alsa-de...@alsa-project.org; linux-omap@vger.kernel.org;
> peter.ujfal...@nokia.com; Wang, Jane
> Subject: Re: [alsa-devel] [PATCH 1/2] OMAP3: MCBSP: Suspend/resume failure
> fix
> 
> On 13 Nov 2009, at 17:39, Jane Wang  wrote:
> 
> > McBSP fucntional clock is not disabled when suspend is triggerd which
> > prevents PER domain entering target low-power state. To fix the
> > problem:
> >
> > 1. Disable/enable McBSP functional clock for suspend/resume.
> >
> > 2. In addition, reconfigure McBSP, this is needed when systerm comes
> > out of OFF state.
> >
> 
> There is no need to resend your patches this iften - please allow at
> least a week or so for review. You only need to repost if addressing
> comments or it looks like the patch got missed.
> 

Sorry for sending this again. Something is not set correctly with my
git send-email. The email did not reach the mailing lists, it only reached
people in cc.
--
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] OMAP3: MCBSP: Suspend/resume failure fix

2009-11-13 Thread Mark Brown

On 13 Nov 2009, at 17:39, Jane Wang  wrote:


McBSP fucntional clock is not disabled when suspend is triggerd which
prevents PER domain entering target low-power state. To fix the  
problem:


1. Disable/enable McBSP functional clock for suspend/resume.

2. In addition, reconfigure McBSP, this is needed when systerm comes  
out of OFF state.




There is no need to resend your patches this iften - please allow at  
least a week or so for review. You only need to repost if addressing  
comments or it looks like the patch got missed.



Signed-off-by: Jane Wang 
---
arch/arm/plat-omap/include/mach/mcbsp.h |2 ++
arch/arm/plat-omap/mcbsp.c  |   27 ++ 
+

sound/soc/omap/omap-mcbsp.c |   14 --
3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat- 
omap/include/mach/mcbsp.h

index e0d6eca..94e1c66 100644
--- a/arch/arm/plat-omap/include/mach/mcbsp.h
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -440,6 +440,8 @@ static inline int omap_mcbsp_get_dma_op_mode 
(unsigned int id) { return 0; }

#endif
int omap_mcbsp_request(unsigned int id);
void omap_mcbsp_free(unsigned int id);
+void omap_mcbsp_disable_fclk(unsigned int id);
+void omap_mcbsp_enable_fclk(unsigned int id);
void omap_mcbsp_start(unsigned int id, int tx, int rx);
void omap_mcbsp_stop(unsigned int id, int tx, int rx);
void omap_mcbsp_xmit_word(unsigned int id, u32 word);
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index e664b91..bfe3c61 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -459,6 +459,33 @@ int omap_mcbsp_request(unsigned int id)
}
EXPORT_SYMBOL(omap_mcbsp_request);

+void omap_mcbsp_disable_fclk(unsigned int id)
+{
+struct omap_mcbsp *mcbsp;
+
+if (!omap_mcbsp_check_valid_id(id)) {
+printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
+return;
+}
+mcbsp = id_to_mcbsp_ptr(id);
+clk_disable(mcbsp->fclk);
+}
+EXPORT_SYMBOL(omap_mcbsp_disable_fclk);
+
+
+void omap_mcbsp_enable_fclk(unsigned int id)
+{
+struct omap_mcbsp *mcbsp;
+
+if (!omap_mcbsp_check_valid_id(id)) {
+printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
+return;
+}
+mcbsp = id_to_mcbsp_ptr(id);
+clk_enable(mcbsp->fclk);
+}
+EXPORT_SYMBOL(omap_mcbsp_enable_fclk);
+
void omap_mcbsp_free(unsigned int id)
{
   struct omap_mcbsp *mcbsp;
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 45be942..e56b5ff 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -229,18 +229,28 @@ static int omap_mcbsp_dai_trigger(struct  
snd_pcm_substream *substream, int cmd,


   switch (cmd) {
   case SNDRV_PCM_TRIGGER_START:
-case SNDRV_PCM_TRIGGER_RESUME:
   case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
   mcbsp_data->active++;
   omap_mcbsp_start(mcbsp_data->bus_id, play, !play);
   break;
+case SNDRV_PCM_TRIGGER_RESUME:
+mcbsp_data->active++;
+omap_mcbsp_enable_fclk(mcbsp_data->bus_id);
+omap_mcbsp_config(mcbsp_data->bus_id,
+&mcbsp_data->regs);
+omap_mcbsp_start(mcbsp_data->bus_id, play, !play);
+break;

   case SNDRV_PCM_TRIGGER_STOP:
-case SNDRV_PCM_TRIGGER_SUSPEND:
   case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
   omap_mcbsp_stop(mcbsp_data->bus_id, play, !play);
   mcbsp_data->active--;
   break;
+case SNDRV_PCM_TRIGGER_SUSPEND:
+omap_mcbsp_stop(mcbsp_data->bus_id, play, !play);
+omap_mcbsp_disable_fclk(mcbsp_data->bus_id);
+mcbsp_data->active--;
+break;
   default:
   err = -EINVAL;
   }
--
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 2/2] ASoC: OMAP: reconfigure DMA to resume audio

2009-11-13 Thread Wang, Jane


> -Original Message-
> From: Mark Brown [mailto:broo...@opensource.wolfsonmicro.com]
> Sent: Friday, November 13, 2009 7:51 AM
> To: Wang, Jane
> Cc: alsa-de...@alsa-project.org; linux-omap@vger.kernel.org;
> peter.ujfal...@nokia.com; Jarkko Nikula
> Subject: Re: [PATCH 2/2] ASoC: OMAP: reconfigure DMA to resume audio
> 
> On Thu, Nov 12, 2009 at 02:15:18PM -0600, Jane Wang wrote:
> > Reconfigure DMA transfer parameters to resume audio after system comming
> out of OFF state.
> 
> > Signed-off-by: Jane Wang 
> 
> This looks OK to me but I'd like an ack from the OMAP folks.  Adding
> Jarkko as well as he's the maintainer for OMAP audio.
> 
Thanks. I think my original patch failed to post on the mailing list. I will 
resend the patch and cc Jarkko.
--
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] OMAP3: MCBSP: Suspend/resume failure fix

2009-11-13 Thread Jane Wang
McBSP fucntional clock is not disabled when suspend is triggerd which
prevents PER domain entering target low-power state. To fix the problem:

1. Disable/enable McBSP functional clock for suspend/resume.

2. In addition, reconfigure McBSP, this is needed when systerm comes out of OFF 
state.

Signed-off-by: Jane Wang 
---
 arch/arm/plat-omap/include/mach/mcbsp.h |2 ++
 arch/arm/plat-omap/mcbsp.c  |   27 +++
 sound/soc/omap/omap-mcbsp.c |   14 --
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h 
b/arch/arm/plat-omap/include/mach/mcbsp.h
index e0d6eca..94e1c66 100644
--- a/arch/arm/plat-omap/include/mach/mcbsp.h
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -440,6 +440,8 @@ static inline int omap_mcbsp_get_dma_op_mode(unsigned int 
id) { return 0; }
 #endif
 int omap_mcbsp_request(unsigned int id);
 void omap_mcbsp_free(unsigned int id);
+void omap_mcbsp_disable_fclk(unsigned int id);
+void omap_mcbsp_enable_fclk(unsigned int id);
 void omap_mcbsp_start(unsigned int id, int tx, int rx);
 void omap_mcbsp_stop(unsigned int id, int tx, int rx);
 void omap_mcbsp_xmit_word(unsigned int id, u32 word);
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index e664b91..bfe3c61 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -459,6 +459,33 @@ int omap_mcbsp_request(unsigned int id)
 }
 EXPORT_SYMBOL(omap_mcbsp_request);
 
+void omap_mcbsp_disable_fclk(unsigned int id)
+{
+   struct omap_mcbsp *mcbsp;
+
+   if (!omap_mcbsp_check_valid_id(id)) {
+   printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
+   return;
+   }
+   mcbsp = id_to_mcbsp_ptr(id);
+   clk_disable(mcbsp->fclk);
+}
+EXPORT_SYMBOL(omap_mcbsp_disable_fclk);
+
+
+void omap_mcbsp_enable_fclk(unsigned int id)
+{
+   struct omap_mcbsp *mcbsp;
+
+   if (!omap_mcbsp_check_valid_id(id)) {
+   printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
+   return;
+   }
+   mcbsp = id_to_mcbsp_ptr(id);
+   clk_enable(mcbsp->fclk);
+}
+EXPORT_SYMBOL(omap_mcbsp_enable_fclk);
+
 void omap_mcbsp_free(unsigned int id)
 {
struct omap_mcbsp *mcbsp;
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 45be942..e56b5ff 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -229,18 +229,28 @@ static int omap_mcbsp_dai_trigger(struct 
snd_pcm_substream *substream, int cmd,
 
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
-   case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
mcbsp_data->active++;
omap_mcbsp_start(mcbsp_data->bus_id, play, !play);
break;
+   case SNDRV_PCM_TRIGGER_RESUME:
+   mcbsp_data->active++;
+   omap_mcbsp_enable_fclk(mcbsp_data->bus_id);
+   omap_mcbsp_config(mcbsp_data->bus_id,
+   &mcbsp_data->regs);
+   omap_mcbsp_start(mcbsp_data->bus_id, play, !play);
+   break;
 
case SNDRV_PCM_TRIGGER_STOP:
-   case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
omap_mcbsp_stop(mcbsp_data->bus_id, play, !play);
mcbsp_data->active--;
break;
+   case SNDRV_PCM_TRIGGER_SUSPEND:
+   omap_mcbsp_stop(mcbsp_data->bus_id, play, !play);
+   omap_mcbsp_disable_fclk(mcbsp_data->bus_id);
+   mcbsp_data->active--;
+   break;
default:
err = -EINVAL;
}
-- 
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


CPUFREQ for beagle

2009-11-13 Thread tarek attia
I want the CPUFREQdriver for the beagleboard which can work with
linux2.6.29 properly




plz any one Help


thnx in Advance
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 2/2] ASoC: OMAP: reconfigure DMA to resume audio

2009-11-13 Thread Mark Brown
On Thu, Nov 12, 2009 at 02:15:18PM -0600, Jane Wang wrote:
> Reconfigure DMA transfer parameters to resume audio after system comming out 
> of OFF state.

> Signed-off-by: Jane Wang 

This looks OK to me but I'd like an ack from the OMAP folks.  Adding
Jarkko as well as he's the maintainer for OMAP audio.

> ---
>  sound/soc/omap/omap-pcm.c |7 ++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index 6a829ee..5e04390 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -215,8 +215,13 @@ static int omap_pcm_trigger(struct snd_pcm_substream 
> *substream, int cmd)
>  
>   spin_lock_irqsave(&prtd->lock, flags);
>   switch (cmd) {
> - case SNDRV_PCM_TRIGGER_START:
>   case SNDRV_PCM_TRIGGER_RESUME:
> + /* Reconfigure DMA transfer parameters
> +  * in order to come back from OFF mode
> +  */
> + omap_pcm_prepare(substream);
> + /* fall through */
> + case SNDRV_PCM_TRIGGER_START:
>   case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
>   prtd->period_index = 0;
>   /* Configure McBSP internal buffer usage */
> -- 
> 1.5.4.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4] OMAP: GPIO module enable/disable

2009-11-13 Thread Charulatha V
This patch disables a GPIO module when all pins of a GPIO
module are inactive (clock gating forced at module level) and
enables the module when any gpio in the module is requested.

The module is enabled only when "mod_usage" indicates that no GPIO
in that  module is currently active and the GPIO being requested
is the 1st one to be active in that module.

Each module would be disabled in omap_gpio_free() API when all
GPIOs in a particular module becomes inactive. The module is
re-enabled in omap_gpio_request() API when a GPIO is requested
from the module that was previously disabled.

Since individual GPIO's bookkeeping is added in this patch
via "mod_usage", the same is used in omap_set_gpio_debounce()
& omap_set_gpio_debounce_time() APIs to ensure that the gpio being
used is actually "requested" prior to being used (Nishant Menon's

Acked-by: Nishanth Menon 
---
 arch/arm/plat-omap/gpio.c |   32 
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index b71052c..ce4f0cd 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -195,6 +195,7 @@ struct gpio_bank {
spinlock_t lock;
struct gpio_chip chip;
struct clk *dbck;
+   u32 mod_usage;
 };
 
 #define METHOD_MPUIO   0
@@ -628,6 +629,10 @@ void omap_set_gpio_debounce(int gpio, int enable)
 #else
reg += OMAP24XX_GPIO_DEBOUNCE_EN;
 #endif
+   if (!(bank->mod_usage & l)) {
+   printk(KERN_ERR "GPIO %d not requested\n", gpio);
+   return;
+   }
 
spin_lock_irqsave(&bank->lock, flags);
val = __raw_readl(reg);
@@ -663,6 +668,11 @@ void omap_set_gpio_debounce_time(int gpio, int enc_time)
bank = get_gpio_bank(gpio);
reg = bank->base;
 
+   if (!bank->mod_usage) {
+   printk(KERN_ERR "GPIO not requested\n");
+   return;
+   }
+
enc_time &= 0xff;
 #ifdef CONFIG_ARCH_OMAP4
reg += OMAP4_GPIO_DEBOUNCINGTIME;
@@ -1144,6 +1154,16 @@ static int omap_gpio_request(struct gpio_chip *chip, 
unsigned offset)
__raw_writel(__raw_readl(reg) | (1 << offset), reg);
}
 #endif
+   if (!cpu_class_is_omap1()) {
+   if (!bank->mod_usage) {
+   u32 ctrl;
+   ctrl = __raw_readl(bank->base + OMAP24XX_GPIO_CTRL);
+   ctrl &= 0xFFFE;
+   /* Module is enabled, clocks are not gated */
+   __raw_writel(ctrl, bank->base + OMAP24XX_GPIO_CTRL);
+   }
+   bank->mod_usage |= 1 << offset;
+   }
spin_unlock_irqrestore(&bank->lock, flags);
 
return 0;
@@ -1170,6 +1190,16 @@ static void omap_gpio_free(struct gpio_chip *chip, 
unsigned offset)
__raw_writel(1 << offset, reg);
}
 #endif
+   if (!cpu_class_is_omap1()) {
+   bank->mod_usage &= ~(1 << offset);
+   if (!bank->mod_usage) {
+   u32 ctrl;
+   ctrl = __raw_readl(bank->base + OMAP24XX_GPIO_CTRL);
+   /* Module is disabled, clocks are gated */
+   ctrl |= 1;
+   __raw_writel(ctrl, bank->base + OMAP24XX_GPIO_CTRL);
+   }
+   }
_reset_gpio(bank, bank->chip.base + offset);
spin_unlock_irqrestore(&bank->lock, flags);
 }
@@ -1749,6 +1779,8 @@ static int __init _omap_gpio_init(void)
gpio_count = 32;
}
 #endif
+
+   bank->mod_usage = 0;
/* REVISIT eventually switch from OMAP-specific gpio structs
 * over to the generic ones
 */
-- 
1.6.0.4

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


Re: Query: Regulator framework in EHCI driver

2009-11-13 Thread Mark Brown
On Fri, Nov 13, 2009 at 09:52:14AM +0530, Gupta, Ajay Kumar wrote:

> + snprintf(supply, 7, "hsusb%d", i);

It'd be better to use sizeof() rather than a hard coded 7 here.

> + omap->regulator[i] = regulator_get(omap->dev, supply);

Looking at your code this needs to be regulator_get_exclusive() - you
conditinoally disable the regulator when unregistering depending on if
it reports as enabled but if the supply is shared then it can be enabled
without this driver having done so.

Alternatively, make the regulator_disable() in the shutdown path
unconditional.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2009-11-13 Thread C.A, Subramaniam
>From 5fd7c2bfae11879edfcae7db073deb11bea1f584 Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
Date: Fri, 13 Nov 2009 15:59:58 +0530
Subject: [PATCH 10/10] omap mailbox: OMAP4 Mailbox-driver Patch to support 
tasklet implementation

This patch uses a tasklet implementation for
sending mailbox messages.

Signed-off-by: C A Subramaniam 
Signed-off-by: Ramesh Gupta G 
Signed-off-by: Hiroshi DOYU 
---
 arch/arm/plat-omap/include/plat/mailbox.h |8 +++-
 arch/arm/plat-omap/mailbox.c  |   59 
 2 files changed, 23 insertions(+), 44 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/mailbox.h 
b/arch/arm/plat-omap/include/plat/mailbox.h
index bf06953..729166b 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -6,6 +6,7 @@
 #include 
 #include 
 #include 
+#include 
 
 typedef u32 mbox_msg_t;
 struct omap_mbox;
@@ -28,8 +29,10 @@ struct omap_mbox_ops {
int (*fifo_empty)(struct omap_mbox *mbox);
int (*fifo_full)(struct omap_mbox *mbox);
/* irq */
-   void(*enable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t 
irq);
-   void(*disable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t 
irq);
+   void(*enable_irq)(struct omap_mbox *mbox,
+   omap_mbox_irq_t irq);
+   void(*disable_irq)(struct omap_mbox *mbox,
+   omap_mbox_irq_t irq);
void(*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
/* ctx */
@@ -41,6 +44,7 @@ struct omap_mbox_queue {
spinlock_t  lock;
struct request_queue*queue;
struct work_struct  work;
+   struct tasklet_struct   tasklet;
int (*callback)(void *);
struct omap_mbox*mbox;
 };
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 4d7947e..8e90633 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -80,74 +80,45 @@ static int __mbox_msg_send(struct omap_mbox *mbox, 
mbox_msg_t msg)
return ret;
 }
 
-struct omap_msg_tx_data {
-   mbox_msg_t  msg;
-};
-
-static void omap_msg_tx_end_io(struct request *rq, int error)
-{
-   kfree(rq->special);
-   __blk_put_request(rq->q, rq);
-}
 
 int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg)
 {
-   struct omap_msg_tx_data *tx_data;
+
struct request *rq;
struct request_queue *q = mbox->txq->queue;
 
-   tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
-   if (unlikely(!tx_data))
-   return -ENOMEM;
-
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
-   if (unlikely(!rq)) {
-   kfree(tx_data);
+   if (unlikely(!rq))
return -ENOMEM;
-   }
 
-   tx_data->msg = msg;
-   rq->end_io = omap_msg_tx_end_io;
-   blk_insert_request(q, rq, 0, tx_data);
+   blk_insert_request(q, rq, 0, (void *) msg);
+   tasklet_schedule(&mbox->txq->tasklet);
 
-   schedule_work(&mbox->txq->work);
return 0;
 }
 EXPORT_SYMBOL(omap_mbox_msg_send);
 
-static void mbox_tx_work(struct work_struct *work)
+static void mbox_tx_tasklet(unsigned long tx_data)
 {
int ret;
struct request *rq;
-   struct omap_mbox_queue *mq = container_of(work,
-   struct omap_mbox_queue, work);
-   struct omap_mbox *mbox = mq->queue->queuedata;
+   struct omap_mbox *mbox = (struct omap_mbox *)tx_data;
struct request_queue *q = mbox->txq->queue;
 
while (1) {
-   struct omap_msg_tx_data *tx_data;
 
-   spin_lock(q->queue_lock);
rq = blk_fetch_request(q);
-   spin_unlock(q->queue_lock);
 
if (!rq)
break;
 
-   tx_data = rq->special;
-
-   ret = __mbox_msg_send(mbox, tx_data->msg);
+   ret = __mbox_msg_send(mbox, (mbox_msg_t)rq->special);
if (ret) {
omap_mbox_enable_irq(mbox, IRQ_TX);
-   spin_lock(q->queue_lock);
blk_requeue_request(q, rq);
-   spin_unlock(q->queue_lock);
return;
}
-
-   spin_lock(q->queue_lock);
-   __blk_end_request_all(rq, 0);
-   spin_unlock(q->queue_lock);
+   blk_end_request_all(rq, 0);
}
 }
 
@@ -192,7 +163,7 @@ static void __mbox_tx_interrupt(struct omap_mbox *mbox)
 {
omap_mbox_disable_irq(mbox, IRQ_TX);
ack_mbox_irq(mbox, IRQ_TX);
-   schedule_work(&mbox->txq->work);
+   tasklet_schedule(&mbox->txq->tasklet);
 }
 
 static void __mbox_rx_interrupt(struct omap_mbox *mbox)
@@ -235,7 +206,8 @@ static irq

[PATCH 9/10] omap: mailbox: OMAP4 Mailbox Patch to change the IRQ

2009-11-13 Thread C.A, Subramaniam
>From 8a1b63918459dfbb5152dd31988714f91f4fd51b Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
Date: Thu, 12 Nov 2009 16:18:06 -0800
Subject: [PATCH 9/10] omap: mailbox: OMAP4 Mailbox Patch to change the IRQ flag 
from IRQF_DISABLED to IRQF_SHARED

Currently, this facilitates both the tesla and ducati
sides to request for the same irq through an
omap_mbox_get() call.

Signed-off-by: C A Subramaniam 
Signed-off-by: Ramesh Gupta G 
Acked-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/mailbox.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 99ecf80..eb76df2 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -283,7 +283,7 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
return ret;
}
 
-   ret = request_irq(mbox->irq, mbox_interrupt, IRQF_DISABLED,
+   ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
mbox->name, mbox);
if (unlikely(ret)) {
printk(KERN_ERR
-- 
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


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

2009-11-13 Thread C.A, Subramaniam
>From 1a5865e67ce5fae94ae283882411cd01f48e07a7 Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
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 
Signed-off-by: C A Subramaniam 
Signed-off-by: Ramesh Gupta G 
---
 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 
 #include 
 
+#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
 
-#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 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 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)
@@ -242,9 +260,12 @@ static struct omap_mbox_ops omap2_mbox_ops = {
  */
 
 /* FIXME: the following structs should be filled automatically by the user id 
*/
-
+#ifdef CONFIG_ARCH_OMAP4
+static struct omap_mbox2_priv omap2_mbox_1_priv = {
+#else
 /* DSP */
 static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
+#endif
.tx_fifo = {
.msg= MAILBOX_MESSAGE(0),
.fifo_stat  = MAILBOX_FIFOSTATUS(0),
@@ -257,7 +278,19 @@ static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
.irqstatus  = MAILBOX_IRQSTATUS(0),
.notfull_bit= MAILBOX_IRQ_NOTFULL(0),
.newmsg_bit = MAILBOX_IRQ_NEWMSG(1),
+#ifdef CONFIG_ARCH_OMAP4
+   .irqdisable = MAILBOX_IRQENABLE_CLR(0),
+#endif
+};
+
+#ifdef CONFIG_ARCH_OM

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

2009-11-13 Thread C.A, Subramaniam
>From 177e2efb7384c03ac445b55e2e4ccf44e2160051 Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
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 
---
 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


[PATCH 6/10] omap: mailbox: remove unnecessary arg for

2009-11-13 Thread C.A, Subramaniam
>From 27c97972080ba1fea6296ee59105aebd5ea4442a Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
Date: Thu, 12 Nov 2009 16:18:05 -0800
Subject: [PATCH 6/10] omap: mailbox: remove unnecessary arg for 
omap_mbox_msg_send

Also removed from tx_data

Signed-off-by: C A Subramaniam 
Acked-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/include/plat/mailbox.h |2 +-
 arch/arm/plat-omap/mailbox.c  |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/mailbox.h 
b/arch/arm/plat-omap/include/plat/mailbox.h
index 319306a..8260a3f 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -63,7 +63,7 @@ struct omap_mbox {
void(*err_notify)(void);
 };
 
-int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg, void *);
+int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
 void omap_mbox_init_seq(struct omap_mbox *);
 
 struct omap_mbox *omap_mbox_get(const char *);
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index b49bb29..99ecf80 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -88,7 +88,6 @@ static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t 
msg)
 
 struct omap_msg_tx_data {
mbox_msg_t  msg;
-   void*arg;
 };
 
 static void omap_msg_tx_end_io(struct request *rq, int error)
@@ -97,7 +96,7 @@ static void omap_msg_tx_end_io(struct request *rq, int error)
__blk_put_request(rq->q, rq);
 }
 
-int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg)
+int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg)
 {
struct omap_msg_tx_data *tx_data;
struct request *rq;
@@ -114,7 +113,6 @@ int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t 
msg, void* arg)
}
 
tx_data->msg = msg;
-   tx_data->arg = arg;
rq->end_io = omap_msg_tx_end_io;
blk_insert_request(q, rq, 0, tx_data);
 
-- 
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


[PATCH 5/10] omap: mailbox: remove disable_/enable_mbox_irq in isr

2009-11-13 Thread C.A, Subramaniam
>From 977b46afb3d52422d486458c6c7889c9ce906b3d Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU 
Date: Thu, 12 Nov 2009 16:18:05 -0800
Subject: [PATCH 5/10] omap: mailbox: remove disable_/enable_mbox_irq in isr

No need to handle it in isr, since irq won't happen during isr.

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

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 13ca236..b49bb29 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -209,8 +209,6 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
mbox_msg_t msg;
struct request_queue *q = mbox->rxq->queue;
 
-   disable_mbox_irq(mbox, IRQ_RX);
-
while (!mbox_fifo_empty(mbox)) {
rq = blk_get_request(q, WRITE, GFP_ATOMIC);
if (unlikely(!rq))
@@ -226,7 +224,6 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
 
/* no more messages in the fifo. clear IRQ source. */
ack_mbox_irq(mbox, IRQ_RX);
-   enable_mbox_irq(mbox, IRQ_RX);
 nomem:
schedule_work(&mbox->rxq->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


[PATCH 4/10] omap: mailbox: remove class interface

2009-11-13 Thread C.A, Subramaniam
>From fcd239d499ab89a13e186d5ec5e2d0dde7d21e9e Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU 
Date: Thu, 12 Nov 2009 16:18:05 -0800
Subject: [PATCH 4/10] omap: mailbox: remove class interface

It's not used at present.

Signed-off-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/plat-omap/include/plat/mailbox.h |1 -
 arch/arm/plat-omap/mailbox.c  |  115 ++--
 2 files changed, 9 insertions(+), 107 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/mailbox.h 
b/arch/arm/plat-omap/include/plat/mailbox.h
index b7a6991..319306a 100644
--- a/arch/arm/plat-omap/include/plat/mailbox.h
+++ b/arch/arm/plat-omap/include/plat/mailbox.h
@@ -8,7 +8,6 @@
 #include 
 
 typedef u32 mbox_msg_t;
-typedef void (mbox_receiver_t)(mbox_msg_t msg);
 struct omap_mbox;
 
 typedef int __bitwise omap_mbox_irq_t;
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index f82810e..13ca236 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -71,7 +71,7 @@ static inline int is_mbox_irq(struct omap_mbox *mbox, 
omap_mbox_irq_t irq)
 /*
  * message sender
  */
-static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void *arg)
+static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg)
 {
int ret = 0, i = 1000;
 
@@ -82,15 +82,7 @@ static int __mbox_msg_send(struct omap_mbox *mbox, 
mbox_msg_t msg, void *arg)
return -1;
udelay(1);
}
-
-   if (arg && mbox->txq->callback) {
-   ret = mbox->txq->callback(arg);
-   if (ret)
-   goto out;
-   }
-
mbox_fifo_write(mbox, msg);
- out:
return ret;
 }
 
@@ -152,7 +144,7 @@ static void mbox_tx_work(struct work_struct *work)
 
tx_data = rq->special;
 
-   ret = __mbox_msg_send(mbox, tx_data->msg, tx_data->arg);
+   ret = __mbox_msg_send(mbox, tx_data->msg);
if (ret) {
enable_mbox_irq(mbox, IRQ_TX);
spin_lock(q->queue_lock);
@@ -180,11 +172,6 @@ static void mbox_rx_work(struct work_struct *work)
mbox_msg_t msg;
unsigned long flags;
 
-   if (mbox->rxq->callback == NULL) {
-   sysfs_notify(&mbox->dev->kobj, NULL, "mbox");
-   return;
-   }
-
while (1) {
spin_lock_irqsave(q->queue_lock, flags);
rq = blk_fetch_request(q);
@@ -257,69 +244,6 @@ static irqreturn_t mbox_interrupt(int irq, void *p)
return IRQ_HANDLED;
 }
 
-/*
- * sysfs files
- */
-static ssize_t
-omap_mbox_write(struct device *dev, struct device_attribute *attr,
-   const char *buf, size_t count)
-{
-   int ret;
-   mbox_msg_t *p = (mbox_msg_t *)buf;
-   struct omap_mbox *mbox = dev_get_drvdata(dev);
-
-   for (; count >= sizeof(mbox_msg_t); count -= sizeof(mbox_msg_t)) {
-   ret = omap_mbox_msg_send(mbox, be32_to_cpu(*p), NULL);
-   if (ret)
-   return -EAGAIN;
-   p++;
-   }
-
-   return (size_t)((char *)p - buf);
-}
-
-static ssize_t
-omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf)
-{
-   unsigned long flags;
-   struct request *rq;
-   mbox_msg_t *p = (mbox_msg_t *) buf;
-   struct omap_mbox *mbox = dev_get_drvdata(dev);
-   struct request_queue *q = mbox->rxq->queue;
-
-   while (1) {
-   spin_lock_irqsave(q->queue_lock, flags);
-   rq = blk_fetch_request(q);
-   spin_unlock_irqrestore(q->queue_lock, flags);
-
-   if (!rq)
-   break;
-
-   *p = (mbox_msg_t)rq->special;
-
-   blk_end_request_all(rq, 0);
-
-   p++;
-   }
-
-   pr_debug("%02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3]);
-
-   return (size_t) ((char *)p - buf);
-}
-
-static DEVICE_ATTR(mbox, S_IRUGO | S_IWUSR, omap_mbox_read, omap_mbox_write);
-
-static ssize_t mbox_show(struct class *class, char *buf)
-{
-   return sprintf(buf, "mbox");
-}
-
-static CLASS_ATTR(mbox, S_IRUGO, mbox_show, NULL);
-
-static struct class omap_mbox_class = {
-   .name = "omap-mailbox",
-};
-
 static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
request_fn_proc *proc,
void (*work) (struct work_struct *))
@@ -353,7 +277,7 @@ static void mbox_queue_free(struct omap_mbox_queue *q)
kfree(q);
 }
 
-static int omap_mbox_init(struct omap_mbox *mbox)
+static int omap_mbox_startup(struct omap_mbox *mbox)
 {
int ret;
struct omap_mbox_queue *mq;
@@ -436,7 +360,7 @@ struct omap_mbox *omap_mbox_get(const char *name)
 
read_unlock(&mboxes_lock);
 
-   ret = omap_mbox_init(mbox);
+   ret = omap_mbox_startup(mbox);
if (ret)
return ERR_PTR(-ENO

[PATCH 3/10] omap: mailbox: remove sequence bit checking

2009-11-13 Thread C.A, Subramaniam
>From 39b709da59a8f146169577702c4d77048050c3d0 Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU 
Date: Thu, 12 Nov 2009 16:18:04 -0800
Subject: [PATCH 3/10] omap: mailbox: remove sequence bit checking

Any protocol should be handled in the upper layer and mailbox driver
shouldn't care about the contents of messages.

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

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 734bff3..f82810e 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -28,54 +28,9 @@
 
 #include 
 
-static int enable_seq_bit;
-module_param(enable_seq_bit, bool, 0);
-MODULE_PARM_DESC(enable_seq_bit, "Enable sequence bit checking.");
-
 static struct omap_mbox *mboxes;
 static DEFINE_RWLOCK(mboxes_lock);
 
-/*
- * Mailbox sequence bit API
- */
-
-/* seq_rcv should be initialized with any value other than
- * 0 and 1 << 31, to allow either value for the first
- * message.  */
-static inline void mbox_seq_init(struct omap_mbox *mbox)
-{
-   if (!enable_seq_bit)
-   return;
-
-   /* any value other than 0 and 1 << 31 */
-   mbox->seq_rcv = 0x;
-}
-
-static inline void mbox_seq_toggle(struct omap_mbox *mbox, mbox_msg_t * msg)
-{
-   if (!enable_seq_bit)
-   return;
-
-   /* add seq_snd to msg */
-   *msg = (*msg & 0x7fff) | mbox->seq_snd;
-   /* flip seq_snd */
-   mbox->seq_snd ^= 1 << 31;
-}
-
-static inline int mbox_seq_test(struct omap_mbox *mbox, mbox_msg_t msg)
-{
-   mbox_msg_t seq;
-
-   if (!enable_seq_bit)
-   return 0;
-
-   seq = msg & (1 << 31);
-   if (seq == mbox->seq_rcv)
-   return -1;
-   mbox->seq_rcv = seq;
-   return 0;
-}
-
 /* Mailbox FIFO handle functions */
 static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
 {
@@ -113,13 +68,6 @@ static inline int is_mbox_irq(struct omap_mbox *mbox, 
omap_mbox_irq_t irq)
return mbox->ops->is_irq(mbox, irq);
 }
 
-/* Mailbox Sequence Bit function */
-void omap_mbox_init_seq(struct omap_mbox *mbox)
-{
-   mbox_seq_init(mbox);
-}
-EXPORT_SYMBOL(omap_mbox_init_seq);
-
 /*
  * message sender
  */
@@ -141,7 +89,6 @@ static int __mbox_msg_send(struct omap_mbox *mbox, 
mbox_msg_t msg, void *arg)
goto out;
}
 
-   mbox_seq_toggle(mbox, &msg);
mbox_fifo_write(mbox, msg);
  out:
return ret;
@@ -254,11 +201,11 @@ static void mbox_rx_work(struct work_struct *work)
 /*
  * Mailbox interrupt handler
  */
-static void mbox_txq_fn(struct request_queue * q)
+static void mbox_txq_fn(struct request_queue *q)
 {
 }
 
-static void mbox_rxq_fn(struct request_queue * q)
+static void mbox_rxq_fn(struct request_queue *q)
 {
 }
 
@@ -284,11 +231,6 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
 
msg = mbox_fifo_read(mbox);
 
-   if (unlikely(mbox_seq_test(mbox, msg))) {
-   pr_info("mbox: Illegal seq bit!(%08x)\n", msg);
-   if (mbox->err_notify)
-   mbox->err_notify();
-   }
 
blk_insert_request(q, rq, 0, (void *)msg);
if (mbox->ops->type == OMAP_MBOX_TYPE1)
@@ -320,7 +262,7 @@ static irqreturn_t mbox_interrupt(int irq, void *p)
  */
 static ssize_t
 omap_mbox_write(struct device *dev, struct device_attribute *attr,
-   const char * buf, size_t count)
+   const char *buf, size_t count)
 {
int ret;
mbox_msg_t *p = (mbox_msg_t *)buf;
@@ -357,10 +299,6 @@ omap_mbox_read(struct device *dev, struct device_attribute 
*attr, char *buf)
 
blk_end_request_all(rq, 0);
 
-   if (unlikely(mbox_seq_test(mbox, *p))) {
-   pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);
-   continue;
-   }
p++;
}
 
@@ -383,7 +321,7 @@ static struct class omap_mbox_class = {
 };
 
 static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
-   request_fn_proc * proc,
+   request_fn_proc *proc,
void (*work) (struct work_struct *))
 {
struct request_queue *q;
-- 
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


[PATCH 2/10] omap: mailbox: OMAP4 - Add resources

2009-11-13 Thread C.A, Subramaniam
>From 80f2bf9ba7e2d87490a36346d25517c41033677f Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
Date: Thu, 12 Nov 2009 16:18:04 -0800
Subject: [PATCH 2/10] omap: mailbox: OMAP4 - Add resources and mailbox register 
base address for OMAP4 mailbox

This patch adds resource information of mailbox driver for
OMAP4 mailbox module. Register base address also added

Signed-off-by: C A Subramaniam 
Signed-off-by: Ramesh Gupta G 
Acked-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/devices.c  |   36 +---
 arch/arm/plat-omap/include/plat/omap44xx.h |2 +
 2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 8b6cd8c..733d3dc 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -136,9 +136,10 @@ static inline void omap_init_camera(void)
 
 #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
 
-#define MBOX_REG_SIZE  0x120
+#define MBOX_REG_SIZE   0x120
 
-static struct resource omap2_mbox_resources[] = {
+#ifdef CONFIG_ARCH_OMAP2
+static struct resource omap_mbox_resources[] = {
{
.start  = OMAP24XX_MAILBOX_BASE,
.end= OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
@@ -153,8 +154,10 @@ static struct resource omap2_mbox_resources[] = {
.flags  = IORESOURCE_IRQ,
},
 };
+#endif
 
-static struct resource omap3_mbox_resources[] = {
+#ifdef CONFIG_ARCH_OMAP3
+static struct resource omap_mbox_resources[] = {
{
.start  = OMAP34XX_MAILBOX_BASE,
.end= OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
@@ -165,6 +168,24 @@ static struct resource omap3_mbox_resources[] = {
.flags  = IORESOURCE_IRQ,
},
 };
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+
+#define OMAP4_MBOX_REG_SIZE0x130
+static struct resource omap_mbox_resources[] = {
+   {
+   .start  = OMAP44XX_MAILBOX_BASE,
+   .end= OMAP44XX_MAILBOX_BASE +
+   OMAP4_MBOX_REG_SIZE - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   {
+   .start  = INT_44XX_MAIL_U0_MPU,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+#endif
 
 static struct platform_device mbox_device = {
.name   = "omap2-mailbox",
@@ -173,12 +194,9 @@ static struct platform_device mbox_device = {
 
 static inline void omap_init_mbox(void)
 {
-   if (cpu_is_omap2420()) {
-   mbox_device.num_resources = ARRAY_SIZE(omap2_mbox_resources);
-   mbox_device.resource = omap2_mbox_resources;
-   } else if (cpu_is_omap3430()) {
-   mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources);
-   mbox_device.resource = omap3_mbox_resources;
+   if (cpu_is_omap2420() || cpu_is_omap3430() || cpu_is_omap44xx()) {
+   mbox_device.num_resources = ARRAY_SIZE(omap_mbox_resources);
+   mbox_device.resource = omap_mbox_resources;
} else {
pr_err("%s: platform not supported\n", __func__);
return;
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h 
b/arch/arm/plat-omap/include/plat/omap44xx.h
index 3361897..e52902a 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -40,5 +40,7 @@
 #define OMAP44XX_LOCAL_TWD_BASE0x48240600
 #define OMAP44XX_WKUPGEN_BASE  0x48281000
 
+#define OMAP44XX_MAILBOX_BASE  (L4_44XX_BASE + 0xF4000)
+
 #endif /* __ASM_ARCH_OMAP44XX_H */
 
-- 
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


[PATCH 1/10] omap: mailbox: Add build specific changes to support omap mailbox

2009-11-13 Thread C.A, Subramaniam
>From bf41b0fd7324149a647b43d434ae3821bea49541 Mon Sep 17 00:00:00 2001
From: C A Subramaniam 
Date: Thu, 12 Nov 2009 16:18:03 -0800
Subject: [PATCH 1/10] omap: mailbox: Add build specific changes to support omap 
mailbox

This patch adds changes to the build related files of mailbox
driver

Signed-off-by: C A Subramaniam 
Signed-off-by: Ramesh Gupta G 
Acked-by: Hiroshi DOYU 
Signed-off-by: Tony Lindgren 
---
 arch/arm/mach-omap2/Makefile |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5c32b65..b77fe24 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -44,6 +44,9 @@ obj-$(CONFIG_ARCH_OMAP4)  += cm4xxx.o
 obj-$(CONFIG_ARCH_OMAP2)   += clock24xx.o
 obj-$(CONFIG_ARCH_OMAP3)   += clock34xx.o
 
+obj-$(CONFIG_OMAP_MBOX_FWK)+= mailbox_mach.o
+mailbox_mach-objs  := mailbox.o
+
 iommu-y+= iommu2.o
 iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
 
-- 
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


[PATCH 0/10] omap mailbox: Refreshed patch series for-next branch

2009-11-13 Thread C.A, Subramaniam
Hi All,
Following is the refreshed version of patches for mailbox driver.

Hi Tony,
I have gone through the patch set in the for-next branch and have made the 
following changes:

Patch 7 was missing. I have re-worked it to the for-next branch.

As you had mentioned in the previous mail, Patches 8 and 10 have been re-worked.

Request you to please apply the patches 7, 8 and 10 on the for-next branch.

Patches already APPLIED on the for-next branch:
--
0001-omap-mailbox-Add-build-specific-changes-to-support.patch
0002-omap-mailbox-OMAP4-Add-resources-and-mailbox-reg.patch
0003-omap-mailbox-remove-sequence-bit-checking.patch
0004-omap-mailbox-remove-class-interface.patch
0005-omap-mailbox-remove-disable_-enable_mbox_irq-in-is.patch
0006-omap-mailbox-remove-unnecessary-arg-for-omap_mbox_.patch

0009-omap-mailbox-OMAP4-Mailbox-Patch-to-change-the-IRQ.patch

Patches refreshed for the for-next branch (need to be APPLIED):
--

0007-omap-mailbox-expose-omap_mbox_enable-disable_irq.patch
0008-omap-mailbox-OMAP4-Mailbox-Adds-code-changes-to-s.patch

0010-omap-mailbox-OMAP4-Mailbox-driver-Patch-to-support.patch

Please do let me know if you have any concerns.

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


[PATCH 2/2 (for-next)] ARM: OMAP3: Add defconfig for IGEP v2 board

2009-11-13 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra 


Signed-off-by: Enric Balletbo i Serra 
---
 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
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is 

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

2009-11-13 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra 

This patch adds minimal IGEP v2 support.

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

Signed-off-by: Enric Balletbo i Serra 
---
 arch/arm/mach-omap2/Kconfig  |4 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0020.c |  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 35b7f5c..b25af76 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -113,6 +113,10 @@ config MACH_OMAP_3630SDP
bool "OMAP3630 SDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
+config MACH_IGEP0020
+   bool "IGEP0020"
+   depends on ARCH_OMAP3 && ARCH_OMAP34XX
+
 config MACH_OMAP_4430SDP
bool "OMAP 4430 SDP board"
depends on ARCH_OMAP4
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index fd7198e..59b0ccc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -88,6 +88,8 @@ obj-$(CONFIG_MACH_OMAP_3630SDP)   += 
board-3630sdp.o \
   mmc-twl4030.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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "mmc-twl4030.h"
+
+#define IGEP2_SMSC911X_CS   5
+#define IGEP2_SMSC911X_GPIO 176
+#define IGEP2_GPIO_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 
+
+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 inline void __init igep2_init_smsc911x(void) { }
+#endif
+
+static struct omap_board_config_kernel igep2_config[] __initdata = {
+};
+
+static struct regulator_consumer_supply igep2_vmmc1_supply = {
+   .supply = "vmmc",
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card *

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

2009-11-13 Thread Tomi Valkeinen
On Thu, 2009-11-12 at 17:14 +0100, ext Daniel Toussaint wrote:
> 
> 
> On Thu, Nov 12, 2009 at 7:46 PM, Tomi Valkeinen
>  wrote:
> On Thu, 2009-11-12 at 11:23 +0100, ext Kim Botherway wrote:
> > This patch add support for the Timll DEVKIT8000 LCD panel
> 
> 
> I don't handle old omapfb patches. I think you should contact
> Imre Deak
> for those, although my advise would be to use the new display
> subsystem
> driver.
> 
> Question more or less related to this thread : when submitting new
> boards, it is better to work with DSS2 directly right ? I am also
> preparing a new board patch at this point, so I would like to know
> what is the sanest way to work ? Patch the linux-omap-2.6 tree with
> DSS2 patches , and then diff from there ? Or is is wiser to first
> submit without display related items, and wait for linux-omap-2.6 tree
> to have DSS2 support - which is going to happen soon I guess.  

Keep in mind that DSS2 is still a bit living target, you may need to do
changes to your board file or panel driver every now and then. If that
is ok for you, then I'd say DSS2 is better choice.

I'd say if you can wait, submit the patches only after DSS2 has gone in.
And I think at least the panel drivers should go through me, and I won't
take any patches until the core DSS2 driver has been merged.

 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] omap3: Change the default silicon

2009-11-13 Thread Nishanth Menon

Premi, Sanjeev had written, on 11/13/2009 04:53 AM, the following:

-Original Message-
From: Menon, Nishanth 
Sent: Friday, November 13, 2009 3:46 PM

To: Premi, Sanjeev
Cc: Gadiyar, Anand; Tony Lindgren; linux-omap@vger.kernel.org
Subject: Re: [PATCH] omap3: Change the default silicon

Premi, Sanjeev had written, on 11/13/2009 04:10 AM, the following:

-Original Message-
From: Gadiyar, Anand 
Sent: Friday, November 13, 2009 10:41 AM

To: Tony Lindgren; Premi, Sanjeev
Cc: linux-omap@vger.kernel.org
Subject: RE: [PATCH] omap3: Change the default silicon

Tony Lindgren wrote:

* Sanjeev Premi  [091029 07:35]:

Currently the default silicon - in absence of
identification - is set to OMAP3630 ES1.0.

Though, condition may/should not arise; but
the default should be latest in the most
common silicon variant - currently OMAP3430
ES3.1.

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


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

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

IMO, 3430 ES3.1 should be default.

- Anand

[sp] That's exactly the reason for this patch.
 There is a small typo in the comment though :(

/* Unknown. Default to latest among all variants */
Should be:
/* Unknown. Default to common among all variants */

 Sending a v2 for the same.

I believe this patch should be dropped -> here is why -> if 
you have new 
silicons that are in 3430 category, you should be sending patches for 
them ;)..


Default != new si


IMHO, I would rather have it as a BUG() instead of giving something 
default there.. essentially hitting that case points at: "hey here is a 
chip the programmers did not think about, let me be smart and try to 
dream up what they might be using" - lets face it, our code aint' that 
smart.. we have two options:

a) Make a guess what it might be
b) force the programmer to fix the bug and send us the patch ;)..
just my 2 cents..



The latest and greatest in the bucket of silicons is 3630 and I would 
rather go with felipe's patch [1] cleaning up the id.c than 


No issues with felipe's patch. It is cleaning the code style.

this -> in 
my opinion, hitting this condition is only because you have the next 
generation of devices..


Since we are talking OMAP3 derivatives, the default should be the
base - in case the condition ever arises. The fall back should
usually be 'most common' than 'latest'.

~sanjeev


--
Regards,
Nishanth Menon

Ref:
[1]: http://patchwork.kernel.org/patch/59540/



--
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: Change the default silicon

2009-11-13 Thread Premi, Sanjeev
> -Original Message-
> From: Menon, Nishanth 
> Sent: Friday, November 13, 2009 3:46 PM
> To: Premi, Sanjeev
> Cc: Gadiyar, Anand; Tony Lindgren; linux-omap@vger.kernel.org
> Subject: Re: [PATCH] omap3: Change the default silicon
> 
> Premi, Sanjeev had written, on 11/13/2009 04:10 AM, the following:
> >> -Original Message-
> >> From: Gadiyar, Anand 
> >> Sent: Friday, November 13, 2009 10:41 AM
> >> To: Tony Lindgren; Premi, Sanjeev
> >> Cc: linux-omap@vger.kernel.org
> >> Subject: RE: [PATCH] omap3: Change the default silicon
> >>
> >> Tony Lindgren wrote:
> >>> * Sanjeev Premi  [091029 07:35]:
>  Currently the default silicon - in absence of
>  identification - is set to OMAP3630 ES1.0.
> 
>  Though, condition may/should not arise; but
>  the default should be latest in the most
>  common silicon variant - currently OMAP3430
>  ES3.1.
> >>> Is this still needed? To me it seems more likely there will
> >>> more 3630 based silicon than 3430 based silicon?
> >>>
> >> 3430 ES3.1s are the most common I believe. All boards in the wild
> >> are 3430 based.
> >>
> >> 3630 is just coming up and will take a while to be as common.
> >>
> >> IMO, 3430 ES3.1 should be default.
> >>
> >> - Anand
> > 
> > [sp] That's exactly the reason for this patch.
> >  There is a small typo in the comment though :(
> > 
> > /* Unknown. Default to latest among all variants */
> > Should be:
> > /* Unknown. Default to common among all variants */
> > 
> >  Sending a v2 for the same.
> > 
> 
> I believe this patch should be dropped -> here is why -> if 
> you have new 
> silicons that are in 3430 category, you should be sending patches for 
> them ;)..

Default != new si

> 
> The latest and greatest in the bucket of silicons is 3630 and I would 
> rather go with felipe's patch [1] cleaning up the id.c than 

No issues with felipe's patch. It is cleaning the code style.

> this -> in 
> my opinion, hitting this condition is only because you have the next 
> generation of devices..

Since we are talking OMAP3 derivatives, the default should be the
base - in case the condition ever arises. The fall back should
usually be 'most common' than 'latest'.

~sanjeev
> 
> 
> -- 
> Regards,
> Nishanth Menon
> 
> Ref:
> [1]: http://patchwork.kernel.org/patch/59540/
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap3: Change the default silicon

2009-11-13 Thread Nishanth Menon

Premi, Sanjeev had written, on 11/13/2009 04:10 AM, the following:

-Original Message-
From: Gadiyar, Anand 
Sent: Friday, November 13, 2009 10:41 AM

To: Tony Lindgren; Premi, Sanjeev
Cc: linux-omap@vger.kernel.org
Subject: RE: [PATCH] omap3: Change the default silicon

Tony Lindgren wrote:

* Sanjeev Premi  [091029 07:35]:

Currently the default silicon - in absence of
identification - is set to OMAP3630 ES1.0.

Though, condition may/should not arise; but
the default should be latest in the most
common silicon variant - currently OMAP3430
ES3.1.

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


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

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

IMO, 3430 ES3.1 should be default.

- Anand


[sp] That's exactly the reason for this patch.
 There is a small typo in the comment though :(

/* Unknown. Default to latest among all variants */
Should be:
/* Unknown. Default to common among all variants */

 Sending a v2 for the same.



I believe this patch should be dropped -> here is why -> if you have new 
silicons that are in 3430 category, you should be sending patches for 
them ;)..


The latest and greatest in the bucket of silicons is 3630 and I would 
rather go with felipe's patch [1] cleaning up the id.c than this -> in 
my opinion, hitting this condition is only because you have the next 
generation of devices..



--
Regards,
Nishanth Menon

Ref:
[1]: http://patchwork.kernel.org/patch/59540/
--
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] omap3: Change the default silicon

2009-11-13 Thread Sanjeev Premi
Currently the default silicon - in absence of
identification - is set to OMAP3630 ES1.0.

Though, condition may/should not arise; but
the default should be latest in the most
common silicon variant - currently OMAP3430
ES3.1.

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

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1c15112..7098e12 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -243,8 +243,8 @@ void __init omap3_check_revision(void)
}
break;
default:
-   /* Unknown default to latest silicon rev as default*/
-   omap_revision = OMAP3630_REV_ES1_0;
+   /* Unknown. Default to most common among all variants */
+   omap_revision = OMAP3430_REV_ES3_1;
}
 }
 
-- 
1.6.2.2

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


Re: [PATCH 1/1] DSPBRIDGE: cache operation against kernel address instead of user's

2009-11-13 Thread Hiroshi DOYU
From: "Doyu Hiroshi (Nokia-D/Helsinki)" 
Subject: [PATCH 1/1] DSPBRIDGE: cache operation against kernel address instead 
of user's
Date: Fri, 6 Nov 2009 13:34:21 +0100

> From: Hiroshi DOYU 
> 
> Based on the discussion:
>   http://www.spinics.net/lists/arm-kernel/msg72810.html
> 
> HACK: export "follow_page()" for dspbridge cache operation
> 
> Signed-off-by: Hiroshi DOYU 
> ---
>  drivers/dsp/bridge/rmgr/proc.c |   76 
> +++-
>  mm/memory.c|1 +
>  2 files changed, 60 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
> index a75b64a..dc37beb 100644
> --- a/drivers/dsp/bridge/rmgr/proc.c
> +++ b/drivers/dsp/bridge/rmgr/proc.c
> @@ -159,6 +159,8 @@
>  #define PWR_TIMEOUT   500/* Sleep/wake timout in msec */
>  #define EXTEND "_EXT_END"/* Extmem end addr in DSP 
> binary */
>  
> +#define DSP_CACHE_LINE 128
> +
>  extern char *iva_img;
>  
>  /*  --- Globals */
> @@ -679,8 +681,48 @@ DSP_STATUS PROC_EnumNodes(DSP_HPROCESSOR hProcessor, OUT 
> DSP_HNODE *aNodeTab,
>   return status;
>  }
>  
> +/* Cache operation against kernel address instead of users */
> +static int memory_sync_page(struct vm_area_struct *vma, unsigned long start,
> + ssize_t len, enum DSP_FLUSHTYPE ftype)
> +{
> + struct page *page;
> + void *kaddr;
> + unsigned long offset;
> + ssize_t rest;
> +
> +#ifdef CHECK_DSP_CACHE_LINE
> + if ((start & DSP_CACHE_LINE) || (len & DSP_CACHE_LINE))
> + pr_warning("%s: not aligned: %08lx(%d)\n", __func__,
> +start, len);
> +#endif
> + while (len) {
> + page = follow_page(vma, start, FOLL_GET);
> + if (!page) {
> + pr_err("%s: no page for %08lx\n", __func__, start);
> + return -EINVAL;
> + } else if (IS_ERR(page)) {
> + pr_err("%s: err page for %08lx(%lu)\n", __func__, start,
> +IS_ERR(page));
> + return IS_ERR(page);
> + }
> +
> + offset = start & ~PAGE_SIZE;

should be:

 +  offset = start & ~PAGE_MASK;

The fixed version is attached.


0001-DSPBRIDGE-cache-operation-against-kernel-address-in.patch
Description: Binary data


RE: [PATCH] omap3: Change the default silicon

2009-11-13 Thread Premi, Sanjeev
> -Original Message-
> From: Gadiyar, Anand 
> Sent: Friday, November 13, 2009 10:41 AM
> To: Tony Lindgren; Premi, Sanjeev
> Cc: linux-omap@vger.kernel.org
> Subject: RE: [PATCH] omap3: Change the default silicon
> 
> Tony Lindgren wrote:
> > * Sanjeev Premi  [091029 07:35]:
> > > Currently the default silicon - in absence of
> > > identification - is set to OMAP3630 ES1.0.
> > > 
> > > Though, condition may/should not arise; but
> > > the default should be latest in the most
> > > common silicon variant - currently OMAP3430
> > > ES3.1.
> > 
> > Is this still needed? To me it seems more likely there will
> > more 3630 based silicon than 3430 based silicon?
> > 
> 
> 3430 ES3.1s are the most common I believe. All boards in the wild
> are 3430 based.
> 
> 3630 is just coming up and will take a while to be as common.
> 
> IMO, 3430 ES3.1 should be default.
> 
> - Anand

[sp] That's exactly the reason for this patch.
 There is a small typo in the comment though :(

/* Unknown. Default to latest among all variants */
Should be:
/* Unknown. Default to common among all variants */

 Sending a v2 for the same.

~sanjeev

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


RE: [PATCH v2 26/32] OMAP3: PM debug: allow runtime toggle of PM features

2009-11-13 Thread Gopinath, Thara


>>-Original Message-
>>From: linux-omap-ow...@vger.kernel.org 
>>[mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Kevin
>>Hilman
>>Sent: Friday, October 23, 2009 4:40 AM
>>To: linux-omap@vger.kernel.org
>>Cc: linux-arm-ker...@lists.infradead.org
>>Subject: [PATCH v2 26/32] OMAP3: PM debug: allow runtime toggle of PM features
>>
>>Allow enable/disable of low-power states during idle.  To
>>enable low-power idle:
>>
>>   echo 1 > /debug/pm_debug/sleep_while_idle
>>
>> to disable:
>>
>>   echo 0 > /debug/pm_debug/sleep_while_idle
>>
>>Also allow enable/disable of OFF-mode.  To enable:
>>
>>   echo 1 > /debug/pm_debug/enable_off_mode
>>
>> to disable:
>>
>>   echo 0 > /debug/pm_debug/enable_off_mode
>>
>>Signed-off-by: Kevin Hilman 
>>---
>> arch/arm/mach-omap2/pm-debug.c |   27 +++
>> arch/arm/mach-omap2/pm.h   |4 
>> arch/arm/mach-omap2/pm34xx.c   |   22 ++
>> arch/arm/mach-omap2/serial.c   |2 --
>> 4 files changed, 53 insertions(+), 2 deletions(-)
>>
>>diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
>>index 7eb2c12..1725da3 100644
>>--- a/arch/arm/mach-omap2/pm-debug.c
>>+++ b/arch/arm/mach-omap2/pm-debug.c
>>@@ -527,6 +527,29 @@ static int __init pwrdms_setup(struct powerdomain 
>>*pwrdm, void *dir)
>>  return 0;
>> }
>>
>>+static int option_get(void *data, u64 *val)
>>+{
>>+ u32 *option = data;
>>+
>>+ *val = *option;
>>+
>>+ return 0;
>>+}
>>+
>>+static int option_set(void *data, u64 val)
>>+{
>>+ u32 *option = data;
>>+
>>+ *option = val;
>>+
>>+ if (option == &enable_off_mode)
>>+ omap3_pm_off_mode_enable(val);
>>+
>>+ return 0;
>>+}
>>+
>>+DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, 
>>"%llu\n");
>>+
>> static int __init pm_dbg_init(void)
>> {
>>  int i;
>>@@ -569,6 +592,10 @@ static int __init pm_dbg_init(void)
>>
>>  }
>>
>>+ (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d,
>>+&enable_off_mode, &pm_dbg_option_fops);
>>+ (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d,
>>+&sleep_while_idle, &pm_dbg_option_fops);
>>  pm_dbg_init_done = 1;
>>
>>  return 0;
>>diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
>>index 45cafac..9582793 100644
>>--- a/arch/arm/mach-omap2/pm.h
>>+++ b/arch/arm/mach-omap2/pm.h
>>@@ -13,7 +13,11 @@
>>
>> #include 
>>
>>+extern u32 enable_off_mode;
>>+extern u32 sleep_while_idle;
>>+
>> extern void *omap3_secure_ram_storage;
>>+extern void omap3_pm_off_mode_enable(int);
>>
>> extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
>> extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
>>diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
>>index 90d1dc5..ade2e4a 100644
>>--- a/arch/arm/mach-omap2/pm34xx.c
>>+++ b/arch/arm/mach-omap2/pm34xx.c
>>@@ -25,6 +25,7 @@
>> #include 
>> #include 
>> #include 
>>+#include 
>>
>> #include 
>> #include 
>>@@ -57,6 +58,9 @@
>> #define OMAP343X_TABLE_VALUE_OFFSET 0x30
>> #define OMAP343X_CONTROL_REG_VALUE_OFFSET  0x32
>>
>>+u32 enable_off_mode;
>>+u32 sleep_while_idle;
>>+
>> struct power_state {
>>  struct powerdomain *pwrdm;
>>  u32 next_state;
>>@@ -456,6 +460,8 @@ static int omap3_fclks_active(void)
>>
>> static int omap3_can_sleep(void)
>> {
>>+ if (!sleep_while_idle)
>>+ return 0;
>>  if (!omap_uart_can_sleep())
>>  return 0;
>>  if (omap3_fclks_active())
>>@@ -900,6 +906,22 @@ static void __init prcm_setup_regs(void)
>>  omap3_d2d_idle();
>> }
>>
>>+void omap3_pm_off_mode_enable(int enable)
>>+{
>>+ struct power_state *pwrst;
>>+ u32 state;
>>+
>>+ if (enable)
>>+ state = PWRDM_POWER_OFF;
>>+ else
>>+ state = PWRDM_POWER_RET;
>>+
>>+ list_for_each_entry(pwrst, &pwrst_list, node) {
>>+ pwrst->next_state = state;
>>+ set_pwrdm_state(pwrst->pwrdm, state);

Shld the next states of MPU and CORE domain also be changed? It should happen 
only in idle thread or system suspend path. Not at any arbit point where user 
sets enable_off_mode.
>>+ }
>>+}
>>+
>> int omap3_pm_get_suspend_state(struct powerdomain *pwrdm)
>> {
>>  struct power_state *pwrst;
>>diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
>>index dabc089..2e17b57 100644
>>--- a/arch/arm/mach-omap2/serial.c
>>+++ b/arch/arm/mach-omap2/serial.c
>>@@ -155,8 +155,6 @@ static inline void __init omap_uart_reset(struct 
>>omap_uart_state *uart)
>>
>> #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
>>
>>-static int enable_off_mode; /* to be removed by full off-mode patches */
>>-
>> static void omap_uart_save_context(struct omap_uart_state *uart)
>> {
>>  u16 lcr = 0;
>>--
>>1.6.4.3
>>
>>--
>>To unsubscribe from this list: send the line "unsubscribe linux-omap" i

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

2009-11-13 Thread Tomi Valkeinen
Hi,

On Thu, 2009-11-12 at 21:48 +0100, ext Stephen Rothwell wrote:
> Hi Tony, Tomi,
> 
> On Thu, 12 Nov 2009 10:14:57 -0800 Tony Lindgren  wrote:
> >
> > OK. The only dependency is the the move of the headers.
> > 
> > Tomi, can you please rebase your patches on top of the 
> > "7xx-iosplit-plat-merge"
> > branch in linux-omap tree? This is commit 
> > 8171d88089ad63fc442b2bf32af7c18653adc5cb,
> > and it should stay static.
> 
> OK, *if* you (Tony) guarantee that the base is stable (i.e. never
> rebased, but may have things added to it) and in linux-next, then I can
> take the DSS2 stuff separately if you want me to.
> 
> Tomi, you can, of course, merge that branch into your tree instead of
> rebasing on top of it (which ever is easiest).

I rebased DSS2 on top of 8171d88089ad63fc442b2bf32af7c18653adc5cb. It
can be found from git://gitorious.org/linux-omap-dss2/linux.git for-next
branch.

I'm ok with Tony pulling DSS2 to his next-branch, or Stephen pulling
directly, which ever works easier for you.

 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


[PATCH] omap3evm: MIgrate to smsc911x ethernet driver.

2009-11-13 Thread Sriramakrishnan
Migrate to smsc911x ethernet driver instead of smc911x driver.
The smsc911x ethernet driver supports NAPI and performs better
under heavy traffic. With the smc911x driver we were witnessing
very high iowait time for high IO load over NFS.

Signed-off-by: Sriramakrishnan 
---
This patch has been refreshed against the tip of for-next branch.
Tested by reverting commit 20dec08ce892df224 as it was breaking
compilation otherwise.

 arch/arm/configs/omap3_evm_defconfig |4 +-
 arch/arm/mach-omap2/board-omap3evm.c |   43 +++--
 2 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/arch/arm/configs/omap3_evm_defconfig 
b/arch/arm/configs/omap3_evm_defconfig
index da69732..e190fc8 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -617,8 +617,8 @@ CONFIG_MII=y
 # CONFIG_DM9000 is not set
 # CONFIG_ENC28J60 is not set
 # CONFIG_ETHOC is not set
-CONFIG_SMC911X=y
-# CONFIG_SMSC911X is not set
+# CONFIG_SMC911X is not set
+CONFIG_SMSC911X=y
 # CONFIG_DNET is not set
 # CONFIG_IBM_NEW_EMAC_ZMII is not set
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index be93142..e8a7617 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -22,11 +22,13 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -52,7 +54,7 @@
 #define OMAP3EVM_ETHR_SIZE 1024
 #define OMAP3EVM_ETHR_ID_REV   0x50
 #define OMAP3EVM_ETHR_GPIO_IRQ 176
-#define OMAP3EVM_SMC911X_CS5
+#define OMAP3EVM_SMSC911X_CS   5
 
 static u8 omap3_evm_version;
 
@@ -84,7 +86,8 @@ static void __init omap3_evm_get_revision(void)
}
 }
 
-static struct resource omap3evm_smc911x_resources[] = {
+#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
+static struct resource omap3evm_smsc911x_resources[] = {
[0] =   {
.start  = OMAP3EVM_ETHR_START,
.end= (OMAP3EVM_ETHR_START + OMAP3EVM_ETHR_SIZE - 1),
@@ -93,24 +96,34 @@ static struct resource omap3evm_smc911x_resources[] = {
[1] =   {
.start  = OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
.end= OMAP_GPIO_IRQ(OMAP3EVM_ETHR_GPIO_IRQ),
-   .flags  = IORESOURCE_IRQ,
+   .flags  = (IORESOURCE_IRQ | IRQF_TRIGGER_LOW),
},
 };
 
-static struct platform_device omap3evm_smc911x_device = {
-   .name   = "smc911x",
+static struct smsc911x_platform_config smsc911x_config = {
+   .phy_interface  = PHY_INTERFACE_MODE_MII,
+   .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
+   .irq_type   = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
+   .flags  = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
+};
+
+static struct platform_device omap3evm_smsc911x_device = {
+   .name   = "smsc911x",
.id = -1,
-   .num_resources  = ARRAY_SIZE(omap3evm_smc911x_resources),
-   .resource   = &omap3evm_smc911x_resources[0],
+   .num_resources  = ARRAY_SIZE(omap3evm_smsc911x_resources),
+   .resource   = &omap3evm_smsc911x_resources[0],
+   .dev= {
+   .platform_data = &smsc911x_config,
+   },
 };
 
-static inline void __init omap3evm_init_smc911x(void)
+static inline void __init omap3evm_init_smsc911x(void)
 {
int eth_cs;
struct clk *l3ck;
unsigned int rate;
 
-   eth_cs = OMAP3EVM_SMC911X_CS;
+   eth_cs = OMAP3EVM_SMSC911X_CS;
 
l3ck = clk_get(NULL, "l3_ck");
if (IS_ERR(l3ck))
@@ -118,15 +131,20 @@ static inline void __init omap3evm_init_smc911x(void)
else
rate = clk_get_rate(l3ck);
 
-   if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMC911x irq") < 0) {
-   printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
+   if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
+   printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
OMAP3EVM_ETHR_GPIO_IRQ);
return;
}
 
gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
+   platform_device_register(&omap3evm_smsc911x_device);
 }
 
+#else
+static inline void __init omap3evm_init_smsc911x(void) { return; }
+#endif
+
 static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
.supply = "vmmc",
 };
@@ -368,12 +386,10 @@ static void __init omap3_evm_init_irq(void)
omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
omap_init_irq();
omap_gpio_init();
-   omap3evm_init_smc911x();
 }
 
 static struct platform_device *omap3_evm_devices[] __initdata = {
&omap3_evm_lcd_device,
-   &omap3evm_smc911x_device,
 };
 
 static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
@@ -430,6 +446,7 @@ static void __init omap3_evm_init(void)
usb_

[build errro on for-next branch] RE: [1/3] omap3evm: ehci: Add EHCI padconfig for board Rev >= E

2009-11-13 Thread Gupta, Ajay Kumar
Hi,
> 
> * Ajay Kumar Gupta  [091028 16:12]:
> > OMAP3EVM (Rev >= E) has EHCI port on main board itself. Apart from this
> > there is a slot to connect Mistral Daughter Card (MDC) to it which also
> > has one EHCI port. Only one EHCI port can be used at a time and we can
> > choose the port using GPIO61.
> >
> > These are the new GPIO lines used for different purpose on EHCI
> interface.
> > - GPIO21 - EHCI phy reset
> > - GPIO22 - EHCI VBUS enable
> > - GPIO61 - Selects EHCI port either on main board or on Mistral
> >   Daughter Card (MDC).
> 
> Let's put this on hold until we have the new mux framework. Should be
> trivial to do then.

Tony,

Another patch [1] which depends on this is already merged to 'for-next'
branch causing a compilation error.

[1] omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E)

So either revert the above patch from 'for-next' or merge the pinmux
patch also.

Regards,
Ajay
> 
> Tony
> 
> > Signed-off-by: Ajay Kumar Gupta 
> >
> > ---
> > arch/arm/mach-omap2/mux.c |7 +++
> >  arch/arm/plat-omap/include/plat/mux.h |5 +
> >  2 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> > index 32c953e..00ad592 100644
> > --- a/arch/arm/mach-omap2/mux.c
> > +++ b/arch/arm/mach-omap2/mux.c
> > @@ -551,6 +551,13 @@ MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
> >  MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
> > OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
> > OMAP34XX_MUX_MODE0)
> > +/* EHCI GPIO's on OMAP3EVM (Rev >= E) */
> > +MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea,
> > +   OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
> > +MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec,
> > +   OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
> > +MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8,
> > +   OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
> >  };
> >
> >  #define OMAP34XX_PINS_SZ   ARRAY_SIZE(omap34xx_pins)
> > diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-
> omap/include/plat/mux.h
> > index f3c1d8a..8316d4f 100644
> > --- a/arch/arm/plat-omap/include/plat/mux.h
> > +++ b/arch/arm/plat-omap/include/plat/mux.h
> > @@ -840,6 +840,11 @@ enum omap34xx_index {
> >
> > /* SYS_NIRQ T2 INT1 */
> > AF26_34XX_SYS_NIRQ,
> > +
> > +   /* EHCI GPIO's for OMAP3EVM (Rev >= E) */
> > +   AH14_34XX_GPIO21,
> > +   AF9_34XX_GPIO22,
> > +   U3_34XX_GPIO61,
> >  };
> >
> >  struct omap_mux_cfg {

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