From: Geert U. <ge...@li...> - 2002-12-23 17:27:49
|
On Mon, 23 Dec 2002, [iso-8859-2] Krystian Bac=B3awski wrote: > On Mon, 23 Dec 2002, Geert Uytterhoeven wrote: > > On Mon, 23 Dec 2002, [iso-8859-2] Krystian Bac=B3awski wrote: > > > On Mon, 23 Dec 2002, Geert Uytterhoeven wrote: > > > > On Mon, 23 Dec 2002, [iso-8859-2] Krystian Bac=B3awski wrote: > > > > > As far as I know apne driver in current version of kernel makes= oops. > > > > >=20 > > > > > I found out that apne driver in 2.4.20 kernel was modified by s= omeone who > > > > > knew nothing about amiga (he/she cut out a lot of code with GAY= LE symbols > > > > > and replaced readb/writeb with inb/outb). I replaced apne.c fro= m current > > > > > cvs tree with old one from 2.4.18-cvs. As for me it works. > > > >=20 > > > > PCMCIA is some sort of ISA, so inb() and friends should be OK. > > > > Most probably the ISA changes in the m68k-specific part of the tr= ee weren't > > > > ported to APUS. > > >=20 > > > Of course should be ok, but someone also cut GAYLE_OFFSET and frien= ds. Is > > > amiga pcmcia driver has anything to do with ISA ? Amiga 1200 doesn'= t have > > > ISA. PCMCIA is serviced by GAYLE chip. > >=20 > > Well, but PCMCIA is just some form of ISA. In the Linux/m68k kernels = with Gayle > > PCMCIA support, inb() and friends work on the PCMCIA bus. > >=20 > > Please take a look at include/asm-m68k/io.h. >=20 > Hmm... Yes, writeb/outb, readb/inb in asm-m68k/io.h are the same but > those in asm-ppc/io.h are different: >=20 > #define inb(port) in_8((u8 *)((port)+_IO_BASE)) > #define outb(val,port) out_8((u8 *)((port)+_IO_BASE), (val)) > #define readb(addr) in_8((volatile u8 *)(addr)) > #define writeb(b,addr) out_8((volatile u8*)(addr),(b)) >=20 > As the _IO_BASE is defined as zero in/read out/write are almost the sam= e, > but what with "volatile" definition ? Those definitions should be put inside #ifndef CONFIG_APUS. For APUS, you= want to use the same definitions as on m68k, if Amiga PCMCIA is enabled. However, be careful! If you enable both Amiga PCMCIA and Permedia 2 PCI, = inb() and friends have to distinguish between PCMCIA ISA and Permedia 2 PCI, cf= r. the MULTI_ISA stuff on m68k. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.org In 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 |