summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-07-02 20:45:36 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-01-25 20:05:32 +0200
commita507e5d90f3d6846a02d9c2c79e6f6395982db92 (patch)
treeae7e2449af76bd21e9e153357fe9f235b575e1da /drivers
parent55627c70db6ad41371ed07a64c6e58d258ab0ae9 (diff)
downloadlinux-a507e5d90f3d6846a02d9c2c79e6f6395982db92.tar.bz2
platform/x86: intel_scu_wdt: Get rid of custom x86 model comparison
Switch the platform code to use x86_id_table and accompanying API instead of custom comparison against x86 CPU model. This is one of the last users of custom API for that and following changes will remove it for the good. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/intel_scu_wdt.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel_scu_wdt.c b/drivers/platform/x86/intel_scu_wdt.c
index 19f7686a3c19..85ee85ca2215 100644
--- a/drivers/platform/x86/intel_scu_wdt.c
+++ b/drivers/platform/x86/intel_scu_wdt.c
@@ -11,6 +11,8 @@
#include <linux/platform_device.h>
#include <linux/platform_data/intel-mid_wdt.h>
+#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/intel-mid.h>
#include <asm/io_apic.h>
#include <asm/hw_irq.h>
@@ -48,12 +50,20 @@ static struct intel_mid_wdt_pdata tangier_pdata = {
.probe = tangier_probe,
};
+static const struct x86_cpu_id intel_mid_cpu_ids[] = {
+ X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT_MID, &tangier_pdata),
+ {}
+};
+
static int __init register_mid_wdt(void)
{
- if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
+ const struct x86_cpu_id *id;
+
+ id = x86_match_cpu(intel_mid_cpu_ids);
+ if (!id)
return -ENODEV;
- wdt_dev.dev.platform_data = &tangier_pdata;
+ wdt_dev.dev.platform_data = (const struct intel_mid_wdt_pdata *)id->driver_data;
return platform_device_register(&wdt_dev);
}
arch_initcall(register_mid_wdt);