Commit Graph

515 Commits

Author SHA1 Message Date
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
mjacob
ad7d727f78 Update ISP driver to latest and greatest. Includes support for the 8Gb part. 2009-06-25 23:44:01 +00:00
macallan
f48726983f make this compile again without tctrl 2009-06-03 16:25:22 +00:00
macallan
b538f79eb0 use pmf, while there do some cleanup, fix typos etc. 2009-05-27 15:13:22 +00:00
macallan
5052b0a047 finally commit a lot of stuff that's been sitting in my source tree for
several ages:
- convert to device_t
- add support for programming colour depth and such, use it to reset the
  console to something usable when we enter ddb or exit X etc.
- basic power management
TODO:
- convert to PMF
- get rid of rconsole code so we don't need to map the framebuffer
- power down the whole DAC when not in use
2009-05-27 00:35:34 +00:00
macallan
991219d617 add a bunch of register definitions 2009-05-27 00:32:10 +00:00
macallan
0483b5b9d9 use BUS_SPACE_MAP_LARGE 2009-05-26 03:32:51 +00:00
tsutsui
f84df6daef u_intNN_t -> uintNN_t 2009-05-17 01:33:24 +00:00
tsutsui
e298c1144d Split device_t/softc.
Tested PCI HME on i386.  Sbus HME is compile test only.
2009-05-17 00:40:43 +00:00
tsutsui
420c7350fb Use device_private() to get struct sbus_softc from device_t parent.
XXX: sbus_softc has been split from device_t on sparc, but not on sparc64!?
2009-05-17 00:28:35 +00:00
martin
a6eabcae57 we can not free() a dmamap! 2009-05-16 18:24:44 +00:00
cegger
7cf2991222 struct device * -> device_t, no functional changes intended. 2009-05-12 14:38:26 +00:00
cegger
d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
macallan
08f5b97b95 clear screen on attach 2009-05-05 23:55:04 +00:00
macallan
c7d8ba2450 Add wscons support 2009-04-23 20:46:49 +00:00
tsutsui
d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
macallan
9757abaa0c use sparc_bus_map_large() to map the I128 framebuffer 2009-04-16 17:00:39 +00:00
tsutsui
bd78a7580b Don't immediately switch UTP/AUI ports on lost carrior.
It may take a while for modern switches to set 10baseT media.
2009-04-12 11:10:28 +00:00