mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org,
	Hans Christian Lonstad <hcl@datarespons.com>
Subject: Re: [PATCH 2/3] nvmem: ocotp: prepare adding tester3 support
Date: Mon, 22 Jan 2024 10:35:53 +0100	[thread overview]
Message-ID: <20240122093553.GS4700@pengutronix.de> (raw)
In-Reply-To: <20240119224522.1399213-3-a.fatoum@pengutronix.de>

On Fri, Jan 19, 2024 at 11:45:21PM +0100, Ahmad Fatoum wrote:
> The tester fuses are written to the OCOTP by NXP during production.
> So far, we only evaluated tester4 to determine which peripherals
> are missing from the SoC. On the i.MX8MP, VPU and CPUs existence is
> instead encoded into the tester3 fuse word. In preparation for adding
> support for tester4, rename the existing masks to be tester4-specific.
> 
> diff --git a/drivers/soc/imx/imx8m-featctrl.c b/drivers/soc/imx/imx8m-featctrl.c
> index 9a2b66555dce..23a3f990160d 100644
> --- a/drivers/soc/imx/imx8m-featctrl.c
> +++ b/drivers/soc/imx/imx8m-featctrl.c
> @@ -33,6 +33,19 @@ static inline bool is_fused(u32 val, u32 bitmask)
>  	return bitmask && (val & bitmask) == bitmask;
>  }
>  
> +#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))

It's likely time to find a common place for this. We already have that
defined in drivers/clk/at91/pmc.h and the kernel also has this defined
three times.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-01-22  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 22:45 [PATCH 0/3] soc: imx: featctrl: finalize support for i.MX8MP Ahmad Fatoum
2024-01-19 22:45 ` [PATCH 1/3] soc: imx: imx8m-featctrl: make header self-contained Ahmad Fatoum
2024-01-19 22:45 ` [PATCH 2/3] nvmem: ocotp: prepare adding tester3 support Ahmad Fatoum
2024-01-22  9:35   ` Sascha Hauer [this message]
2024-01-19 22:45 ` [PATCH 3/3] soc: imx: featctrl: finalize support for i.MX8MP Ahmad Fatoum
2024-01-22  9:31 ` [PATCH 0/3] " Sascha Hauer

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=20240122093553.GS4700@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=hcl@datarespons.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