linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Brad Boyer <flar@allandria.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Joshua Thompson <funaho@jurai.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>
Subject: Re: [PATCH 0/4] Mac IOP driver fixes
Date: Tue, 2 Jun 2020 13:48:22 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LNX.2.22.394.2006021317230.8@nippy.intranet> (raw)
In-Reply-To: <20200602022157.GA3216@allandria.com>

On Mon, 1 Jun 2020, Brad Boyer wrote:

> On Tue, Jun 02, 2020 at 09:32:29AM +1000, Finn Thain wrote:
> > I'm hoping that the SWIM IOP can be used in bypass mode, so it could 
> > be used with the swim.c driver. I haven't been able to make that work 
> > yet.
> 
> Putting the IOP in bypass mode would have a couple issues. The obvious 
> one is that it will break ADB (and because the shift register attached 
> to the ADB transceiver is part of the IOP chip itself, there's not an 
> easy fix for that)

I see.

> but there's also some strangeness in the way the SWIM chip is attached 
> to the IOP chip that looks like it might break a few things. In 
> particular, it looks like they only enabled using the SWIM chip in ISM 
> mode and not IWM mode.

IIUC, swim.c only uses ISM mode.

> The notes I have imply that the normal Mac floppy driver didn't work on 
> a IIfx even in bypass mode.

I abandoned my failed attempt to put the SWIM IOP into bypass mode when I 
finally came across this text in the HW09 tech note:

    "Like the processor which controls floppy disk and ADB I/O, the IIfx 
    has another ASIC to control the SCC, but unlike the former, this 
    processor is capable of running in a special 'IOP Bypass' mode which 
    allows direct access to the SCC."

I suppose the problem being alluded to here is the one you mentioned: to 
put this IOP in bypass would kill ADB functionality (for the duration).

> In particular, note the direct use of a GPIO line on VIA1 in swim_select 
> in drivers/block/swim.c.  That won't work on an IOP based system as that 
> input line to SWIM doesn't appear to be hooked up to anything that can 
> be accessed directly.
> 
> Here's the way it's put in _Guide to the Macintosh Family Hardware_ 
> (Second Edition), on page 155:
> 
> "An IOP provides the state-control line SEL to the floppy disk drives. 
> Among other functions, this line selects which of the two heads is to be 
> used in a double-sided floppy disk drive."
> 
> The bit in VIA1 register A that is normally the "vHeadSel" line is 
> explicitly listed as "Reserved" on the IIfx.
> 

Yes, I was aware of that issue. But the GTMFH 2ed. figure 9-14 indicates 
that (on the IIfx) pin 12 in the drive connector is driven by the SWIM 
HDSEL pin instead of VIA1 Port A output. So, I wrote a patch to attempt to 
get the SWIM to drive this pin. But nothing worked because I never 
succeeded in putting the chip into bypass mode.

> It's definitely possible to access and drive the SWIM chip in bypass 
> mode, but that doesn't mean it's as transparent as for the SCC driver. 

OK.

BTW, I suspect there may be an issue with swim.c because it doesn't work 
on all models on which it should work. I know it works on Quadra 800, 650 
and a few others.

With regard to PowerBooks, we will need to power up the drive. And with 
regard to the IIfx, the A/UX iop.h header file indicates that, in bypass 
mode, the ISM registers have a 2-byte spacing (instead of 512-byte).

But I wish I knew why the driver doesn't work on an LC III, which 
supposedly has a SWIM 2, just like the Quadra 800.

> Apparently this external input line is not strictly required when the 
> SWIM chip is running in ISM mode. However, our driver appears to force 
> the chip into ISM mode and yet still depends on this input line.
> 

I can't comment on that. I don't really understand the ISM or IWM logic in 
any depth.

  reply	other threads:[~2020-06-02  3:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 23:12 [PATCH 0/4] Mac IOP driver fixes Finn Thain
2020-05-30 23:12 ` [PATCH 1/4] m68k/mac: Don't send IOP message until channel is idle Finn Thain
2020-05-30 23:12 ` [PATCH 3/4] m68k/mac: Don't send uninitialized data in IOP message reply Finn Thain
2020-05-30 23:12 ` [PATCH 2/4] m68k/mac: Fix IOP status/control register writes Finn Thain
2020-05-30 23:12 ` [PATCH 4/4] m68k/mac: Improve IOP debug messages Finn Thain
2020-05-31  8:41 ` [PATCH 0/4] Mac IOP driver fixes Geert Uytterhoeven
2020-06-01  0:05   ` Finn Thain
2020-06-01  6:09     ` Brad Boyer
2020-06-01 23:32       ` Finn Thain
2020-06-02  2:21         ` Brad Boyer
2020-06-02  3:48           ` Finn Thain [this message]
2020-06-04  3:19             ` Brad Boyer
2020-06-04  4:49               ` Finn Thain
2020-06-04  7:43                 ` Brad Boyer
2020-06-05  3:50                   ` Finn Thain
2020-06-05  4:23                     ` Finn Thain
2020-06-05  9:11                       ` Brad Boyer
2020-06-29 21:39   ` 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=alpine.LNX.2.22.394.2006021317230.8@nippy.intranet \
    --to=fthain@telegraphics.com.au \
    --cc=flar@allandria.com \
    --cc=funaho@jurai.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-m68k@lists.linux-m68k.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).