File: [local] / prex-old / dev / arm / cats / footbridge.c (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: footbridge.c,v 1.1 2008/08/08 13:18:16 nbrk Exp $
*/
/*
* DC21285 core logic.
* TODO.
*/
#include <driver.h>
#include <bus.h>
/*
* Autoconf glue.
*/
int footbridge_match(struct device *parent, void *aux);
int footbridge_attach(struct device *parent, struct device *self, void *aux);
struct driver footbridge_drv = {
"footbridge", /* name */
1 ,/* datasize */
footbridge_match, /* match */
footbridge_attach, /* attach */
NULL, /* detach */
-1 /* nunits XXX */
};
int
footbridge_match(struct device *parent, void *aux)
{
return(1);
}
int
footbridge_attach(struct device *parent, struct device *self, void *aux)
{
printk("DC21285 Core Logic\n");
/* just proxy aux (which is a hostio tag) */
config_search_children(self, aux);
}