Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > As you said, if read/write/in/out functions take device parameter, > > taking I/O function pointers into the dev_archdata structure should be > > the best solution. But they don't take device parameter, and they must > > search I/O function pointers with address parameter. I think it's > > better they search pointers from bus bridges, because access mothod > > for a device on its parent bus bridge, not device itself. > > What I meant is that if the pointers are in dev_archdata, we can > populate with a different set of pointers for PCI vs. PCI-E.
I'm afraid I misunderstood your opinion. My concern is how to find a device by address when I/O function pointers are in dev_archdata. You must select the appropriate device with an address, because all I/O functions, read/write/in/out don't have device parameter. If the address is in MMIO space, you can set 'token' to the address to select the device. But in IO space, you can't set 'token' to the I/O port address. Thefore you must scan all devices to select the device. Do you have any better solution? Best regards, Kou Ishizaki _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev