Re: How to get physical address from vitrutal address-Linux serial driver
From: Manoj (sewaonegai_at_rediffmail.com)
Date: 01/21/04
- Next message: Manoj: "Global data in linux serial driver."
- Previous message: Michael AKA Slowhand: "Re: Manually controlling ARP requests"
- In reply to: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Next in thread: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Reply: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Manoj: "Global data in linux serial driver."
- Previous message: Michael AKA Slowhand: "Re: Manually controlling ARP requests"
- In reply to: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Next in thread: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Reply: Robert Kaiser: "Re: How to get physical address from vitrutal address-Linux serial driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|