RE: [PATCH] OMAP3: Fix McBSP poll read and write for 32bit reg access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: G, Manjunath Kondaiah
> Sent: Wednesday, October 14, 2009 4:01 PM
> To: 'vimal singh'; Varadarajan, Charu Latha
> Cc: linux-omap@xxxxxxxxxxxxxxx; Syed, Rafiuddin
> Subject: RE: [PATCH] OMAP3: Fix McBSP poll read and write for
> 32bit reg access
>
>
>
> > -----Original Message-----
> > From: linux-omap-owner@xxxxxxxxxxxxxxx
> > [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of vimal singh
> > Sent: Wednesday, October 14, 2009 3:23 PM
> > To: Varadarajan, Charu Latha
> > Cc: linux-omap@xxxxxxxxxxxxxxx; Syed, Rafiuddin
> > Subject: Re: [PATCH] OMAP3: Fix McBSP poll read and write for
> > 32bit reg access
>
> > >
> > >        base = mcbsp->io_base;
> > >        /* if frame sync error - clear the error */
> > > -       if (readw(base + OMAP_MCBSP_REG_SPCR1) & RSYNC_ERR) {
> > > +       if (OMAP_MCBSP_READ(base, SPCR1) & RSYNC_ERR) {
> > >                /* clear error */
> > > -               writew(readw(base + OMAP_MCBSP_REG_SPCR1) &
> > (~RSYNC_ERR),
> > > -                      base + OMAP_MCBSP_REG_SPCR1);
> > > +               OMAP_MCBSP_WRITE(base, SPCR1,
> > OMAP_MCBSP_READ(base, SPCR1)
> > > +                                       & (~RSYNC_ERR));
> > >                /* resend */
> > >                return -1;
>
> Return value can be a meaningful macro with proper value?
>
> > >        } else {
> > >                /* wait for recieve confirmation */
> > >                int attemps = 0;
> > > -               while (!(readw(base + OMAP_MCBSP_REG_SPCR1)
> > & RRDY)) {
> > > -                       if (attemps++ > 1000) {
> > > -                               writew(readw(base +
> > OMAP_MCBSP_REG_SPCR1) &
> > > -                                      (~RRST),
> > > -                                      base +
> OMAP_MCBSP_REG_SPCR1);
> > > +               while (!(OMAP_MCBSP_READ(base, SPCR1) & RRDY)) {
> > > +                       if (attemps++ > 10000) {
> > > +                               OMAP_MCBSP_WRITE(base, SPCR1,
> > > +
>
> Why attemps changed from 1000 to 10000?
Ooops.. That's a typo, but critical error. Will do the needful.
>
> -Manjunath
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux