Commit Graph

532 Commits

Author SHA1 Message Date
macallan
3bc5d8b535 make latching optional.
The SPARCbook docs claim it's necessary but my 3GX happily works without.
2010-03-01 05:42:08 +00:00
macallan
539b768657 fix ancient typo, noticed by mouse@ 2010-03-01 05:26:53 +00:00
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
macallan
490ba2f1c7 Abort setup when we find no audio codec to avoid crashing later on with
ISDN-only cards.
Should fix PR41055
2010-02-18 02:21:38 +00:00
macallan
565f3dd6cd avoid using PAGE_SIZE directly so sparc/GENERIC builds again 2010-01-29 23:50:01 +00:00
macallan
31d6295bdf round the space we bus_space_map() up to PAGE_SIZE alignment 2010-01-27 21:02:22 +00:00
macallan
5f203032ca tcx doesn't use bt_dac 2010-01-27 21:01:33 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
macallan
351d4f5ebb set a delta value for the master channel so volume control via PMF works 2010-01-14 02:20:07 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
macallan
7190e17c0e fix off by one in zx_copyrect() 2010-01-05 05:04:38 +00:00
macallan
647d0c5994 fix off by one error in zx_fillrect()
while there, use vcons_replay_msgbuf()
2010-01-05 04:17:49 +00:00
tsutsui
7a44913b3f Fix botches in mechanical changes to make this compile:
dbri.c:165: warning: 'dbri_sus' declared 'static' but never defined
dbri.c: In function 'dbri_resume':
dbri.c:2188: error: 'sc' undeclared
dbri.c:2189: error: break statement not within loop or switch
2010-01-02 04:12:07 +00:00
christos
641f5484f1 convert to pmf 2010-01-02 01:42:49 +00:00
tsutsui
33999cc30c Remove some more unnecessary casts. 2009-09-22 13:13:46 +00:00
tsutsui
6e067fe997 u_intNN_t -> uintNN_t 2009-09-20 08:24:04 +00:00
tsutsui
579b9cbd30 u_intNN_t -> uintNN_t 2009-09-19 11:53:42 +00:00
tsutsui
a616b75df3 Split device_t/softc.
Tested on TME emulating SS2.

XXX: bwtwo at obmem on TME emulating sun2 didn't match and cannot test
2009-09-19 04:52:44 +00:00
tsutsui
6d160c7919 Split device_t/softc.
Tested on:
---
qec0 at sbus0 slot 3 offset 0x20000: 128K memory
be0 at qec0 slot 0 offset 0x0 level 4 (ipl 7): rev 1, address 00:80:17:xx:xx:xx
2009-09-19 04:48:18 +00:00
tsutsui
1f6e50b57e Make bwtwo(4) match prior to genfb(4).
Required by bwtwo(4) on TME emulating SS2.
2009-09-19 03:49:22 +00:00
tsutsui
853e246fe1 Split device_t/softc. Tested on SS1+.
XXX: sparc/dev/cgthree.c in Attic had an attachment for cgthree* at obio?
XXX: and sparc/conf/files.sparc still has an entry of nonexistent (or not yet)
XXX: sparc/dev/cgthree_obio.c. Is there any sun4m machine which requires it?
2009-09-18 16:43:19 +00:00
tsutsui
6dce7b7053 Use the common ether_crc32_le() function for multicast hash. 2009-09-18 14:40:49 +00:00
tsutsui
df6a834f16 Misc KNF. 2009-09-18 14:35:11 +00:00
tsutsui
51d56bbc55 Make local functions static. 2009-09-18 14:14:06 +00:00
tsutsui
01a44458f7 Use uint8_t pointers for TX/RX buffers to avoid extra pointer casts. 2009-09-18 14:09:42 +00:00
tsutsui
d7e3eba588 Adjust attach messages. 2009-09-18 14:00:44 +00:00
tsutsui
d01ef0d1d1 Split device_t/softc. 2009-09-18 13:48:54 +00:00
tsutsui
0ab05b4a42 Make be(4) is properly initialized at the first ifconfig(8) command:
- make beinit() and bestop() match struct ifnet
- if ether_ioctl() returns ENETRESET always call init function
2009-09-18 13:45:20 +00:00
tsutsui
c349dcd7cd - wrap a long line
- ANSIfy
2009-09-18 12:59:47 +00:00
tsutsui
f3504c80ad - use device_private(), proper types and variables for device_t/softc
- remove unnecessary casts against void pointer

XXX: many inconsistent use of aprint_*(9) and printf(9)
2009-09-18 12:23:16 +00:00
tsutsui
9c13754d44 Fix a message format in error path. 2009-09-17 17:53:35 +00:00
tsutsui
73d3aaa327 Split device_t/softc.
Tested on:
> lebuffer0 at sbus0 slot 3 offset 0x40000: 128K memory
2009-09-17 17:51:52 +00:00
tsutsui
08c902218f Include "ioconf.h" instead of extern struct cfdriver foo_cd decls. 2009-09-17 16:39:48 +00:00
tsutsui
12ad76b18c Remove struct sbusdev and related functions sbus_establish() and sbusreset().
They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.

Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
2009-09-17 16:28:12 +00:00
tsutsui
62b836f249 Make cgthree(4) match prior to genfb(4). Required by cgthree(4) on SS1+. 2009-09-16 13:05:07 +00:00
tsutsui
a93b3edd3f Rewrite code which looks for an unallocated lebuffer and pairs it
with possible orphaned this le at sbus one on old PROMs not using
homegrown struct sbusdev but common cfdriver_t and device_t structures.
Now nothing refers struct sbusdev registered by sbus_establish().

Tested an SBus le/esp combo card on SS1+.
2009-09-16 11:17:19 +00:00
tsutsui
32fba42272 sbus_establish() should take device_t self for the device itself,
not device_t parent even if sbus is grandparent of the device,
otherwise (*sd_reset)() callbacks will be called with an wrong device_t.
Even in such case, sbus_establish() looks for an sbus though device tree.
XXX: (*sd_reset)() isn't called anyway, and these stuff seems really bogus.
2009-09-08 18:31:36 +00:00
tsutsui
26a7078461 Fix botch on device_t/softc split caused by awful casts around
registration of (*sd_reset)(device_t) in struct sbusdev via sbus_establish().

XXX: (*sd_reset)() in struct sbusdev seems called from only sbusreset(),
XXX: but there is no function which calls sbusreset()???
2009-09-08 18:15:17 +00:00
tsutsui
91bbbb9ed1 Split device_t/softc.
Tested QLogic 1020 Fast Wide SCSI HBA at PCI.
Sbus attachment is untested, but not so much quirks in it.
2009-09-07 13:39:19 +00:00
macallan
7382668d37 adjust some mmap ranges so X can work, also use FBTYPE_TCXCOLOR 2009-08-26 22:36:07 +00:00
macallan
a63997dc13 call vcons_replay_msgbuf() if we're the console 2009-08-20 02:29:16 +00:00
macallan
de0635bac0 use vcons_replay_msgbuf() 2009-08-20 02:01:55 +00:00
macallan
c1e3bcc969 add support for a hardware cursor via wsdisplay 2009-08-20 00:59:28 +00:00
macallan
b737c05a07 clear the screen and initialize it with the right WID to bypass the LUT on
24bit boards when switching to WSDISPLAYIO_MODE_FB
Now 24bit X with wsfb looks right.
TODO:
- hardware cursor
- acceleration
2009-08-19 20:51:47 +00:00
macallan
b8db42fd33 - more cosmetics
- support screen blanking ioctl()s on both /dev/fb* and wsdisplay
2009-08-19 03:45:51 +00:00
macallan
d106f169f8 - some cosmetic fixes
- add support for screen blanking via /dev/fb*
- reimplement colour map ioctl()s for /dev/fb*
- implement mmap and ioctl for wscons, map 8 or 24bit framebuffer depending
  on hardware
With this X works with the wsfb driver in 24bit.
TODO:
- fix wsfb to use the right pixel format for S24
- implement wsdisplay colour map ioctl()s
- add hardware cursor support for wscons and /dev/fb*
2009-08-19 03:35:32 +00:00
macallan
8ec24faa06 device_t-ify 2009-08-18 20:45:42 +00:00
macallan
45b6e71b60 make the tcx driver do something useful:
- attach a wsdisplay
- make it work with an S24
- accelerate scrolling and character drawing
This isn't quite finished yet, it works fine as a console but most things
X will need are not functional right now.
2009-08-06 18:26:03 +00:00
martin
9c3d37432b Fix small oversight in device_t/softc split. Pointed out by <jdc>. 2009-08-04 09:26:26 +00:00
dyoung
1b6947b941 Do a complete device_t/softc split for the PCI attachment. I have
not finished the device_t/softc split for the SBus attachment
because I don't have an SBus gem(4) to test with.

Convert from legacy shutdownhooks to a PMF shutdown hook.  Add PMF
suspend/resume handlers.

Factor a detachment hook out of gem_attach().  During device
attachment, track which resources are reserved in sc_attach_state,
and release only those resources during detachment.

Tested on gem0 and gem1 at pci1 on a Sun Fire V120.
2009-07-27 18:10:53 +00:00