Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd9b865 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman
Browse files

mei: wd: drop the watchdog code from the core mei driver



Instead of integrating the iAMT watchdog in the mei core driver
we will create a watchdog device on the mei client bus and
create a driver for it.

This patch removes the watchdog code from the mei core driver.

Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b86d1bd8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
config INTEL_MEI
	tristate "Intel Management Engine Interface"
	depends on X86 && PCI && WATCHDOG_CORE
	depends on X86 && PCI
	help
	  The Intel Management Engine (Intel ME) provides Manageability,
	  Security and Media services for system containing Intel chipsets.
@@ -12,7 +12,7 @@ config INTEL_MEI
config INTEL_MEI_ME
	tristate "ME Enabled Intel Chipsets"
	select INTEL_MEI
	depends on X86 && PCI && WATCHDOG_CORE
	depends on X86 && PCI
	help
	  MEI support for ME Enabled Intel chipsets.

@@ -37,7 +37,7 @@ config INTEL_MEI_ME
config INTEL_MEI_TXE
	tristate "Intel Trusted Execution Environment with ME Interface"
	select INTEL_MEI
	depends on X86 && PCI && WATCHDOG_CORE
	depends on X86 && PCI
	help
	  MEI Support for Trusted Execution Environment device on Intel SoCs

+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ mei-objs += interrupt.o
mei-objs += client.o
mei-objs += main.o
mei-objs += amthif.o
mei-objs += wd.o
mei-objs += bus.o
mei-objs += bus-fixup.o
mei-$(CONFIG_DEBUG_FS) += debugfs.o
+3 −9
Original line number Diff line number Diff line
@@ -648,7 +648,7 @@ int mei_cl_unlink(struct mei_cl *cl)
	if (!cl)
		return 0;

	/* wd and amthif might not be initialized */
	/* amthif might not be initialized */
	if (!cl->dev)
		return 0;

@@ -679,17 +679,11 @@ void mei_host_client_init(struct work_struct *work)

	mutex_lock(&dev->device_lock);


	me_cl = mei_me_cl_by_uuid(dev, &mei_amthif_guid);
	if (me_cl)
		mei_amthif_host_init(dev, me_cl);
	mei_me_cl_put(me_cl);

	me_cl = mei_me_cl_by_uuid(dev, &mei_wd_guid);
	if (me_cl)
		mei_wd_host_init(dev, me_cl);
	mei_me_cl_put(me_cl);

	dev->dev_state = MEI_DEV_ENABLED;
	dev->reset_count = 0;
	mutex_unlock(&dev->device_lock);
@@ -1153,7 +1147,7 @@ struct mei_cl *mei_cl_alloc_linked(struct mei_device *dev, int id)
 *
 * Return: 1 if mei_flow_ctrl_creds >0, 0 - otherwise.
 */
int mei_cl_flow_ctrl_creds(struct mei_cl *cl)
static int mei_cl_flow_ctrl_creds(struct mei_cl *cl)
{
	int rets;

@@ -1186,7 +1180,7 @@ int mei_cl_flow_ctrl_creds(struct mei_cl *cl)
 *	0 on success
 *	-EINVAL when ctrl credits are <= 0
 */
int mei_cl_flow_ctrl_reduce(struct mei_cl *cl)
static int mei_cl_flow_ctrl_reduce(struct mei_cl *cl)
{
	if (WARN_ON(!cl || !cl->me_cl))
		return -EINVAL;
+0 −4
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#define _MEI_CLIENT_H_

#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/poll.h>
#include <linux/mei.h>

@@ -120,9 +119,6 @@ struct mei_cl_cb *mei_cl_alloc_cb(struct mei_cl *cl, size_t length,
				  enum mei_cb_file_ops type, struct file *fp);
int mei_cl_flush_queues(struct mei_cl *cl, const struct file *fp);

int mei_cl_flow_ctrl_creds(struct mei_cl *cl);

int mei_cl_flow_ctrl_reduce(struct mei_cl *cl);
/*
 *  MEI input output function prototype
 */
+1 −9
Original line number Diff line number Diff line
@@ -156,8 +156,7 @@ int mei_reset(struct mei_device *dev)
		mei_cl_all_wakeup(dev);

		/* remove entry if already in list */
		dev_dbg(dev->dev, "remove iamthif and wd from the file list.\n");
		mei_cl_unlink(&dev->wd_cl);
		dev_dbg(dev->dev, "remove iamthif from the file list.\n");
		mei_cl_unlink(&dev->iamthif_cl);
		mei_amthif_reset_params(dev);
	}
@@ -165,7 +164,6 @@ int mei_reset(struct mei_device *dev)
	mei_hbm_reset(dev);

	dev->rd_msg_hdr = 0;
	dev->wd_pending = false;

	if (ret) {
		dev_err(dev->dev, "hw_reset failed ret = %d\n", ret);
@@ -335,16 +333,12 @@ void mei_stop(struct mei_device *dev)

	mutex_lock(&dev->device_lock);

	mei_wd_stop(dev);

	dev->dev_state = MEI_DEV_POWER_DOWN;
	mei_reset(dev);
	/* move device to disabled state unconditionally */
	dev->dev_state = MEI_DEV_DISABLED;

	mutex_unlock(&dev->device_lock);

	mei_watchdog_unregister(dev);
}
EXPORT_SYMBOL_GPL(mei_stop);

@@ -394,7 +388,6 @@ void mei_device_init(struct mei_device *dev,
	init_waitqueue_head(&dev->wait_hw_ready);
	init_waitqueue_head(&dev->wait_pg);
	init_waitqueue_head(&dev->wait_hbm_start);
	init_waitqueue_head(&dev->wait_stop_wd);
	dev->dev_state = MEI_DEV_INITIALIZING;
	dev->reset_count = 0;

@@ -407,7 +400,6 @@ void mei_device_init(struct mei_device *dev,
	INIT_WORK(&dev->init_work, mei_host_client_init);
	INIT_WORK(&dev->reset_work, mei_reset_work);

	INIT_LIST_HEAD(&dev->wd_cl.link);
	INIT_LIST_HEAD(&dev->iamthif_cl.link);
	mei_io_list_init(&dev->amthif_cmd_list);
	mei_io_list_init(&dev->amthif_rd_complete_list);
Loading