Home
last modified time | relevance | path

Searched refs:cxlhdm (Results 1 – 8 of 8) sorted by relevance

/openbmc/linux/drivers/cxl/
H A Dport.c62 struct cxl_hdm *cxlhdm; in cxl_switch_port_probe() local
69 cxlhdm = devm_cxl_setup_hdm(port, NULL); in cxl_switch_port_probe()
70 if (!IS_ERR(cxlhdm)) in cxl_switch_port_probe()
71 return devm_cxl_enumerate_decoders(cxlhdm, NULL); in cxl_switch_port_probe()
73 if (PTR_ERR(cxlhdm) != -ENODEV) { in cxl_switch_port_probe()
75 return PTR_ERR(cxlhdm); in cxl_switch_port_probe()
92 struct cxl_hdm *cxlhdm; in cxl_endpoint_port_probe() local
100 cxlhdm = devm_cxl_setup_hdm(port, &info); in cxl_endpoint_port_probe()
101 if (IS_ERR(cxlhdm)) { in cxl_endpoint_port_probe()
102 if (PTR_ERR(cxlhdm) == -ENODEV) in cxl_endpoint_port_probe()
[all …]
H A Dcxlpci.h90 int cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm,
H A Dcxl.h747 int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
/openbmc/linux/drivers/cxl/core/
H A Dhdm.c55 struct cxl_hdm *cxlhdm = dev_get_drvdata(&port->dev); in devm_cxl_add_passthrough_decoder() local
61 cxlhdm->interleave_mask = ~0U; in devm_cxl_add_passthrough_decoder()
62 cxlhdm->iw_cap_mask = ~0UL; in devm_cxl_add_passthrough_decoder()
78 static void parse_hdm_decoder_caps(struct cxl_hdm *cxlhdm) in parse_hdm_decoder_caps() argument
82 hdm_cap = readl(cxlhdm->regs.hdm_decoder + CXL_HDM_DECODER_CAP_OFFSET); in parse_hdm_decoder_caps()
83 cxlhdm->decoder_count = cxl_hdm_decoder_count(hdm_cap); in parse_hdm_decoder_caps()
84 cxlhdm->target_count = in parse_hdm_decoder_caps()
87 cxlhdm->interleave_mask |= GENMASK(11, 8); in parse_hdm_decoder_caps()
89 cxlhdm->interleave_mask |= GENMASK(14, 12); in parse_hdm_decoder_caps()
90 cxlhdm->iw_cap_mask = BIT(1) | BIT(2) | BIT(4) | BIT(8); in parse_hdm_decoder_caps()
[all …]
H A Dpci.c303 struct cxl_hdm *cxlhdm = _cxlhdm; in disable_hdm() local
304 void __iomem *hdm = cxlhdm->regs.hdm_decoder; in disable_hdm()
311 static int devm_cxl_enable_hdm(struct device *host, struct cxl_hdm *cxlhdm) in devm_cxl_enable_hdm() argument
313 void __iomem *hdm = cxlhdm->regs.hdm_decoder; in devm_cxl_enable_hdm()
320 return devm_add_action_or_reset(host, disable_hdm, cxlhdm); in devm_cxl_enable_hdm()
428 int cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm, in cxl_hdm_decode_init() argument
431 void __iomem *hdm = cxlhdm->regs.hdm_decoder; in cxl_hdm_decode_init()
432 struct cxl_port *port = cxlhdm->port; in cxl_hdm_decode_init()
489 rc = devm_cxl_enable_hdm(&port->dev, cxlhdm); in cxl_hdm_decode_init()
H A Dregion.c1116 struct cxl_hdm *cxlhdm = dev_get_drvdata(&port->dev); in check_interleave_cap() local
1122 if (!test_bit(iw, &cxlhdm->iw_cap_mask)) in check_interleave_cap()
1151 if (interleave_mask & ~cxlhdm->interleave_mask) in check_interleave_cap()
/openbmc/linux/tools/testing/cxl/test/
H A Dmock.c139 struct cxl_hdm *cxlhdm; in __wrap_devm_cxl_setup_hdm() local
143 cxlhdm = ops->devm_cxl_setup_hdm(port, info); in __wrap_devm_cxl_setup_hdm()
145 cxlhdm = devm_cxl_setup_hdm(port, info); in __wrap_devm_cxl_setup_hdm()
148 return cxlhdm; in __wrap_devm_cxl_setup_hdm()
167 int __wrap_devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm, in __wrap_devm_cxl_enumerate_decoders() argument
171 struct cxl_port *port = cxlhdm->port; in __wrap_devm_cxl_enumerate_decoders()
175 rc = ops->devm_cxl_enumerate_decoders(cxlhdm, info); in __wrap_devm_cxl_enumerate_decoders()
177 rc = devm_cxl_enumerate_decoders(cxlhdm, info); in __wrap_devm_cxl_enumerate_decoders()
215 struct cxl_hdm *cxlhdm, in __wrap_cxl_hdm_decode_init() argument
224 rc = cxl_hdm_decode_init(cxlds, cxlhdm, info); in __wrap_cxl_hdm_decode_init()
H A Dcxl.c626 struct cxl_hdm *cxlhdm = devm_kzalloc(&port->dev, sizeof(*cxlhdm), GFP_KERNEL); in mock_cxl_setup_hdm() local
629 if (!cxlhdm) in mock_cxl_setup_hdm()
632 cxlhdm->port = port; in mock_cxl_setup_hdm()
633 cxlhdm->interleave_mask = ~0U; in mock_cxl_setup_hdm()
634 cxlhdm->iw_cap_mask = ~0UL; in mock_cxl_setup_hdm()
635 dev_set_drvdata(dev, cxlhdm); in mock_cxl_setup_hdm()
636 return cxlhdm; in mock_cxl_setup_hdm()
844 static int mock_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm, in mock_cxl_enumerate_decoders() argument
847 struct cxl_port *port = cxlhdm->port; in mock_cxl_enumerate_decoders()