Lines Matching defs:ntb

40 #include "ntb.h"
43 SYSCTL_NODE(_hw, OID_AUTO, ntb, CTLFLAG_RW, 0, "NTB sysctls");
108 rm_init(&nc->ctx_lock, "ntb ctx");
197 ntb_link_is_up(device_t ntb, enum ntb_speed *speed, enum ntb_width *width)
200 return (NTB_LINK_IS_UP(device_get_parent(ntb), speed, width));
204 ntb_link_enable(device_t ntb, enum ntb_speed speed, enum ntb_width width)
206 struct ntb_child *nc = device_get_ivars(ntb);
217 return (NTB_LINK_ENABLE(device_get_parent(ntb), speed, width));
221 ntb_link_disable(device_t ntb)
223 struct ntb_child *nc = device_get_ivars(ntb);
234 return (NTB_LINK_DISABLE(device_get_parent(ntb)));
238 ntb_link_enabled(device_t ntb)
240 struct ntb_child *nc = device_get_ivars(ntb);
242 return (nc->enabled && NTB_LINK_ENABLED(device_get_parent(ntb)));
246 ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops)
248 struct ntb_child *nc = device_get_ivars(ntb);
266 ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops)
268 struct ntb_child *nc = device_get_ivars(ntb);
277 ntb_clear_ctx(device_t ntb)
279 struct ntb_child *nc = device_get_ivars(ntb);
288 ntb_mw_count(device_t ntb)
290 struct ntb_child *nc = device_get_ivars(ntb);
296 ntb_mw_get_range(device_t ntb, unsigned mw_idx, vm_paddr_t *base,
300 struct ntb_child *nc = device_get_ivars(ntb);
302 return (NTB_MW_GET_RANGE(device_get_parent(ntb), mw_idx + nc->mwoff,
307 ntb_mw_set_trans(device_t ntb, unsigned mw_idx, bus_addr_t addr, size_t size)
309 struct ntb_child *nc = device_get_ivars(ntb);
311 return (NTB_MW_SET_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff,
316 ntb_mw_clear_trans(device_t ntb, unsigned mw_idx)
318 struct ntb_child *nc = device_get_ivars(ntb);
320 return (NTB_MW_CLEAR_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff));
324 ntb_mw_get_wc(device_t ntb, unsigned mw_idx, vm_memattr_t *mode)
326 struct ntb_child *nc = device_get_ivars(ntb);
328 return (NTB_MW_GET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode));
332 ntb_mw_set_wc(device_t ntb, unsigned mw_idx, vm_memattr_t mode)
334 struct ntb_child *nc = device_get_ivars(ntb);
336 return (NTB_MW_SET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode));
340 ntb_spad_count(device_t ntb)
342 struct ntb_child *nc = device_get_ivars(ntb);
348 ntb_spad_clear(device_t ntb)
350 struct ntb_child *nc = device_get_ivars(ntb);
354 NTB_SPAD_WRITE(device_get_parent(ntb), i + nc->spadoff, 0);
358 ntb_spad_write(device_t ntb, unsigned int idx, uint32_t val)
360 struct ntb_child *nc = device_get_ivars(ntb);
362 return (NTB_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff, val));
366 ntb_spad_read(device_t ntb, unsigned int idx, uint32_t *val)
368 struct ntb_child *nc = device_get_ivars(ntb);
370 return (NTB_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff, val));
374 ntb_peer_spad_write(device_t ntb, unsigned int idx, uint32_t val)
376 struct ntb_child *nc = device_get_ivars(ntb);
378 return (NTB_PEER_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff,
383 ntb_peer_spad_read(device_t ntb, unsigned int idx, uint32_t *val)
385 struct ntb_child *nc = device_get_ivars(ntb);
387 return (NTB_PEER_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff,
392 ntb_db_valid_mask(device_t ntb)
394 struct ntb_child *nc = device_get_ivars(ntb);
400 ntb_db_vector_count(device_t ntb)
403 return (NTB_DB_VECTOR_COUNT(device_get_parent(ntb)));
407 ntb_db_vector_mask(device_t ntb, uint32_t vector)
409 struct ntb_child *nc = device_get_ivars(ntb);
411 return ((NTB_DB_VECTOR_MASK(device_get_parent(ntb), vector)
416 ntb_peer_db_addr(device_t ntb, bus_addr_t *db_addr, vm_size_t *db_size)
419 return (NTB_PEER_DB_ADDR(device_get_parent(ntb), db_addr, db_size));
423 ntb_db_clear(device_t ntb, uint64_t bits)
425 struct ntb_child *nc = device_get_ivars(ntb);
427 return (NTB_DB_CLEAR(device_get_parent(ntb), bits << nc->dboff));
431 ntb_db_clear_mask(device_t ntb, uint64_t bits)
433 struct ntb_child *nc = device_get_ivars(ntb);
435 return (NTB_DB_CLEAR_MASK(device_get_parent(ntb), bits << nc->dboff));
439 ntb_db_read(device_t ntb)
441 struct ntb_child *nc = device_get_ivars(ntb);
443 return ((NTB_DB_READ(device_get_parent(ntb)) >> nc->dboff)
448 ntb_db_set_mask(device_t ntb, uint64_t bits)
450 struct ntb_child *nc = device_get_ivars(ntb);
452 return (NTB_DB_SET_MASK(device_get_parent(ntb), bits << nc->dboff));
456 ntb_peer_db_set(device_t ntb, uint64_t bits)
458 struct ntb_child *nc = device_get_ivars(ntb);
460 return (NTB_PEER_DB_SET(device_get_parent(ntb), bits << nc->dboff));
463 MODULE_VERSION(ntb, 1);