Lines Matching refs:ntb

40 SYSCTL_NODE(_hw, OID_AUTO, ntb, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
252 ntb_port_number(device_t ntb) in ntb_port_number() argument
254 return (NTB_PORT_NUMBER(device_get_parent(ntb))); in ntb_port_number()
258 ntb_peer_port_count(device_t ntb) in ntb_peer_port_count() argument
260 return (NTB_PEER_PORT_COUNT(device_get_parent(ntb))); in ntb_peer_port_count()
264 ntb_peer_port_number(device_t ntb, int pidx) in ntb_peer_port_number() argument
266 return (NTB_PEER_PORT_NUMBER(device_get_parent(ntb), pidx)); in ntb_peer_port_number()
270 ntb_peer_port_idx(device_t ntb, int port) in ntb_peer_port_idx() argument
272 return (NTB_PEER_PORT_IDX(device_get_parent(ntb), port)); in ntb_peer_port_idx()
276 ntb_link_is_up(device_t ntb, enum ntb_speed *speed, enum ntb_width *width) in ntb_link_is_up() argument
279 return (NTB_LINK_IS_UP(device_get_parent(ntb), speed, width)); in ntb_link_is_up()
283 ntb_link_enable(device_t ntb, enum ntb_speed speed, enum ntb_width width) in ntb_link_enable() argument
285 struct ntb_child *nc = device_get_ivars(ntb); in ntb_link_enable()
296 return (NTB_LINK_ENABLE(device_get_parent(ntb), speed, width)); in ntb_link_enable()
300 ntb_link_disable(device_t ntb) in ntb_link_disable() argument
302 struct ntb_child *nc = device_get_ivars(ntb); in ntb_link_disable()
313 return (NTB_LINK_DISABLE(device_get_parent(ntb))); in ntb_link_disable()
317 ntb_link_enabled(device_t ntb) in ntb_link_enabled() argument
319 struct ntb_child *nc = device_get_ivars(ntb); in ntb_link_enabled()
321 return (nc->enabled && NTB_LINK_ENABLED(device_get_parent(ntb))); in ntb_link_enabled()
325 ntb_set_ctx(device_t ntb, void *ctx, const struct ntb_ctx_ops *ctx_ops) in ntb_set_ctx() argument
327 struct ntb_child *nc = device_get_ivars(ntb); in ntb_set_ctx()
352 ntb_get_ctx(device_t ntb, const struct ntb_ctx_ops **ctx_ops) in ntb_get_ctx() argument
354 struct ntb_child *nc = device_get_ivars(ntb); in ntb_get_ctx()
363 ntb_clear_ctx(device_t ntb) in ntb_clear_ctx() argument
365 struct ntb_child *nc = device_get_ivars(ntb); in ntb_clear_ctx()
374 ntb_mw_count(device_t ntb) in ntb_mw_count() argument
376 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_count()
382 ntb_mw_get_range(device_t ntb, unsigned mw_idx, vm_paddr_t *base, in ntb_mw_get_range() argument
386 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_get_range()
388 return (NTB_MW_GET_RANGE(device_get_parent(ntb), mw_idx + nc->mwoff, in ntb_mw_get_range()
393 ntb_mw_set_trans(device_t ntb, unsigned mw_idx, bus_addr_t addr, size_t size) in ntb_mw_set_trans() argument
395 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_set_trans()
397 return (NTB_MW_SET_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff, in ntb_mw_set_trans()
402 ntb_mw_clear_trans(device_t ntb, unsigned mw_idx) in ntb_mw_clear_trans() argument
404 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_clear_trans()
406 return (NTB_MW_CLEAR_TRANS(device_get_parent(ntb), mw_idx + nc->mwoff)); in ntb_mw_clear_trans()
410 ntb_mw_get_wc(device_t ntb, unsigned mw_idx, vm_memattr_t *mode) in ntb_mw_get_wc() argument
412 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_get_wc()
414 return (NTB_MW_GET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode)); in ntb_mw_get_wc()
418 ntb_mw_set_wc(device_t ntb, unsigned mw_idx, vm_memattr_t mode) in ntb_mw_set_wc() argument
420 struct ntb_child *nc = device_get_ivars(ntb); in ntb_mw_set_wc()
422 return (NTB_MW_SET_WC(device_get_parent(ntb), mw_idx + nc->mwoff, mode)); in ntb_mw_set_wc()
426 ntb_spad_count(device_t ntb) in ntb_spad_count() argument
428 struct ntb_child *nc = device_get_ivars(ntb); in ntb_spad_count()
434 ntb_spad_clear(device_t ntb) in ntb_spad_clear() argument
436 struct ntb_child *nc = device_get_ivars(ntb); in ntb_spad_clear()
440 NTB_SPAD_WRITE(device_get_parent(ntb), i + nc->spadoff, 0); in ntb_spad_clear()
444 ntb_spad_write(device_t ntb, unsigned int idx, uint32_t val) in ntb_spad_write() argument
446 struct ntb_child *nc = device_get_ivars(ntb); in ntb_spad_write()
448 return (NTB_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff, val)); in ntb_spad_write()
452 ntb_spad_read(device_t ntb, unsigned int idx, uint32_t *val) in ntb_spad_read() argument
454 struct ntb_child *nc = device_get_ivars(ntb); in ntb_spad_read()
456 return (NTB_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff, val)); in ntb_spad_read()
460 ntb_peer_spad_write(device_t ntb, unsigned int idx, uint32_t val) in ntb_peer_spad_write() argument
462 struct ntb_child *nc = device_get_ivars(ntb); in ntb_peer_spad_write()
464 return (NTB_PEER_SPAD_WRITE(device_get_parent(ntb), idx + nc->spadoff, in ntb_peer_spad_write()
469 ntb_peer_spad_read(device_t ntb, unsigned int idx, uint32_t *val) in ntb_peer_spad_read() argument
471 struct ntb_child *nc = device_get_ivars(ntb); in ntb_peer_spad_read()
473 return (NTB_PEER_SPAD_READ(device_get_parent(ntb), idx + nc->spadoff, in ntb_peer_spad_read()
478 ntb_db_valid_mask(device_t ntb) in ntb_db_valid_mask() argument
480 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_valid_mask()
486 ntb_db_vector_count(device_t ntb) in ntb_db_vector_count() argument
489 return (NTB_DB_VECTOR_COUNT(device_get_parent(ntb))); in ntb_db_vector_count()
493 ntb_db_vector_mask(device_t ntb, uint32_t vector) in ntb_db_vector_mask() argument
495 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_vector_mask()
497 return ((NTB_DB_VECTOR_MASK(device_get_parent(ntb), vector) in ntb_db_vector_mask()
502 ntb_peer_db_addr(device_t ntb, bus_addr_t *db_addr, vm_size_t *db_size) in ntb_peer_db_addr() argument
505 return (NTB_PEER_DB_ADDR(device_get_parent(ntb), db_addr, db_size)); in ntb_peer_db_addr()
509 ntb_db_clear(device_t ntb, uint64_t bits) in ntb_db_clear() argument
511 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_clear()
513 return (NTB_DB_CLEAR(device_get_parent(ntb), bits << nc->dboff)); in ntb_db_clear()
517 ntb_db_clear_mask(device_t ntb, uint64_t bits) in ntb_db_clear_mask() argument
519 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_clear_mask()
521 return (NTB_DB_CLEAR_MASK(device_get_parent(ntb), bits << nc->dboff)); in ntb_db_clear_mask()
525 ntb_db_read(device_t ntb) in ntb_db_read() argument
527 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_read()
529 return ((NTB_DB_READ(device_get_parent(ntb)) >> nc->dboff) in ntb_db_read()
534 ntb_db_set_mask(device_t ntb, uint64_t bits) in ntb_db_set_mask() argument
536 struct ntb_child *nc = device_get_ivars(ntb); in ntb_db_set_mask()
538 return (NTB_DB_SET_MASK(device_get_parent(ntb), bits << nc->dboff)); in ntb_db_set_mask()
542 ntb_peer_db_set(device_t ntb, uint64_t bits) in ntb_peer_db_set() argument
544 struct ntb_child *nc = device_get_ivars(ntb); in ntb_peer_db_set()
546 return (NTB_PEER_DB_SET(device_get_parent(ntb), bits << nc->dboff)); in ntb_peer_db_set()
549 MODULE_VERSION(ntb, 1);