Commit Graph

120 Commits

Author SHA1 Message Date
tsutsui
8d17a1295b Split softc/device_t for oosiop(4) and osiop(4), with misc cosmetic changes. 2008-03-29 09:11:35 +00:00
tsutsui
4090172b20 Don't forget to initialize sc_dev. 2008-03-29 05:42:45 +00:00
tsutsui
048fb884fc Split device_t and softc for MI mc146818 clock,
and other related misc cosmetics.
2008-03-28 19:05:49 +00:00
cube
a22d8d4abb Split device_t and softc for pckbc(4) and its attachments. 2008-03-15 13:23:24 +00:00
cube
d293cfca1a Split device_t and softc for all attachments of vga(4). 2008-03-14 22:12:08 +00:00
tsutsui
4f59bf75cb Fix spl(9) botch in cpu_intr() on arc:
Don't enable unhandled interrupts before all interrupts are processed,
and also change all interrupt handlers to return processed MIPS_INT_MASK
values, rather than masked values of them.
2008-03-14 16:43:27 +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
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
tsutsui
db09bcc34f Move todr_attach(9) calls from each MD attachment to MI mc146818_attach(). 2008-01-10 15:17:39 +00:00
ad
c29520cb1a Fix includes. 2008-01-05 00:31:50 +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
ad
2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
he
e448d82109 Change one overlooked label reference from "bad" to "done". 2007-07-30 14:32:40 +00:00
ad
66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +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
tsutsui
d851aeff1e Set DCR_TFT[01] and DCR_RFT[01] bits of DCR register for TX/RX thresholds
in each MD attachment since optimized values could be machine dependent.
2007-06-08 17:08:46 +00:00
he
881084c9ed Well, as pointed out by is@ for the amiga port, the added indirection
is wrong.  Restore previous behaviour, and add the now appropriate cast.
2007-03-11 17:39:02 +00:00
he
582dc91458 More fixes after the caddr_t removal.
Mostly cast to char* for pointer arithmetic,
but also one missing indirection, and one "void *v, x;" fix.
2007-03-06 13:54:44 +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
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
0aa05e92ff Remove unused struct abus stuff. 2006-06-25 16:46:15 +00:00
tsutsui
2a8a21a021 Misc minor cleanup for arc interrupt handlers:
- always enable options MIPS3_ENABLE_CLOCK_INTR and just clear the compare
  register in cpu_intr() to make CLKF_BASE() works
  properly
- prepare only possible number of cpu_inttab
- use macro for interrupt priority number passed to arc_set_intr()
  to avoid confusion
- merge arc_hardware_intr() into cpu_intr()
- check independent timer interrupt first in cpu_intr()
- tweak MIPS_SR_INT_IE before calling hardclock timer handlers so that
  spllowersoftclock(9) will be invoked properly in hardclock(9)
- reenable interrupt for timer in cpu_intr() rather than each timer handlers

okay'ed by soda.

Note the real fix is to make CLKF_BASE() check all independent
interrupt sources including jazz and isa devices.
2006-06-24 03:50:38 +00:00
tsutsui
ec9a7dcbfd - don't forget to set _dm_vmspace in BUS_DMA_ALLOCNOW case
- also set ARC_DMAMAP_COHERENT hint in the case if buf is in KSEG1
  (I'm not sure if ALLOCNOW is worth for linear buffer, i.e. nsegs=1 case)
2006-06-15 17:06:19 +00:00
tsutsui
c51f229f25 Detect FAS216 chip on some Olivetti machines. (untested)
Based on a patch for old asc driver from Maki Kato:
http://mail-index.netbsd.org/port-arc/2000/10/07/0003.html
2006-04-15 12:41:45 +00:00
tsutsui
c234c43a71 Include "ioconf.h" rather than declare struct cfdriver foo_cd in each file. 2006-04-15 08:49:47 +00:00
blymn
3c0adb7d99 Make i/o statistics collection more generic, include tape drives and
nfs mounts in the set of devices that statistics will be reported on.
2006-04-14 13:09:05 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
thorpej
458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tsutsui
d9a0be54d3 Explicitly enable interrupts before softintr is handled as noted
in the TODO file. At least this fixes "sn0: receive buffers exhausted"
messages on my NEC-JC94.

XXX: does anyone know what "Dont reenable" comment means, which was
XXX: there since initial import of pica (not arc).
2005-11-15 15:07:36 +00:00
tsutsui
a452ef42e4 constify 2005-11-15 12:12:21 +00:00
tsutsui
5c3034f5b3 - <machine/param.h> says:
"XXX Maxphys temporary changed to 32K while SCSI driver is fixed."
  I (and soda) don't know what the "SCSI driver" is, but add local
  asc_minphys() to limit max xfer size only for asc.c for now.
- According to old asc.c driver, DMA_START() is called before NCR_CMD_DMA
  command. I'm not sure which DMAC or ASC should be started first, but
  move DMA command from asc_dma_go() to asc_dma_setup().
- Disable NCR_F_DMASELECT (which allows DMA xfer for select command)
  since it caused some problem on PICA.

Now gxemul-0.3.6.2 reaches mountroot() sd0 (but can't exec /sbin/init yet).
2005-11-06 11:09:17 +00:00
tsutsui
fdb3b14bb4 Adapt arc port to the new MI mips3 wired map functions.
Tested on NEC-RD94 with several PCI and jazzio devices.
2005-11-05 09:50:50 +00:00
yamt
aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
tsutsui
54713c08ec Count jazzio timer interrupts by evcnt(9). 2005-08-20 17:58:49 +00:00
tsutsui
09ae8cb89e - constify
- remove arg names from prototypes
2005-06-03 12:31:38 +00:00
tsutsui
da084245a6 Add const. 2005-06-03 12:30:53 +00:00
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