NetBSD/sys/arch/sparc/include/am7930_machdep.h
jonathan 69d2d27c1b Use bus_space tags and handles, embedded in MD hooks AM7930_{READ_WRITE}_REG
to handle MD delay and bus padding. Tested on sparc2 by David Brownlee.

Should use regmaps, but that breaks sparc pDMA assembly code.
1999-03-14 22:29:00 +00:00

15 lines
452 B
C

/* $NetBSD: am7930_machdep.h,v 1.1 1999/03/14 22:29:00 jonathan Exp $ */
/*
* Machine-dependent register accessors for am7930.
* On Sparc, these are direct bus_space operations.
*/
#define AM7930_REGOFF(reg) (offsetof(struct am7930, reg))
#define AM7930_WRITE_REG(bt, bh, reg, val) \
bus_space_write_1((bt), (bh), AM7930_REGOFF(reg), (val))
#define AM7930_READ_REG(bt, bh, reg) \
bus_space_read_1((bt), (bh), AM7930_REGOFF(reg), (val))