plan 9 kernel history: overview | file list | diff list

1997/0327/pc/devi82365.c (diff list | history)

1996/0613/sys/src/9/pc/devi82365.c:185,1951997/0327/sys/src/9/pc/devi82365.c:185,195 (short | long | prev | next)
1994/1209    
 
1995/0225    
static void	cisread(Slot*); 
static void	i82365intr(Ureg*, void*); 
1997/0327    
static void	i82365reset(void); 
1995/0225    
static int	pcmio(int, ISAConf*); 
static long	pcmread(int, int, void*, long, ulong); 
static long	pcmwrite(int, int, void*, long, ulong); 
1996/0303    
 
void i82365reset(void); 
1996/0604    
static void i82365dump(Slot*); 
1994/1209    
 
/* 
1996/0613/sys/src/9/pc/devi82365.c:353,3621997/0327/sys/src/9/pc/devi82365.c:353,362
1995/0225    
	/* if isa space isn't big enough, free it and get more */ 
	if(m->len < len){ 
		if(m->isa){ 
			putisa(m->isa, m->len); 
1997/0327    
			umbfree(m->isa, m->len); 
1995/0225    
			m->len = 0; 
		} 
		m->isa = getisa(0, len, Mgran)&~KZERO; 
1997/0327    
		m->isa = umbmalloc(0, len, Mgran)&~KZERO; 
1995/0225    
		if(m->isa == 0){ 
			print("pcmmap: out of isa space\n"); 
			unlock(&pp->mlock); 
1996/0613/sys/src/9/pc/devi82365.c:399,4051997/0327/sys/src/9/pc/devi82365.c:399,404
1995/0225    
	unlock(&pp->mlock); 
} 
 
                 
1994/1209    
static void 
increfp(Slot *pp) 
{ 
1996/0613/sys/src/9/pc/devi82365.c:598,6041997/0327/sys/src/9/pc/devi82365.c:597,603
1994/1209    
/* 
 *  set up for slot cards 
 */ 
void 
1997/0327    
static void 
1994/1209    
i82365reset(void) 
{ 
	static int already; 
1996/0613/sys/src/9/pc/devi82365.c:632,6761997/0327/sys/src/9/pc/devi82365.c:631,664
1995/0223    
			slotdis(pp); 
 
			/* interrupt on status change */ 
			wrreg(pp, Rcscic, ((PCMCIAvec-Int0vec)<<4) | Fchangeena); 
1997/0327    
			wrreg(pp, Rcscic, ((VectorPCMCIA-VectorPIC)<<4) | Fchangeena); 
1996/0604    
			rdreg(pp, Rcsc); 
1994/1209    
		} 
	} 
1995/0222    
 
	/* for card management interrupts */ 
	setvec(PCMCIAvec, i82365intr, 0); 
1997/0327    
	intrenable(VectorPCMCIA, i82365intr, 0, BUSUNKNOWN); 
1994/1209    
} 
 
void 
i82365init(void) 
{ 
} 
                 
Chan * 
1997/0327    
static Chan* 
1994/1209    
i82365attach(char *spec) 
{ 
	return devattach('y', spec); 
} 
 
Chan * 
i82365clone(Chan *c, Chan *nc) 
{ 
	return devclone(c, nc); 
} 
                 
int 
1997/0327    
static int 
1994/1209    
i82365walk(Chan *c, char *name) 
{ 
	return devwalk(c, name, 0, 0, pcmgen); 
} 
 
void 
1997/0327    
static void 
1994/1209    
i82365stat(Chan *c, char *db) 
{ 
	devstat(c, db, 0, 0, pcmgen); 
} 
 
Chan * 
1997/0327    
static Chan* 
1994/1209    
i82365open(Chan *c, int omode) 
{ 
	if(c->qid.path == CHDIR){ 
1996/0613/sys/src/9/pc/devi82365.c:684,7081997/0327/sys/src/9/pc/devi82365.c:672,678
1994/1209    
	return c; 
} 
 
void 
1995/0726    
i82365create(Chan*, char*, int, ulong) 
1994/1209    
{ 
	error(Eperm); 
} 
                 
void 
1995/0726    
i82365remove(Chan*) 
1994/1209    
{ 
	error(Eperm); 
} 
                 
void 
1995/0726    
i82365wstat(Chan*, char*) 
1994/1209    
{ 
	error(Eperm); 
} 
                 
void 
1997/0327    
static void 
1994/1209    
i82365close(Chan *c) 
{ 
1995/0222    
	if(c->flag & COPEN) 
1996/0613/sys/src/9/pc/devi82365.c:778,7901997/0327/sys/src/9/pc/devi82365.c:748,754
1994/1209    
	return n; 
} 
 
1995/0222    
Block* 
i82365bread(Chan *c, long n, ulong offset) 
{ 
	return devbread(c, n, offset); 
} 
                 
1994/1209    
long 
1997/0327    
static long 
1994/1209    
i82365read(Chan *c, void *a, long n, ulong offset) 
{ 
1995/0222    
	char *cp, buf[2048]; 
1996/0613/sys/src/9/pc/devi82365.c:833,8441997/0327/sys/src/9/pc/devi82365.c:797,802
1994/1209    
	return n; 
} 
 
1995/0222    
long 
i82365bwrite(Chan *c, Block *bp, ulong offset) 
1995/0108    
{ 
1995/0222    
	return devbwrite(c, bp, offset); 
1995/0108    
} 
                 
1995/0225    
static long 
1994/1209    
pcmwrite(int dev, int attr, void *a, long n, ulong offset) 
{ 
1996/0613/sys/src/9/pc/devi82365.c:881,8871997/0327/sys/src/9/pc/devi82365.c:839,845
1994/1209    
	return n; 
} 
 
long 
1997/0327    
static long 
1994/1209    
i82365write(Chan *c, void *a, long n, ulong offset) 
{ 
	ulong p; 
1996/0613/sys/src/9/pc/devi82365.c:918,9231997/0327/sys/src/9/pc/devi82365.c:876,899
1994/1209    
	return n; 
1995/0108    
} 
 
1997/0327    
Dev i82365devtab = { 
	i82365reset, 
	devinit, 
	i82365attach, 
	devclone, 
	i82365walk, 
	i82365stat, 
	i82365open, 
	devcreate, 
	i82365close, 
	i82365read, 
	devbread, 
	i82365write, 
	devbwrite, 
	devremove, 
	devwstat, 
}; 
 
1994/1209    
/* 
 *  configure the Slot for IO.  We assume very heavily that we can read 
1996/0604    
 *  configuration info from the CIS.  If not, we won't set up correctly. 
1996/0613/sys/src/9/pc/devi82365.c:1252,12581997/0327/sys/src/9/pc/devi82365.c:1228,1234
1995/0223    
		ct->otherwait = ttiming(pp, i);		/* reserved wait */ 
1994/1209    
} 
 
void 
1997/0327    
static void 
1995/0223    
iospaces(Slot *pp, Conftab *ct) 
1994/1209    
{ 
	uchar c; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)