Commit Graph

82 Commits

Author SHA1 Message Date
matt a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
tsutsui ec0d5b6338 Use TAILQ_* macro. 2005-01-22 11:08:18 +00:00
tsutsui 7310abde32 Make all intr_mask value types uint32_t rather than int, u_int,
or unsigned etc.
2005-01-22 08:43:02 +00:00
tsutsui 66f3c84b7a bzero -> memset 2005-01-22 07:44:33 +00:00
tsutsui 6f188aed1d Use M_ZERO flag for malloc(9) and remove bzero(9). 2005-01-22 07:44:08 +00:00
tsutsui 7fe2a5a003 - remove __P()
- use ANSI function decls
- u_intNN_t -> uintNN_t
- some KNF
2005-01-22 07:35:33 +00:00
tsutsui a8633fb248 Unload xfer dmamap in asc_dma_stop(). 2005-01-22 07:32:05 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
drochner cf8b697c65 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:06:57 +00:00
bjh21 dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
tsutsui 18b32ac5ba Switch arc to use MI mc146818 tod driver. 2003-10-29 18:17:49 +00:00
tsutsui e6a659ad96 The 6th argument to extent_create() is size_t, don't pass NULL in it. 2003-10-21 16:19:04 +00:00
tsutsui cdb8e31d33 - Count jazzio interrupts with evcnt(9).
- Misc cleanup.
2003-10-08 18:12:24 +00:00
tsutsui 143adabe3d If BUS_DMA_ALLOCNOW is specified with nsegments > 1
in jazz_bus_dmamap_create() disable BUS_DMA_ALLOCNOW for now
rather than return ENOMEM.  Required by some PCI devices (like pciide(4)).
XXX needs re-think how BUS_DMA_ALLOCNOW should be handled.
XXX (we should use another flag for the jazz internal DMAC?)
2003-08-14 09:35:26 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
lukem a418360342 __KERNEL_RCSID() 2003-07-15 00:04:39 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner 1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
tsutsui 30f71213c8 Remove unused file since asc.c switched to MI ncr53c9x. 2003-05-18 04:28:33 +00:00
tsutsui ff776a0f93 Remove (deprecated) DMA functions in jazz/dma.c which are no longer used.
jazz/dma.h now only contains DMAC register definitions.
2003-05-04 10:07:50 +00:00
tsutsui 0bcf529e7f Rewrite jazzio asc SCSI driver to use MI ncr53c9x and bus_dma(9) with
BUS_DMA_ALLOCNOW flag for jazzio bus DMAC.

Tested on Soda's NEC Image RISCstation (which is an OEM of Acer PICA),
and should fix port-arc/13388.
2003-05-04 10:01:19 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
tsutsui 8e19dfb2ae Remove register declarations. 2003-04-27 17:05:55 +00:00
tsutsui f640b8f9fc Add MD attachment of the 53c700 SCSI controller on arc jazzio. 2003-04-06 09:55:50 +00:00
tsutsui 3e78f52de4 Switch fdc_jazzio.c to use bus_dma(9) with BUS_DMA_ALLOCNOW flag
and to use bus_space(9) for jazzio DMAC access.
2003-02-10 15:19:44 +00:00
tsutsui 438b17bf15 Changes needed to bus_dma'fy fdc_jazzio.c and asc.c:
Modify jazz_bus_dmamap_create() to allocate jazz dmatlb
 if BUS_DMA_ALLOCNOW flag is specified and nsegment is 1.
 In this case, jazz_bus_dmamap_load() just call
 jazz_dmatlb_map_va() to map CPU VA space into jazzio
 VA space with pre-allocated TLB entries (like dma.c does).
 bus_dmamap_load_{mbuf,uio,raw} functions are not allowed
 if dmamap is created with BUS_DMA_ALLOCNOW flag.
 (i.e. ALLOCNOW is valid only for linear buffers.)
2003-02-10 14:58:37 +00:00
tsutsui f80f1b2213 Call jazz_dmatlb_init() from jazzioattach() directly and
remove picaDmaInit() in dma.c.
2003-02-10 11:43:28 +00:00
tsutsui eb506d3c00 Fix further printf format warnings for FD_DEBUG, in the wake of daddr_t
having changed.
2003-01-26 06:16:31 +00:00
tsutsui 61924d6eac Use PRId64 from <machine/int_fmtio.h> in printf format for daddr_t.
(Eventually jazzio would be moved into MI place :-)
2003-01-25 15:43:11 +00:00
tsutsui 59dafa2c6b TAB/space cleanup. 2003-01-19 10:06:12 +00:00
tsutsui 55b4104918 Fix pasto. 2003-01-19 03:36:58 +00:00
thorpej 23bc250391 Merge the nathanw_sa branch. 2003-01-17 21:55:23 +00:00
thorpej aec1389b37 Use aprint_normal for cfprint routines. 2003-01-01 00:32:04 +00:00
tsutsui da446ea2da Change device names in struct pica_dev to match ones used by ARC BIOS.
All of these parameters should be obtained from ARC BIOS, and we will
switch to the way in future. As per discussion with soda.
2002-12-28 16:25:38 +00:00
tsutsui a92570f14c As per discussion with soda, all EISA based Jazz machines seem to require
the same method to access TOD clock, so move chipset-dependent mcclock
routines to appropriate files.

This should also fix Express RISCserver and RISCserver2200 (aka R96) support
which has been broken since "struct platform" was introduced.
2002-12-09 13:36:26 +00:00
tsutsui 40ca5f0895 - Add definitions RD_94_[PVS]_EISA_{IO,MEM} in rd94.h.
- J96A (Express5800/240 R4400 EISA) requires different method to access
  todclock from other NEC machines (it's similar with magnum),
  so handle it in p_nec_j96a.c.

Now my NEC Express5800/240 works. (and now I can test 53c700 SCSI.)
2002-12-07 13:09:46 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +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 c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +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 0de052bd51 Convert to new device buffer queue interface.
Approved by: Noriyuki Soda <soda@netbsd.org>
2002-07-31 18:48:17 +00:00
tsutsui aa1cd5db22 vga_common_attach() now seems to take quirks arg.
BTW, why don't we put it into vc_quirks member of vga_softc directly
in MD attachments?
2002-07-26 12:57:38 +00:00
thorpej af66038f73 Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
2001-11-14 18:15:10 +00:00
chs 80373b7e54 don't depend on other headers to include sys/proc.h for us. 2001-09-28 11:59:51 +00:00
thorpej b9fffe1967 Allow bus front-end to provide both ioctl and mmap entry points,
and also the wsdisplay type.

Based on changes from Simon Burge <simonb@wasabisystems.com>.
2001-09-14 01:10:11 +00:00
tsutsui e4258b142d Remove sn_dma_init() for the old Sonic driver. 2001-07-24 16:26:53 +00:00
jdolecek 000f85917b Since ~all pckbc_poll_data1() callers had the appropriate pckbc
tag handy and we are going to need more of it in pckbc_poll_data1() soon,
change pckbc_poll_data1() to accept it as first arg. iot, ioh_d, ioh_c are
no longer passed separately. Use fabricated pckbc tag for calls from
arch/arc/jazz/pckbc_jazzio.c and dev/isa/pckbc_isa.c.
2001-07-23 21:03:19 +00:00