diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-04-16 11:15:49 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-04-24 13:18:25 +0300 |
commit | b8da68f44f6dec243a4e9685af0ca0cdc1cd939c (patch) | |
tree | 4267027a13a0d32aea6fe872beb7778d3049af0a /drivers/platform/x86/intel_scu_pcidrv.c | |
parent | 781adff21c841196e846a5a88505f80d04b06016 (diff) | |
download | linux-b8da68f44f6dec243a4e9685af0ca0cdc1cd939c.tar.xz |
platform/x86: intel_pmc_ipc: Move PCI IDs to intel_scu_pcidrv.c
The PCI probe driver in intel_pmc_ipc.c is a duplicate of what we
already have in intel_scu_pcidrv.c with the exception that the later also
creates SCU specific devices. Move the PCI IDs from the intel_pmc_ipc.c
to intel_scu.c and use driver_data to detect whether SCU devices need to
be created or not.
Also update Kconfig entry to mention all platforms supported by the
Intel SCU PCI driver and change dependency from X86_INTEL_MID to PCI
which is more generic.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/platform/x86/intel_scu_pcidrv.c')
-rw-r--r-- | drivers/platform/x86/intel_scu_pcidrv.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel_scu_pcidrv.c b/drivers/platform/x86/intel_scu_pcidrv.c index b869ec2eda0e..8c5fd8240da9 100644 --- a/drivers/platform/x86/intel_scu_pcidrv.c +++ b/drivers/platform/x86/intel_scu_pcidrv.c @@ -17,6 +17,7 @@ static int intel_scu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { + void (*setup_fn)(void) = (void (*)(void))id->driver_data; struct intel_scu_ipc_data scu_data = {}; struct intel_scu_ipc_dev *scu; int ret; @@ -32,14 +33,26 @@ static int intel_scu_pci_probe(struct pci_dev *pdev, if (IS_ERR(scu)) return PTR_ERR(scu); - intel_scu_devices_create(); + if (setup_fn) + setup_fn(); return 0; } +static void intel_mid_scu_setup(void) +{ + intel_scu_devices_create(); +} + static const struct pci_device_id pci_ids[] = { - { PCI_VDEVICE(INTEL, 0x080e) }, - { PCI_VDEVICE(INTEL, 0x08ea) }, - { PCI_VDEVICE(INTEL, 0x11a0) }, + { PCI_VDEVICE(INTEL, 0x080e), + .driver_data = (kernel_ulong_t)intel_mid_scu_setup }, + { PCI_VDEVICE(INTEL, 0x08ea), + .driver_data = (kernel_ulong_t)intel_mid_scu_setup }, + { PCI_VDEVICE(INTEL, 0x0a94) }, + { PCI_VDEVICE(INTEL, 0x11a0), + .driver_data = (kernel_ulong_t)intel_mid_scu_setup }, + { PCI_VDEVICE(INTEL, 0x1a94) }, + { PCI_VDEVICE(INTEL, 0x5a94) }, {} }; |