MLK-24569-2: pci: endpoint: function: imx_mic: add probe mic driver function call

Invoke mic driver API to probe mic card driver when imx_mic_epf setup pci
outbound configuration.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
This commit is contained in:
Sherry Sun 2020-08-07 20:59:00 +08:00
parent 3ab11464ab
commit 2a98a948c1
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,8 @@ static void imx_mic_epf_unbind(struct pci_epf *epf)
cancel_delayed_work(&imx_epf->bar0_handler);
imx_mic_remove();
pci_epc_stop(epc);
if (imx_epf->reg[BAR_0]) {
@ -96,6 +98,12 @@ static int imx_mic_epf_set_outbound(struct imx_mic_epf *imx_epf,
dev_info(dev, "%s: rc map share region to ep (rc->ep: 0x%llx->0x%llx), size 0x%llx", __func__,
imx_epf->aper.rc_shmem_pa, imx_epf->aper.pci_pa, imx_epf->aper.pci_len);
ret = imx_mic_probe(imx_epf);
if (ret) {
dev_err(dev, "Failed to probe i.MX MIC\n");
return ret;
}
return 0;
}

View File

@ -27,4 +27,6 @@ struct imx_mic_epf {
};
void imx_mic_get_doorbell_info(u32 *doorbell_reg_base, u32 *doorbell_reg_size);
int imx_mic_probe(struct imx_mic_epf *mic_epf);
void imx_mic_remove(void);
#endif