Hi,

On 12/21/10 09:40, ext Kishon Vijay Abraham I wrote:
> McBSP2/3 in OMAP3 has sidetone feature which requires autoidle
> to be disabled before starting the sidetone. Also SYSCONFIG
> register has to be set with smart idle or no idle depending on the
> dma op mode (threshold or element sync). For doing these operations
> dynamically at runtime, omap_device APIs are used to modify SYSCONFIG 
> register.
> 
> Signed-off-by: Kishon Vijay Abraham I <kis...@ti.com>


>  static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
>  {
> +     struct omap_device *od;
> +
> +     od = find_omap_device_by_dev(mcbsp->dev);
>       /*
>        * Enable wakup behavior, smart idle and all wakeups
>        * REVISIT: some wakeups may be unnecessary
>        */
>       if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
> -             u16 syscon;
> -
> -             syscon = MCBSP_READ(mcbsp, SYSCON);
> -             syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
> -
> -             if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) {
> -                     syscon |= (ENAWAKEUP | SIDLEMODE(0x02) |
> -                                     CLOCKACTIVITY(0x02));
> -                     MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
> -             } else {
> -                     syscon |= SIDLEMODE(0x01);
> -             }
> -
> -             MCBSP_WRITE(mcbsp, SYSCON, syscon);
> +             if (mcbsp->dma_op_mode != MCBSP_DMA_MODE_THRESHOLD)
> +                     omap_device_noidle(od);

Should you configure McBSP to SMART_IDLE, when the THRESHOLD mode is
selected?
While we are here:
1. How we select the WAKE events from McBSP?
   We need XRDYEN, and RRDYEN bits for wake (in WAKEUPEN register), and
   also we need to enable the WAKEUP in SYSCON register.
2. How we are configuring the CLOCKACTIVITY field in SYSCON register?

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

Reply via email to