From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
Aisheng Dong <aisheng.dong@nxp.com>
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
dl-linux-imx <linux-imx@nxp.com>, Ying Liu <victor.liu@nxp.com>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Pankaj Bansal <pankaj.bansal@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V2 8/8] can: flexcan: add CAN wakeup function for i.MX8QM
Date: Mon, 19 Oct 2020 09:03:12 +0000 [thread overview]
Message-ID: <DB8PR04MB67957F30D89ABFCF0801D741E61E0@DB8PR04MB6795.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <0e871906-e179-a2ea-1379-d0194c9d58fe@pengutronix.de>
Hi Marc,
> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: 2020年10月19日 16:42
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; robh+dt@kernel.org;
> shawnguo@kernel.org; s.hauer@pengutronix.de
> Cc: kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>; Ying Liu
> <victor.liu@nxp.com>; linux-can@vger.kernel.org; Pankaj Bansal
> <pankaj.bansal@nxp.com>; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 8/8] can: flexcan: add CAN wakeup function for
> i.MX8QM
>
> On 10/19/20 10:39 AM, Joakim Zhang wrote:
> >>> +#define FLEXCAN_IMX_SC_R_CAN(x) (IMX_SC_R_CAN_0 + (x))
> >>
> >> Why not move it into the appropriate svc header file?
> >
> > Sorry, not quite understand. Which file do you mean the appropriate
> > svc header file? Is it include/dt-bindings/firmware/imx/rsrc.h?
>
> yes, I meant that:
>
> > include/dt-bindings/firmware/imx/rsrc.h:111:#define IMX_SC_R_CAN_0
> 105
As I can see in rsrc.h file, it just list each resource sequentially, and there is a note in the comments:
"Note items from list should never be changed or removed (only added to at the end of the list)."
So the driver author doesn't want any scu users to change these resource macro. If we only do below change for CAN, but keep other devices unchanged,
It would be very strange. And I think this code change could not be accepted. There may be another consideration, now we only has 3 CAN instances, how can we handle
if later SoCs have more CAN instances, and they still want to reuse this header file. This is also reason I prefer to use these defined macros directly in flexcan driver.
--- a/include/dt-bindings/firmware/imx/rsrc.h
+++ b/include/dt-bindings/firmware/imx/rsrc.h
@@ -108,9 +108,7 @@
#define IMX_SC_R_ADC_1 102
#define IMX_SC_R_FTM_0 103
#define IMX_SC_R_FTM_1 104
-#define IMX_SC_R_CAN_0 105
-#define IMX_SC_R_CAN_1 106
-#define IMX_SC_R_CAN_2 107
+#define IMX_SC_R_CAN(x) (105 + (x))
#define IMX_SC_R_DMA_1_CH0 108
#define IMX_SC_R_DMA_1_CH1 109
#define IMX_SC_R_DMA_1_CH2 110
Add @Aisheng Dong, could above code changes can be accepted by you?
Best Regards,
Joakim Zhang
next prev parent reply other threads:[~2020-10-19 9:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 15:57 [PATCH V2 0/8] can: flexcan: add stop mode support for i.MX8QM Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 1/8] firmware: imx: always export SCU symbols Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 2/8] dt-bindings: can: flexcan: fix fsl,clk-source property Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 3/8] can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 4/8] can: flexcan: add ECC initialization for LX2160A Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 5/8] can: flexcan: add ECC initialization for VF610 Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 6/8] dt-bindings: can: flexcan: add fsl,scu-index property to indicate a resource Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 7/8] can: flexcan: rename macro FLEXCAN_QUIRK_SETUP_STOP_MODE -> FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR Joakim Zhang
2020-10-19 15:57 ` [PATCH V2 8/8] can: flexcan: add CAN wakeup function for i.MX8QM Joakim Zhang
2020-10-19 8:15 ` Marc Kleine-Budde
2020-10-19 8:39 ` Joakim Zhang
2020-10-19 8:41 ` Marc Kleine-Budde
2020-10-19 9:03 ` Joakim Zhang [this message]
2020-10-19 9:05 ` Marc Kleine-Budde
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=DB8PR04MB67957F30D89ABFCF0801D741E61E0@DB8PR04MB6795.eurprd04.prod.outlook.com \
--to=qiangqing.zhang@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pankaj.bansal@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=victor.liu@nxp.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).