Re: [PATCH RESEND v2 1/2] m68k/atari: add platform device for Falcon IDE port

Geert Uytterhoeven
2019-11-04T10:57:09Z

Hi Michael,

On Thu, Sep 26, 2019 at 5:54 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
> Autoloading of Falcon IDE driver modules requires converting
> these drivers to platform drivers.
>
> Add platform device for Falcon IDE interface in Atari platform
> setup code in preparation for this.
>
> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
>
> --

This should be a triple dash.

>
> Changes from RFC
>
> - fix region size (spotted by Szymon Bieganski <S.Bieganski@chello.nl>)
> - define IDE interface address in atari/config.c, create platform device
> always (suggested by Geert Uytterhoeven <geert@linux-m68k.org>)
>
> Changes from v1
>
> - add error checking for Falcon IDE platform device register

Thanks for the update!

> --- a/arch/m68k/atari/config.c
> +++ b/arch/m68k/atari/config.c
> @@ -939,6 +959,13 @@ int __init atari_platform_init(void)
> atari_scsi_tt_rsrc, ARRAY_SIZE(atari_scsi_tt_rsrc));
> #endif
>
> + if (ATARIHW_PRESENT(IDE)) {
> + pdev = platform_device_register_simple("atari-falcon-ide", -1,
> + atari_falconide_rsrc, ARRAY_SIZE(atari_falconide_rsrc));
> + if (IS_ERR(pdev))
> + rv = PTR_ERR(pdev);
> + }
> +
> return rv;
> }

This breaks both falconide and pata_falcon, as it marks the resource
busy:

ide: Falcon IDE controller
falconide: resources busy

and

pata_falcon: Atari Falcon PATA controller
pata_falcon: resources busy

For pata_falcon, that regression can easily be fixed by merging both patches.
For falconide, I think the sensible thing to do is just remove the driver.
But before that, the defconfigs should be updated to use pata_falcon
instead of falconide.

For the actual code changes:
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.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