x86/platform/intel-mid: Rename platform_wdt to platform_mrfld_wdt
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 18 Nov 2016 17:27:23 +0000 (19:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 21 Nov 2016 10:07:11 +0000 (11:07 +0100)
Rename the watchdog platform library file to explicitly show that is used only
on Intel Merrifield platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20161118172723.179761-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/platform/intel-mid/device_libs/Makefile
arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c [new file with mode: 0644]
arch/x86/platform/intel-mid/device_libs/platform_wdt.c [deleted file]

index 429d08be7848a2df6334aef7e5e2c4e79e4b6d4a..dd6cfa4ad3ac35713da9c93951bd65bd70106a58 100644 (file)
@@ -28,4 +28,4 @@ obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o
 obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 # MISC Devices
 obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
-obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_wdt.o
+obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_mrfld_wdt.o
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
new file mode 100644 (file)
index 0000000..3f1f1c7
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Intel Merrifield watchdog platform device library file
+ *
+ * (C) Copyright 2014 Intel Corporation
+ * Author: David Cohen <david.a.cohen@linux.intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ */
+
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/intel-mid_wdt.h>
+
+#include <asm/intel-mid.h>
+#include <asm/intel_scu_ipc.h>
+#include <asm/io_apic.h>
+
+#define TANGIER_EXT_TIMER0_MSI 15
+
+static struct platform_device wdt_dev = {
+       .name = "intel_mid_wdt",
+       .id = -1,
+};
+
+static int tangier_probe(struct platform_device *pdev)
+{
+       int gsi;
+       struct irq_alloc_info info;
+       struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
+
+       if (!pdata)
+               return -EINVAL;
+
+       /* IOAPIC builds identity mapping between GSI and IRQ on MID */
+       gsi = pdata->irq;
+       ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
+       if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
+               dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
+                        gsi);
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+static struct intel_mid_wdt_pdata tangier_pdata = {
+       .irq = TANGIER_EXT_TIMER0_MSI,
+       .probe = tangier_probe,
+};
+
+static int wdt_scu_status_change(struct notifier_block *nb,
+                                unsigned long code, void *data)
+{
+       if (code == SCU_DOWN) {
+               platform_device_unregister(&wdt_dev);
+               return 0;
+       }
+
+       return platform_device_register(&wdt_dev);
+}
+
+static struct notifier_block wdt_scu_notifier = {
+       .notifier_call  = wdt_scu_status_change,
+};
+
+static int __init register_mid_wdt(void)
+{
+       if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
+               return -ENODEV;
+
+       wdt_dev.dev.platform_data = &tangier_pdata;
+
+       /*
+        * We need to be sure that the SCU IPC is ready before watchdog device
+        * can be registered:
+        */
+       intel_scu_notifier_add(&wdt_scu_notifier);
+
+       return 0;
+}
+rootfs_initcall(register_mid_wdt);
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_wdt.c
deleted file mode 100644 (file)
index 4f96cd0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * platform_wdt.c: Watchdog platform library file
- *
- * (C) Copyright 2014 Intel Corporation
- * Author: David Cohen <david.a.cohen@linux.intel.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- */
-
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/platform_data/intel-mid_wdt.h>
-
-#include <asm/intel-mid.h>
-#include <asm/intel_scu_ipc.h>
-#include <asm/io_apic.h>
-
-#define TANGIER_EXT_TIMER0_MSI 15
-
-static struct platform_device wdt_dev = {
-       .name = "intel_mid_wdt",
-       .id = -1,
-};
-
-static int tangier_probe(struct platform_device *pdev)
-{
-       int gsi;
-       struct irq_alloc_info info;
-       struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
-
-       if (!pdata)
-               return -EINVAL;
-
-       /* IOAPIC builds identity mapping between GSI and IRQ on MID */
-       gsi = pdata->irq;
-       ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
-       if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
-               dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
-                        gsi);
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
-static struct intel_mid_wdt_pdata tangier_pdata = {
-       .irq = TANGIER_EXT_TIMER0_MSI,
-       .probe = tangier_probe,
-};
-
-static int wdt_scu_status_change(struct notifier_block *nb,
-                                unsigned long code, void *data)
-{
-       if (code == SCU_DOWN) {
-               platform_device_unregister(&wdt_dev);
-               return 0;
-       }
-
-       return platform_device_register(&wdt_dev);
-}
-
-static struct notifier_block wdt_scu_notifier = {
-       .notifier_call  = wdt_scu_status_change,
-};
-
-static int __init register_mid_wdt(void)
-{
-       if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
-               return -ENODEV;
-
-       wdt_dev.dev.platform_data = &tangier_pdata;
-
-       /*
-        * We need to be sure that the SCU IPC is ready before watchdog device
-        * can be registered:
-        */
-       intel_scu_notifier_add(&wdt_scu_notifier);
-
-       return 0;
-}
-rootfs_initcall(register_mid_wdt);