diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 17:08:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 17:08:22 +0000 |
commit | f4562dcb93c79b7b359529239856fc68fcf8afee (patch) | |
tree | 5838b3aeefb21a6472bd74ab5e1b656818f260bc /sys/arch/sparc/dev/sbus.c | |
parent | d52e6d948c583c385b4a797a75a76cff2d6df41e (diff) |
+ sbus_slavecheck()
Diffstat (limited to 'sys/arch/sparc/dev/sbus.c')
-rw-r--r-- | sys/arch/sparc/dev/sbus.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/arch/sparc/dev/sbus.c b/sys/arch/sparc/dev/sbus.c index 0b18f3229e3..77ba2349467 100644 --- a/sys/arch/sparc/dev/sbus.c +++ b/sys/arch/sparc/dev/sbus.c @@ -200,3 +200,24 @@ sbusreset(sbus) } } } + +/* + * Returns true if this device is in a slave slot, so that drivers + * can bail rather than fail. + */ +int +sbus_slavecheck(self, ca) + struct device *self; + struct confargs *ca; +{ + int slave_only; + + slave_only = getpropint(findroot(), "slave-only", 8); + + if (slave_only & (1<<ca->ca_slot)) { + printf("%s: slave sbus slot -- not supported\n", + self->dv_xname); + return (1); + } + return (0); +} |