X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C7AF09.8AD48CF5@onstor-exch02.onstor.net>; Thu, 14 Jun 2007 20:56:32 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: from IRQs to INTs and back
Date: Thu, 14 Jun 2007 20:56:33 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E042A4FC1@onstor-exch02.onstor.net>
In-Reply-To: <20070614135529.5763fdb0@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: from IRQs to INTs and back
Thread-Index: AceuxleF4aKM2WXhTTK3fddEnemEKAAF16WA
References: <20070614135529.5763fdb0@ripper.onstor.net>
From: "Brian Stark" <brian.stark@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>

Andy,

I was at a customer for most of the afternoon, so today wasn't good.  I
could do some work on this tomorrow, but I'll have to balance it around
a doc appt that my wife has at 11am.  I could also do it on Monday,
which would probably be better for me so that I can finish up some stuff
on Cougar tomorrow.  Let me know what you think.   =20

Here's how the interrupts are wired:

Cirrus

Socket	PCI Interrupt	Signal name		RM9K interrupt

A		INTB_L		SPD_INTB_L		INT8_L (IM10)
B		INTA_L		SPD_INTA_L		INT9_L (IM11)

TI

Socket	PCI Interrupt	Signal name		RM9K interrupt

A		INTA_L		SPD_INTA_L		INT9_L (IM11)
B		INTB_L		SPD_INTB_L		INT8_L (IM10)


I know that functional interrupts are being used on both parts.  The
functional interrupt fires whenever there's a status change on the INT
signal on the PC Card side, but I don't know exactly which events the OS
is looking for and then what it does after it sees an interrupt (maybe
this is when it polls the Status register to see if the card is ready?).
If interrupts are disabled, the OS isn't happy and will hang when you
access the CF.=20

For the Cirrus part, interrupts are enabled in the ExCA Interrupt and
General Control Register (offset 3).  Here's how the register looks:

RCON-FC0:5 > mm -b b8000000 3; dm -b b8000001 1

0xb8000001:  64

The '4' means that socket A is hooked to INTB_L.  The register for
socket B will have a '3' in the lower nibble, which corresponds to
INTA_L.  By the way, there's no reason the Cirrus part can't be
programmed to reverse the interrupt routing and match the TI part.
Unfortunately, the TI part doesn't have the flexibility to match the
routing programmed into the Cirrus.  Socket A -> INTB_L with the Cirrus
-- what was Max thinking!

There is also another class of interrupts called management interrupts
that are triggered by changes in card status -- these events are all
disabled in ExCA Mgmt Interrupt Config (offset 5).  Maybe these are the
events that are being polled, e.g. card plugged in or pulled out?

Unless you want to just rely on what the PROM has already done, the TI
part is a bit different in terms of setting up interrupts, but we can
get to that after the Cirrus part is working.  At a minimum, the OS has
to take into account the reversal shown above and write the appropriate
values into the ExCA Interrupt and General Control Register for each
socket.



Brian

=20

> -----Original Message-----
> From: Andy Sharp=20
> Sent: Thursday, June 14, 2007 1:55 PM
> To: Brian Stark
> Subject: from IRQs to INTs and back
>=20
> Hey Brian,
>=20
> So, I need to get a definitive statement about how the=20
> interrupts are set up on both the Cirrus and the TI parts.  I=20
> seem to be making some progress with the pd6729, but I'm not=20
> getting any interrupts.  It looks like Dan never did either=20
> -- he apparently hacked the driver to operate in some kind of=20
> polled mode.  Which shouldn't have been necessary, but for=20
> some reason he did so anyway.
>=20
> I'm thinking that maybe the best thing to do is run the thing=20
> on the analyzer again and this time look for interrupts=20
> generated by the part, to make sure that they are being=20
> generated, and then set about trying to get them set up right=20
> in the software.
>=20
> Any chance we can do some analyzer runs today or tomorrow?
>=20
> Thanks mucho,
>=20
> a
>=20
