Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * PCI driver for the Intel SCU.
0004  *
0005  * Copyright (C) 2008-2010, 2015, 2020 Intel Corporation
0006  * Authors: Sreedhara DS (sreedhara.ds@intel.com)
0007  *      Mika Westerberg <mika.westerberg@linux.intel.com>
0008  */
0009 
0010 #include <linux/errno.h>
0011 #include <linux/init.h>
0012 #include <linux/pci.h>
0013 
0014 #include <asm/intel-mid.h>
0015 #include <asm/intel_scu_ipc.h>
0016 
0017 static int intel_scu_pci_probe(struct pci_dev *pdev,
0018                    const struct pci_device_id *id)
0019 {
0020     struct intel_scu_ipc_data scu_data = {};
0021     struct intel_scu_ipc_dev *scu;
0022     int ret;
0023 
0024     ret = pcim_enable_device(pdev);
0025     if (ret)
0026         return ret;
0027 
0028     scu_data.mem = pdev->resource[0];
0029     scu_data.irq = pdev->irq;
0030 
0031     scu = intel_scu_ipc_register(&pdev->dev, &scu_data);
0032     return PTR_ERR_OR_ZERO(scu);
0033 }
0034 
0035 static const struct pci_device_id pci_ids[] = {
0036     { PCI_VDEVICE(INTEL, 0x080e) },
0037     { PCI_VDEVICE(INTEL, 0x08ea) },
0038     { PCI_VDEVICE(INTEL, 0x0a94) },
0039     { PCI_VDEVICE(INTEL, 0x11a0) },
0040     { PCI_VDEVICE(INTEL, 0x1a94) },
0041     { PCI_VDEVICE(INTEL, 0x5a94) },
0042     {}
0043 };
0044 
0045 static struct pci_driver intel_scu_pci_driver = {
0046     .driver = {
0047         .suppress_bind_attrs = true,
0048     },
0049     .name = "intel_scu",
0050     .id_table = pci_ids,
0051     .probe = intel_scu_pci_probe,
0052 };
0053 
0054 builtin_pci_driver(intel_scu_pci_driver);