Lines 249-256
Link Here
|
249 |
|
249 |
|
250 |
/* RESETS spec (22.2.36) recommends saving and re-initializing registers */ |
250 |
/* RESETS spec (22.2.36) recommends saving and re-initializing registers */ |
251 |
for (int i = 0; i < IG4_REGS_CONTEXT_SIZE; i++) { |
251 |
for (int i = 0; i < IG4_REGS_CONTEXT_SIZE; i++) { |
252 |
bus_barrier(sc->regs_res, regs_context_ids[i], 4, BUS_SPACE_BARRIER_READ); |
|
|
253 |
sc->regs_context[i] = bus_read_4(sc->regs_res, regs_context_ids[i]); |
252 |
sc->regs_context[i] = bus_read_4(sc->regs_res, regs_context_ids[i]); |
|
|
253 |
bus_barrier(sc->regs_res, regs_context_ids[i], 4, BUS_SPACE_BARRIER_READ); |
254 |
} |
254 |
} |
255 |
|
255 |
|
256 |
/* |
256 |
/* |
Lines 259-268
Link Here
|
259 |
*/ |
259 |
*/ |
260 |
if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { |
260 |
if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { |
261 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_HSW, IG4_RESETS_ASSERT_HSW); |
261 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_HSW, IG4_RESETS_ASSERT_HSW); |
262 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_READ); |
262 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_WRITE); |
263 |
} else if (sc->version == IG4_SKYLAKE) { |
263 |
} else if (sc->version == IG4_SKYLAKE) { |
264 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_SKL, IG4_RESETS_ASSERT_SKL); |
264 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_SKL, IG4_RESETS_ASSERT_SKL); |
265 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_READ); |
265 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_WRITE); |
266 |
} else { |
266 |
} else { |
267 |
device_printf(dev, "Unable to assert reset, reset register unavailable\n"); |
267 |
device_printf(dev, "Unable to assert reset, reset register unavailable\n"); |
268 |
} |
268 |
} |
Lines 281-290
Link Here
|
281 |
/* wake the controller before its children */ |
281 |
/* wake the controller before its children */ |
282 |
if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { |
282 |
if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) { |
283 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_HSW, IG4_RESETS_DEASSERT_HSW); |
283 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_HSW, IG4_RESETS_DEASSERT_HSW); |
284 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_READ); |
284 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_WRITE); |
285 |
} else if (sc->version == IG4_SKYLAKE) { |
285 |
} else if (sc->version == IG4_SKYLAKE) { |
286 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_SKL, IG4_RESETS_DEASSERT_SKL); |
286 |
bus_write_4(sc->regs_res, IG4_REG_RESETS_SKL, IG4_RESETS_DEASSERT_SKL); |
287 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_READ); |
287 |
bus_barrier(sc->regs_res, IG4_REG_RESETS_HSW, 4, BUS_SPACE_BARRIER_WRITE); |
288 |
} else { |
288 |
} else { |
289 |
device_printf(dev, "Unable to deassert reset, reset register unavailable\n"); |
289 |
device_printf(dev, "Unable to deassert reset, reset register unavailable\n"); |
290 |
} |
290 |
} |