Lines Matching refs:cldev
57 static void number_of_connections(struct mei_cl_device *cldev) in number_of_connections() argument
59 if (cldev->me_cl->props.max_number_of_connections > 1) in number_of_connections()
60 cldev->do_match = 0; in number_of_connections()
68 static void blacklist(struct mei_cl_device *cldev) in blacklist() argument
70 cldev->do_match = 0; in blacklist()
78 static void whitelist(struct mei_cl_device *cldev) in whitelist() argument
80 cldev->do_match = 1; in whitelist()
108 static int mei_osver(struct mei_cl_device *cldev) in mei_osver() argument
131 return __mei_cl_send(cldev->cl, buf, size, 0, mode); in mei_osver()
138 static int mei_fwver(struct mei_cl_device *cldev) in mei_fwver() argument
151 ret = __mei_cl_send(cldev->cl, (u8 *)&req, sizeof(req), 0, in mei_fwver()
154 dev_err(&cldev->dev, "Could not send ReqFWVersion cmd\n"); in mei_fwver()
159 bytes_recv = __mei_cl_recv(cldev->cl, buf, sizeof(buf), NULL, 0, in mei_fwver()
160 cldev->bus->timeouts.mkhi_recv); in mei_fwver()
166 dev_err(&cldev->dev, "Could not read FW version\n"); in mei_fwver()
172 memset(cldev->bus->fw_ver, 0, sizeof(cldev->bus->fw_ver)); in mei_fwver()
176 dev_dbg(&cldev->dev, "FW version%d %d:%d.%d.%d.%d\n", in mei_fwver()
181 cldev->bus->fw_ver[i].platform = fwver->ver[i].platform; in mei_fwver()
182 cldev->bus->fw_ver[i].major = fwver->ver[i].major; in mei_fwver()
183 cldev->bus->fw_ver[i].minor = fwver->ver[i].minor; in mei_fwver()
184 cldev->bus->fw_ver[i].hotfix = fwver->ver[i].hotfix; in mei_fwver()
185 cldev->bus->fw_ver[i].buildno = fwver->ver[i].buildno; in mei_fwver()
191 static int mei_gfx_memory_ready(struct mei_cl_device *cldev) in mei_gfx_memory_ready() argument
200 dev_dbg(&cldev->dev, "Sending memory ready command\n"); in mei_gfx_memory_ready()
201 return __mei_cl_send(cldev->cl, (u8 *)&req, sizeof(req), 0, mode); in mei_gfx_memory_ready()
204 static void mei_mkhi_fix(struct mei_cl_device *cldev) in mei_mkhi_fix() argument
209 if (!cldev->bus->fw_f_fw_ver_supported && in mei_mkhi_fix()
210 !cldev->bus->hbm_f_os_supported) in mei_mkhi_fix()
213 ret = mei_cldev_enable(cldev); in mei_mkhi_fix()
217 if (cldev->bus->fw_f_fw_ver_supported) { in mei_mkhi_fix()
218 ret = mei_fwver(cldev); in mei_mkhi_fix()
220 dev_err(&cldev->dev, "FW version command failed %d\n", in mei_mkhi_fix()
224 if (cldev->bus->hbm_f_os_supported) { in mei_mkhi_fix()
225 ret = mei_osver(cldev); in mei_mkhi_fix()
227 dev_err(&cldev->dev, "OS version command failed %d\n", in mei_mkhi_fix()
230 mei_cldev_disable(cldev); in mei_mkhi_fix()
233 static void mei_gsc_mkhi_ver(struct mei_cl_device *cldev) in mei_gsc_mkhi_ver() argument
238 if (!cldev->bus->fw_f_fw_ver_supported) in mei_gsc_mkhi_ver()
241 ret = mei_cldev_enable(cldev); in mei_gsc_mkhi_ver()
245 ret = mei_fwver(cldev); in mei_gsc_mkhi_ver()
247 dev_err(&cldev->dev, "FW version command failed %d\n", ret); in mei_gsc_mkhi_ver()
248 mei_cldev_disable(cldev); in mei_gsc_mkhi_ver()
251 static void mei_gsc_mkhi_fix_ver(struct mei_cl_device *cldev) in mei_gsc_mkhi_fix_ver() argument
256 if (!cldev->bus->fw_f_fw_ver_supported && in mei_gsc_mkhi_fix_ver()
257 cldev->bus->pxp_mode != MEI_DEV_PXP_INIT) in mei_gsc_mkhi_fix_ver()
260 ret = mei_cldev_enable(cldev); in mei_gsc_mkhi_fix_ver()
264 if (cldev->bus->pxp_mode == MEI_DEV_PXP_INIT) { in mei_gsc_mkhi_fix_ver()
265 ret = mei_gfx_memory_ready(cldev); in mei_gsc_mkhi_fix_ver()
267 dev_err(&cldev->dev, "memory ready command failed %d\n", ret); in mei_gsc_mkhi_fix_ver()
269 dev_dbg(&cldev->dev, "memory ready command sent\n"); in mei_gsc_mkhi_fix_ver()
271 cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP; in mei_gsc_mkhi_fix_ver()
275 ret = mei_fwver(cldev); in mei_gsc_mkhi_fix_ver()
277 dev_err(&cldev->dev, "FW version command failed %d\n", in mei_gsc_mkhi_fix_ver()
280 mei_cldev_disable(cldev); in mei_gsc_mkhi_fix_ver()
292 static void mei_wd(struct mei_cl_device *cldev) in mei_wd() argument
294 struct pci_dev *pdev = to_pci_dev(cldev->dev.parent); in mei_wd()
299 cldev->me_cl->props.protocol_version = 0x2; in mei_wd()
301 cldev->do_match = 1; in mei_wd()
304 static inline void mei_wd(struct mei_cl_device *cldev) {} in mei_wd() argument
439 static void mei_nfc(struct mei_cl_device *cldev) in mei_nfc() argument
448 bus = cldev->bus; in mei_nfc()
469 dev_err(&cldev->dev, "Can't connect to the NFC INFO ME ret = %d\n", in mei_nfc()
484 dev_err(&cldev->dev, "Can't get the NFC interface version ret = %d\n", in mei_nfc()
490 strscpy(cldev->name, radio_name, sizeof(cldev->name)); in mei_nfc()
506 cldev->do_match = 0; in mei_nfc()
508 dev_dbg(bus->dev, "end of fixup match = %d\n", cldev->do_match); in mei_nfc()
516 static void vt_support(struct mei_cl_device *cldev) in vt_support() argument
518 if (cldev->me_cl->props.vt_supported == 1) in vt_support()
519 cldev->do_match = 1; in vt_support()
527 static void pxp_is_ready(struct mei_cl_device *cldev) in pxp_is_ready() argument
529 struct mei_device *bus = cldev->bus; in pxp_is_ready()
534 cldev->do_match = 1; in pxp_is_ready()
537 cldev->do_match = 0; in pxp_is_ready()
547 void (*hook)(struct mei_cl_device *cldev);
566 void mei_cl_bus_dev_fixup(struct mei_cl_device *cldev) in mei_cl_bus_dev_fixup() argument
569 const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl); in mei_cl_bus_dev_fixup()
577 f->hook(cldev); in mei_cl_bus_dev_fixup()