Re: How to get physical address from vitrutal address-Linux serial driver
From: Robert Kaiser (bitbucket_at_invalid-domain-see-sig.nil)
Date: 01/20/04
- Next message: Hagit: "Re: /proc write"
- Previous message: Andi Kleen: "Re: implementing kernel32.dll on linux"
- In reply to: Manoj: "How to get physical address from vitrutal address-Linux serial driver"
- Next in thread: Manoj: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Reply: Manoj: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Jan 2004 11:57:34 GMT
In article <325d00dd.0401200018.641e5c1c@posting.google.com>,
sewaonegai@rediffmail.com (Manoj) writes:
> I am modifying the serial driver in linux for a custom PCI card.
> The card has interrupts which has to be enabled and disable during open and close.
>
> From with in the startup() function,i want to enable the board interrupts.
>
> But,i have on the virutal address of the serial port with me..
>
>
> How to get the physical adderess form virtual addesss(output of ioremap() )
>
> virt_to_phys() is not working,since it cannot be used for data from ioremap().
What do you want to do with the physical address?
(Assuming your hardware is memory-mapped), ioremap() gives you a pointer
that you can dereference in your code to access the hardware registers.
The physical address is quite useless if you want to access registers
from a program (e.g. your driver). The only case where you would
need it is if you want to program an external bus master (e.g. DMA
controller) to access the ioremapped memory area.
Rob
-- Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG http://www.elinos.com Klein-Winternheim / Germany http://www.sysgo.com
- Next message: Hagit: "Re: /proc write"
- Previous message: Andi Kleen: "Re: implementing kernel32.dll on linux"
- In reply to: Manoj: "How to get physical address from vitrutal address-Linux serial driver"
- Next in thread: Manoj: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Reply: Manoj: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|