Lines Matching refs:cdx

19 static unsigned int cdx_mcdi_rpc_timeout(struct cdx_mcdi *cdx, unsigned int cmd)  in cdx_mcdi_rpc_timeout()  argument
24 static void cdx_mcdi_request(struct cdx_mcdi *cdx, in cdx_mcdi_request() argument
28 if (cdx_rpmsg_send(cdx, hdr, hdr_len, sdu, sdu_len)) in cdx_mcdi_request()
29 dev_err(&cdx->rpdev->dev, "Failed to send rpmsg data\n"); in cdx_mcdi_request()
37 static int cdx_bus_enable(struct cdx_controller *cdx, u8 bus_num) in cdx_bus_enable() argument
39 return cdx_mcdi_bus_enable(cdx->priv, bus_num); in cdx_bus_enable()
42 static int cdx_bus_disable(struct cdx_controller *cdx, u8 bus_num) in cdx_bus_disable() argument
44 return cdx_mcdi_bus_disable(cdx->priv, bus_num); in cdx_bus_disable()
47 void cdx_rpmsg_post_probe(struct cdx_controller *cdx) in cdx_rpmsg_post_probe() argument
50 if (cdx_register_controller(cdx)) in cdx_rpmsg_post_probe()
51 dev_err(cdx->dev, "Failed to register CDX controller\n"); in cdx_rpmsg_post_probe()
54 void cdx_rpmsg_pre_remove(struct cdx_controller *cdx) in cdx_rpmsg_pre_remove() argument
56 cdx_unregister_controller(cdx); in cdx_rpmsg_pre_remove()
57 cdx_mcdi_wait_for_quiescence(cdx->priv, MCDI_RPC_TIMEOUT); in cdx_rpmsg_pre_remove()
60 static int cdx_configure_device(struct cdx_controller *cdx, in cdx_configure_device() argument
75 ret = cdx_mcdi_write_msi(cdx->priv, bus_num, dev_num, msi_index, addr, data); in cdx_configure_device()
78 ret = cdx_mcdi_reset_device(cdx->priv, bus_num, dev_num); in cdx_configure_device()
81 ret = cdx_mcdi_bus_master_enable(cdx->priv, bus_num, dev_num, in cdx_configure_device()
85 ret = cdx_mcdi_msi_enable(cdx->priv, bus_num, dev_num, dev_config->msi_enable); in cdx_configure_device()
94 static int cdx_scan_devices(struct cdx_controller *cdx) in cdx_scan_devices() argument
96 struct cdx_mcdi *cdx_mcdi = cdx->priv; in cdx_scan_devices()
103 dev_err(cdx->dev, in cdx_scan_devices()
114 bus_dev = cdx_bus_add(cdx, bus_num); in cdx_scan_devices()
121 dev_err(cdx->dev, in cdx_scan_devices()
134 dev_err(cdx->dev, in cdx_scan_devices()
139 dev_params.cdx = cdx; in cdx_scan_devices()
145 dev_err(cdx->dev, "registering cdx dev: %d failed: %d\n", in cdx_scan_devices()
150 dev_dbg(cdx->dev, "CDX dev: %d on cdx bus: %d created\n", in cdx_scan_devices()
167 struct cdx_controller *cdx; in xlnx_cdx_probe() local
184 cdx = kzalloc(sizeof(*cdx), GFP_KERNEL); in xlnx_cdx_probe()
185 if (!cdx) { in xlnx_cdx_probe()
189 platform_set_drvdata(pdev, cdx); in xlnx_cdx_probe()
191 cdx->dev = &pdev->dev; in xlnx_cdx_probe()
192 cdx->priv = cdx_mcdi; in xlnx_cdx_probe()
193 cdx->ops = &cdx_ops; in xlnx_cdx_probe()
196 cdx->msi_domain = cdx_msi_domain_init(&pdev->dev); in xlnx_cdx_probe()
197 if (!cdx->msi_domain) { in xlnx_cdx_probe()
214 irq_domain_remove(cdx->msi_domain); in xlnx_cdx_probe()
216 kfree(cdx); in xlnx_cdx_probe()
227 struct cdx_controller *cdx = platform_get_drvdata(pdev); in xlnx_cdx_remove() local
228 struct cdx_mcdi *cdx_mcdi = cdx->priv; in xlnx_cdx_remove()
232 irq_domain_remove(cdx->msi_domain); in xlnx_cdx_remove()
233 kfree(cdx); in xlnx_cdx_remove()