Pass the RID from the bus frontends to the core probe function.
Currently all RIDs are 0, but for PCI devices this typically isn't the case. This change is made with future PCI support in mind.
This commit is contained in:
parent
5f634111fa
commit
cad72a80bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167822
@ -138,7 +138,7 @@ extern char scc_driver_name[];
|
||||
|
||||
int scc_bfe_attach(device_t dev);
|
||||
int scc_bfe_detach(device_t dev);
|
||||
int scc_bfe_probe(device_t dev, u_int, u_int);
|
||||
int scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid);
|
||||
|
||||
struct resource *scc_bus_alloc_resource(device_t, device_t, int, int *,
|
||||
u_long, u_long, u_long, u_int);
|
||||
|
@ -59,7 +59,7 @@ scc_ebus_probe(device_t dev)
|
||||
if (!strcmp(nm, "se") || !strcmp(cmpt, "sab82532")) {
|
||||
device_set_desc(dev, "Siemens SAB 82532 dual channel SCC");
|
||||
sc->sc_class = &scc_sab82532_class;
|
||||
return (scc_bfe_probe(dev, EBUS_REGSHFT, EBUS_RCLK));
|
||||
return (scc_bfe_probe(dev, EBUS_REGSHFT, EBUS_RCLK, 0));
|
||||
}
|
||||
return (ENXIO);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ scc_macio_probe(device_t dev)
|
||||
if (!strcmp(nm, "escc")) {
|
||||
device_set_desc(dev, "Zilog Z8530 dual channel SCC");
|
||||
sc->sc_class = &scc_z8530_class;
|
||||
return (scc_bfe_probe(dev, MACIO_REGSHFT, MACIO_RCLK));
|
||||
return (scc_bfe_probe(dev, MACIO_REGSHFT, MACIO_RCLK, 0));
|
||||
}
|
||||
return (ENXIO);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ scc_sbus_probe(device_t dev)
|
||||
if (!strcmp(nm, "zs")) {
|
||||
device_set_desc(dev, "Zilog Z8530 dual channel SCC");
|
||||
sc->sc_class = &scc_z8530_class;
|
||||
return (scc_bfe_probe(dev, SBUS_REGSHFT, SBUS_RCLK));
|
||||
return (scc_bfe_probe(dev, SBUS_REGSHFT, SBUS_RCLK, 0));
|
||||
}
|
||||
return (ENXIO);
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ scc_bfe_detach(device_t dev)
|
||||
}
|
||||
|
||||
int
|
||||
scc_bfe_probe(device_t dev, u_int regshft, u_int rclk)
|
||||
scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid)
|
||||
{
|
||||
struct scc_softc *sc;
|
||||
struct scc_class *cl;
|
||||
@ -361,12 +361,12 @@ scc_bfe_probe(device_t dev, u_int regshft, u_int rclk)
|
||||
* I/O space. Any SCC that needs multiple windows will consequently
|
||||
* not be supported by this driver as-is.
|
||||
*/
|
||||
sc->sc_rrid = 0;
|
||||
sc->sc_rrid = rid;
|
||||
sc->sc_rtype = SYS_RES_MEMORY;
|
||||
sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid,
|
||||
0, ~0, cl->cl_channels * size, RF_ACTIVE);
|
||||
if (sc->sc_rres == NULL) {
|
||||
sc->sc_rrid = 0;
|
||||
sc->sc_rrid = rid;
|
||||
sc->sc_rtype = SYS_RES_IOPORT;
|
||||
sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype,
|
||||
&sc->sc_rrid, 0, ~0, cl->cl_channels * size, RF_ACTIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user