Commit Graph

37 Commits

Author SHA1 Message Date
Warner Losh
cba55405e1 CardBus instead of cardbus. 2010-01-03 23:26:29 +00:00
Warner Losh
d3ec8e547e __LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).
2009-03-09 13:29:13 +00:00
Warner Losh
fc4c469701 fix spelling error
Submitted by:	trasz
2009-02-06 09:34:17 +00:00
Warner Losh
2f4f3e9365 Don't check for mapping above 4GB on 32-bit platforms. 2009-02-05 20:44:06 +00:00
Warner Losh
cdaf8487a3 Add some additional debugging for the memory code. 2009-02-05 18:51:14 +00:00
Warner Losh
1f97c78986 First cut at fixing memory mapping botch. Nobody must use the ray(4)
driver since it couldn't have worked with NEWCARD w/o these fixes.
This should allow selecting 16-bit memory width as well (which was
what was broken).
2009-01-05 21:00:22 +00:00
John Baldwin
00362cddbe - Fix exca_(io|mem)_map() to return proper errno values.
- Change exca_activate_resource() to call BUS_ACTIVATE_RESOURCE() before
  calling exca_(io|mem)_map() since the latter use rman_get_bus(tag|handle)
  and the recent changes to nexus(4) mean that you need to activate a
  resource before reading the bus tag and handle.  This was true before,
  but now the nexus(4) drivers on x86 and ia64 are more forceful about it.

Reviewed by:	imp
2007-03-23 17:15:07 +00:00
Warner Losh
e2ae5821fe exca->pccarddev should always be non-null now. Only call it when the
device is actually attached.
2007-02-24 15:56:06 +00:00
Warner Losh
21de43a1ec It turns out that it is easier to not NULL out pccard and cardbus
device pointers.  They don't change as the children device drivers
come and go.  Rather, check to see if the device is attached where we
would have checked ! NULL.  This solves many asymmetries in the code
that likely could lead to crashes when loading/unloading cbb without
one or more of the expected children's driver not present.
2007-02-15 07:22:27 +00:00
Warner Losh
4e53810378 Cleanup sloppy ifdef. 2006-09-24 00:26:33 +00:00
Warner Losh
3c48d33eec The TOPIC97 and TOPIC100 seem to have a special register in the exca
space that enables low voltage operation (and maybe other stuff).
Enable the bits in this register so low voltage 16-bit cards may work.

Existance noticed in NetBSD driver.
2006-08-12 08:53:54 +00:00
Warner Losh
837d712d07 Don't dereference an uninitialized pointer. 2006-03-09 16:28:24 +00:00
Warner Losh
02341dd12e Set the name of the chipset found 2005-10-19 00:25:39 +00:00
Warner Losh
0cf11d1db4 Minor commentary correction 2005-10-17 08:20:44 +00:00
Warner Losh
1d508c2092 MFP4: Minor tweaks. 2005-10-14 04:48:11 +00:00
Warner Losh
c82f53f61d 'PC Card' instead of other variants 2005-09-22 06:01:44 +00:00
Warner Losh
703ef1e74c Properly calculate the offset in mapping the memory of pccards. This
allows my 3com cards to work again.  It appears that this code was
once there, but I removed it when I added the alignment issues.

MFC After: 5 days
PR: 70639 (and likely others)
2005-01-11 00:32:43 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Warner Losh
9fea47c8e6 Didn't intend to commit debugging code enabled 2004-08-16 01:57:06 +00:00
Warner Losh
cc81f0c35e Other part of the cbb isa/pci split. This likely is causing problems
wrt cbb module.
2004-08-15 23:17:54 +00:00
Warner Losh
a1721d84eb Card type stuff was backwards, so assume io for the moment. mem needs
a lot of help and with luck bms will help me fix that.
2003-10-07 04:29:04 +00:00
Warner Losh
26824d8c47 CARDMEM is the offset of the address ON THE CARD (eg which page).
Instead, use EXCA_MEMREG_WIN_SHIFT which is the amount we shift the
bus address by to write into upper memory (eg above 24MB).  Use the
latter in this case.
2003-09-24 22:13:25 +00:00
Warner Losh
d029ead3cb When we went to the set_flags interface for the memory resource, we
switched from PCCARD_MEM_FOO to PCCARD_A_MEM_FOO, yet we didn't change
exca in all the right places.  Do so now.  Also use PCCARD_WIDTH_AUTO
rather than the magic cookie 0.
2003-08-29 05:27:36 +00:00
Warner Losh
39c50d587a A number of minor fixes to the mapping of memory. This should help
reading the CIS on some cards.  However, not all just yet.  This makes
at least some of the xircom cards that weren't working to work.  It
doesn't make my home and away card work, however.

o Don't get the card offset wrong.  This is the biggest hassle for
  reading the CIS.  The old code was just so wrong I can't believe that
  it worked at all.
o Don't set the bit that allows/forces 16-bit memory access to the
  memory.  It is hard coded with 0x80.
o Don't need to slow down memory access with wait-states.  OLDCARD didn't
  need them and it doesn't hurt anything.
o remove bogus grousying in comment.
2003-08-28 05:01:11 +00:00
Warner Losh
289dc689c6 Fix location of $FreeBSD$ from last commit. 2003-08-27 23:30:01 +00:00
David E. O'Brien
aad970f1fe Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
Warner Losh
090555da5b MFP4:
Merge some common code from cbb into exca.
2003-06-07 20:46:39 +00:00
Warner Losh
e4e7b5bc54 Add two of three workarounds for interrupt storms for o2micro parts as
obtained from o2micro.  These should only be needed for 'older'
o2micro bridges (anything before the 7xxx series of bridges), but will
work with the new bridges.

# I don't plan on porting it to oldcard, but will happily commit to
# oldcard if someone else needs them.
2003-06-06 06:00:49 +00:00
Poul-Henning Kamp
26028fee6f Don't use return(foo(...)); in function returning void.
Found by:       FlexeLint
2003-05-31 16:51:41 +00:00
Warner Losh
e0ba3d7e56 Massive overhaul of exca to help with the isa efforts:
o chip_name arrays ifdef'd out.
o use the OLDCARD-like get/put functions so we can support differnt types
  of mappings.
o Write the beggings of is this a valid exca device and introduce more
  chipset support.

# this is partially a wip, but also needed because some other cahnges I've
# made require some of these changes.
2003-02-14 06:21:18 +00:00
Semen Ustimenko
83190e29d3 Do not return(foo()) in void function.
Submitted by:	marius@alchemy.franken.de
MFC after:	3 days
2002-12-18 22:53:24 +00:00
Warner Losh
db8c52408d Update comments to remind me about power bugs in oldcard. 2002-10-07 06:18:50 +00:00
Warner Losh
6dfd31d460 MFp4:
o Protect .h against multiple includes.
	o eliminate the pointers to the read/write routines.  The
	  bus_space_read routines can cope since we have the offset
	  field.
	o Print a warning if the requested map address is > 16M and
	  your chipset doesn't support the extended ExCA registers.
2002-07-26 08:01:08 +00:00
Alfred Perlstein
e27f378e33 Fix a couple of places where preprocessor concatination was misused and
something wound up grafted to a comma.
2002-06-01 16:21:26 +00:00
Takanori Watanabe
80f1001813 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
Warner Losh
a0e457a620 Default debugging to OFF now. 2002-02-04 15:55:21 +00:00
Warner Losh
c3ee5891b9 First draft of common code between pccbb and pcic drivers for talking
to ExCA register sets.  These registers exist in both ISA and PCI
devices in a couple different ways, and this will provide a common
base for future building.  This code is a rehash of the pccbb 16-bit
code, which was a rehash of the pcic code, which was a rehash of the
netbsd i82365 code.  More hashing to come.
2002-01-29 06:48:38 +00:00