Hi Steve,

Thank you.

I found the problem. Problem was with the order of the parameter that I was
passing to davinci_writel() function.

It takes davinci_writel(value, address) and I was passing it
davinci_writel(address, value).

After I changed the order of the parameter everything worked fine.

Thanks a lot for the help.

Thanks,
azam.


On Thu, Jul 23, 2009 at 5:36 PM, Steve Chen <[email protected]> wrote:

> On Thu, 2009-07-23 at 15:41 +0530, Azam Ansari wrote:
> > Hi Steve,
> >
> > When I try to write PLLEN bit in PLLCTL register of PLL1 it crashes.
> >
> > But When I read it works fine. Can you please suggest me how do I
> > write the pll registers?
> >
> > Below is how I try to write PLL register.
> >
> >     pllcnt = davinci_readl(DAVINCI_PLL_CNTRL0_BASE + PLLCTL);
> >     davinci_writel(DAVINCI_PLL_CNTRL0_BASE + PLLCTL, pllcnt &
> > ~BIT(0));
> >     udelay(50);
> >     davinci_writel(DAVINCI_PLL_CNTRL0_BASE + PLLCTL, (pllcnt &
> > ~BIT(0)) | PLLRST);
> >
> >
> > Then kernel fails to write:
> > davinci_writel(DAVINCI_PLL_CNTRL0_BASE + PLLCTL, pllcnt & ~BIT(0));
> >
>
> Try
>
> ...
> #include <linux/io.h>
> ...
>        /* optionally you can use
> __raw_readl(IO_ADDRESS(DAVINCI_PLL_CNTRL0_BASE + PLLCTL));
>         pllcnt = davinci_readl(DAVINCI_PLL_CNTRL0_BASE + PLLCTL);
>         __raw_writel(pllcnt & ~BIT(0), IO_ADDRESS(DAVINCI_PLL_CNTRL0_BASE +
> PLLCTL));
> ...
>
> Regards,
>
> Steve
>
>
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to