Commit Graph

156 Commits

Author SHA1 Message Date
imp
fbd9641457 Mollify the whitespace police 2005-11-08 15:42:12 +00:00
imp
f2206b9a97 Shutdown a little better by commenting the shutdown code and acknowledging
any interrupts after we turn off the interrupt mask.
2005-10-29 03:36:00 +00:00
imp
5fe80693f5 Shut down the card bus bridge hardware on detach. Before we'd just
free the resoruces w/o actually turning off the interrupts.  This lead
to interrupt storms if you were to insert a card after kldunloading
the driver.
2005-10-29 03:27:43 +00:00
imp
a6f0699845 Make sure we set bst and bsh in the softc.
This gets us probing, but not attaching to, ISA cards.  More work
needed since the ISA attach routine is return ENXIO right now :-)
2005-10-19 00:18:11 +00:00
imp
86ab2d4d27 Merge in WIP from p4 for supporting ISA pccard bridges conforming to
the ExCA spec, and close cousins:

o Write an activate routine that works.
o merge a couple of items from oldcard before they are lost
o write a deactivate routine

I suspect we're still a ways away from having this work, but maybe for
6.1/5.5?
2005-10-14 04:47:18 +00:00
imp
40a15ca539 MFP4: More removal of unused stuff. 2005-10-08 06:58:51 +00:00
imp
96e6d186fa MFP4: Changes to hopefully make the new power code work better
o Rather than just try to turn off EXCA_INTR_RESET, set the entire register
  to 0.  This is slightly faster, and a better hammer.
o Move attempted clearing of the output enable (EXCA_PWRCTL_OE) back to
  after we turn off the power.  Modify it to write 0 so that we don't get
  Bad Vcc messages on TI bridges (untested, but ru@ sent me a similar patch)
  while at the same time avoiding interrupt storms on Ricoh bridges (tested
  by me on my Sony).

# Many of my observations of 'breakage' for this patch are due to some bug
# in the load/unload of cbb.ko unlreated to this change.  I'll be investigating
# and fixing that bug in the fullness of time.
2005-10-08 06:57:13 +00:00
imp
623046a75f MFP4: We no longer use intr_handlers, so remove it. 2005-10-08 06:53:17 +00:00
imp
1fddd6361f MFP4: Note why we do the dance we do for waiting for the thread to die. 2005-10-08 06:51:47 +00:00
imp
f0fcf4b3c2 Fix bad compile. Pointy hat to: imp 2005-09-29 20:41:04 +00:00
imp
9dde40faaa o Add a bunch of o2micro controller IDs
o Add SMC34C90 to list as well, since I've found enough more data about it
  since my original research to know it is appropriate for this driver.
2005-09-29 19:59:03 +00:00
imp
4fd2f9116b I added the device IDs to the header, but not to the table. Add them
to the table.

MFC After: 3 days
2005-09-29 14:57:51 +00:00
imp
7fa2686fe8 'PC Card' instead of other variants 2005-09-22 06:01:44 +00:00
imp
b939d57c24 This appears to be good for some folks, but really bad for others.
Until we know why, back out 1.127.
2005-09-12 05:35:11 +00:00
imp
fc07baa460 Minor improvement for the suspend case for Ricoh based (and others)
CardBus bridges.
2005-09-08 17:18:42 +00:00
imp
9b222cbe2a o The ricoh bridge needs us to turn off the function interrupts for
16-bit cards when we're powering them up.  Other bridges may have
  similar issues, so we do this for all of them by setting the
  interrupt in the PCIC register 3 to be 0 (done always anyway)
  and turning on the bit in the bridge control register to route these
  interrupts via the ISA bus (or via the interrupt configured in the
  PCIC register 3).  '0' means disable completely.  There's a small
  chance this may interfere with the o2micro power hacks, but I'll
  wait for reports to come in from o2micro users.
o Expand some of the comments about why we do certain things.

# this gets rid of the interrupt storm warnings on my 505TS.  I think
# that we may need to do something similar on suspend, but I'm unsure
# since I don't have a laptop that supports suspened/resume with a
# ricoh chipset in it.
2005-07-17 19:40:05 +00:00
imp
f69c4458ba Rename a bit to make it clearer that it enables routing of the function
interrupts to the ISA bus.
2005-07-17 19:31:39 +00:00
imp
138abbd843 The CD interrupt should only be enabled after we've initialized the
card.  Mask it while we're doing power things, as the PC Card standard
suggests.  Also, poll the POWER_CYCLE bit 10x a second as well as
providing a timeout for power cycle interrupt to happen.

The Ricoh '475 that I have doesn't seem to generate an interrupt for
power at the present time, so the polling is necessary for reasons as
yet unknown.  This results in an interrupt storm warning that I'm
still trying to quantify (the o2micro trick doesn't work to mitigate
this storm).  At the very least, this should help those users that
lost pccards on boot with the prior rev of this code.  My VAIO
PCG-505TS is now happier, but more investigation is necessary.
2005-07-17 07:48:28 +00:00
imp
a5137833ce s/_us// 2005-07-15 04:11:42 +00:00
imp
7bf1d45c6c Move to using tsleeps in the cardbus reset case as well. This
eliminates the last of the DELAYs in pccbb.
2005-07-15 03:25:22 +00:00
imp
7518c75269 Omnibus power and interrupt fixes:
o Don't busy wait on powerup.  Instead, use the power up interrupt to wait
  for the card to power up.  Don't wait when we're turning the card off,
  since no interrupt happens in that case.
o Convert many of the long DELAYs to tsleeps.  We do not run before
  the timer have stared, so DELAY isn't necessary.  More DELAYs can likely
  be eliminated in the future.
o When powering up the card, don't do anything if the card is already
  powered up (before we'd power cycle it).  This means that for most
  cards we power them up once and then never change the power.
o On card eject, mask (by clearing) the CD bit.  Before we set it, which
  was wrong.  We don't want to see any CD events past the first one since
  they need to be debounced.

With these changes, I can insert/eject 16bit cards without glitching xmms'
sound output.  Something very important to the development of better pccard
drivers :-)
2005-07-14 20:46:59 +00:00
imp
e5bbab0ebd Not yet ready to burn this, so unmark power stuff.... non-type 0 busses still need to do this 2005-06-06 06:05:32 +00:00
imp
4085e6fe95 Since cbb implements the pcib_ interface, it must also implement the
pcib_route_interrupt interface.  Since there's only one interrupt pin
in the CardBus form factor, everybody gets to share it.  Implement
cbb_route_interrupt to return the interrupt we have.

Suggested by: bms
2005-04-13 16:35:15 +00:00
imp
01223e02a3 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:10:49 +00:00
imp
22375c2f97 Use the standard FreeBSD license for these files.
Approved by: imp, jon
2005-01-13 19:05:25 +00:00
imp
57e0fb88c0 The card activation failured message is lame, and not done for other
busses, nor for the 16-bit cards.  Eliminate it.
2005-01-11 05:38:01 +00:00
imp
d4a4785a60 /* -> /*- for a second clause 2005-01-11 05:34:14 +00:00
imp
f542ef7871 Use the FreeBSD standard license, since there's no reason to use the
version I have here.
2005-01-11 05:33:18 +00:00
imp
4b319958e7 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
imp
296ed3d95d Add recognition of O2Micro 711M1.
Submitted by: Gordon Bergling
2004-12-23 05:28:36 +00:00
imp
eeb52edac0 Don't need to declare cbb module. don't know why I never saw
duplicate messages..
2004-08-16 06:33:58 +00:00
imp
2d3c2de7f0 Move towards isa attachment for pccbb. This is a work in progress, but
works well with the pci attachment.
2004-08-12 06:50:29 +00:00
imp
3a6160ae6a Add IDs from TI's web site. Reports from the field and inspection of
the data sheets leads me to believe these will just work.  Those parts
with the various media readers on them may not have the required
FreeBSD drivers that will attach to the subdevices that will be seen
on some of these parts.

PCI 1515, 1530, 1620, 4520, 6411, 6420, 7410, 7510, 7610

Prompted by: Havard Eidnes
2004-07-22 20:19:57 +00:00
imp
04d3924209 More TI device IDs.
These are from the datasheets downloaded from TI's web site.
They describe the PCI[67]x[12]1 and PCI[67]x20 parts, with and without
the smartcard enabled.
2004-07-22 20:02:16 +00:00
imp
896583b3ec Update comment about fast interrupts to be closer to reality 2004-07-22 07:44:10 +00:00
imp
c5906d37f5 Improve the kludge assignment of sub-bus numbers a little by fixing an
off by one error.  subbus must be > than pribus, so the right test is
<= not just <.

Reported by: Peter Losher
2004-06-23 13:49:46 +00:00
phk
d6f7d2bde6 Add some missing <sys/module.h> includes which are masked by the
one on death-row in <sys/kernel.h>
2004-05-30 17:57:46 +00:00
imp
fe8b9d7c5a When attaching pccard and cardbus children, there's no need to set the
device == NULL on failure.  A warning should suffice.

# I wrote this back before I understood the unattached but loosely bound
# newbus concept...
2004-05-21 06:11:47 +00:00
imp
ff3bba9a31 Now that we have the resource allocation code in current, the kludge
to try to allocate things on my parent can be taken out.  It duplicates code.

Also, add comment about why the power state stuff is here (type 2
devices don't participate in the power state save/restore due to
larger Bx issues).
2004-05-21 06:10:13 +00:00
imp
26c98d4eb0 Need to mark the interrupt from cbb as being MP safe on resume too. 2004-05-04 02:25:00 +00:00
imp
800bba64fe Start programming the bus numbers for the pci<->cardbus. When the
secondary bus is 0, we program the primary bus, the secondary bus and
the suborindate bus.  This isn't ideal, since we start at parent_bus +
1 and store this in a static.

Ideally, we'd walk the tree and assign bus numbers.  However, that's
harder to accomplish without some help from the bus layer which we're
not planning on doing that until 6.

This fixes my CardBus problems on my Sony PCG-Z1WA, and might fix the
Dells that have had problems.
2004-04-23 05:25:13 +00:00
imp
d14cbe0db8 Remove extra copy of code.
Noticed by: Carlos Velasco
2004-04-13 14:39:26 +00:00
imp
09643af85a MFp4:
Alignment for pccards should also be treated in a similar way that
	we tread it for cardbus cards.

	Remove bogus debugs while I'm here.

# This is also necessary to make the CIS reading work.

Submitted by: Carlos Velasco
2004-04-12 21:04:54 +00:00
imp
361a4ffcb7 Better checks to make sure that we get good alignment. This code is a
bit of a bandaide until I get better pci bus code committed to head
from my p4 tree.
2004-04-06 22:50:50 +00:00
imp
ad7ac7636e Fix mis-merge from p4 by adding line getting sc.
Attempt to deal with larger memory allocation better.
2004-04-06 22:41:14 +00:00
imp
d531fd6fd2 MFP4: Power up with OE disabled. Similar patches went into NetBSD a
while ago, and it does seem to help at least one card I have and has
been in my p4 tree for many months.
2004-04-06 20:13:29 +00:00
njl
05a1f56fc9 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
jhb
2642ed4029 kthread_exit() no longer requires Giant, so don't force callers to acquire
Giant just to call kthread_exit().

Requested by:	many
2004-03-05 22:42:17 +00:00
imp
a6f4226846 MFp4:
o O2Micro OZ711e1 is now recognized (note: I don't have one, and the current
  owner of the Dell laptop is reporting problems).
o minor nits wrt copyright date.
2004-01-04 22:10:00 +00:00
imp
cfec163b6f Fix typo in ENE CB710 description. It isn't a 720. 2003-12-22 06:09:35 +00:00