PPC kernel hangs
Rupesh S
rupesh.sugathan at gmail.com
Fri Oct 15 02:44:30 EST 2004
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 at gmail.com> wrote:
> On Tue, 12 Oct 2004 14:36:34 -0700, Eugene Surovegin <ebs at 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
More information about the Linuxppc-embedded
mailing list