File: [local] / prex-old / dev / arm / cats / hostiovar.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: hostiovar.h,v 1.1 2008/08/08 13:18:16 nbrk Exp $
*/
#ifndef _DEV_ARM_CATS_HOSTIOVAR_H_
#define _DEV_ARM_CATS_HOSTIOVAR_H_
/*
* bus_space glue.
*/
int hostio_map(void *cookie, bus_addr_t addr, bus_size_t size, int flags, bus_space_handle_t *ioh);
uint8_t hostio_read_1(void *cookie, bus_space_handle_t ioh, bus_size_t off);
uint16_t hostio_read_2(void *cookie, bus_space_handle_t ioh, bus_size_t off);
uint32_t hostio_read_4(void *cookie, bus_space_handle_t ioh, bus_size_t off);
void hostio_write_1(void *cookie, bus_space_handle_t ioh, bus_size_t off, uint8_t data);
void hostio_write_2(void *cookie, bus_space_handle_t ioh, bus_size_t off, uint16_t data);
void hostio_write_4(void *cookie, bus_space_handle_t ioh, bus_size_t off, uint32_t data);
/*
* Our tag.
* One and only.
*/
struct bus_space hostio_bs_tag = {
NULL, /* cookie */
hostio_map,
NULL, /* unmap */
NULL, /* subregion */
NULL, /* barrier */
hostio_read_1,
hostio_read_2,
hostio_read_4,
hostio_write_1,
hostio_write_2,
hostio_write_4,
};
struct hostio_softc {
bus_space_tag_t sc_iot;
};
#endif /* !_DEV_ARM_CATS_HOSTIOVAR_H_ */