[BACK]Return to comvar.h CVS log [TXT][DIR] Up to [local] / prex-old / dev / ic

File: [local] / prex-old / dev / ic / comvar.h (download)

Revision 1.1, Fri Aug 8 13:18:16 2008 UTC (15 years, 9 months ago) by nbrk
Branch: MAIN
CVS Tags: HEAD

Start implementing basic hardware support for CATS, based on new autoconfiguration
mechanism. This effectively uses bus_space to abstract children of parents.
Some info about these drivers:
hostio is a host memory-mapped i/o - one and only child of 'root';
footbridge is just a proxy for now;
fuart is a DC21285 UART driver which fills uart_attach_args and attaches
com, which is machine independent driver;

This all is not finished yet (just quick hacks), but commit it so i could work at home.

/*
 * $Id: comvar.h,v 1.1 2008/08/08 13:18:16 nbrk Exp $
 */
#ifndef _DEV_IC_COMVAR_H_
#define _DEV_IC_COMVAR_H_

struct uart_attach_args {
	void	*ua_cookie;

	int		(*ua_init)(void *cookie, int speed, int mode);
	void	(*ua_on)(void *cookie);
	void	(*ua_off)(void *cookie);
	void	(*ua_putc)(void *cookie, int blocking, int c);
	int		(*ua_getc)(void *cookie, int blocking);

	/* TODO: get/set speed/mode */
};


struct com_softc {
	struct uart_attach_args	*sc_uaap;

	int 					sc_mode;
	int						sc_speed;
};

#endif /* !_DEV_IC_COMVAR_H_ */