=================================================================== RCS file: /cvs/funnyos/arch/testarm/dev/obio.c,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- funnyos/arch/testarm/dev/obio.c 2007/10/16 19:34:13 1.3 +++ funnyos/arch/testarm/dev/obio.c 2007/10/16 19:55:30 1.5 @@ -1,5 +1,5 @@ /* - * $Id: obio.c,v 1.3 2007/10/16 18:34:13 init Exp $ + * $Id: obio.c,v 1.5 2007/10/16 18:55:30 init Exp $ */ #include #include @@ -22,7 +22,7 @@ struct driver obio_dr = { - sizeof(obio_dd), + sizeof(struct obio_dd), obio_attach, obio_detach }; @@ -33,7 +33,10 @@ { struct obio_dd *ddp = self->dv_devdata; struct bus_handle *bhp = ddp->od_bh; - + + ddp->od_locked = 0; + ddp->od_ndevices = 0; + bhp->bus_read_1 = obio_read_1; bhp->bus_read_2 = obio_read_2; bhp->bus_read_4 = obio_read_4; @@ -41,6 +44,8 @@ bhp->bus_write_2 = obio_write_2; bhp->bus_write_4 = obio_write_4; + /* expose our bus_handle to the world */ + self->dv_aux = bhp; printf("memory-mapped i/o\n");