From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] arm: rmobile: Add RZ/G2M SoC
Date: Tue, 22 Sep 2020 15:11:25 +0200 [thread overview]
Message-ID: <5b95abef-25a2-4271-fcb2-e52a8c521927@gmail.com> (raw)
In-Reply-To: <TYBPR01MB530951A481C0C9A7F6038B4B863A0@TYBPR01MB5309.jpnprd01.prod.outlook.com>
On 9/21/20 7:29 PM, Biju Das wrote:
[...]
>> There might be even better way. Look at rmobile_get_cpu_type() , that is a
>> weak function. So if you can implement one for RZG2 , then that function can
>> return CPU_TYPE_RZG2_something ; and rmobile_get_cpu_type() for RZG2
>> can be implemented using the match on /compatible string .
>>
>> Take a look at how arch/arm/mach-rmobile/cpu_info-rcar.c implements it
>> using PRR, you might need cpu_info-rzg.c I think.
>
> As mentioned in the commit message PRR values of both R-Car M3-W and RZ/G2M are identical. So there is no need for separate cpu_info-rzg.c.
> I believe it is duplication of code.
I wonder whether it wouldn't be easier to simply ignore PRR on RZG
altogether, and simply match on the /compatible string from the DT.
> We are matching PRR first (device binding) and then use TFA SoC compatible string to differentiate from R-Car family.
> Please see the diff below[3].
I wonder whether we need the PRR matching at all ?
>> Also, I hope there should already be some function to which you provide a
>> compatible string and a table of supported compatible strings (of match
>> table), from which it will return the .data field of the matching entry in that
>> table. And that .data field can already be the CPU_TYPE_RZG_something , so
>> you don't have to implement the table look up again.
>>
>> What do you think ?
>
> Device binding is important use case, run time you need to match PRR, that is same for both RCar-M3W and RZ/G2E.
> In RZ/G2 case, we miss device binding if just go with TFA compatible Approach. So we need both.
>
> What do you think?
>
> [3]
> +static const struct {
> +char *compatible;
> +u16 cpu_type;
> +u8 cpu_name[10];
> +} tfa_cpuinfo[] = {
> +{ "renesas,r8a774a1", RMOBILE_CPU_TYPE_R8A774A1, "R8A774A1" },
> +{ },
> +};
btw Can you please fix your mailer so it doesn't drop indent ? It's real
hard to read the code.
[...]
prev parent reply other threads:[~2020-09-22 13:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 16:03 [PATCH 1/2] arm: rmobile: Add RZ/G2M SoC Biju Das
2020-09-18 16:03 ` [PATCH 2/2] arm: rmobile: Add HopeRun HiHope RZ/G2M board support Biju Das
2020-09-19 2:48 ` Marek Vasut
2020-09-19 12:18 ` Biju Das
2020-09-19 13:04 ` Marek Vasut
2020-09-19 18:38 ` Biju Das
2020-09-19 19:18 ` Marek Vasut
2020-09-19 2:47 ` [PATCH 1/2] arm: rmobile: Add RZ/G2M SoC Marek Vasut
2020-09-19 11:37 ` Biju Das
2020-09-19 13:00 ` Marek Vasut
2020-09-19 18:35 ` Biju Das
2020-09-19 19:18 ` Marek Vasut
2020-09-21 10:30 ` Biju Das
2020-09-21 16:23 ` Marek Vasut
2020-09-21 17:29 ` Biju Das
2020-09-22 6:08 ` Biju Das
2020-09-22 11:11 ` Biju Das
2020-09-22 13:11 ` Marek Vasut [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=5b95abef-25a2-4271-fcb2-e52a8c521927@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/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