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

Re: Atari Falcon platform drivers



Hi Geert,

Am 20.06.2019 um 19:19 schrieb Geert Uytterhoeven:
drivers/ide/falconide.c and drivers/ata/pata_falcon.c should be converted
to proper platform drivers, matching against a platform device registered
in arch/m68k/atari/config.c.

And that's going to help with autoloading modules?

Yes, platform drivers have automatic module aliases.
Compare e.g.

    $ modinfo drivers/ata/pata_falcon.ko
    filename:       drivers/ata/pata_falcon.ko
    version:        0.1.0
    license:        GPL v2
    description:    low-level driver for Atari Falcon PATA
    author:         Bartlomiej Zolnierkiewicz
    srcversion:     84A5F6FDA8A93A0BC6F8B9E
    depends:        libata
    intree:         Y
    name:           pata_falcon
    vermagic:       5.2.0-rc5+ mod_unload modversions
    $ modinfo drivers/ata/pata_gayle.ko
    filename:       drivers/ata/pata_gayle.ko
    version:        0.1.0
    alias:          platform:amiga-gayle-ide
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    license:        GPL v2
    description:    low-level driver for Amiga Gayle PATA
    author:         Bartlomiej Zolnierkiewicz
    srcversion:     DC5461633EF515ACD5AB512
    depends:        libata
    intree:         Y
    name:           pata_gayle
    vermagic:       5.2.0-rc5+ mod_unload modversions

Thanks - bit hard to test this without ginning up a modified initrd...

In this particular instance, both drivers would need to bind to the same
platform device - how do we handle this case?

That's easy: the first driver bound wins ;-)

Both need to reserve the IDE register region, so the second one would fail anyway.

Just be aware that pata_falcon does poll for IDE command completion instead of using the interrupt (to avoid the whole issue around exclusive access to the ST-DMA registers). Didn't seem to have a catastrophic impact on performance, but less than ideal IMO.

pata_falcon.c is probably easiest to convert, and should be sufficient
to test with the installer. falconide.c is going away in two years
anyway, and I can't test these changes on my hardware, so I'd rather
leave this one alone.

pata_falcon.c alrwady creates its own platform device inside the driver,
so that's indeed the easiest to convert.

Yep - I'll test Falcon IDE platform device creation and pata_falcon builtin ASAP but won't be able to test pata_falcon as a module. Maybe someone else can eventually do that.

Cheers,

	Michael


Gr{oetje,eeting}s,

                        Geert



Reply to: