Re: [PATCH RFC v3] m68k/q40: fix IO base selection for Q40 in pata_falcon.c

Michael Schmitz
2023-08-16T08:07:47Z

Hi Finn,

Am 16.08.2023 um 19:37 schrieb Finn Thain:
> On Wed, 16 Aug 2023, Finn Thain wrote:
>
>> Given it's a platform device that's only ever instantiated once, you
>> could just use the module-scope variable rather than device-scope.
>>
>
> I see that atari instantiates one platform device but q40 actually
> instantiates two ata ports, and each port has two drives. So it appears
> the module parameter would need to have 4 bits.

That's what I thought.

>
> You could set ap->private_data to pdev. Then pata_falcon_data_xfer() can
> use pdev->id and sdev_target->id to find the relevant bit in the module
> parameter.

Instead of doing that for each call to pata_falcon_data_xfer(), I'd
rather find the relevant bits from the module parameter at device probe
time, and set the device-scope bit mask accordingly.

Cheers,

Michael