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


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


Relevant Pages

  • How to get physical address from vitrutal address-Linux serial driver
    ... 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. ... virt_to_physis not working,since it cannot be used for data from ioremap(). ...
    (comp.os.linux.development.system)
  • Re: How to get physical address from vitrutal address-Linux serial driver
    ... >> 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. ... If the address corresponds to serial port 1,then i need to enable the ...
    (comp.os.linux.development.system)
  • Re: elimination of intercharacter gap in RS232 stream?
    ... It sounds like either your serial driver is broken or you've ... got interrupts disabled for a _long_ time. ... Any ideas on how to force continous transmission of the data? ... You could also try fixing the receive end so that a gap between ...
    (comp.arch.embedded)
  • Re: elimination of intercharacter gap in RS232 stream?
    ... It sounds like either your serial driver is broken or you've ... got interrupts disabled for a _long_ time. ... Any ideas on how to force continous transmission of the data? ... You could also try fixing the receive end so that a gap between ...
    (comp.arch.embedded)
  • Re: Interrupts disabled for too long in printk
    ... that showed missing interrupts. ... tracer to solve this kind of problem which I presented at the CE Linux Form ... It shows that, when the serial console is activated, the following code disables ... serial driver getting interrupts to be able to display the message? ...
    (Linux-Kernel)