From: Rupesh S <rupesh.sugathan@gmail.com>
To: jonathan@jonmasters.org
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: PPC kernel hangs
Date: Thu, 14 Oct 2004 09:44:30 -0700 [thread overview]
Message-ID: <1e44ebcf0410140944620f1dab@mail.gmail.com> (raw)
In-Reply-To: <35fb2e590410121603624c27a2@mail.gmail.com>
Thanks for the informations.
I used "ioremap" and it works !!
However, when I checked out some documentaions on this regard, I
happened to notice that for "cache disabled acees in some arch", we
would probably need to use "ioremap_nocache". My requirement is for a
cache disabled access. Also, I read that in some processor arch, the
"nocache" and the normmal version is all the same. How is it in PPC ?
I could also read that it is encouraged to use "readl", "writel" to
access the memory rather than the normal pointer dereferencing.
However, in my driver, the normal pointer dereferencing works, but the
"readl" and "writel" doesn't work. Here is the code snippet for the
write operation. Any clues ?
################################################################
volatile __u32* __fpga;
__fpga = (__u32*) ioremap_nocache(0x60000000, (4*1024));
/* writel(data, ((__u32)__fpga + 0x0C)); */ /* This does not work */
*(volatile __u32*)((__u32)__fpga + 0x0C) = data; /* This works */
#############################################################
On Wed, 13 Oct 2004 00:03:21 +0100, Jon Masters <jonmasters@gmail.com> wrote:
> On Tue, 12 Oct 2004 14:36:34 -0700, Eugene Surovegin <ebs@ebshome.net> wrote:
>
> > Did you use ioremap to get valid kernel virtual address for your
> > device registers? You generally cannot just use physical address to
> > access device from the device driver.
>
> Possibly also use io_block_mapping on ppc to map a block of IO memory
> before ioremapping.
>
> Jon.
>
--
Rupesh S
next prev parent reply other threads:[~2004-10-14 16:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-12 21:24 PPC kernel hangs Rupesh S
2004-10-12 21:36 ` Eugene Surovegin
2004-10-12 23:03 ` Jon Masters
2004-10-12 23:05 ` Jon Masters
2004-10-12 23:34 ` Eugene Surovegin
2004-10-13 18:00 ` Jon Masters
2004-10-14 16:44 ` Rupesh S [this message]
2004-10-14 21:23 ` Jon Masters
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=1e44ebcf0410140944620f1dab@mail.gmail.com \
--to=rupesh.sugathan@gmail.com \
--cc=jonathan@jonmasters.org \
--cc=linuxppc-embedded@ozlabs.org \
/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.