Re: How to get physical address from vitrutal address-Linux serial driver

From: Manoj (sewaonegai_at_rediffmail.com)
Date: 01/21/04


Date: 20 Jan 2004 18:41:46 -0800

bitbucket@invalid-domain-see-sig.nil (Robert Kaiser) wrote in message news:<buj53e$idv$1@dagobert.sysgo.com>...
> 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

I am not going to do any read or write using Physical address.
Actually in my serial driver,in a function(startup),i get a virtual
address.

I want to do a checking like,if this address corresponds to serial
port 0,then i need to enable the board interrupts for serial port 0
If the address corresponds to serial port 1,then i need to enable the
boards interrupt for Serial port 1.

If i could convert virt to physic,then,i can add the offset of the
serial port and find out ,which serial port,this particular virtual
address corresponds to.



Relevant Pages

  • 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. ... > How to get the physical adderess form virtual addesss(output of ioremap()) ...
    (comp.os.linux.development.system)
  • 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: internal serial ports on CE4.2 vs CE5.0
    ... selecting different interrupts. ... Even though the interrupts are not designated ... specific case it could be useful if your serial port were ... Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO) ...
    (microsoft.public.windowsce.platbuilder)
  • 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)