Commit Graph

8 Commits

Author SHA1 Message Date
Warner Losh
78ae73b5ea Eliminate pccard_chip_* tonight.
o ifdef out pccardchip.h (almost all of it, there are dangling bits
o Add rid/res members to pccard_function
o remove pct/pch from pccard_softc
o map memory properly in scan_cis (almost, see XXX for more work)
o manage ccr.
o remove bogus comment I added about touching the ccr being a layering
  violation for pccard.  It is properly done at that level.
o More function prototyping
2000-01-10 06:58:17 +00:00
Warner Losh
deae2aaf91 Checkpoint of today's changes. We now get to the point where the pccard
layer is trying to access the now unexistant chip functions.
o Added DEVPRINTF which is like DPRINTF only calls device_printf.
o Made it possible to define PCICDEBUG
o Remove ph_parent and use the softc pointer sc instead in pcic_handle.
o Remove all references to dv_xname
o Add some debug messages.
o enable MI attach/detach calling for pccard.
o convert pcic_chip_socket_{en,dis}able to pcic_{dis,en}able_socket
  and connect them to the power_{enable,disbale}_socket.
o Remove pccard pointer from pcic_softc.
o GC some unused pccard functions.
o Convert pccard_chip_socket* to POWER_ENABLE_SOCKET
o kill pccard_attach_args.
o power_if.m updates.  More to come.
2000-01-06 07:30:28 +00:00
Warner Losh
fe98624bbb Connect interrupts and start processing them. We panic on card removal
now, but we're getting interrupts!
o Add pcic_suspend/pcic_resume so we can detach our children on suspention
  and fix the state of the pcic on resume.
o Remove some unused parts of softc.
o Centralize resource activation/deactivation for pcic bridge chip in
  the stylistic pcic_activate/pcic_deactivate.
o Add bus_print_child method so we can see the pccard attachment.
o Add pcic_identify in an attempt to make it possible to automatically id
  the pcic devices.  This works great, but we cannot divine the irq to use
  from this method, nor the memory hole.  For the moment, KLUDGE irq to be
  10 and memory hold to be 0xd0000.
o Loose the pnp probe stuff.  This may be a big mistake, but it is easy
  enough to add back later.  I did this so the identify routines can do their
  thing unmolested by pnp information.  The whole identify thing may be a bad
  idea to be ripped out later.
o change return type of pcic_intr to void, make it static and ripple
  this through the code.
o Add explicit call to bus_generic_attach at the end of pcic_attach to
  get any children probed/attached.
o add some comments about future directions/questionable things being
  done at different layers, etc.
2000-01-03 06:45:16 +00:00
Warner Losh
810473943f Tonight's cleanups.
o Implement memory and I/O activation/deactivation.  irq not handled.
o switch pcic_chip functions around to use more convenient types.
o kill __P and most of the old K&R prototypes just to be mean.
o minor other nits
1999-12-07 06:44:38 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
Warner Losh
12bba6c259 Flesh out the pccard bus_ methods with either the generic one (where
it would work), or a specialized one.  Most of these have been
creatively stolen from pccard_nkb, which in turn stole from isa
showing that generic bus_ versions of bus_{set,get,delete}_resource
might be profitable.

Fix a couple of minor bugs introduced in the last round of updates
from NetBSD.

Start on the pccard_ivar structure which will hold the resources and
slot number.

Add tcic as a possible attachment for pccard and rename the attachment
for pcicx to pcic since the name has changed since I originally wrote
this stuff.

Next up:
	stringing together the various memory and I/O
allocation/mapping primitives in i82365.c, final touches on the isa
attach routine and other fun stuff in that line of attach.
1999-11-29 06:42:55 +00:00
Warner Losh
eda5b689f1 Update pccard code to latest NetBSD code. This is the last merge
before newbusification hits full steam ahead.

All:
	Adjust NetBSD labels to reflect new base versions.
dev/pcic/i82365.c:
	1.24	Interface change for kernel threads
	1.25	Massive unification for cardbus
dev/pcic/i82365var.h
	1.8	Massive unification for cardbus
dev/pcic/i82365_isasubr.c
	1.3	Massive unification for cardbus
dev/pccard/pccard_cis.c
	1.11	Massive unification for cardbus
		(better device printing, better memspace calcs)
dev/pccard/pccard_cis_quirks.c
	1.4,1.5	Lotsa 3com devices
dev/pccard/pccardchip.h
	1.4	Massive unification for cardbus
dev/pccard/pccarddevs
	1.33..1.59 Lots of devices
1999-11-28 05:49:27 +00:00
Warner Losh
c2380338f0 Moderately hacked pccard code from newconfig. It is somewhat in
incomplete and likely has problem.  The code was originally pcmcia,
but I renamed it to pccard and made it compile on FreeBSD -current.  I
converted SIMPLEQ to STAILQ as well as a few sc->dev.xname ->
device_printf changes.  This is a green port of fairly mature code.

I derived this work from the FreeBSD newconfig project
(http://www.jp.freebsd.org/newconfig).  Any problems with it are
likely introduced by me.

Obtained from: newconfig project
1999-10-26 06:52:31 +00:00