public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Laurent Vivier <laurent@lvivier.info>
Cc: linux-m68k@vger.kernel.org,
	0001-Add-a-new-entry-in-mac_model-to-identify-the-floppy-controller-type.txt@lvivier.info
Subject: Re: [PATCH 2/2][v3] Add SWIM floppy support for m68k Macs.
Date: Sun, 9 Nov 2008 17:19:27 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0811091716590.19341@anakin> (raw)
In-Reply-To: <12260012691527-git-send-email-laurent@lvivier.info>

On Thu, 6 Nov 2008, Laurent Vivier wrote:
> --- /dev/null
> +++ b/drivers/block/swim.c

> +static struct platform_device *swim_device;

One global instance?

> +static int __devinit swim_probe(struct platform_device *dev)
> +{
> +	struct swim *swim_base;
> +	struct swim_priv *swd;
> +
> +	if (!MACH_IS_MAC)
> +		return -ENODEV;
> +
> +	switch (macintosh_config->floppy_type) {
> +	case MAC_FLOPPY_SWIM_ADDR1:
> +		swim_base = (struct swim *)(VIA1_BASE + 0x1E000);
> +		break;
> +	case MAC_FLOPPY_SWIM_ADDR2:
> +		swim_base = (struct swim *)(VIA1_BASE + 0x16000);
> +		break;
> +	default:
> +		swim_base = (struct swim *)base;
> +		break;
> +	}
> +
> +	if (swim_base == NULL)
> +		return -ENODEV;
> +
> +	printk(KERN_INFO "SWIM base adress 0x%p\n", swim_base);
> +
> +	/* probe device */
> +
> +	set_swim_mode(swim_base, 1);
> +	if (!get_swim_mode(swim_base)) {

get_swim_mode() is also written in assembly. Is plain C not fast enough?
If speed matters, what about disabling interrupts here?

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

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 19:54 [PATCH 2/2][v3] Add SWIM floppy support for m68k Macs Laurent Vivier
2008-11-09 16:19 ` Geert Uytterhoeven [this message]
2008-11-09 19:14   ` Laurent Vivier
2008-11-09 19:42     ` Geert Uytterhoeven
2008-11-09 21:06       ` Laurent Vivier
2008-11-10  1:04         ` Brad Boyer

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.0811091716590.19341@anakin \
    --to=geert@linux-m68k.org \
    --cc=0001-Add-a-new-entry-in-mac_model-to-identify-the-floppy-controller-type.txt@lvivier.info \
    --cc=laurent@lvivier.info \
    --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