From: Arnold <abo_gwapo@yahoo.com>
To: Khem Raj <kraj@mvista.com>
Cc: Linux-omap-open-source@linux.omap.com
Subject: Re: Reading and Writing to Omap register
Date: Sun, 19 Nov 2006 17:51:16 -0800 (PST) [thread overview]
Message-ID: <121193.77841.qm@web55306.mail.re4.yahoo.com> (raw)
In-Reply-To: <455D2E6A.5030804@mvista.com>
Hi,
Sorry it was just a typo error. What I am using is:
__raw_writel(l,MY_REG);
printk("MY_REG = %x \n", __raw_readl(MY_REG));
The MY_REG is a 4byte register. I can not change the
value if I am using the __raw_writel. But if I use a
__raw_writew or __raw_writeb and if I print the value
of the register using __raw_readw and __raw_readb the
value changes.
Is there something wrong with what I am doing? It
seems to be weird.
--- Khem Raj <kraj@mvista.com> wrote:
>
>
> Arnold said the following on 11/16/2006 7:19 PM:
> > Hi All,
> >
> > I been having problems reading/writing to omap
> > registers. I'm using the __raw_read and
> __raw_write.
> > It seems that when I use the __raw_readl the
> values of
> > the register that is passed back to when I read
> the
> > register is always 0. I am accessing a 4byte
> register
> > and I want to write a value to it, but whenever I
> > check the values using __raw_read_l, the values
> does
> > not change. But it confuses me when I tried to use
> a
> > __raw_readb it changes the value. It also concerns
> me
> > because the register that I am accesing is a 4byte
> > register and not a 1 bytes register. Below is my
> > implementation:
> > Using __raw_readl:
> > u32 l;
> >
> > l = 0x10;
> > __raw_writel(l,MY_REG);
> > printk("MY_REG = %x \n", __raw_readl(l,MY_REG));
> >
> why are you passing 'l' as first argument here? This
> function accepts
> only one argument and that should be MY_REG in your
> case.
> > --> This implementation always prints a 0.
> >
> > However when I use this implementation:
> > l = 0x10;
> > __raw_writeb(l,MY_REG);
> > printk("MY_REG = %x \n", __raw_readb(l,MY_REG));
> > --> This implementation prints a 0x10.
> >
> same here
> > Does anyone knows whats wrong? I am using an
> omap5912
> > and kernel2.6.17.
> >
> > I hope somebody could tell me whats wrong. Thank
> you
> > very much in advance.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > Mortgage rates near 39yr lows.
> > $510k for $1,698/mo. Calculate new payment!
> > www.LowerMyBills.com/lre
> > _______________________________________________
> > Linux-omap-open-source mailing list
> > Linux-omap-open-source@linux.omap.com
> >
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >
>
> --
> Khem Raj <kraj@mvista.com>
> MontaVista Software Inc.
>
>
____________________________________________________________________________________
Sponsored Link
$420k for $1,399/mo.
Think You Pay Too Much For Your Mortgage?
Find Out! www.LowerMyBills.com/lre
prev parent reply other threads:[~2006-11-20 1:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 17:27 patchs commits Luís Vitório Cargnini
2006-11-09 20:28 ` tony
2006-11-09 20:44 ` Hingkwan Huen
2006-11-09 20:51 ` Tony Lindgren
2006-11-09 21:08 ` David Brownell
2006-11-09 22:08 ` Hingkwan Huen
2006-11-09 22:11 ` Hingkwan Huen
2006-11-09 23:40 ` Tony Lindgren
2006-11-10 1:17 ` David Brownell
2006-11-11 0:13 ` Tony Lindgren
2006-11-11 3:05 ` David Brownell
2006-11-11 17:02 ` Tony Lindgren
2006-11-16 16:55 ` Luís Vitório Cargnini
2006-11-17 3:19 ` Reading and Writing to Omap register Arnold
2006-11-17 3:37 ` Khem Raj
2006-11-20 1:51 ` Arnold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=121193.77841.qm@web55306.mail.re4.yahoo.com \
--to=abo_gwapo@yahoo.com \
--cc=Linux-omap-open-source@linux.omap.com \
--cc=kraj@mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox