Lines Matching +full:id +full:- +full:base
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
58 #define ERST_LOCK(sc) mtx_lock(&(sc)->mtx)
59 #define ERST_UNLOCK(sc) mtx_unlock(&(sc)->mtx)
60 #define ERST_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED);
61 #define ERST_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED);
64 SYSCON_READ_4(sc->syscon, (_reg))
66 SYSCON_WRITE_4(sc->syscon, (_reg), (_val))
69 { "eswin,eic7700-reset", 1 },
80 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in eswin_rst_probe()
95 sc->dev = dev; in eswin_rst_attach()
98 &sc->syscon); in eswin_rst_attach()
104 mtx_init(&sc->mtx, device_get_nameunit(sc->dev), NULL, MTX_DEF); in eswin_rst_attach()
112 eswin_rst_reset_assert(device_t dev, intptr_t id, bool reset) in eswin_rst_reset_assert() argument
116 uint32_t base; in eswin_rst_reset_assert() local
121 base = RESET_ID_TO_REG(id >> 5); in eswin_rst_reset_assert()
122 bit = id & 0x1f; in eswin_rst_reset_assert()
125 reg = ERST_READ(sc, base); in eswin_rst_reset_assert()
130 ERST_WRITE(sc, base, reg); in eswin_rst_reset_assert()
137 eswin_rst_reset_is_asserted(device_t dev, intptr_t id, bool *reset) in eswin_rst_reset_is_asserted() argument
141 uint32_t base; in eswin_rst_reset_is_asserted() local
146 base = RESET_ID_TO_REG(id >> 5); in eswin_rst_reset_is_asserted()
147 bit = id & 0x1f; in eswin_rst_reset_is_asserted()
150 reg = ERST_READ(sc, base); in eswin_rst_reset_is_asserted()
159 pcell_t *cells, intptr_t *id) in eswin_rst_map() argument
164 *id = cells[0] << 5; in eswin_rst_map()
165 *id |= ilog2(cells[1]); in eswin_rst_map()