void qtnf_pcie_init_shm_ipc(struct qtnf_pcie_bus_priv *priv, struct qtnf_shm_ipc_region __iomem *ipc_tx_reg, struct qtnf_shm_ipc_region __iomem *ipc_rx_reg, const struct qtnf_shm_ipc_int *ipc_int) { const struct qtnf_shm_ipc_rx_callback rx_callback = { qtnf_pcie_control_rx_callback, priv }; qtnf_shm_ipc_init(&priv->shm_ipc_ep_in, QTNF_SHM_IPC_OUTBOUND, ipc_tx_reg, priv->workqueue, ipc_int, &rx_callback); qtnf_shm_ipc_init(&priv->shm_ipc_ep_out, QTNF_SHM_IPC_INBOUND, ipc_rx_reg, priv->workqueue, ipc_int, &rx_callback); }
static int qtnf_pcie_init_shm_ipc(struct qtnf_pcie_bus_priv *priv) { struct qtnf_shm_ipc_region __iomem *ipc_tx_reg; struct qtnf_shm_ipc_region __iomem *ipc_rx_reg; const struct qtnf_shm_ipc_int ipc_int = { qtnf_ipc_gen_ep_int, priv }; const struct qtnf_shm_ipc_rx_callback rx_callback = { qtnf_pcie_control_rx_callback, priv }; ipc_tx_reg = &priv->bda->bda_shm_reg1; ipc_rx_reg = &priv->bda->bda_shm_reg2; qtnf_shm_ipc_init(&priv->shm_ipc_ep_in, QTNF_SHM_IPC_OUTBOUND, ipc_tx_reg, priv->workqueue, &ipc_int, &rx_callback); qtnf_shm_ipc_init(&priv->shm_ipc_ep_out, QTNF_SHM_IPC_INBOUND, ipc_rx_reg, priv->workqueue, &ipc_int, &rx_callback); return 0; }