head	1.3;
access;
symbols
	perseant-exfatfs-base-20250801:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.100
	perseant-exfatfs-base:1.3
	bouyer-sunxi-drm:1.3.0.98
	bouyer-sunxi-drm-base:1.3
	cjep_sun2x:1.3.0.96
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	cjep_staticlib_x:1.3.0.94
	cjep_staticlib_x-base:1.3
	thorpej-futex-base:1.3
	bouyer-xenpvh-base2:1.3
	phil-wifi-20200421:1.3
	bouyer-xenpvh-base1:1.3
	phil-wifi-20200411:1.3
	bouyer-xenpvh:1.3.0.92
	bouyer-xenpvh-base:1.3
	phil-wifi-20200406:1.3
	ad-namecache-base3:1.3
	ad-namecache-base2:1.3
	ad-namecache-base1:1.3
	ad-namecache:1.3.0.90
	ad-namecache-base:1.3
	isaki-audio2:1.3.0.88
	isaki-audio2-base:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	pgoyette-compat-0728:1.3
	pgoyette-compat-0625:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	pgoyette-compat:1.3.0.86
	pgoyette-compat-base:1.3
	perseant-stdc-iso10646:1.3.0.84
	perseant-stdc-iso10646-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.82
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	bouyer-socketcan:1.3.0.80
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	pgoyette-localcount-20161104:1.3
	localcount-20160914:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.78
	pgoyette-localcount-base:1.3
	netbsd-5-2-3-RELEASE:1.3
	netbsd-5-1-5-RELEASE:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.3
	tls-earlyentropy:1.3.0.76
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-5-2-2-RELEASE:1.3
	netbsd-5-1-4-RELEASE:1.3
	netbsd-5-2-1-RELEASE:1.3
	netbsd-5-1-3-RELEASE:1.3
	rmind-smpnet-nbase:1.3
	rmind-smpnet:1.3.0.72
	rmind-smpnet-base:1.3
	agc-symver:1.3.0.74
	agc-symver-base:1.3
	tls-maxphys-base:1.3
	yamt-pagecache-base8:1.3
	netbsd-5-2:1.3.0.70
	yamt-pagecache-base7:1.3
	netbsd-5-2-RELEASE:1.3
	netbsd-5-2-RC1:1.3
	yamt-pagecache-base6:1.3
	yamt-pagecache-base5:1.3
	yamt-pagecache-base4:1.3
	netbsd-5-1-2-RELEASE:1.3
	netbsd-5-1-1-RELEASE:1.3
	jmcneill-usbmp:1.3.0.68
	jmcneill-usbmp-base:1.3
	jmcneill-audiomp3:1.3.0.66
	jmcneill-audiomp3-base:1.3
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.64
	yamt-pagecache-base:1.3
	rmind-uvmplock-nbase:1.3
	jym-xensuspend-nbase:1.3
	bouyer-quota2-nbase:1.3
	bouyer-quota2:1.3.0.62
	bouyer-quota2-base:1.3
	jruoho-x86intr:1.3.0.60
	jruoho-x86intr-base:1.3
	matt-nb5-pq3:1.3.0.58
	matt-nb5-pq3-base:1.3
	netbsd-5-1:1.3.0.56
	netbsd-5-1-RELEASE:1.3
	yamt-nfs-mp-base11:1.3
	netbsd-5-1-RC4:1.3
	uebayasi-xip-base2:1.3
	yamt-nfs-mp-base10:1.3
	netbsd-5-1-RC3:1.3
	netbsd-5-1-RC2:1.3
	netbsd-5-1-RC1:1.3
	rmind-uvmplock:1.3.0.54
	rmind-uvmplock-base:1.3
	yamt-nfs-mp-base9:1.3
	uebayasi-xip:1.3.0.52
	uebayasi-xip-base:1.3
	netbsd-5-0-2-RELEASE:1.3
	yamt-nfs-mp-base8:1.3
	yamt-nfs-mp-base7:1.3
	netbsd-5-0-1-RELEASE:1.3
	jymxensuspend-base:1.3
	yamt-nfs-mp-base6:1.3
	yamt-nfs-mp-base5:1.3
	yamt-nfs-mp-base4:1.3
	yamt-nfs-mp-base3:1.3
	netbsd-5-0:1.3.0.50
	netbsd-5-0-RELEASE:1.3
	netbsd-5-0-RC4:1.3
	netbsd-5-0-RC3:1.3
	netbsd-5-0-RC2:1.3
	jym-xensuspend:1.3.0.48
	jym-xensuspend-base:1.3
	netbsd-5-0-RC1:1.3
	haad-dm-base2:1.3
	haad-nbase2:1.3
	ad-audiomp2:1.3.0.46
	ad-audiomp2-base:1.3
	netbsd-5:1.3.0.44
	netbsd-5-base:1.3
	haad-dm-base1:1.3
	haad-dm:1.3.0.42
	haad-dm-base:1.3
	simonb-wapbl-nbase:1.3
	yamt-pf42-base4:1.3
	simonb-wapbl:1.3.0.40
	simonb-wapbl-base:1.3
	yamt-pf42-base3:1.3
	hpcarm-cleanup-nbase:1.3
	yamt-pf42-base2:1.3
	yamt-nfs-mp-base2:1.3
	yamt-nfs-mp:1.3.0.38
	yamt-nfs-mp-base:1.3
	yamt-pf42:1.3.0.36
	yamt-pf42-base:1.3
	ad-socklock-base1:1.3
	yamt-lazymbuf-base15:1.3
	yamt-lazymbuf-base14:1.3
	keiichi-mipv6-nbase:1.3
	mjf-devfs2:1.3.0.34
	mjf-devfs2-base:1.3
	keiichi-mipv6:1.3.0.32
	keiichi-mipv6-base:1.3
	bouyer-xeni386-merge1:1.3
	vmlocking2-base3:1.3
	bouyer-xeni386-nbase:1.3
	yamt-kmem-base3:1.3
	cube-autoconf:1.3.0.30
	cube-autoconf-base:1.3
	yamt-kmem-base2:1.3
	bouyer-xeni386:1.3.0.28
	bouyer-xeni386-base:1.3
	yamt-kmem:1.3.0.26
	yamt-kmem-base:1.3
	vmlocking2-base2:1.3
	reinoud-bufcleanup-nbase:1.3
	vmlocking2:1.3.0.24
	vmlocking2-base1:1.3
	jmcneill-base:1.3
	mjf-devfs:1.3.0.22
	mjf-devfs-base:1.3
	bouyer-xenamd64-base2:1.3
	vmlocking-nbase:1.3
	yamt-x86pmap-base4:1.3
	bouyer-xenamd64:1.3.0.20
	bouyer-xenamd64-base:1.3
	yamt-x86pmap-base3:1.3
	yamt-x86pmap-base2:1.3
	yamt-x86pmap:1.3.0.18
	yamt-x86pmap-base:1.3
	jmcneill-pm:1.3.0.16
	jmcneill-pm-base:1.3
	hpcarm-cleanup:1.3.0.14
	hpcarm-cleanup-base:1.3
	mjf-ufs-trans-base:1.3
	netbsd-3-1-1-RELEASE:1.2
	netbsd-3-0-3-RELEASE:1.2
	yamt-idlelwp-base8:1.3
	ppcoea-renovation:1.3.0.12
	ppcoea-renovation-base:1.3
	reinoud-bufcleanup-base:1.3
	vmlocking:1.3.0.10
	vmlocking-base:1.3
	ad-audiomp:1.3.0.8
	ad-audiomp-base:1.3
	yamt-idlelwp:1.3.0.6
	post-newlock2-merge:1.3
	newlock2-nbase:1.3
	yamt-splraiseipl-base5:1.3
	yamt-splraiseipl-base4:1.3
	yamt-splraiseipl-base3:1.3
	abandoned-netbsd-4-base:1.2
	abandoned-netbsd-4:1.2.0.64
	netbsd-3-1:1.2.0.66
	netbsd-3-1-RELEASE:1.2
	netbsd-3-0-2-RELEASE:1.2
	yamt-splraiseipl-base2:1.3
	netbsd-3-1-RC4:1.2
	yamt-splraiseipl:1.3.0.4
	yamt-splraiseipl-base:1.3
	netbsd-3-1-RC3:1.2
	newlock2:1.3.0.2
	newlock2-base:1.3
	yamt-pdpolicy-base8:1.3
	netbsd-3-1-RC2:1.2
	netbsd-3-1-RC1:1.2
	yamt-pdpolicy-base7:1.2
	yamt-pdpolicy-base6:1.2
	chap-midi-nbase:1.2
	netbsd-3-0-1-RELEASE:1.2
	gdamore-uart:1.2.0.62
	gdamore-uart-base:1.2
	simonb-timcounters-final:1.2
	yamt-pdpolicy-base5:1.2
	chap-midi:1.2.0.60
	chap-midi-base:1.2
	yamt-pdpolicy-base4:1.2
	yamt-pdpolicy-base3:1.2
	peter-altq-base:1.2
	peter-altq:1.2.0.58
	yamt-pdpolicy-base2:1.2
	elad-kernelauth-base:1.2
	elad-kernelauth:1.2.0.56
	yamt-pdpolicy:1.2.0.54
	yamt-pdpolicy-base:1.2
	yamt-uio_vmspace-base5:1.2
	simonb-timecounters:1.2.0.52
	simonb-timecounters-base:1.2
	rpaulo-netinet-merge-pcb:1.2.0.50
	rpaulo-netinet-merge-pcb-base:1.3
	yamt-uio_vmspace:1.2.0.48
	netbsd-3-0:1.2.0.46
	netbsd-3-0-RELEASE:1.2
	netbsd-3-0-RC6:1.2
	yamt-readahead-base3:1.2
	netbsd-3-0-RC5:1.2
	netbsd-3-0-RC4:1.2
	netbsd-3-0-RC3:1.2
	yamt-readahead-base2:1.2
	netbsd-3-0-RC2:1.2
	yamt-readahead-pervnode:1.2
	yamt-readahead-perfile:1.2
	yamt-readahead:1.2.0.44
	yamt-readahead-base:1.2
	netbsd-3-0-RC1:1.2
	yamt-vop-base3:1.2
	netbsd-2-0-3-RELEASE:1.2
	netbsd-2-1:1.2.0.42
	yamt-vop-base2:1.2
	thorpej-vnode-attr:1.2.0.40
	thorpej-vnode-attr-base:1.2
	netbsd-2-1-RELEASE:1.2
	yamt-vop:1.2.0.38
	yamt-vop-base:1.2
	netbsd-2-1-RC6:1.2
	netbsd-2-1-RC5:1.2
	netbsd-2-1-RC4:1.2
	netbsd-2-1-RC3:1.2
	netbsd-2-1-RC2:1.2
	netbsd-2-1-RC1:1.2
	yamt-lazymbuf:1.2.0.36
	yamt-km-base4:1.2
	netbsd-2-0-2-RELEASE:1.2
	yamt-km-base3:1.2
	netbsd-3:1.2.0.34
	netbsd-3-base:1.2
	yamt-km-base2:1.2
	yamt-km:1.2.0.30
	yamt-km-base:1.2
	kent-audio2:1.2.0.28
	kent-audio2-base:1.2
	netbsd-2-0-1-RELEASE:1.2
	kent-audio1-beforemerge:1.2
	netbsd-2:1.2.0.26
	netbsd-2-base:1.2
	kent-audio1:1.2.0.24
	kent-audio1-base:1.2
	netbsd-2-0-RELEASE:1.2
	netbsd-2-0-RC5:1.2
	netbsd-2-0-RC4:1.2
	netbsd-2-0-RC3:1.2
	netbsd-2-0-RC2:1.2
	netbsd-2-0-RC1:1.2
	netbsd-2-0:1.2.0.22
	netbsd-2-0-base:1.2
	netbsd-1-6-PATCH002-RELEASE:1.2
	netbsd-1-6-PATCH002:1.2
	netbsd-1-6-PATCH002-RC4:1.2
	netbsd-1-6-PATCH002-RC3:1.2
	netbsd-1-6-PATCH002-RC2:1.2
	netbsd-1-6-PATCH002-RC1:1.2
	ktrace-lwp:1.2.0.20
	ktrace-lwp-base:1.2
	netbsd-1-6-PATCH001:1.2
	netbsd-1-6-PATCH001-RELEASE:1.2
	netbsd-1-6-PATCH001-RC3:1.2
	netbsd-1-6-PATCH001-RC2:1.2
	netbsd-1-6-PATCH001-RC1:1.2
	nathanw_sa_end:1.1.4.2
	nathanw_sa_before_merge:1.2
	fvdl_fs64_base:1.2
	gmcgarry_ctxsw:1.2.0.18
	gmcgarry_ctxsw_base:1.2
	gmcgarry_ucred:1.2.0.16
	gmcgarry_ucred_base:1.2
	nathanw_sa_base:1.2
	kqueue-aftermerge:1.2
	kqueue-beforemerge:1.2
	bjh21-hydra:1.2.0.14
	bjh21-hydra-base:1.2
	netbsd-1-6-RELEASE:1.2
	netbsd-1-6-RC3:1.2
	netbsd-1-6-RC2:1.2
	netbsd-1-6-RC1:1.2
	netbsd-1-6:1.2.0.12
	netbsd-1-6-base:1.2
	gehenna-devsw:1.2.0.10
	gehenna-devsw-base:1.2
	eeh-devprop:1.2.0.8
	eeh-devprop-base:1.2
	newlock:1.2.0.6
	newlock-base:1.2
	ifpoll-base:1.2
	kqueue-base:1.2
	kqueue:1.2.0.2
	nathanw_sa:1.1.0.4
	thorpej-mips-cache:1.1.0.2
	thorpej-mips-cache-base:1.1
	thorpej-devvp-base3:1.1;
locks; strict;
comment	@# @;


1.3
date	2006.08.14.22.04.30;	author bjh21;	state dead;
branches;
next	1.2;

1.2
date	2001.11.27.01.03.53;	author thorpej;	state Exp;
branches
	1.2.2.1
	1.2.36.1
	1.2.50.1
	1.2.54.1;
next	1.1;

1.1
date	2001.10.05.22.27.43;	author reinoud;	state Exp;
branches
	1.1.4.1;
next	;

1.2.2.1
date	2001.11.27.01.03.53;	author thorpej;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2002.01.10.19.38.20;	author thorpej;	state Exp;
branches;
next	;

1.2.36.1
date	2006.12.30.20.45.33;	author yamt;	state dead;
branches;
next	;

1.2.50.1
date	2006.09.09.02.37.59;	author rpaulo;	state dead;
branches;
next	;

1.2.54.1
date	2006.09.03.15.22.42;	author yamt;	state dead;
branches;
next	;

1.1.4.1
date	2001.10.05.22.27.43;	author nathanw;	state dead;
branches;
next	1.1.4.2;

1.1.4.2
date	2002.01.08.00.23.16;	author nathanw;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Finally remove the old, pre-wscons, acorn32 console code.  This dated back
to RiscBSD and had been lurking in dark corners scaring people (mostly me)
for far too long.  It will be missed, but not much, and I hope we can clear
up any fallout before 5.0.

While I'm in the area, also remove rpckbd(4), since pckbd(4) has
been supported on acorn32 for ages.
@
text
@
/************************************************************
 * OLD STUFF                                                *
 ************************************************************/


/* XXX commented out XXX */
#if 0
int
vidcrender_attach(vc, parent, self, aux)
	struct vconsole *vc;
	struct device *parent;
	struct device *self;
	void *aux;
{
	vidc_cursor_init ( vc );
	vidcrender_flash_go ( vc );
	return 0;
}


int
vidcrender_flash_go(void)
{
	static int irqclaimed = 0;
	static int lock=0;
	if (lock==1)
		return -1;
	lock=0;

	if (!irqclaimed) {
		cursor_ih.ih_func = vidcrender_cursorintr;
		cursor_ih.ih_arg = vc;		/* argument ... needed? */
		cursor_ih.ih_level = IPL_TTY;
		cursor_ih.ih_name = "vsync";
		irq_claim ( IRQ_FLYBACK, &cursor_ih );
		irqclaimed = 1;
	}

	cursor_init = 0;
	return 0;
}
#endif /* XXX commented out XXX */


/* XXX commented out ... dunno if nessisary XXX */
#if 0
#ifdef NICE_UPDATE
static int need_update = 0;

void
vidcrender_updatecursor(arg)
	void *arg;
{
	struct vconsole *vc = vconsole_current;

	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return;
}

int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
    timeout ( vidcrender_updatecursor, NULL, 20 );
    return 0;
}

#else

static int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return (0);
}

#endif
#endif /* XXX comment out XXX */

/* XXX comment out XXX */
#if 0
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
/*#include <sys/malloc.h>*/
#include <sys/ioctl.h>
#include <sys/conf.h>
#include <sys/tty.h>
#include <sys/map.h>
#include <sys/proc.h>
/*#include <sys/user.h>*/
#include <sys/syslog.h>
/*#include <sys/resourcevar.h>*/

#include <machine/cpu.h>
#include <machine/param.h>
/*#include <machine/katelib.h>*/
/*#include <machine/cpu.h>*/
/*#include <machine/bootconfig.h>*/
/*#include <machine/iomd.h>*/
/*#include <machine/intr.h>*/
/*#include <machine/pmap.h>*/
#include <machine/vidc.h>
#include <machine/vconsole.h>


/* extern struct cfdriver vidcconsole_cd; */

int
vidcvideoopen(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	struct vconsole vconsole_new;
	int unit = minor(dev);
	int s;

	if (unit >= vidcconsole_cd.cd_ndevs)
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
/*	if (sc->sc_opened) {
		(void)splx(s);
		return(EBUSY);
	}*/
	++sc->sc_opened;
	(void)splx(s);

	if (sc->sc_opened == 1) {
		vconsole_new = *vconsole_default;
		vconsole_new.render_engine = &vidcrender;
		vconsole_spawn_re (
		makedev ( physcon_major, 64 + minor(dev) ),
		    &vconsole_new );
	} else {
		log(LOG_WARNING, "Multiple open of/dev/vidcconsole0 by proc %d\n", p->p_pid);
	}

	return 0;
}

int
vidcconsoleclose(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	int unit = minor(dev);
	int s;

	if ( unit >= vidcconsole_cd.cd_ndevs )
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
	--sc->sc_opened;
	(void)splx(s);

	return 0;
}

extern int physconioctl __P((dev_t, int, caddr_t, int,	struct proc *));

int
vidcconsoleioctl(dev, cmd, data, flag, p)
	dev_t dev;
	int cmd;
	caddr_t data;
	int flag;
	struct proc *p;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconioctl(dev, cmd, data, flag, p));
}

extern paddr_t physconmmap __P((dev_t, off_t, int));

paddr_t
vidcconsolemmap(dev, offset, prot)
	dev_t dev;
	off_t offset;
	int prot;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconmmap(dev, offset, prot));
}
#endif /* XXX comment out XXX */

@


1.2
log
@Use <machine/intr.h> rather than <machine/irqhandler.h>
@
text
@@


1.2.2.1
log
@file vidc20config.c.old-stuff was added on branch kqueue on 2002-01-10 19:38:20 +0000
@
text
@d1 207
@


1.2.2.2
log
@Sync kqueue branch with -current.
@
text
@a0 207

/************************************************************
 * OLD STUFF                                                *
 ************************************************************/


/* XXX commented out XXX */
#if 0
int
vidcrender_attach(vc, parent, self, aux)
	struct vconsole *vc;
	struct device *parent;
	struct device *self;
	void *aux;
{
	vidc_cursor_init ( vc );
	vidcrender_flash_go ( vc );
	return 0;
}


int
vidcrender_flash_go(void)
{
	static int irqclaimed = 0;
	static int lock=0;
	if (lock==1)
		return -1;
	lock=0;

	if (!irqclaimed) {
		cursor_ih.ih_func = vidcrender_cursorintr;
		cursor_ih.ih_arg = vc;		/* argument ... needed? */
		cursor_ih.ih_level = IPL_TTY;
		cursor_ih.ih_name = "vsync";
		irq_claim ( IRQ_FLYBACK, &cursor_ih );
		irqclaimed = 1;
	}

	cursor_init = 0;
	return 0;
}
#endif /* XXX commented out XXX */


/* XXX commented out ... dunno if nessisary XXX */
#if 0
#ifdef NICE_UPDATE
static int need_update = 0;

void
vidcrender_updatecursor(arg)
	void *arg;
{
	struct vconsole *vc = vconsole_current;

	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return;
}

int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
    timeout ( vidcrender_updatecursor, NULL, 20 );
    return 0;
}

#else

static int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return (0);
}

#endif
#endif /* XXX comment out XXX */

/* XXX comment out XXX */
#if 0
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
/*#include <sys/malloc.h>*/
#include <sys/ioctl.h>
#include <sys/conf.h>
#include <sys/tty.h>
#include <sys/map.h>
#include <sys/proc.h>
/*#include <sys/user.h>*/
#include <sys/syslog.h>
/*#include <sys/resourcevar.h>*/

#include <machine/cpu.h>
#include <machine/param.h>
/*#include <machine/katelib.h>*/
/*#include <machine/cpu.h>*/
/*#include <machine/bootconfig.h>*/
/*#include <machine/iomd.h>*/
/*#include <machine/intr.h>*/
/*#include <machine/pmap.h>*/
#include <machine/vidc.h>
#include <machine/vconsole.h>


/* extern struct cfdriver vidcconsole_cd; */

int
vidcvideoopen(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	struct vconsole vconsole_new;
	int unit = minor(dev);
	int s;

	if (unit >= vidcconsole_cd.cd_ndevs)
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
/*	if (sc->sc_opened) {
		(void)splx(s);
		return(EBUSY);
	}*/
	++sc->sc_opened;
	(void)splx(s);

	if (sc->sc_opened == 1) {
		vconsole_new = *vconsole_default;
		vconsole_new.render_engine = &vidcrender;
		vconsole_spawn_re (
		makedev ( physcon_major, 64 + minor(dev) ),
		    &vconsole_new );
	} else {
		log(LOG_WARNING, "Multiple open of/dev/vidcconsole0 by proc %d\n", p->p_pid);
	}

	return 0;
}

int
vidcconsoleclose(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	int unit = minor(dev);
	int s;

	if ( unit >= vidcconsole_cd.cd_ndevs )
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
	--sc->sc_opened;
	(void)splx(s);

	return 0;
}

extern int physconioctl __P((dev_t, int, caddr_t, int,	struct proc *));

int
vidcconsoleioctl(dev, cmd, data, flag, p)
	dev_t dev;
	int cmd;
	caddr_t data;
	int flag;
	struct proc *p;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconioctl(dev, cmd, data, flag, p));
}

extern paddr_t physconmmap __P((dev_t, off_t, int));

paddr_t
vidcconsolemmap(dev, offset, prot)
	dev_t dev;
	off_t offset;
	int prot;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconmmap(dev, offset, prot));
}
#endif /* XXX comment out XXX */

@


1.2.36.1
log
@sync with head.
@
text
@@


1.2.50.1
log
@sync with head
@
text
@@


1.2.54.1
log
@sync with head.
@
text
@@


1.1
log
@Initial commit of the splitting off of arch/acorn32 from arch/arm32.

The IOMD/VIDC combination is now moved to arch/arm/iomd together. These
files still need a lot of cleaning up :( .... esp. the RC7500 support that
is still dormant in it; this needs either to be removed or split out for
RC7500's ``VIDC'' video/audio variant.

Apart from the RC7500 support wich is still in arch/arm32 the
iomd,vidc,riscpc and podulebus subdirectories of arch/arm32 can be removed.

This split still uses some small parts of arch/arm32 .... those are the MI
parts that haven't been moved yet.

RiscPC/A7000 have been tested and confirmed to build as should NC.
@
text
@d110 1
a110 1
/*#include <machine/irqhandler.h>*/
@


1.1.4.1
log
@file vidc20config.c.old-stuff was added on branch nathanw_sa on 2002-01-08 00:23:16 +0000
@
text
@d1 207
@


1.1.4.2
log
@Catch up to -current.
@
text
@a0 207

/************************************************************
 * OLD STUFF                                                *
 ************************************************************/


/* XXX commented out XXX */
#if 0
int
vidcrender_attach(vc, parent, self, aux)
	struct vconsole *vc;
	struct device *parent;
	struct device *self;
	void *aux;
{
	vidc_cursor_init ( vc );
	vidcrender_flash_go ( vc );
	return 0;
}


int
vidcrender_flash_go(void)
{
	static int irqclaimed = 0;
	static int lock=0;
	if (lock==1)
		return -1;
	lock=0;

	if (!irqclaimed) {
		cursor_ih.ih_func = vidcrender_cursorintr;
		cursor_ih.ih_arg = vc;		/* argument ... needed? */
		cursor_ih.ih_level = IPL_TTY;
		cursor_ih.ih_name = "vsync";
		irq_claim ( IRQ_FLYBACK, &cursor_ih );
		irqclaimed = 1;
	}

	cursor_init = 0;
	return 0;
}
#endif /* XXX commented out XXX */


/* XXX commented out ... dunno if nessisary XXX */
#if 0
#ifdef NICE_UPDATE
static int need_update = 0;

void
vidcrender_updatecursor(arg)
	void *arg;
{
	struct vconsole *vc = vconsole_current;

	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return;
}

int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
    timeout ( vidcrender_updatecursor, NULL, 20 );
    return 0;
}

#else

static int
vidcrender_cursorupdate(vc)
	struct vconsole *vc;
{
	vidcvideo_write(VIDC_HCSR, R_DATA->frontporch-17+ (vc->xcur)*R_DATA->font->pixel_width );
	vidcvideo_write(VIDC_VCSR, R_DATA->topporch-2+ (vc->ycur+1)*R_DATA->font->pixel_height-2 + 3
	    - R_DATA->font->pixel_height);
	vidcvideo_write(VIDC_VCER, R_DATA->topporch-2+ (vc->ycur+3)*R_DATA->font->pixel_height+2 + 3 );
	return (0);
}

#endif
#endif /* XXX comment out XXX */

/* XXX comment out XXX */
#if 0
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
/*#include <sys/malloc.h>*/
#include <sys/ioctl.h>
#include <sys/conf.h>
#include <sys/tty.h>
#include <sys/map.h>
#include <sys/proc.h>
/*#include <sys/user.h>*/
#include <sys/syslog.h>
/*#include <sys/resourcevar.h>*/

#include <machine/cpu.h>
#include <machine/param.h>
/*#include <machine/katelib.h>*/
/*#include <machine/cpu.h>*/
/*#include <machine/bootconfig.h>*/
/*#include <machine/iomd.h>*/
/*#include <machine/intr.h>*/
/*#include <machine/pmap.h>*/
#include <machine/vidc.h>
#include <machine/vconsole.h>


/* extern struct cfdriver vidcconsole_cd; */

int
vidcvideoopen(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	struct vconsole vconsole_new;
	int unit = minor(dev);
	int s;

	if (unit >= vidcconsole_cd.cd_ndevs)
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
/*	if (sc->sc_opened) {
		(void)splx(s);
		return(EBUSY);
	}*/
	++sc->sc_opened;
	(void)splx(s);

	if (sc->sc_opened == 1) {
		vconsole_new = *vconsole_default;
		vconsole_new.render_engine = &vidcrender;
		vconsole_spawn_re (
		makedev ( physcon_major, 64 + minor(dev) ),
		    &vconsole_new );
	} else {
		log(LOG_WARNING, "Multiple open of/dev/vidcconsole0 by proc %d\n", p->p_pid);
	}

	return 0;
}

int
vidcconsoleclose(dev, flags, fmt, p)
	dev_t dev;
	int flags;
	int fmt;
	struct proc *p;
{
	struct vidcconsole_softc *sc;
	int unit = minor(dev);
	int s;

	if ( unit >= vidcconsole_cd.cd_ndevs )
		return ENXIO;
	sc = vidcconsole_cd.cd_devs[unit];
	if (!sc)
		return ENXIO;

	s = spltty();
	--sc->sc_opened;
	(void)splx(s);

	return 0;
}

extern int physconioctl __P((dev_t, int, caddr_t, int,	struct proc *));

int
vidcconsoleioctl(dev, cmd, data, flag, p)
	dev_t dev;
	int cmd;
	caddr_t data;
	int flag;
	struct proc *p;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconioctl(dev, cmd, data, flag, p));
}

extern paddr_t physconmmap __P((dev_t, off_t, int));

paddr_t
vidcconsolemmap(dev, offset, prot)
	dev_t dev;
	off_t offset;
	int prot;
{
	dev = makedev(physcon_major, 64 + minor(dev));
	return(physconmmap(dev, offset, prot));
}
#endif /* XXX comment out XXX */

@
