Fix style error replicated multiple times. Move to
mips_bus_space_generic for octeon obio impl.
This commit is contained in:
parent
778355f6c1
commit
19aa4fea4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=196236
@ -63,20 +63,18 @@ int obio_attach(device_t);
|
|||||||
* A bit tricky and hackish. Since we need OBIO to rely
|
* A bit tricky and hackish. Since we need OBIO to rely
|
||||||
* on PCI we make it pseudo-pci device. But there should
|
* on PCI we make it pseudo-pci device. But there should
|
||||||
* be only one such device, so we use this static flag
|
* be only one such device, so we use this static flag
|
||||||
* to prevent false positives on every realPCI device probe.
|
* to prevent false positives on every real PCI device probe.
|
||||||
*/
|
*/
|
||||||
static int have_one = 0;
|
static int have_one = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
obio_probe(device_t dev)
|
obio_probe(device_t dev)
|
||||||
{
|
{
|
||||||
if(!have_one)
|
if (!have_one) {
|
||||||
{
|
|
||||||
have_one = 1;
|
have_one = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
return (ENXIO);
|
||||||
return (ENXIO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -60,22 +60,19 @@ int obio_probe(device_t);
|
|||||||
int obio_attach(device_t);
|
int obio_attach(device_t);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need only one obio.
|
* We need only one obio. Any other device hanging off of it,
|
||||||
* Any other device hanging off of it, shouldn't cause multiple of
|
* shouldn't cause multiple of these to be found.
|
||||||
* these to be found.
|
|
||||||
*/
|
*/
|
||||||
static int have_one = 0;
|
static int have_one = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
obio_probe(device_t dev)
|
obio_probe(device_t dev)
|
||||||
{
|
{
|
||||||
if(!have_one)
|
if (!have_one) {
|
||||||
{
|
|
||||||
have_one = 1;
|
have_one = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
return (ENXIO);
|
||||||
return (ENXIO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -83,7 +80,7 @@ obio_attach(device_t dev)
|
|||||||
{
|
{
|
||||||
struct obio_softc *sc = device_get_softc(dev);
|
struct obio_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
sc->oba_st = MIPS_BUS_SPACE_IO;
|
sc->oba_st = mips_bus_space_generic;
|
||||||
sc->oba_addr = OCTEON_UART0ADR;
|
sc->oba_addr = OCTEON_UART0ADR;
|
||||||
sc->oba_size = 0x10000;
|
sc->oba_size = 0x10000;
|
||||||
sc->oba_rman.rm_type = RMAN_ARRAY;
|
sc->oba_rman.rm_type = RMAN_ARRAY;
|
||||||
|
@ -72,13 +72,11 @@ static int have_one = 0;
|
|||||||
int
|
int
|
||||||
obio_probe(device_t dev)
|
obio_probe(device_t dev)
|
||||||
{
|
{
|
||||||
if(!have_one)
|
if (!have_one) {
|
||||||
{
|
|
||||||
have_one = 1;
|
have_one = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
return (ENXIO);
|
||||||
return (ENXIO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user