On 16 Mar 2003, James Bottomley wrote:
> On Sat, 2003-03-15 at 19:15, Osamu Tomita wrote:
> > /* This is what the 3393 chip looks like to us */
> > typedef struct {
> > +#ifdef CONFIG_WD33C93_PIO
> > + unsigned int SASR;
> > + unsigned int SCMD;
> > +#else
> > volatile unsigned char *SASR;
> > volatile unsigned char *SCMD;
> > +#endif
> > } wd33c93_regs;
> >
>
> This really doesn't look right. For non PIO (which is all drivers apart
> from yours), they expect to dereference SASR to get the port number (as
> an unsigned char). If you remove the dereference, don't they all break?
On m68k and MIPS, we do not derefence SASR to get the port number, SASR _is_
the MMIO pointer to the 8-bit SASR register. Hence you access the register by
dereferencing the pointer.
> Perhaps the better thing to do is to make your driver use an unsigned
> int *, so the dereference works in all cases.
Actually, it was my suggestion to remove the dereference for PIO accesses. In
that case SASR contains the I/O port register.
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.orgIn personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:18 EST