| From 898872f21ea35425378c19dd18197b54b00a13ac Mon Sep 17 00:00:00 2001 |
| From: David Wang <davidwang@quantatw.com> |
| Date: Mon, 6 Nov 2023 10:49:25 +0800 |
| Subject: [PATCH 06/16] drivers: char: ipmi: sync npcm kcs bmc |
| |
| --- |
| drivers/char/ipmi/Kconfig | 2 +- |
| drivers/char/ipmi/kcs_bmc_npcm7xx.c | 5 +++++ |
| 2 files changed, 6 insertions(+), 1 deletion(-) |
| |
| diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig |
| index 1d3751fce154..ab8922e5e92c 100644 |
| --- a/drivers/char/ipmi/Kconfig |
| +++ b/drivers/char/ipmi/Kconfig |
| @@ -110,7 +110,7 @@ config ASPEED_KCS_IPMI_BMC |
| provides the access of KCS IO space for BMC side. |
| |
| config NPCM7XX_KCS_IPMI_BMC |
| - depends on ARCH_NPCM7XX || COMPILE_TEST |
| + depends on ARCH_NPCM || COMPILE_TEST |
| select IPMI_KCS_BMC |
| select REGMAP_MMIO |
| tristate "NPCM7xx KCS IPMI BMC driver" |
| diff --git a/drivers/char/ipmi/kcs_bmc_npcm7xx.c b/drivers/char/ipmi/kcs_bmc_npcm7xx.c |
| index 7961fec56476..56d1779e2ce7 100644 |
| --- a/drivers/char/ipmi/kcs_bmc_npcm7xx.c |
| +++ b/drivers/char/ipmi/kcs_bmc_npcm7xx.c |
| @@ -169,6 +169,7 @@ static int npcm7xx_kcs_probe(struct platform_device *pdev) |
| struct npcm7xx_kcs_bmc *priv; |
| struct kcs_bmc_device *kcs_bmc; |
| u32 chan; |
| + u32 val; |
| int rc; |
| |
| rc = of_property_read_u32(dev->of_node, "kcs_chan", &chan); |
| @@ -198,6 +199,9 @@ static int npcm7xx_kcs_probe(struct platform_device *pdev) |
| |
| platform_set_drvdata(pdev, priv); |
| |
| + /* clear KCS status before enable the IRQ */ |
| + rc = regmap_read(priv->map, priv->reg->sts, &val); |
| + |
| rc = npcm7xx_kcs_config_irq(kcs_bmc, pdev); |
| if (rc) |
| return rc; |
| @@ -233,6 +237,7 @@ static int npcm7xx_kcs_remove(struct platform_device *pdev) |
| |
| static const struct of_device_id npcm_kcs_bmc_match[] = { |
| { .compatible = "nuvoton,npcm750-kcs-bmc" }, |
| + { .compatible = "nuvoton,npcm845-kcs-bmc" }, |
| { } |
| }; |
| MODULE_DEVICE_TABLE(of, npcm_kcs_bmc_match); |
| -- |
| 2.25.1 |
| |