Panics about how things can't be attached should probably happen in the
attach method rather than probe. Submitted by: brooks
This commit is contained in:
parent
a5198c41bc
commit
a5c296c5c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257365
@ -309,9 +309,6 @@ static int
|
||||
clock_probe(device_t dev)
|
||||
{
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
device_set_desc(dev, "Generic MIPS32 ticker");
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
}
|
||||
@ -329,6 +326,9 @@ clock_attach(device_t dev)
|
||||
struct clock_softc *sc;
|
||||
int error;
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
softc = sc = device_get_softc(dev);
|
||||
sc->intr_rid = 0;
|
||||
sc->intr_res = bus_alloc_resource(dev,
|
||||
|
@ -314,9 +314,6 @@ static int
|
||||
clock_probe(device_t dev)
|
||||
{
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
device_set_desc(dev, "Generic MIPS32 ticker");
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
}
|
||||
@ -333,6 +330,9 @@ clock_attach(device_t dev)
|
||||
{
|
||||
struct clock_softc *sc;
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
softc = sc = device_get_softc(dev);
|
||||
cpu_establish_hardintr("compare", clock_intr, NULL,
|
||||
sc, IRQ_TIMER, INTR_TYPE_CLK, &sc->intr_handler);
|
||||
|
@ -311,9 +311,6 @@ static int
|
||||
clock_probe(device_t dev)
|
||||
{
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
device_set_desc(dev, "Generic MIPS32 ticker");
|
||||
return (BUS_PROBE_NOWILDCARD);
|
||||
}
|
||||
@ -330,6 +327,9 @@ clock_attach(device_t dev)
|
||||
{
|
||||
struct clock_softc *sc;
|
||||
|
||||
if (device_get_unit(dev) != 0)
|
||||
panic("can't attach more clocks");
|
||||
|
||||
softc = sc = device_get_softc(dev);
|
||||
cpu_establish_hardintr("compare", clock_intr, NULL,
|
||||
sc, IRQ_TIMER, INTR_TYPE_CLK, &sc->intr_handler);
|
||||
|
Loading…
Reference in New Issue
Block a user