All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Ulrich Hecht <uli+renesas@fpond.eu>
Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net, linux-can@vger.kernel.org,
	prabhakar.mahadev-lad.rj@bp.renesas.com,
	biju.das.jz@bp.renesas.com, wsa@kernel.org,
	yoshihiro.shimoda.uh@renesas.com, wg@grandegger.com,
	mkl@pengutronix.de, kuba@kernel.org, mailhol.vincent@wanadoo.fr,
	socketcan@hartkopp.net, geert@linux-m68k.org,
	kieran.bingham@ideasonboard.com
Subject: Re: [PATCH v3 1/4] can: rcar_canfd: Add support for r8a779a0 SoC
Date: Thu, 10 Feb 2022 14:15:28 +0100	[thread overview]
Message-ID: <YgUP8O/HEKA1fOm/@vergenet.net> (raw)
In-Reply-To: <20220209163806.18618-2-uli+renesas@fpond.eu>

On Wed, Feb 09, 2022 at 05:38:03PM +0100, Ulrich Hecht wrote:
> Adds support for the CANFD IP variant in the V3U SoC.
> 
> Differences to controllers in other SoCs are limited to an increase in
> the number of channels from two to eight, an absence of dedicated
> registers for "classic" CAN mode, and a number of differences in magic
> numbers (register offsets and layouts).
> 
> Inspired by BSP patch by Kazuya Mizuguchi.
> 
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>

Hi Ulrich,

for some reason this caught by eye.

> @@ -740,12 +784,16 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
>  			    RCANFD_GAFLECTR_AFLDAE));
>  
>  	/* Write number of rules for channel */
> -	rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG0,
> +	rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG(ch),
>  			   RCANFD_GAFLCFG_SETRNC(ch, num_rules));
> -	if (gpriv->fdmode)
> -		offset = RCANFD_F_GAFL_OFFSET;
> -	else
> -		offset = RCANFD_C_GAFL_OFFSET;
> +	if (is_v3u(gpriv)) {
> +		offset = RCANFD_V3U_GAFL_OFFSET;
> +	} else {
> +		if (gpriv->fdmode)
> +			offset = RCANFD_F_GAFL_OFFSET;
> +		else
> +			offset = RCANFD_C_GAFL_OFFSET;
> +	}

nit: this could be:

	if (is_v3u(gpriv))
		offset = RCANFD_V3U_GAFL_OFFSET;
	else if (gpriv->fdmode)
		offset = RCANFD_F_GAFL_OFFSET;
	else
		offset = RCANFD_C_GAFL_OFFSET;

...

  reply	other threads:[~2022-02-10 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 16:38 [PATCH v3 0/4] can: rcar_canfd: Add support for V3U flavor Ulrich Hecht
2022-02-09 16:38 ` [PATCH v3 1/4] can: rcar_canfd: Add support for r8a779a0 SoC Ulrich Hecht
2022-02-10 13:15   ` Simon Horman [this message]
2022-02-12 16:47   ` Marc Kleine-Budde
2022-02-14  7:10   ` Vincent MAILHOL
2022-03-09 16:25     ` Ulrich Hecht
2022-02-09 16:38 ` [PATCH v3 2/4] arm64: dts: renesas: r8a779a0: Add CANFD device node Ulrich Hecht
2022-02-09 16:38 ` [PATCH v3 3/4] arm64: dts: renesas: r8a779a0-falcon: enable CANFD 0 and 1 Ulrich Hecht
2022-02-09 16:38 ` [PATCH v3 4/4] dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support Ulrich Hecht

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=YgUP8O/HEKA1fOm/@vergenet.net \
    --to=horms@verge.net.au \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=socketcan@hartkopp.net \
    --cc=uli+renesas@fpond.eu \
    --cc=wg@grandegger.com \
    --cc=wsa@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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.