All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chandrasekar R" <rcsekar@samsung.com>
To: "'Marc Kleine-Budde'" <mkl@pengutronix.de>, <linux-can@vger.kernel.org>
Cc: <kernel@pengutronix.de>,
	"'Torin Cooper-Bennun'" <torin@maxiluxsystems.com>
Subject: RE: [PATCH] can: m_can: m_can_chip_config(): actually enable internal timestamping
Date: Mon, 13 Jun 2022 12:00:01 +0530	[thread overview]
Message-ID: <001101d87eef$040a0a40$0c1e1ec0$@samsung.com> (raw)
In-Reply-To: <20220612212708.4081756-1-mkl@pengutronix.de>



> -----Original Message-----
> From: Marc Kleine-Budde [mailto:mkl@pengutronix.de]
> Sent: Monday, June 13, 2022 2:57 AM
> To: linux-can@vger.kernel.org
> Cc: kernel@pengutronix.de; Marc Kleine-Budde <mkl@pengutronix.de>;
> Torin Cooper-Bennun <torin@maxiluxsystems.com>; Chandrasekar
> Ramakrishnan <rcsekar@samsung.com>
> Subject: [PATCH] can: m_can: m_can_chip_config(): actually enable internal
> timestamping
> 
> In commit df06fd678260 ("can: m_can: m_can_chip_config(): enable and
> configure internal timestamps") the timestamping in the m_can core should
> be enabled. In peripheral mode, the RX'ed CAN frames, TX compete frames
> and error events are sorted by the timestamp.
> 
> The above mentioned commit however forgot to enable the timestamping.
> This patch adds the missing bits to the write of the Timestamp Counter
> Configuration register.
> 
> Fixes: df06fd678260 ("can: m_can: m_can_chip_config(): enable and
> configure internal timestamps")
> Cc: Torin Cooper-Bennun <torin@maxiluxsystems.com>
> Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Changes looks fine, 
Reviewed-by: Chandrasekar Ramakrishnan <rcsekar@samsung.com>
> ---
>  drivers/net/can/m_can/m_can.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/can/m_can/m_can.c
> b/drivers/net/can/m_can/m_can.c index 5d0c82d8b9a9..03a22d493cf6
> 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1351,7 +1351,9 @@ static void m_can_chip_config(struct net_device
> *dev)
>  	/* enable internal timestamp generation, with a prescalar of 16. The
>  	 * prescalar is applied to the nominal bit timing
>  	 */
> -	m_can_write(cdev, M_CAN_TSCC, FIELD_PREP(TSCC_TCP_MASK,
> 0xf));
> +	m_can_write(cdev, M_CAN_TSCC,
> +		    FIELD_PREP(TSCC_TCP_MASK, 0xf) |
> +		    FIELD_PREP(TSCC_TSS_MASK, TSCC_TSS_INTERNAL));
> 
>  	m_can_config_endisable(cdev, false);
> 
> --
> 2.35.1
> 



      reply	other threads:[~2022-06-13  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220612212736epcas5p4bf1d5ea94666f176dd1ec3b0e61f37bf@epcas5p4.samsung.com>
2022-06-12 21:27 ` [PATCH] can: m_can: m_can_chip_config(): actually enable internal timestamping Marc Kleine-Budde
2022-06-13  6:30   ` Chandrasekar R [this message]

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='001101d87eef$040a0a40$0c1e1ec0$@samsung.com' \
    --to=rcsekar@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=torin@maxiluxsystems.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.