Re: [PATCH V2 8/8] can: flexcan: add CAN wakeup function for i.MX8QM

From: Marc Kleine-Budde
Date: Mon Oct 19 2020 - 05:05:32 EST


On 10/19/20 11:03 AM, Joakim Zhang wrote:
>>> 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 don't do it! Do not remove the CAN_0...2 :) Only add IMX_SC_R_CAN(x)

> 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?

Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: OpenPGP digital signature