public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: Brad Boyer <flar@allandria.com>,
	Laurent Vivier <Laurent@lvivier.info>,
	linux-m68k@vger.kernel.org
Subject: Re: [PATCH] Add SWIM floppy support for m68k Macs.
Date: Sun, 9 Nov 2008 17:16:52 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0811091711150.19341@anakin> (raw)
In-Reply-To: <Pine.LNX.4.64.0811031102090.10345@loopy.telegraphics.com.au>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 2931 bytes --]

On Mon, 3 Nov 2008, Finn Thain wrote:
> On Sun, 2 Nov 2008, Brad Boyer wrote:
> > On Sun, Nov 02, 2008 at 12:21:23PM +0100, Laurent Vivier wrote:
> > > Le 2 nov. 08 à 09:54, Geert Uytterhoeven a écrit :
> > > > The preferred way to do this these days is to create a platform 
> > > > device with a struct resource that points to the SWIMBase.
> > > 
> > > Is this what Finn explains also in his answer ? If so, I agree.
> > 
> > Not exactly. What Finn suggested is to match the way we handle many of 
> > the other on-board things like ADB and SCSI. What Geert suggests is a 
> > much more recent way to do things that we generally haven't done for 
> > Mac-only drivers. I think Finn used it for the new Sonic ethernet driver 
> > because we share it with other systems. The code in macsonic.c also has 
> > the extra complexity from having both NuBus and on-board hardware to 
> > support, and NuBus also hasn't been updated to the new driver model.
> > 
> > Finn's suggestion of using the macintosh_config entry and data table is 
> > the easiest way to get it working, but Geert's method would move to the 
> > real device/driver model that most other systems are using now.
> 
> I agree with Geert. Ignore my comment about device_initcall -- I was 
> looking at via-cuda.c but that is not a good example. 
> drivers/scsi/mac_esp.c is a better example. 
> 
> esp_mac_probe checks the macintosh_config entry. That and esp_mac_remove 
> are the platform device entry points Geert referred to. The module entry 
> points are mac_esp_init and mac_esp_exit. I think you could use either of 
> the platform device probe routine or the module init routine to set the 
> base address.

Ideally, the _probe() routine should not look at the bits in macintosh_config,
but only at the platform device and its resources.

The creation of the platform device should be moved to arch/m68k/mac/config,
which would create the platform device, and only if the bits in
macintosh_config indicate that the hardware is present. The actual value of
swim_base can be stored in a struct resource linked to the platform device.

So far the only platform device for m68k (not in mainline) is Michael's
EtherNAT driver, cfr. arch/m68k/atari/config.c. Note that that one registers
the platform device unconditionally, as there's no magic predictor for its
presence in the firmware or machine tables.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-11-09 16:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01  9:43 [PATCH] Add SWIM floppy support for m68k Macs Laurent
2008-11-01 18:10 ` Brad Boyer
2008-11-02  0:29   ` Finn Thain
2008-11-02  5:23     ` Brad Boyer
2008-11-02 12:02   ` Laurent Vivier
2008-11-04 18:34     ` Riccardo
2008-11-04 20:06       ` Brad Boyer
2008-11-05  0:58         ` Riccardo
2008-11-05  2:28           ` Brad Boyer
2008-11-05 21:43             ` Riccardo
2008-11-06  4:18               ` Brad Boyer
2008-11-05  6:58           ` Finn Thain
2008-11-05 21:45             ` Riccardo
2008-11-05  7:37         ` Joshua Juran
2008-11-05 10:31           ` Finn Thain
2008-11-05 12:20             ` Joshua Juran
2008-11-05 13:10               ` Finn Thain
2008-11-05 14:32                 ` Laurent Vivier
2008-11-06  4:09                   ` Brad Boyer
2008-11-02  6:00 ` Finn Thain
2008-11-02 11:59   ` Laurent Vivier
2008-11-02  8:54 ` Geert Uytterhoeven
2008-11-02 11:21   ` Laurent Vivier
2008-11-02 21:28     ` Brad Boyer
2008-11-03  0:14       ` Finn Thain
2008-11-03 18:58         ` Laurent Vivier
2008-11-09 16:16         ` Geert Uytterhoeven [this message]
2008-11-09 21:47           ` Laurent Vivier
2008-11-09 23:05           ` Michael Schmitz
2008-11-10  0:15           ` Finn Thain
2008-11-11  8:52             ` Geert Uytterhoeven
2008-11-11  9:43               ` Finn Thain
2008-11-11 10:21                 ` Geert Uytterhoeven

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=Pine.LNX.4.64.0811091711150.19341@anakin \
    --to=geert@linux-m68k.org \
    --cc=Laurent@lvivier.info \
    --cc=flar@allandria.com \
    --cc=fthain@telegraphics.com.au \
    --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