~kris/9p

9hist

e43ce1cea26b1b8b323ad460c22ac3fb482272a1 — David du Colombier 25 years ago b6dd50a
Plan 9 from Bell Labs 2001-05-01
5 files changed, 24 insertions(+), 11 deletions(-)

M bitsy/devuda1341.c
M bitsy/main.c
M bitsy/sa1110dma.c
M pc/devvga.c
M pc/screen.h
M bitsy/devuda1341.c => bitsy/devuda1341.c +2 -1
@@ 19,7 19,7 @@
#include	"io.h"
#include	"sa1110dma.h"

static int debug = 0;
static int debug = 2;

/*
 * GPIO based L3 bus support.


@@ 442,6 442,7 @@ audioinit(void)
	mcpregs->status &= ~(1<<16);

	sspregs = mapspecial(SSPREGS, 32);

}

uchar	status0[1]		= {0x22};

M bitsy/main.c => bitsy/main.c +1 -1
@@ 381,7 381,7 @@ machinit(void)
	gpioregs->altfunc |= 
		GPIO_LDD8_o|GPIO_LDD9_o|GPIO_LDD10_o|GPIO_LDD11_o
		|GPIO_LDD12_o|GPIO_LDD13_o|GPIO_LDD14_o|GPIO_LDD15_o
		|GPIO_SSP_CLK_i;
		|GPIO_SSP_CLK_i|GPIO_SSP_RXD_i;

	/* map in special H3650 io pins */
	egpioreg = mapspecial(EGPIOREGS, 4);

M bitsy/sa1110dma.c => bitsy/sa1110dma.c +1 -1
@@ 7,7 7,7 @@
#include	"../port/error.h"
#include	"sa1110dma.h"

static int debug = 0;
static int debug = 2;

/*
 *	DMA helper routines

M pc/devvga.c => pc/devvga.c +19 -7
@@ 61,19 61,31 @@ vgastat(Chan* c, char* dp)
static Chan*
vgaopen(Chan* c, int omode)
{
	VGAscr *scr;
	static char *openctl = "openctl\n";

	scr = &vgascreen[0];
	if ((c->qid.path & ~CHDIR) == Qvgaovlctl) {
		if (scr->dev->ovlctl)
			scr->dev->ovlctl(scr, c, openctl, strlen(openctl));
		else 
			error(Enonexist);
	}
	return devopen(c, omode, vgadir, nelem(vgadir), devgen);
}

static void
vgaclose(Chan*)
vgaclose(Chan* c)
{		
	VGAscr *scr;
	static char *closectl = "closectl\n";

	scr = &vgascreen[0];
	if (scr && scr->dev && scr->dev->ovlctl) {
		static char disable[] = "disable\n"; 

		scr->dev->ovlctl(scr, disable, strlen(disable));
	if ((c->qid.path & ~CHDIR) == Qvgaovlctl) {
		if (scr->dev->ovlctl)
			scr->dev->ovlctl(scr, c, closectl, strlen(closectl));
		else 
			error(Enonexist);
	}
}



@@ 397,8 409,8 @@ vgawrite(Chan* c, void* a, long n, vlong off)
			error(Enooverlay);
			break;
		}
		pprint("vgawrite: Calling ovlctl (%p) (%s)\n", scr->dev->ovlctl, a);
		return scr->dev->ovlctl(scr, a, n);
		scr->dev->ovlctl(scr, c, a, n);
		return n;

	default:
		error(Egreg);

M pc/screen.h => pc/screen.h +1 -1
@@ 68,7 68,7 @@ struct VGAdev {
	ulong	(*linear)(VGAscr*, int*, int*);
	void	(*drawinit)(VGAscr*);
	int	(*fill)(VGAscr*, Rectangle, ulong);
	int	(*ovlctl)(VGAscr*, void*, int);
	void	(*ovlctl)(VGAscr*, Chan*, void*, int);
	int	(*ovlwrite)(VGAscr*, void*, int, vlong);
};