> -----Original Message-----
> From: Marc Kleine-Budde <[email protected]>
> Sent: 2020年9月29日 19:31
> To: Joakim Zhang <[email protected]>; [email protected]
> Cc: [email protected]; dl-linux-imx <[email protected]>
> Subject: Re: [PATCH V3 1/3] can: flexcan: initialize all flexcan memory for 
> ECC
> function
> 
> On 9/29/20 1:27 PM, Joakim Zhang wrote:
> > [...]
> >>> + reg_ctrl2 = priv->read(&regs->ctrl2);
> >>> + reg_ctrl2 |= FLEXCAN_CTRL2_WRMFRZ;
> >>> + priv->write(reg_ctrl2, &regs->ctrl2);
> >>> +
> >>> + /* ranging from 0x0080 to 0x0ADF, ram details as below list:
> >>> +  * 0x0080--0x087F:      128 MBs
> >>> +  * 0x0880--0x0A7F:      128 RXIMRs
> >>> +  * 0x0A80--0x0A97:      6 RXFIRs
> >>> +  * 0x0A98--0x0A9F:      Reserved
> >>> +  * 0x0AA0--0x0AA3:      RXMGMASK
> >>> +  * 0x0AA4--0x0AA7:      RXFGMASK
> >>> +  * 0x0AA8--0x0AAB:      RX14MASK
> >>> +  * 0x0AAC--0x0AAF:      RX15MASK
> >>> +  * 0x0AB0--0x0ABF:      TX_SMB
> >>> +  * 0x0AC0--0x0ACF:      RX_SMB0
> >>> +  * 0x0AD0--0x0ADF:      RX_SMB1
> >>
> >> I don't like to have the register definition here *again), we have
> >> struct flexcan_regs for this.
> >
> > Do you mean still move these register definitions into flexcan_regs, right?
> 
> ack
> 
> >>> +  */
> >>> + memset_io((void __iomem *)regs + 0x80, 0, 0xadf - 0x80 + 1);
> >>
> >> why the cast?
> >
> > Yes, no need, will remove it.
> >
> >> Can you use the "&regs->foo - &regs->bar + x" to get the length for
> >> the memset?
> >
> > After move above register definition into flexcan_regs, I can change
> > to use this way to get the length for the memset_io.
> 
> ACK
> 
> >>> +
> >>> + /* ranging from 0x0F28 to 0x0FFF when CAN FD feature is enabled,
> >>> +  * ram details as below list:
> >>> +  * 0x0F28--0x0F6F:      TX_SMB_FD
> >>> +  * 0x0F70--0x0FB7:      RX_SMB0_FD
> >>> +  * 0x0FB8--0x0FFF:      RX_SMB0_FD
> >>> +  */
> >>> + memset_io((void __iomem *)regs + 0xf28, 0, 0xfff - 0xf28 + 1);
> >>
> >> same here
> >
> > Will change.
> 
> tnx
> 
> > Hi Marc, I'm going on holiday from tomorrow, so I would delay to send
> > out a
> > V4 to review until I come back, sorry for this. Thanks for your
> > comments of
> > "can: flexcan: add CAN wakeup function for i.MX8", will rework the
> > patch later.
> 
> Fine with me, I think we can push these changes via net to v5.10 after the 
> v5.9
> release is out.

I don't know whether to rush into V5.10, since I will back on Oct 12th. If you 
have such plan, I will rework the patch right now.
After I test, I will send out the V4.

Best Regards,
Joakim Zhang
> 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 |

Reply via email to