Commit Graph

63 Commits

Author SHA1 Message Date
jmcneill 729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
tsutsui 835f32c27d - split softc/device_t with related changes
- always make local functions static since mips/conf/Makefile.mips
  has been changed to preserve local symbols for debug
2008-04-29 15:50:39 +00:00
cube 607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
tnn 012005e684 - Attach the keyboard controller even if we're on serial console.
- If arcbios is using graphics console, then attach the keyboard as the
  console keyboard. Makes ddb work on the framebuffer console.
2008-03-08 15:04:33 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
martin bc6c1c587e Add a hack to deal with hardware that misses the machine's serial number
for whatever reason - just generate a MAC address from another environemt
variable, so that the admin can adjust it.
2008-02-25 22:49:20 +00:00
sekiya 1ca3315527 Garbage-collect my old broken attempt at creating a ringbuffer for the audio
chip.  Fix grammar in a comment while I'm here.
2008-02-02 08:58:20 +00:00
jmcneill de1fd2ebad Use auconv to create our encoding list for us. 2008-01-26 22:06:16 +00:00
tsutsui af15dc6cc2 - call mec_reset() to make sure DMA stopped (inspired by OpenBSD)
- also stop DMA in mec_reset() before resetting chip
- set MAC address to MAC_STATION reg in mec_attach(), not in mec_reset()

Possibly fixes occasional interrupt storm from mec(4) (i.e. hangup) at boot.
2008-01-26 14:28:49 +00:00
he 78d5b85f20 Remove two now-unused local variables. 2008-01-20 14:14:11 +00:00
dyoung b480b62270 Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
2008-01-19 22:10:14 +00:00
tsutsui 7bfee5be48 Fix typo in comments. Mostly from OpenBSD. 2007-12-29 17:53:23 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
macallan 4a60b0ecfe add mcclock_poweroff() 2007-09-26 05:50:02 +00:00
pooka ac9042f5ce remove TNF advertising clause from file copyrighted to me 2007-07-24 14:41:29 +00:00
macallan 01a8ddf94a sprinkle delay() and mec_mii_wait() in MII access functions
with this I no longer get spontaneous reboots during network traffic
2007-07-15 23:24:47 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
sekiya e2a64ba528 Nuke homegrown PCI configuration routines. #ifdef'd out by tsutsui@ a long
time ago; this is just garbage collection.
2007-04-17 12:41:57 +00:00
jmcneill ed55554c70 We don't use the RTC interrupt (yet), so mask it as well. 2007-04-14 20:57:55 +00:00
jmcneill dd9aa16186 Disable count/compare timer interrupts, as NetBSD does not use these. 2007-04-14 19:36:46 +00:00
jmcneill 8dd565451d Don't bother attaching if the keyboard is not the console. Reduce the
amount of time that macekbc_wait takes before timing out, and don't
bother checking the status of unattached ports in the interrupt handler.
2007-04-14 15:11:39 +00:00
jmcneill d8dfb3533c GC a few commented out lines of code, no functional change. 2007-04-13 03:42:39 +00:00
jmcneill 7d13eb09bd Remove traces of macau, it never existed in the first place apart for
a handful of register definitions.
2007-04-13 03:39:44 +00:00
jmcneill 845cd29d75 Add SGI O2 MACE audio driver, from OpenBSD. 2007-04-13 03:37:41 +00:00
jmcneill e7c2f5f47f Add some MACE audio bit definitions, from OpenBSD. 2007-04-13 03:36:24 +00:00
jmcneill eaf962445e Remove pckbc_mace, it has never worked and has been replaced by macekbc 2007-04-12 13:12:00 +00:00
jmcneill ab47cb33cd Add SGI MACE ps2 keyboard/aux controller driver. ok rumble@
XXX can someone confirm that we can remove pckbc_mace?
2007-04-10 23:44:10 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui 5a003ebca0 Accept RX packets which are larger than ETHER_MAX_LEN but can be stored
into RX mbufs.

(BTW, is there any way to allocate RX mbufs aligned at PAGE_SIZE?)
2007-02-04 06:16:12 +00:00
rumble f30a520560 Switch sgimips to MI todr. 2006-09-05 01:38:59 +00:00
rumble aa71bc7886 Generalise pci/pci_machdep.c further and move all mace-specific code into
mace/pci_mace.c in preparation for pci devices on the gio(4) bus.
2006-08-30 23:35:10 +00:00
gdamore 34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
tsutsui 936c3743c7 Switch macepci to use MI pci_configure_bus(9) rather than its own fixup code.
Tested on my O2 with several devices, and ok'ed by sekiya.
2006-04-17 14:01:08 +00:00
tsutsui 27ec859c0e Add some delay() on asserting MEC_MAC_CORE_RESET. 2006-04-02 11:20:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tsutsui f32d48a2f6 Use 64bit access ops for MEC_PHY_* registers (for consistency). 2005-12-10 07:05:10 +00:00
tsutsui ca2b187449 Use aprint_debug() instead of aprint_normal() for messages
of establishing/disestablishing mace interrupt.
2005-11-26 06:18:40 +00:00
drochner 44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00
drochner 996c273eda adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes 2005-06-30 17:03:51 +00:00
martin bf739d0144 Constify 2005-06-03 18:55:12 +00:00
tsutsui ca49b6380d Fix a typo. (from OpenBSD) 2005-05-18 14:57:36 +00:00
thorpej a7ba88252d Eliminate use of M_HASFCS. 2005-01-30 19:03:23 +00:00
tsutsui c6824e7fc3 Fix comment. 2004-11-24 17:31:58 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
sekiya 551d2b9aa9 Use ANSI function declarations. 2004-09-29 04:06:51 +00:00
tsutsui ef820af6db Rename if_mec_mace.c -> if_mec.c.
This file contains not only an attachment but whole driver functions.
2004-09-23 14:45:20 +00:00
sekiya 8590eac465 Use the mace interrupt handler for PCI interrupts.
From KIYOHARA Takashi
2004-09-06 07:24:06 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
tsutsui efa3e6b66b Remove bogus TABs. (from OpenBSD) 2004-08-18 14:47:25 +00:00
tsutsui 9df92e5adc - It turns out alignment restriction for TX descs is 8kbytes, not 64kbytes.
- Use MEC_TX_ALIAS register to set/clear TX interrupt enable bit.
2004-08-01 06:36:36 +00:00