linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* How to access physical memory from user space for MPC8260 chip
@ 2007-07-12 10:07 suresh suresh
  2007-07-12 12:07 ` Fillod Stephane
  0 siblings, 1 reply; 3+ messages in thread
From: suresh suresh @ 2007-07-12 10:07 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

Hi,

I have to map physical memory to user space or kernel space. I am writing
driver for MPC8260 chip and I want to know how to map any 32-bit address
space to user space and kernel space.

Please give me some ideas.

Thanks,
Suresh

[-- Attachment #2: Type: text/html, Size: 266 bytes --]

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

* RE: How to access physical memory from user space for MPC8260 chip
@ 2007-07-12 12:07 ` Fillod Stephane
  2007-07-20 11:32   ` Misbah khan
  0 siblings, 1 reply; 3+ messages in thread
From: Fillod Stephane @ 2007-07-12 12:07 UTC (permalink / raw)
  To: suresh suresh, linuxppc-embedded

suresh suresh wrote:
>I have to map physical memory to user space or kernel space. I am
writing >driver for MPC8260 chip and I want to know how to map any
32-bit address >space to user space and kernel space.

Your question is a linuxppc-embedded FAQ. User-land access is documented

in Denx's FAQ[1], and accessible through shorter URL[2]. For more=20
information, please follow this thread[3] (not ppc specific actually).

[1]
http://www.denx.de/twiki/bin/view/PPCEmbedded/DeviceDrivers#Section_Acce
ssingPeripheralsFromUserSpace
[2] http://tinyurl.com/6c7th
[3] http://article.gmane.org/gmane.linux.ports.ppc.embedded/5053

In kernel land, ioremap() is all you need.

Don't forget to use the 'eieio' asm instruction if you want explicit=20
I/O ordering.

Best Regards,
--=20
Stephane, the userland ioremap bot

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

* RE: How to access physical memory from user space for MPC8260 chip
  2007-07-12 12:07 ` Fillod Stephane
@ 2007-07-20 11:32   ` Misbah khan
  0 siblings, 0 replies; 3+ messages in thread
From: Misbah khan @ 2007-07-20 11:32 UTC (permalink / raw)
  To: linuxppc-embedded


Physical address you can map to  kernel space using ioremap() function 
but you are not clear whether you want to map it to the user space / kernel
space. To map kernel space to user space you should use mmap() functionality
in your driver.

I hope you got the answer to what you were expecting else send the clear
query

regard 
misbah


Fillod Stephane wrote:
> 
> suresh suresh wrote:
>>I have to map physical memory to user space or kernel space. I am
> writing >driver for MPC8260 chip and I want to know how to map any
> 32-bit address >space to user space and kernel space.
> 
> Your question is a linuxppc-embedded FAQ. User-land access is documented
> 
> in Denx's FAQ[1], and accessible through shorter URL[2]. For more 
> information, please follow this thread[3] (not ppc specific actually).
> 
> [1]
> http://www.denx.de/twiki/bin/view/PPCEmbedded/DeviceDrivers#Section_Acce
> ssingPeripheralsFromUserSpace
> [2] http://tinyurl.com/6c7th
> [3] http://article.gmane.org/gmane.linux.ports.ppc.embedded/5053
> 
> In kernel land, ioremap() is all you need.
> 
> Don't forget to use the 'eieio' asm instruction if you want explicit 
> I/O ordering.
> 
> Best Regards,
> -- 
> Stephane, the userland ioremap bot
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-access-physical-memory-from-user-space-for-MPC8260-chip-tf4067159.html#a11706536
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

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

end of thread, other threads:[~2007-07-20 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12 10:07 How to access physical memory from user space for MPC8260 chip suresh suresh
2007-07-12 12:07 ` Fillod Stephane
2007-07-20 11:32   ` Misbah khan

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).