linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Markus Schneider-Pargmann <msp@baylibre.com>
Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 11/11] can: tcan4x5x: Specify separate read/write ranges
Date: Tue, 6 Dec 2022 17:20:01 +0100	[thread overview]
Message-ID: <20221206162001.3cgtod46h5d5j7fx@pengutronix.de> (raw)
In-Reply-To: <20221206115728.1056014-12-msp@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

On 06.12.2022 12:57:28, Markus Schneider-Pargmann wrote:
> Specify exactly which registers are read/writeable in the chip. This
> is supposed to help detect any violations in the future.
> 
> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> ---
>  drivers/net/can/m_can/tcan4x5x-regmap.c | 43 +++++++++++++++++++++----
>  1 file changed, 37 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/can/m_can/tcan4x5x-regmap.c b/drivers/net/can/m_can/tcan4x5x-regmap.c
> index 33aed989e42a..2b218ce04e9f 100644
> --- a/drivers/net/can/m_can/tcan4x5x-regmap.c
> +++ b/drivers/net/can/m_can/tcan4x5x-regmap.c
> @@ -90,16 +90,47 @@ static int tcan4x5x_regmap_read(void *context,
>  	return 0;
>  }
>  
> -static const struct regmap_range tcan4x5x_reg_table_yes_range[] = {
> +static const struct regmap_range tcan4x5x_reg_table_wr_range[] = {
> +	/* Device ID and SPI Registers */
> +	regmap_reg_range(0x000c, 0x0010),

According to "Table 8-8" 0xc is RO, but in "8.6.1.4 Status (address =
h000C) [reset = h0000000U]" it clearly says it has write 1 to clear bits
:/.

> +	/* Device configuration registers and Interrupt Flags*/
> +	regmap_reg_range(0x0800, 0x080c),
> +	regmap_reg_range(0x0814, 0x0814),

0x814 is marked as reserved in "SLLSEZ5D – JANUARY 2018 – REVISED JUNE
2022"?

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-12-06 16:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 11:57 [PATCH v2 00/11] can: m_can: Optimizations for tcan and peripheral chips Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 01/11] can: m_can: Eliminate double read of TXFQS in tx_handler Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 02/11] can: m_can: Avoid reading irqstatus twice Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 03/11] can: m_can: Read register PSR only on error Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 04/11] can: m_can: Count TXE FIFO getidx in the driver Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 05/11] can: m_can: Count read getindex " Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 06/11] can: m_can: Batch acknowledge transmit events Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 07/11] can: m_can: Batch acknowledge rx fifo Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 08/11] can: tcan4x5x: Remove invalid write in clear_interrupts Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 09/11] can: tcan4x5x: Fix use of register error status mask Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 10/11] can: tcan4x5x: Fix register range of first two blocks Markus Schneider-Pargmann
2022-12-06 11:57 ` [PATCH v2 11/11] can: tcan4x5x: Specify separate read/write ranges Markus Schneider-Pargmann
2022-12-06 16:20   ` Marc Kleine-Budde [this message]
2022-12-12 10:54     ` Marc Kleine-Budde
2022-12-13 17:10       ` Markus Schneider-Pargmann
2022-12-13 19:10         ` Markus Schneider-Pargmann
2022-12-13 19:13           ` Marc Kleine-Budde

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=20221206162001.3cgtod46h5d5j7fx@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msp@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=rcsekar@samsung.com \
    --cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).