On Thu, Jul 16, 2015 at 01:27:15PM -0600, Eric Blake wrote: > On 07/15/2015 06:43 PM, Gabriel L. Somlo wrote: > > > > > OK, so I replaced my port i/o with mmio equivalents: > > > > -#define FW_CFG_PORT_CTL 0x510 > > +#define FW_CFG_PORT_CTL (void *)0x09020008 > > > > -#define FW_CFG_PORT_DATA 0x511 > > +#define FW_CFG_PORT_DATA (void *)0x09020000 > > Under-parenthesized; you'll want: > > #define FW_CFG_PORT_DATA ((void *)0x09020000) > > to be useful in all possible locations where an identifier can appear in > an expression. > > > > > - outw(select, FW_CFG_PORT_CTL); > > + writew(select, FW_CFG_PORT_CTL); > > > > - inb(FW_CFG_PORT_DATA); > > + readb(FW_CFG_PORT_DATA); > > > > - insb(FW_CFG_PORT_DATA, buf, count); > > + readsb(FW_CFG_PORT_DATA, buf, count); > > But as it doesn't affect your usage here... > > > > > I'm probably missing something that'll turn out to be really obvious > > in retrospect... :) > > I probably didn't spot the really obvious problem.
After some meditation (and digging around), I now think I may have missed some of the pomp and circumstance surrounding mmio access, beyond the simple writew/readsb calls I was using. Such as [request|check|release]_mem_region(), ioremap(), and maybe even ioport_[map|unmap](), to hopefully make things more uniform across the mmio vs. ioport architectures :) Guess Section 9.4 of LDD3 is my new bestest friend :) (http://www.makelinux.net/ldd3/chp-9-sect-4) Thanks, --Gabriel