Lines Matching refs:nhi

374 static bool icm_firmware_running(const struct tb_nhi *nhi)  in icm_firmware_running()  argument
378 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_running()
451 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0); in icm_fr_save_devices()
603 nhi_mailbox_cmd(tb->nhi, cmd, 1); in icm_fr_disconnect_xdomain_paths()
605 nhi_mailbox_cmd(tb->nhi, cmd, 2); in icm_fr_disconnect_xdomain_paths()
1437 if (icm_firmware_running(tb->nhi)) in icm_ar_is_supported()
1446 upstream_port = get_upstream_port(tb->nhi->pdev); in icm_ar_is_supported()
1470 struct tb_nhi *nhi = tb->nhi; in icm_ar_get_mode() local
1475 val = ioread32(nhi->iobase + REG_FW_STS); in icm_ar_get_mode()
1482 dev_err(&nhi->pdev->dev, "ICM firmware not authenticated\n"); in icm_ar_get_mode()
1486 return nhi_mailbox_mode(nhi); in icm_ar_get_mode()
1648 struct tb_nhi *nhi = tb->nhi; in icm_icl_set_uuid() local
1651 pci_read_config_dword(nhi->pdev, VS_CAP_10, &uuid[0]); in icm_icl_set_uuid()
1652 pci_read_config_dword(nhi->pdev, VS_CAP_11, &uuid[1]); in icm_icl_set_uuid()
1685 val = ioread32(tb->nhi->iobase + REG_FW_STS); in icm_tgl_is_supported()
1791 static int icm_firmware_reset(struct tb *tb, struct tb_nhi *nhi) in icm_firmware_reset() argument
1800 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_reset()
1802 iowrite32(val, nhi->iobase + REG_FW_STS); in icm_firmware_reset()
1805 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_reset()
1808 iowrite32(val, nhi->iobase + REG_FW_STS); in icm_firmware_reset()
1814 static int icm_firmware_start(struct tb *tb, struct tb_nhi *nhi) in icm_firmware_start() argument
1821 if (icm_firmware_running(nhi)) in icm_firmware_start()
1824 dev_dbg(&nhi->pdev->dev, "starting ICM firmware\n"); in icm_firmware_start()
1826 ret = icm_firmware_reset(tb, nhi); in icm_firmware_start()
1833 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_start()
1914 struct tb_nhi *nhi = tb->nhi; in icm_firmware_init() local
1917 ret = icm_firmware_start(tb, nhi); in icm_firmware_init()
1919 dev_err(&nhi->pdev->dev, "could not start ICM firmware\n"); in icm_firmware_init()
1933 nhi_mailbox_cmd(nhi, NHI_MAILBOX_ALLOW_ALL_DEVS, 0); in icm_firmware_init()
1951 dev_warn(&nhi->pdev->dev, "failed to reset links on port0\n"); in icm_firmware_init()
1954 dev_warn(&nhi->pdev->dev, "failed to reset links on port1\n"); in icm_firmware_init()
2000 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_DRV_UNLOADS, 0); in icm_suspend()
2089 if (tb->nhi->going_away) in icm_complete()
2117 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_DRV_UNLOADS, 0); in icm_runtime_suspend()
2183 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_DRV_UNLOADS, 0); in icm_stop()
2190 return nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_DISCONNECT_PCIE_PATHS, 0); in icm_disconnect_pcie_paths()
2431 struct tb *icm_probe(struct tb_nhi *nhi) in icm_probe() argument
2436 tb = tb_domain_alloc(nhi, ICM_TIMEOUT, sizeof(struct icm)); in icm_probe()
2444 switch (nhi->pdev->device) { in icm_probe()
2549 dev_dbg(&nhi->pdev->dev, "ICM not supported on this controller\n"); in icm_probe()