intel_scu_pcidrv.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * PCI driver for the Intel SCU.
  4. *
  5. * Copyright (C) 2008-2010, 2015, 2020 Intel Corporation
  6. * Authors: Sreedhara DS (sreedhara.ds@intel.com)
  7. * Mika Westerberg <mika.westerberg@linux.intel.com>
  8. */
  9. #include <linux/errno.h>
  10. #include <linux/init.h>
  11. #include <linux/pci.h>
  12. #include <linux/platform_data/x86/intel_scu_ipc.h>
  13. static int intel_scu_pci_probe(struct pci_dev *pdev,
  14. const struct pci_device_id *id)
  15. {
  16. struct intel_scu_ipc_data scu_data = {};
  17. struct intel_scu_ipc_dev *scu;
  18. int ret;
  19. ret = pcim_enable_device(pdev);
  20. if (ret)
  21. return ret;
  22. scu_data.mem = pdev->resource[0];
  23. scu_data.irq = pdev->irq;
  24. scu = intel_scu_ipc_register(&pdev->dev, &scu_data);
  25. return PTR_ERR_OR_ZERO(scu);
  26. }
  27. static const struct pci_device_id pci_ids[] = {
  28. { PCI_VDEVICE(INTEL, 0x080e) },
  29. { PCI_VDEVICE(INTEL, 0x082a) },
  30. { PCI_VDEVICE(INTEL, 0x08ea) },
  31. { PCI_VDEVICE(INTEL, 0x0a94) },
  32. { PCI_VDEVICE(INTEL, 0x11a0) },
  33. { PCI_VDEVICE(INTEL, 0x1a94) },
  34. { PCI_VDEVICE(INTEL, 0x5a94) },
  35. {}
  36. };
  37. static struct pci_driver intel_scu_pci_driver = {
  38. .driver = {
  39. .suppress_bind_attrs = true,
  40. },
  41. .name = "intel_scu",
  42. .id_table = pci_ids,
  43. .probe = intel_scu_pci_probe,
  44. };
  45. builtin_pci_driver(intel_scu_pci_driver);