From: Michael Schmitz <schmitzmic@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>,
linux-ide@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH RFC 1/2] m68k/atari: add platform device for Falcon IDE port
Date: Wed, 26 Jun 2019 08:51:05 +1200 [thread overview]
Message-ID: <92de0ad7-731e-c898-0cde-4265fb737d59@gmail.com> (raw)
In-Reply-To: <CAMuHMdWMb2MFRN6ug3Jt3MROAs0nhYYC_RDexu876n9PBRZOiQ@mail.gmail.com>
Hi Geert,
On 25/06/19 7:51 PM, Geert Uytterhoeven wrote:
> Hi Michael,
>
> On Thu, Jun 20, 2019 at 10:47 PM 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.
>>
>> Add Falcon IDE base address in Atari hardware address header.
>>
>> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
> Thanks for your patch!
Thanks for your feedback!
>
>> --- a/arch/m68k/atari/config.c
>> +++ b/arch/m68k/atari/config.c
>> @@ -896,6 +896,21 @@ static void isp1160_delay(struct device *dev, int delay)
>> };
>> #endif
>>
>> +#if IS_ENABLED(CONFIG_PATA_FALCON)
> I wouldn't bother making this depend on a config symbol, as it is
> builtin hardware (EtherNEC/NAT isn't), and prevents compiling a module
> later.
Fair enough - not sure how much it saves in kernel size when this code
isn't compiled (falconide does not depend on it, and that's my preferred
choice due to interrupt support).
IDE is builtin hardware only for Falcon, not TT BTW. Building the kernel
for TT, all of IDE support may well be omitted altogether.
> arch/m68k/amiga/platform.c has everything unconditional.
> I know there's such a dependency for SCSI, perhaps it should be removed?
SCSI isn't present on the Mega ST/e, so we would not need the SCSI
platform device there. Not sure whether it's still possible to boot
recent kernels on that hardware though.
I'll have to try the bloat-o-meter for these changes.
>
>> +static const struct resource atari_falconide_rsrc[] __initconst = {
>> + {
>> + .flags = IORESOURCE_MEM,
>> + .start = FALCON_IDE_BASE,
>> + .end = FALCON_IDE_BASE+0x40,
>> + },
>> + {
>> + .flags = IORESOURCE_IRQ,
>> + .start = IRQ_MFP_FSCSI,
>> + .end = IRQ_MFP_FSCSI,
>> + },
>> +};
>> +#endif
>> +
>> int __init atari_platform_init(void)
>> {
>> int rv = 0;
>> @@ -939,6 +954,11 @@ int __init atari_platform_init(void)
>> atari_scsi_tt_rsrc, ARRAY_SIZE(atari_scsi_tt_rsrc));
>> #endif
>>
>> +#if IS_ENABLED(CONFIG_PATA_FALCON)
>> + if (ATARIHW_PRESENT(IDE))
>> + platform_device_register_simple("pata_falcon", -1,
>> + atari_falconide_rsrc, ARRAY_SIZE(atari_falconide_rsrc));
>> +#endif
>> return rv;
>> }
>>
>> diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h
>> index 5330082..4bea923 100644
>> --- a/arch/m68k/include/asm/atarihw.h
>> +++ b/arch/m68k/include/asm/atarihw.h
>> @@ -813,6 +813,12 @@ struct MSTE_RTC {
>> #define mste_rtc ((*(volatile struct MSTE_RTC *)MSTE_RTC_BAS))
>>
>> /*
>> +** Falcon IDE interface
>> +*/
>> +
>> +#define FALCON_IDE_BASE 0xfff00000
> Is it worth having this as a #define in a global header file?
> You still need a hardcoded region size in config.c.
Probably not.
I'm still incubating a hare-brained scheme to allow use of IDE
interrupts in pata_falcon without the use of the old locking scheme, and
might need to peek at the IDE interrupt status from the shared interrupt
handler for that. But that's gone on the back burner, so I can move the
#define into config.c instead.
Cheers,
Michael
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2019-06-25 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMuHMdUcUqWWGNngNV3EpEq5wSsf5qTVeZvTB9gX1e26Jrq1xA@mail.gmail.com>
2019-06-20 20:47 ` [PATCH RFC 0/2] Convert Atari Falcon IDE driver to platform device Michael Schmitz
2019-06-20 20:47 ` [PATCH RFC 1/2] m68k/atari: add platform device for Falcon IDE port Michael Schmitz
2019-06-23 9:06 ` Sergei Shtylyov
2019-06-25 3:47 ` Michael Schmitz
2019-06-25 7:51 ` Geert Uytterhoeven
2019-06-25 20:51 ` Michael Schmitz [this message]
2019-06-20 20:47 ` [PATCH RFC 2/2] drivers/ata: convert pata_falcon to arch platform device Michael Schmitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92de0ad7-731e-c898-0cde-4265fb737d59@gmail.com \
--to=schmitzmic@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=geert@linux-m68k.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).