On Thu, May 24, 2012 at 2:48 AM, Michael Schmitz
<[email protected]> wrote:
> --- a/arch/m68k/atari/config.c
> +++ b/arch/m68k/atari/config.c
> @@ -662,7 +662,7 @@ static void atari_get_hardware_list(struct seq_file *m)
>  */
>
>  #define ATARI_ETHERNAT_PHYS_ADDR       0x80000000
> -#define ATARI_ETHERNAT_IRQ             0xc3
> +#define ATARI_ETHERNAT_IRQ             140

So the EtherNAT does have a working interrupt line?

> @@ -686,16 +686,27 @@ static struct platform_device smc91x_device = {
>        .resource       = smc91x_resources,
>  };
>
> -static struct platform_device *atari_platform_devices[] __initdata = {
> +static struct platform_device *atari_ethernat_devices[] __initdata = {
>        &smc91x_device
>  };
>
>  int __init atari_platform_init(void)
>  {
> +       unsigned char *enatc_virt;
> +       int rv = -ENODEV;
> +
>        if (!MACH_IS_ATARI)
>                return -ENODEV;
>
> -       return platform_add_devices(atari_platform_devices, 
> ARRAY_SIZE(atari_platform_devices));
> +#if IS_ENABLED(CONFIG_ATARI_ETHERNAT_OLD)
> +       enatc_virt = (unsigned char 
> *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0xf);
> +       if (hwreg_present(enatc_virt)) {
> +               *enatc_virt |= 0x2;     /* enable SMC91C111 interrupt */

Do you really want to do that here?
Typically this is done by the driver itself, in its probe() routine.

> +               rv = platform_add_devices(atari_ethernat_devices, 
> ARRAY_SIZE(atari_ethernat_devices));
> +       }
> +#endif
> +
> +       return rv;
>  }
>
>  arch_initcall(atari_platform_init);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to