Re: Atari ROM port ISA detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 7 Apr 2008, Michael Schmitz wrote:
Is it possible to detect the presence of Atari ROM port adapters?

That depends - what happens if you read from the ROM port with nothing
attached? I'll have to try. From memory, when I accidentially disconnected the
ROM port adapter, the EtherNEC module just got stuck and required a reload. No
kernel panic or other errors (tx timeouts aside). So I guess a simple read
test is not going to cut it. I'm not sure whether we can use ARAnyM to check
this - should accessing an empty ROM port generate a kernel bus error, and
will ARAnyM do this? Petr?

Something akin to the ISA ethercard probe should work, though. Is there some
way to explicitly test for presence of _any_ ISA card in a given slot, or at a
given IO address?

Currently a kernel with support for multiple ISA types cannot use Atari
ROM port ISA, as arch/m68k/kernel/setup.c has no support to set isa_type
dynamically if MULTI_ISA is defined.

The conflict is with Q40, right? Do these boxes also have a ROM port?
Otherwise we could fix that by using something from the bootinfo, or make it
depend on the precise kind of Atari model detected in atari/config.c ...

In the mean time, I changed it to the code below, as the Ethernec probe gave me
NULL pointer dereferences in isa_inb() for multi-platform kernels:

/* set ISA defs early as possible */
#if defined(CONFIG_ISA) && defined(MULTI_ISA)
        if (MACH_IS_Q40) {
                isa_type = ISA_TYPE_Q40;
                isa_sex = 0;
        }
#ifdef CONFIG_GG2
        if (MACH_IS_AMIGA && AMIGAHW_PRESENT(GG2_ISA)) {
                isa_type = ISA_TYPE_GG2;
                isa_sex = 0;
        }
#endif
#ifdef CONFIG_AMIGA_PCMCIA
        if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) {
                isa_type = ISA_TYPE_AG;
                isa_sex = 1;
        }
#endif
#ifdef CONFIG_ATARI_ROM_ISA
        if (MACH_IS_ATARI) {
                isa_type = ISA_TYPE_ENEC;
                isa_sex = 0;
        }
#endif
#endif

And ARAnyM doesn't seem to complain...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux