154b34aa0SMika Westerberg // SPDX-License-Identifier: GPL-2.0 254b34aa0SMika Westerberg /* 354b34aa0SMika Westerberg * PCI driver for the Intel SCU. 454b34aa0SMika Westerberg * 554b34aa0SMika Westerberg * Copyright (C) 2008-2010, 2015, 2020 Intel Corporation 654b34aa0SMika Westerberg * Authors: Sreedhara DS (sreedhara.ds@intel.com) 754b34aa0SMika Westerberg * Mika Westerberg <mika.westerberg@linux.intel.com> 854b34aa0SMika Westerberg */ 954b34aa0SMika Westerberg 1054b34aa0SMika Westerberg #include <linux/errno.h> 1154b34aa0SMika Westerberg #include <linux/init.h> 1254b34aa0SMika Westerberg #include <linux/pci.h> 1354b34aa0SMika Westerberg 1454b34aa0SMika Westerberg #include <asm/intel-mid.h> 1554b34aa0SMika Westerberg #include <asm/intel_scu_ipc.h> 1654b34aa0SMika Westerberg 1754b34aa0SMika Westerberg static int intel_scu_pci_probe(struct pci_dev *pdev, 1854b34aa0SMika Westerberg const struct pci_device_id *id) 1954b34aa0SMika Westerberg { 2054b34aa0SMika Westerberg struct intel_scu_ipc_data scu_data = {}; 2154b34aa0SMika Westerberg struct intel_scu_ipc_dev *scu; 2254b34aa0SMika Westerberg int ret; 2354b34aa0SMika Westerberg 2454b34aa0SMika Westerberg ret = pcim_enable_device(pdev); 2554b34aa0SMika Westerberg if (ret) 2654b34aa0SMika Westerberg return ret; 2754b34aa0SMika Westerberg 2854b34aa0SMika Westerberg scu_data.mem = pdev->resource[0]; 2954b34aa0SMika Westerberg scu_data.irq = pdev->irq; 3054b34aa0SMika Westerberg 3154b34aa0SMika Westerberg scu = intel_scu_ipc_register(&pdev->dev, &scu_data); 32*4590d98fSAndy Shevchenko return PTR_ERR_OR_ZERO(scu); 33b8da68f4SMika Westerberg } 34b8da68f4SMika Westerberg 3554b34aa0SMika Westerberg static const struct pci_device_id pci_ids[] = { 36*4590d98fSAndy Shevchenko { PCI_VDEVICE(INTEL, 0x080e) }, 37*4590d98fSAndy Shevchenko { PCI_VDEVICE(INTEL, 0x08ea) }, 38b8da68f4SMika Westerberg { PCI_VDEVICE(INTEL, 0x0a94) }, 39*4590d98fSAndy Shevchenko { PCI_VDEVICE(INTEL, 0x11a0) }, 40b8da68f4SMika Westerberg { PCI_VDEVICE(INTEL, 0x1a94) }, 41b8da68f4SMika Westerberg { PCI_VDEVICE(INTEL, 0x5a94) }, 4254b34aa0SMika Westerberg {} 4354b34aa0SMika Westerberg }; 4454b34aa0SMika Westerberg 4554b34aa0SMika Westerberg static struct pci_driver intel_scu_pci_driver = { 4654b34aa0SMika Westerberg .driver = { 4754b34aa0SMika Westerberg .suppress_bind_attrs = true, 4854b34aa0SMika Westerberg }, 4954b34aa0SMika Westerberg .name = "intel_scu", 5054b34aa0SMika Westerberg .id_table = pci_ids, 5154b34aa0SMika Westerberg .probe = intel_scu_pci_probe, 5254b34aa0SMika Westerberg }; 5354b34aa0SMika Westerberg 5454b34aa0SMika Westerberg builtin_pci_driver(intel_scu_pci_driver); 55