From: Frank Li <Frank.li@nxp.com>
To: Stanley Chu <stanley.chuys@gmail.com>
Cc: miquel.raynal@bootlin.com, alexandre.belloni@bootlin.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, tomer.maimon@nuvoton.com,
kwliu@nuvoton.com, yschu@nuvoton.com
Subject: Re: [PATCH v7 2/5] i3c: master: svc: Add support for Nuvoton npcm845 i3c
Date: Thu, 6 Mar 2025 10:08:19 -0500 [thread overview]
Message-ID: <Z8m6Y8WTevsCUMZX@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250306075429.2265183-3-yschu@nuvoton.com>
On Thu, Mar 06, 2025 at 03:54:26PM +0800, Stanley Chu wrote:
> From: Stanley Chu <yschu@nuvoton.com>
>
> Nuvoton npcm845 SoC uses an older IP version, which has specific
> hardware issues that need to be addressed with a different compatible
> string.
>
> Add driver data for different compatible strings to define platform
> specific quirks.
> Add compatible string for npcm845 to define its own driver data.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202503061400.GGr64rkR-lkp@intel.com/
Needn't these for new version. Need such tags only when seperated patch
that fix this issue.
I think alex can drop these when apply. If need respin patches, remove it.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Stanley Chu <yschu@nuvoton.com>
> ---
> drivers/i3c/master/svc-i3c-master.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index d6057d8c7dec..40269b692aa8 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -158,6 +158,10 @@ struct svc_i3c_regs_save {
> u32 mdynaddr;
> };
>
> +struct svc_i3c_drvdata {
> + u32 quirks;
> +};
> +
> /**
> * struct svc_i3c_master - Silvaco I3C Master structure
> * @base: I3C master controller
> @@ -183,6 +187,7 @@ struct svc_i3c_regs_save {
> * @ibi.tbq_slot: To be queued IBI slot
> * @ibi.lock: IBI lock
> * @lock: Transfer lock, protect between IBI work thread and callbacks from master
> + * @drvdata: Driver data
> * @enabled_events: Bit masks for enable events (IBI, HotJoin).
> * @mctrl_config: Configuration value in SVC_I3C_MCTRL for setting speed back.
> */
> @@ -214,6 +219,7 @@ struct svc_i3c_master {
> spinlock_t lock;
> } ibi;
> struct mutex lock;
> + const struct svc_i3c_drvdata *drvdata;
> u32 enabled_events;
> u32 mctrl_config;
> };
> @@ -1817,6 +1823,10 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
> if (!master)
> return -ENOMEM;
>
> + master->drvdata = of_device_get_match_data(dev);
> + if (!master->drvdata)
> + return -EINVAL;
> +
> master->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(master->regs))
> return PTR_ERR(master->regs);
> @@ -1958,8 +1968,13 @@ static const struct dev_pm_ops svc_i3c_pm_ops = {
> svc_i3c_runtime_resume, NULL)
> };
>
> +static const struct svc_i3c_drvdata npcm845_drvdata = {};
> +
> +static const struct svc_i3c_drvdata svc_default_drvdata = {};
> +
> static const struct of_device_id svc_i3c_master_of_match_tbl[] = {
> - { .compatible = "silvaco,i3c-master-v1"},
> + { .compatible = "nuvoton,npcm845-i3c", .data = &npcm845_drvdata },
> + { .compatible = "silvaco,i3c-master-v1", .data = &svc_default_drvdata },
> { /* sentinel */ },
> };
> MODULE_DEVICE_TABLE(of, svc_i3c_master_of_match_tbl);
> --
> 2.34.1
>
>
> --
> linux-i3c mailing list
> linux-i3c@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-03-06 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 7:54 [PATCH v7 0/5] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-03-06 7:54 ` [PATCH v7 1/5] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
2025-03-06 7:54 ` [PATCH v7 2/5] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
2025-03-06 15:08 ` Frank Li [this message]
2025-03-06 7:54 ` [PATCH v7 3/5] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
2025-03-06 7:54 ` [PATCH v7 4/5] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
2025-03-06 7:54 ` [PATCH v7 5/5] i3c: master: svc: Fix npcm845 DAA process corruption Stanley Chu
2025-03-06 20:55 ` [PATCH v7 0/5] Add support for Nuvoton npcm845 i3c controller Alexandre Belloni
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=Z8m6Y8WTevsCUMZX@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwliu@nuvoton.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=robh@kernel.org \
--cc=stanley.chuys@gmail.com \
--cc=tomer.maimon@nuvoton.com \
--cc=yschu@nuvoton.com \
/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).