From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org,
Prabhakar <prabhakar.csengg@gmail.com>,
Sergey Shtylyov <s.shtylyov@omp.ru>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] memory: renesas-rpc-if: Fix PHYCNT.STRTIM setting
Date: Thu, 26 Jan 2023 13:48:32 +0100 [thread overview]
Message-ID: <Y9J2oPHHNQoU+7m7@ninjato> (raw)
In-Reply-To: <CAMuHMdXY0c4qKCi057CtJdhUJ+443rtyCjwYyK3qGgwWTZ2a0A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
Hi Geert,
> > +static const struct soc_device_attribute rpcif_info_match[] = {
> > + { .soc_id = "r8a7795", .revision = "ES1.*", .data = &rpcif_info_r8a7795_es1 },
> > + { .soc_id = "r8a7796", .revision = "ES1.*", .data = &rpcif_info_r8a7796_es1 },
>
> As we do have a separate compatible value for R-Car M3-W+ aka R-Car M3-W ES3.0
> ("renesas,r8a77961-rpc-if"), and there is no R-Car M3-W ES2.x (see the PRR
> screwup handling in renesas_soc_init()), you can just match against
> "renesas,r8a7796-rpc-if instead.
Right, I missed that! This is awesome news because with us dropping H3
ES1 support, this means we can drop all the soc_device_match() handling
now and use compatibles only. There, everybody happy :D
> > + regmap_update_bits(rpc->regmap, RPCIF_PHYCNT,
> > + /* create mask with all affected bits set */
> > + RPCIF_PHYCNT_STRTIM(BIT(fls(rpc->info->strtim)) - 1),
>
> fls(0) = 0, and BIT(-1) is undefined, so this won't work for R-Car
> H3 ES1.x. So I'm afraid you cannot handle this without storing the
> actual mask ;-)
You misread the parens, it is: BIT(0) - 1 = 0
I actually wrote a program to print out the calculations to make sure I
got it right. But yeah, ES1 is obsolete now.
I'll send V3 later today.
Thanks everyone,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-01-26 12:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 10:46 [PATCH v2] memory: renesas-rpc-if: Fix PHYCNT.STRTIM setting Wolfram Sang
2023-01-22 12:05 ` Krzysztof Kozlowski
2023-01-23 6:58 ` Wolfram Sang
2023-01-23 7:55 ` Krzysztof Kozlowski
2023-01-26 9:01 ` Wolfram Sang
2023-01-26 9:27 ` Geert Uytterhoeven
2023-01-26 9:51 ` Krzysztof Kozlowski
2023-01-26 9:39 ` Geert Uytterhoeven
2023-01-26 12:48 ` Wolfram Sang [this message]
2023-01-26 13:13 ` Geert Uytterhoeven
2023-01-26 13:26 ` Lad, Prabhakar
2023-01-26 16:39 ` Wolfram Sang
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=Y9J2oPHHNQoU+7m7@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=geert@linux-m68k.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=s.shtylyov@omp.ru \
/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