Commit Graph

34 Commits

Author SHA1 Message Date
Warner Losh
521c179f7d SMIENB not needed, but maybe PCI_CLOCK is, so put it in #if 0'd out 2002-09-29 23:37:07 +00:00
Warner Losh
4376ee32ba MFp4:
o reduce the extra-long ID names.
	o TI-1510, 1520 and 4510 support.
	o MFUNC is the name of the register on TI 1200 and newer chips (except
	  125x and 1450).  Initialize it in the func routine, but only
	  if NO_MFUNC isn't set.
	o better comments about above workaround
	o register definitions for MFUNC.
	o move zoom video disable to a better place.
2002-07-26 08:07:55 +00:00
Warner Losh
1d88dfe265 What:
o ToPIC is happy with two cards now, even when the two cards are
	  modems.
	o Fix (all?) hangs on boot when power is applied to the card.  I
	  suspect that this will make the Ricoh bridges happier and also
	  make a lot of VAIO owners happy (confirm to me in private email
	  please :-).
	o All Cardbus bridges should now support 3.3V, X.XV and Y.YV cards,
	  to the extent that the underlying hardware supports such cards.
	  (X.X and Y.Y haven't been assigned values yet :-).
	o Better 3.3V support for Ricoh ISA bridges.

How:
	o Don't mess with the power register when scanning the cards.  It
	  is unnecessary and causes BADVcc conditions on many chipsets.  These
	  in turn can cause an interrupt storm.
	o Make pcic_disable reset the slot's voltage.
	o Move initializing voltage for the slot until after it has been
	  disabled.
	o Fix a lot of issues with the pcic_cardbus_power routine.  We
	  now properly enable the card and take it out of reset after
	  a power change.
	o When detecting the card's voltage, if we're in a BadVcc state,
	  direct the bridge to rescan the card for what it supports.
	  (we might need to in the future set the power register to 0
	   before doing this).
	o Don't preserve CLKSTOP.  need to revisit this.
	o Better support for Ricoh ISA bridges for 3.3V cards.
	o Don't write to PCIC_POWER directly as offten, but instead go
	  through the pcic_power interface.
	o All cardbus bridges now default to use cardbus power control.
	o Add misc register definitions.
	o remove some (now) bogus comments.

Extra Special Thanks To: Scott Lamber for his kind and generous loan
of a Toshiba laptop with a ToPIC 100 in it for my use.
2002-06-23 01:55:10 +00:00
Warner Losh
285ed29005 Define masks for the VCC an VPP voltages 2002-03-20 19:01:16 +00:00
Warner Losh
f3bfc73757 Use the NetBSD init code for the TOPIC parts as a more complete basis
for initializing the parts.  Since I don't have any of these parts in
any of my working laptops, I'm committing this to allow people to test
it.  Will MFC when I receive reports of it working.
2001-10-11 05:37:32 +00:00
Warner Losh
1ead03c2ba Add support for changing the way that ToPIC csc interrupts are routed.
# Note: The ToPIC 100 and the ToPIC 97 datasheets are in disagreement
# as to if this bit is supposed to be set or cleared to enable INTA routing
# so I made my best guess.

Also, comments about the various chipsets, including some grumpy ones
about how vague the O2micro datasheets are.
2001-09-04 05:50:08 +00:00
Warner Losh
592823383b Move to using a chip function + function pointers to deal with the
function and csc interrupt routing path (eg, ISA or PCI) so that we
can more easily switch between the two.

When we don't have a card ISR, put the function interrupt into ISA
mode.  This effectively masks the interrupt since it happens once, and
not again until we have an ISR.  This should help hangs, and might
help people that unwisely update the kernel w/o updating pccardd.
This is done at mapirq time.

Force CL-PD6729/30 to use ISA interrupt routing and maybe even detect
the number of pccard slots properly (this is still WIP).  We aren't
going to support PCI interrupts for this release.  A future release
should support them, however.  Shibata-san's 3.3V fixes are not
included.

Add a hack which should, in i386, rewrite IRQ 0 cardbus bridges to be
IRQ 255, which should cause interrupts to be routed.  This is mostly
untested since my one tester disappeared after reporting nothing
changed.

Implement, but do not use, a power method called cardbus.  It looked
like a great way to get around the 3.3V problem, but it seems that you
can only use it to power cardbus cards (I get no CIS when I enable it,
so maybe we're programming things bogusly).

GC the intr and argp stuff from the slot database.

Improve the ToPIC support with the power hacks that Nakagawa-san
published in FreeBSD Press and that Hiroyuki Aizu-san ported to
-stable.  The ToPIC hacks were for 3.3V support in ToPIC 100, but it
looks like the '97 also has identical registers, so use them too.

Add some #defines for the cardbus power stuff.

Finally implement making CSC on the Ricoh chips ISA or PCI.  This will
allow polling mode to work on vaios, I think.

Add some minor debugging.  This should likely be cleaned up or put
behing a bootverbose.

Some of this work, and earlier work, was influanced by Chiharu
Shibata-san's power handing patches posted to bsd-nomads:15866.

MFC: Soon, if possible.
2001-09-04 04:47:58 +00:00
Warner Losh
6ac061b532 Improve interlocking for card removal. We now can remove the card in
the ISR.  We keep track of the card state and don't call the IRS when
the card isn't inserted.  This helps quite a bit with card ejection
problems that Ian was seeing.

Submitted by: Ian Dowse
MFC upon: re approvel.
2001-08-19 05:01:18 +00:00
Warner Losh
e423aa38ba For TI12xx and newer, clear register 0x84. This is the "Multimedia"
register.  It enables Zoom Video.  It appears that on at least one
card that Monzoon is using sets these bits by default.  Nothing works
when these bits are set, everything works when they are clear.

Add commentary on some of the ti bits.  Make code a little clearer.
Also remove a call to pcic_pci_pd6729 which was prematurely added in
the last commit.
2001-08-14 07:31:47 +00:00
Warner Losh
82c38f3a43 Try to support the Cirrus Logic PD6833 better in pci mode. This is
done from the datasheets since I'm ahving problems with my laptop that
has the 6833 in it...

Minor rework of TI code.  Should be the same as before.
2001-08-14 05:31:56 +00:00
Warner Losh
53af1c8a3d TI cardbus bridges, 12xx and newer, have an interesting register. It
is the diagnostics register at offset 0x93.  When bit 5 is set in this
register, bits 4-7 in ExCA register 0x5 being 0000 are required for
pci interrupt routing.  When it is clear, then bit 4 of ExCA register
0x3 is used to enable it.

The only other issue is that when you route interrupts this way, you
must read ExCA register 0x4 in order to clear the interrupt, else you
get an interrupt storm.

Deal with this requirement by setting things up.  It is believed that
this won't hurt other chipsets, but other chipsets may require their
own work arounds.
2001-08-01 19:41:56 +00:00
Warner Losh
9f3112df2d Add CLPD6832_BCR_ISA_IRQ definition for ISA routing of interrupts.
Minor commentary tweaking.
2001-07-31 06:31:38 +00:00
Warner Losh
58c13f9b7a Add new pci attachment for pcic. This supports pci cards as well as
card bus bridges.

We now always use pci interrupts for pci cards.  This will allow us to
more easily configure things.  You must change your IRQ lines in
/etc/pccard.conf to match what we've probed.  I'm not sure the right
way to deal with this right now.

Development of pci pcmcia has been funded by Monzoon Networks AG.  I
am grateful for their generosity.
2001-06-04 06:49:46 +00:00
Warner Losh
f20688d55c #defines for pci way interrupt routing. 2001-06-04 03:36:22 +00:00
Warner Losh
ee327e92e1 Move to using the common device list.
Move to table driven probing of these devices since we have such a long list.
2001-05-25 19:22:36 +00:00
Warner Losh
e0e34f291e Add recognition for Toshiba ToPIC-100.
Submitted by: Shimodaira Toshio <tshimod1@ym.nsw.co.jp> in [bsd-nomads:15589]
2001-05-23 04:37:00 +00:00
Warner Losh
bccfae2270 Add some additional register definitions for some work I have in progress. 2001-05-08 02:06:03 +00:00
Warner Losh
82d3fe450d When booting, turn on the 3E0 compatibility address for ricoh cardbus
parts.  This is based on the newcard code that turns it off :-).  We
can now reboot after NEWCARD or Windows and have OLDCARD work.  Add
support for the RL5C466 while I'm at it.

Treat TI1031 the same as the CLPD6832.  It doesn't work yet, but sucks
less than it did before.

Also add a few #defines for other changes in the pipe.
2001-04-17 23:15:00 +00:00
Warner Losh
a9304a4eb5 Fix minor typo in comment. 112x -> 12xx 2001-04-11 22:49:00 +00:00
Warner Losh
a5eccf28a8 Add device id for the OZ Micro 6832. I didn't try to init it like the
Cirrus Logic parts that end in 6832, but maybe some machines will need
that in the future.
2001-01-02 21:42:48 +00:00
Warner Losh
a7d5d6a892 Add TI-1031 id. It doesn't work yet, but it is nice to have it.
These were on cards that were pci pccard (not cardbus) bridges that
lived in SparcUltras that picked up on ebay.
2000-08-29 04:40:17 +00:00
Peter Wemm
0a8e3ce8a5 Make this compile without depending on the FreeBSD 2.2 compatability
defines.
2000-05-28 16:31:35 +00:00
Warner Losh
748fdadaad Add TI-1211 chipset from datasheet info 2000-04-20 03:16:49 +00:00
Warner Losh
6ea2fbe9be More fully initialize cardbus bridges. We now call the new generic
cardbus bridge init routine for all cardbuses.  This routine attempts
to compensate for BIOSes that do not setup the cardbus bridge into
legacy mode.  Since this is becoming more common, and cardbus pci
cards have appeared on the market, this makes sense.

Do some TI113x specific initialization.  This came in as part of the
patch.  Report TI1[1234]XX specific config registers protected by
bootverbose.

Minor code cleanup while I'm here.  I've also removed the unused code
present in the original patches, and cleaned it up slightly in places
as well.

The original patches supported more than one card, but these patches
support just one.  We should likely revisit this in the future.

This makes the Compaq card that Walnut Creek CD purchased for me work
in my bouncer box.

This is a MFC candidate.  However, I'd like to get some airtime on
these patches on as many laptops as possible before doing the MFC.  It
does change things somewhat.  In theory, apart from the minor TI
tweaks, this shouldn't change anything if the bridge is in legacy mode
already.

Submitted by: sanpei@sanpei.org (MIHIRA Yoshiro)
2000-03-25 20:29:55 +00:00
Bill Fumerola
4eb47ecfab Fill in the blanks for some of the Texas Instruments cardbus controllers.
Obtained from:	NetBSD (syssrc/sys/dev/pci/pcidevs)
1999-12-31 07:22:24 +00:00
Bill Fumerola
f88e599fcb Copy Texas Instruments cardbus controllers from pcisupport.c, the pcisupport.c
probes are at the 'chip' level and will get overridden by pcic_p if it is
compiled in. It's still nice to get the better probe message if it's not...

Requested by:	imp
1999-12-29 13:33:37 +00:00
Eivind Eklund
e9f0f7d4ad Add the PCI id for the TI PCI-1251B PCI-CardBus bridge.
Submitted by:   Martin Blapp <mb@imp.ch>
1999-11-28 13:37:35 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Nate Williams
4be290acd4 - Added PCI identification support for the TI1251 PCI/CardBus bridge.
With this addition my ThinkPad 600E works with the stock FreeBSD
  PCMCIA code.
1999-05-02 05:53:50 +00:00
Nick Sayer
db49f041ae Import PCI pccard bridge chip probing from PAO. Hopeful prelude for
broadening chipset support in -current.

Reviewed by:	joerg
Obtained from:	PAO
1999-04-01 15:28:10 +00:00
Torsten Blum
de6f543955 Identify the TI1250 PCMCIA/CardBus bridge. It seems that it's compatible
to the TI1131. At least it works in my Compaq Armada 7800.
1999-01-25 12:59:31 +00:00
Nate Williams
a9b9e46550 - Support for multiple PD6832 controllers. Each found 6832 is assigned
and initializes the next two ports in order starting at 03e0.  This
  also patches pcic_p.h to reduce the I/O ports mapped from 4 to 2.

Submitted by:	Ted Faber <faber@ISI.EDU>
1998-01-20 21:11:03 +00:00
Nate Williams
12defa4078 - Bring in code removed from /sys/pccard/pcic.c, including DEVICE IDs, and
more bootverbose code.
- Style nits.

No significant functional changes.
1997-12-02 22:13:59 +00:00
Nate Williams
030713d715 - Framework for PCI/CardBus controllers running in PCMCIA emulation
mode.  Currently, the only supported controller is the Cirrus Logic
  PD6832, but others can be supported with docs on them.

Submitted by:	Ted Faber <faber@ISI.EDU>
1997-12-02 21:26:41 +00:00