lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 09:03:12 +0000
From:   Joakim Zhang <qiangqing.zhang@....com>
To:     Marc Kleine-Budde <mkl@...gutronix.de>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        Aisheng Dong <aisheng.dong@....com>
CC:     "kernel@...gutronix.de" <kernel@...gutronix.de>,
        dl-linux-imx <linux-imx@....com>, Ying Liu <victor.liu@....com>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
        Pankaj Bansal <pankaj.bansal@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V2 8/8] can: flexcan: add CAN wakeup function for i.MX8QM


Hi Marc,

> -----Original Message-----
> From: Marc Kleine-Budde <mkl@...gutronix.de>
> Sent: 2020年10月19日 16:42
> To: Joakim Zhang <qiangqing.zhang@....com>; robh+dt@...nel.org;
> shawnguo@...nel.org; s.hauer@...gutronix.de
> Cc: kernel@...gutronix.de; dl-linux-imx <linux-imx@....com>; Ying Liu
> <victor.liu@....com>; linux-can@...r.kernel.org; Pankaj Bansal
> <pankaj.bansal@....com>; netdev@...r.kernel.org;
> linux-kernel@...r.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

Powered by blists - more mailing lists