1 // SPDX-License-Identifier: GPL-2.0
3 * PCI driver for the Intel SCU.
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>
10 #include <linux/errno.h>
11 #include <linux/init.h>
12 #include <linux/pci.h>
14 #include <asm/intel-mid.h>
15 #include <asm/intel_scu_ipc.h>
17 static int intel_scu_pci_probe(struct pci_dev *pdev,
18 const struct pci_device_id *id)
20 void (*setup_fn)(void) = (void (*)(void))id->driver_data;
21 struct intel_scu_ipc_data scu_data = {};
22 struct intel_scu_ipc_dev *scu;
25 ret = pcim_enable_device(pdev);
29 scu_data.mem = pdev->resource[0];
30 scu_data.irq = pdev->irq;
32 scu = intel_scu_ipc_register(&pdev->dev, &scu_data);
41 static void intel_mid_scu_setup(void)
43 intel_scu_devices_create();
46 static const struct pci_device_id pci_ids[] = {
47 { PCI_VDEVICE(INTEL, 0x080e),
48 .driver_data = (kernel_ulong_t)intel_mid_scu_setup },
49 { PCI_VDEVICE(INTEL, 0x08ea),
50 .driver_data = (kernel_ulong_t)intel_mid_scu_setup },
51 { PCI_VDEVICE(INTEL, 0x0a94) },
52 { PCI_VDEVICE(INTEL, 0x11a0),
53 .driver_data = (kernel_ulong_t)intel_mid_scu_setup },
54 { PCI_VDEVICE(INTEL, 0x1a94) },
55 { PCI_VDEVICE(INTEL, 0x5a94) },
59 static struct pci_driver intel_scu_pci_driver = {
61 .suppress_bind_attrs = true,
65 .probe = intel_scu_pci_probe,
68 builtin_pci_driver(intel_scu_pci_driver);