Thread (2 messages) flat view 2 messages, 2 authors, 2000-02-09

Re: [linux-fbdev] Retrace

From: Benjamin Herrenschmidt <hidden>
Date: 2000-02-08 21:29:16

On Tue, Feb 8, 2000, Gabriel Paubert [off-list ref] wrote:
deviobase = ioport_ptr(dev->resource[0]);

data = inl(deviobase+register_offset);

and for an MMIO mapped area:

mmioptr = ioremap(ioremap_ptr(dev->resource[1]));

data = readl(mmioptr+register_offset);
Is it possible to "walk up" the resource tree from dev->resource[0] ? I
mean, the ioport_ptr function, to work on those weird Apple bridges, need
to go thru a special routine that looks up the device in OF device tree
to find out on which sub-bridge it is.
In order to do that, it needs the pci dev_fn. Can this be retreived from
dev->resource[0] ?

Also, this doesn't solve the userland problem.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help