Commit Graph

87 Commits

Author SHA1 Message Date
marcus afc21ff9d1 mulaw/alaw timing bugfix from Izumi Tsutsui. 2003-08-25 18:48:31 +00:00
marcus 9010cdf728 LINEAR and LINEAR_LE need to be interchangeable (fixes 8bit unsigned bug). 2003-08-24 19:52:46 +00:00
marcus f436d156b4 Added some encodings which were supported but not listed. 2003-08-24 19:44:29 +00:00
marcus 7973c3321c Added AICA sound driver contributed by Ryo Shimizu. 2003-08-24 17:33:27 +00:00
lukem 141727280b __KERNEL_RCSID() 2003-07-15 01:31:38 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
tsutsui 9c5dcb82ac Cleanup G2_LOCK/G2_UNLOCK macros per discussion on port-dreamcast:
- Use _cpu_intr_suspend()/_cpu_intr_resume() in G2_LOCK/G2_UNLOCK macros
  rather than _cpu_exception_suspend()/_cpu_exception_resume().
  TLB miss exceptions could happen on accessing buffer, but it will never
  block G2bus cycle anyway.
- Restore the previous SR.IMASK value in G2_UNLOCK().
- some misc cosmetics.

Should fix spontaneous reboots by "ping -s 8192 host" on the LAN Adapter.
2003-03-02 04:23:16 +00:00
itohy b1f5bd8e4f constify command buffer 2003-02-15 02:36:52 +00:00
itohy 453c51f214 Tweak unit ping (removal detect) code to work around problems
with some 3rd party memory cards.
2003-02-11 01:21:46 +00:00
tsutsui 6aea963ed9 It seems the LAN Adapter on dreamcast actually uses slow 150ns SRAM,
so handle it properly by an additional quirk flag in sc_flags.

The problem was reported by Pat Wendorf on port-dreamcast, and
the fix was suggested and confirmed by Christian Groessler.
2003-02-05 12:03:54 +00:00
tsutsui c1acc622c0 Check chip type first in mbe_g2_detect() to reduce unexpected device access
in mbe_g2_match() when the device does not exist.
2003-01-04 18:10:18 +00:00
thorpej 1132348b98 Use aprint_normal() for cfprint routines. 2003-01-01 01:24:19 +00:00
tsutsui fbc8e4748a Add support for SEGA LAN Adapter, MB86967 based Ethernet adapter.
Based on the patches in port-dreamcast/17493 by Christian Groessler,
with several modification by me.
2002-12-27 11:43:38 +00:00
tsutsui c680050521 Add a set of bus_space(9) functions for g2bus devices with
sparse address space. This is required for SEGA LAN adapter support.
2002-12-27 11:34:05 +00:00
tsutsui 1bfd32c4f3 Fix pasto in comment. 2002-12-23 09:59:25 +00:00
itohy 6e91aedc2d Use use WSMOUSE_TYPE_MAPLE.
Enable periodic GETCOND only if the mouse is enabled.
2002-12-10 13:19:10 +00:00
itohy 9cd48c7572 Use WSKBD_TYPE_MAPLE. 2002-12-10 13:18:04 +00:00
itohy 3e8cfbbf05 minor changes
fix typo
2002-12-06 16:03:52 +00:00
itohy 0d63741702 The buf structure (<sys/buf.h>) is not flexible since it is designed for disks,
and use home-grown buffer structure.

Handle display orientation (normal or upside-down) appropriately
by making use of devinfo of base device.
If the LCD is at an expansion slot of a base unit
whose di_connector_direction == MAPLE_CONN_TOP,
the driver automatically rotates the bitmap.
You need not rotate the bitmap before passing to the driver (spec change).
2002-12-06 15:59:53 +00:00
itohy f972b5535e Pass devinfo of the base device (subunit == 0 of the same port)
to sub-drivers.
2002-12-06 15:49:31 +00:00
itohy 8f6d7bef0a The value of di_connector_direction is 1 for Dreamcast Gun, 0 for
other devices.  It looks like that the value represents the direction
of expansion units (Visual Memory, etc.).
Add definition of the directions.
2002-12-06 15:47:22 +00:00
itohy 51cd3ce6c9 Maple Bus monochrome LCD device driver
Reference: US Patent 6,338,105
2002-11-15 14:10:51 +00:00
itohy 2c105f37e1 Maple Bus storage device driver
Reference: US Patent 6,338,105
2002-11-15 14:10:12 +00:00
itohy 154b121f4b New Maple Bus driver
- interrupt driven
 - support hot swapping
 - sub-drivers can send commands
2002-11-15 13:30:21 +00:00
itohy 7710d527c5 Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
	IRL9	IPL_BIO
	IRL11	IPL_NET
	IRL13	IPL_TTY
2002-11-15 13:29:26 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
thorpej bd5bb4652b Add trailing ; to CFATTACH_DECL 2002-10-02 15:45:10 +00:00
itohy d64dac0bb7 ../../../../arch/dreamcast/dev/g2/gapspci.c:62: macro `CFATTACH_DECL' used with only 5 args 2002-10-02 09:49:38 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
thorpej c4cbfcf060 Use CFATTACH_DECL(). 2002-10-01 02:54:11 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej bb34bc8caa When in a match routine, the cfdata we're passed always references
our own cfdriver, so don't bother comparing the names, since they
will always match.
2002-09-27 02:16:28 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
hannken 69d849b171 Convert to new device buffer queue interface.
Approved by: Marcus Comstedt <marcus@netbsd.org>
2002-07-27 11:07:35 +00:00
tsutsui 0fe49daba1 Add keydescs for swapctrlcaps, and clean up formating. 2002-07-05 14:29:06 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
drochner d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
thorpej 204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
thorpej e19aab3751 Implement pci_decompose_tag(). 2002-05-15 17:09:04 +00:00
thorpej b8e4c037bd De-obfuscate somewhat; define and use register bit constants, etc. 2002-05-03 04:42:08 +00:00
uch b095a0d0c5 ANSIfy, KNF 2002-03-25 18:59:39 +00:00
uch e8300f3659 adapted to new interrupt code and shb changes. 2002-03-24 18:21:08 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
ad b89e39b91a Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
2002-03-13 15:05:13 +00:00
uch 90baa8b206 SR related parts moved to psl.h. cpufunc.h segments.h are removed.
kernel mode checking is only SR.MD. no check stack pointer.
2002-03-03 14:31:24 +00:00
uch 1bdc7cc5ca Clean up functions
disable_intr, enable_intr, disable_interrupt, enable_interrupt,
disable_ext_intr, enable_ext_intr.
New functions:
for external interrupt:
_cpu_intr_suspend and _cpu_intr_resume.
for exception:
_cpu_exception_suspend and _cpu_exception_resume.
2002-02-19 17:21:18 +00:00
atatat 239aeafb2e Fixes to eliminate some compiler complaints, such as:
suggest explicit braces to avoid ambiguous `else'
suggest parentheses around assignment used as truth value
2001-12-04 15:27:35 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
thorpej b42556773f Driver for the Dreamcast mouse, based on the programming info
on Marcus's web site.

Not yet thoroughly tested, but does appear to generate events
that look okay.
2001-09-06 22:07:39 +00:00