All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <kraj@mvista.com>
To: Arnold <abo_gwapo@yahoo.com>
Cc: Linux-omap-open-source@linux.omap.com
Subject: Re: Reading and Writing to Omap register
Date: Thu, 16 Nov 2006 19:37:14 -0800	[thread overview]
Message-ID: <455D2E6A.5030804@mvista.com> (raw)
In-Reply-To: <20061117031945.29896.qmail@web55313.mail.re4.yahoo.com>



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.

  reply	other threads:[~2006-11-17  3:37 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 [this message]
2006-11-20  1:51     ` Arnold

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=455D2E6A.5030804@mvista.com \
    --to=kraj@mvista.com \
    --cc=Linux-omap-open-source@linux.omap.com \
    --cc=abo_gwapo@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.