openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Igor Kononenko <i.kononenko@yadro.com>
To: Corey Minyard <minyard@acm.org>, Joel Stanley <joel@jms.id.au>,
	"Andrew Jeffery" <andrew@aj.id.au>
Cc: Igor Kononenko <i.kononenko@yadro.com>,
	kernel test robot <lkp@intel.com>,
	linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org,
	linux-kernel@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] ipmi:kcs_bmc: Add cleanup regmap(interrupt-regs) on a shutdown.
Date: Mon, 22 Aug 2022 09:35:57 +0300	[thread overview]
Message-ID: <ad3cd046c4dcb9169aaff6c0b739b23d0a06014d.1661149313.git.i.kononenko@yadro.com> (raw)
In-Reply-To: <fb81dda34f9db0b9f743b247a2464576dcccd7c9.1661094034.git.i.kononenko@yadro.com>

The previos v1 [PATCH 1/3] have error of getting `struct kcs_bmc_device` 
pointer from `struct platform_device *`. Replaced to retriveing pointer by 
`platform_get_drvdata()`

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Igor Kononenko <i.kononenko@yadro.com>
---
 drivers/char/ipmi/kcs_bmc_aspeed.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index cdc88cde1e9a..8437f3cfe3f4 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
@@ -636,6 +636,14 @@ static int aspeed_kcs_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static void aspeed_kcs_shutdown(struct platform_device *pdev)
+{
+	struct aspeed_kcs_bmc *priv = platform_get_drvdata(pdev);
+	struct kcs_bmc_device *kcs_bmc = &priv->kcs_bmc;
+
+	aspeed_kcs_irq_mask_update(kcs_bmc, (KCS_BMC_EVENT_TYPE_IBF), 0);
+}
+
 static const struct of_device_id ast_kcs_bmc_match[] = {
 	{ .compatible = "aspeed,ast2400-kcs-bmc-v2" },
 	{ .compatible = "aspeed,ast2500-kcs-bmc-v2" },
@@ -651,6 +659,7 @@ static struct platform_driver ast_kcs_bmc_driver = {
 	},
 	.probe  = aspeed_kcs_probe,
 	.remove = aspeed_kcs_remove,
+	.shutdown = aspeed_kcs_shutdown,
 };
 module_platform_driver(ast_kcs_bmc_driver);
 
-- 
2.25.1


  parent reply	other threads:[~2022-08-22  6:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 15:54 [PATCH 0/3] aspeed:lpc: Fix lpc-snoop probe exception Igor Kononenko
2022-08-21 15:54 ` [PATCH 1/3] ipmi:kcs_bmc: Add cleanup regmap(interrupt-regs) on a shutdown Igor Kononenko
2022-08-21 19:46   ` kernel test robot
2022-08-22  6:35   ` Igor Kononenko [this message]
2022-08-23  0:22     ` [PATCH v2 " Joel Stanley
2022-08-23  6:54       ` i.kononenko
2022-08-21 15:54 ` [PATCH 2/3] drivers/misc: (aspeed-lpc-snoop): Add regmap cleanup " Igor Kononenko
2022-08-23  0:30   ` Joel Stanley
2022-08-23  7:02     ` i.kononenko
2022-08-21 15:54 ` [PATCH 3/3] drivers/misc: (aspeed-lpc-snoop): Fix platform_get_irq() error checking Igor Kononenko
2022-08-21 16:06 ` [PATCH 0/3] aspeed:lpc: Fix lpc-snoop probe exception Igor Kononenko
2022-08-23  0:22 ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad3cd046c4dcb9169aaff6c0b739b23d0a06014d.1661149313.git.i.kononenko@yadro.com \
    --to=i.kononenko@yadro.com \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=minyard@acm.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).