linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PowerPC/Linux device driver question
@ 2005-10-20 19:56 Madhu Saravana Sibi Govindan
  2005-10-20 20:21 ` Matt Porter
  0 siblings, 1 reply; 2+ messages in thread
From: Madhu Saravana Sibi Govindan @ 2005-10-20 19:56 UTC (permalink / raw)
  To: linuxppc-dev

Hello all,

I'm trying to write a device driver in linux on a PowerPC processor.
The device has been allocated a range of addresses in the physical
address space of the processor (IBM 440GP) - from 0x100000000 -
0x13fffffff. (FYI, the 440GP is a 32 bit processor using 36 physical
addresses, the processor's MMU appends the extra 4 bits to get a
36-bit physical address).

I'm not sure how to request this range of physical memory from the
kernel. I thought I could use ioremap to map this range into the
virtual space, but ioremap takes only an unsigned long as an argument,
which is only 32 bits on 440GP. I don't think I can represent the range of =
my
device with 32 bits.

Could someone tell me how to solve the problem? I want this range of
physical addresses to be associated with my device driver and how do I
do that?

Thanks in advance,
G.Sibi

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PowerPC/Linux device driver question
  2005-10-20 19:56 PowerPC/Linux device driver question Madhu Saravana Sibi Govindan
@ 2005-10-20 20:21 ` Matt Porter
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Porter @ 2005-10-20 20:21 UTC (permalink / raw)
  To: Madhu Saravana Sibi Govindan; +Cc: linuxppc-dev

On Thu, Oct 20, 2005 at 02:56:21PM -0500, Madhu Saravana Sibi Govindan wrote:
> I'm not sure how to request this range of physical memory from the
> kernel. I thought I could use ioremap to map this range into the
> virtual space, but ioremap takes only an unsigned long as an argument,
> which is only 32 bits on 440GP. I don't think I can represent the range of my
> device with 32 bits.
> 
> Could someone tell me how to solve the problem? I want this range of
> physical addresses to be associated with my device driver and how do I
> do that?

Use the ppc-specific ioremap64() call. 

-Matt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-20 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-20 19:56 PowerPC/Linux device driver question Madhu Saravana Sibi Govindan
2005-10-20 20:21 ` Matt Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).