From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] ARM: rmobile: Switch CPU to non-secure HYP mode for r8a7790 based boards
Date: Sat, 9 Feb 2019 17:35:46 +0100 [thread overview]
Message-ID: <f0ada70f-ebd3-6adf-c6e8-dca5d6720656@gmail.com> (raw)
In-Reply-To: <9c8a4b4b-5da5-23b5-80de-f629a7597e79@gmail.com>
On 2/7/19 6:19 PM, Oleksandr wrote:
[...]
>>>>> + /* Update registers with correct frequency */
>>>>> + writel(freq, TIMER_BASE + TIMER_CNTFID0);
>>>>> + asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
>>>>> +
>>>>> + /* Make sure arch timer is started by setting bit 0 of
>>>>> CNTCR */
>>>>> + writel(1, TIMER_BASE + TIMER_CNTCR);
>>>> Shouldn't this be in the timer driver instead ?
>>> Which timer driver? Probably, I missed something, but I didn't find any
>>> arch timer driver being used for Gen2.
>>>
>>> I see that TMU timer (arch/sh/lib/time.c) is used as a system timer, but
>>> it is yet another IP.
>>>
>>> Would it be correct, if I move arch timer updating code to
>>> arch/arm/mach-rmobile directory?
>>>
>>> Actually, at the same location the corresponding code lives in Linux:
>>>
>>> https://elixir.bootlin.com/linux/v5.0-rc5/source/arch/arm/mach-shmobile/setup-rcar-gen2.c#L61
>>>
>> Presumably if this is something else than TMU, it needs proper driver
>> that goes into drivers/ .
>
> Did I get your point correctly that new driver (specially for Gen2 arch
> timer) should be introduced in U-Boot and
>
> the only one thing it is intended to do is to configure that timer for
> the future use by Linux/Hypervisor?
>
> If yes, the only question I have is how that new driver is going to be
> populated? There is no corresponding node for arch timer in the device
> tree.
>
> https://elixir.bootlin.com/linux/v5.0-rc5/source/arch/arm/boot/dts/r8a7790.dtsi
>
>
> So, do I need specially for this case add arch timer node with reg and
> compatible properties?
>
> Sorry if I ask obvious questions, not familiar enough with U-Boot.
You would need a DT entry and a bit of code to start the timer in case
the PSCI is enabled, yes. This would then fit into the DM/DT paradigm.
>>>>> + }
>>>>> +}
>>>>> +
>>>>> +/*
>>>>> + * In order not to break compilation if someone decides to build
>>>>> with PSCI
>>>>> + * support disabled, keep these dummy functions.
>>>>> + */
>>>> That's currently the only use-case.
>>> Shall I drop this comment and dummy functions below?
>> Since there is no PSCI support, yes.
>
> Understand.
>
>>
>> [...]
>>
>> I'd like to have a cover letter go with V2, which describes what you're
>> trying to achieve here.
>
> Yes, sure. Cover letter is present for the current V1 as well.
>
> I thought that I had CC-ed all.
>
> This is a link to it:
>
> http://u-boot.10912.n7.nabble.com/PATCH-0-3-PSCI-support-for-r8a7790-SoC-Lager-Stout-boards-td357352.html
Thanks
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2019-02-09 16:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 17:38 [U-Boot] [PATCH 0/3] PSCI support for r8a7790 SoC (Lager/Stout boards) Oleksandr Tyshchenko
2019-01-31 17:38 ` [U-Boot] [PATCH 1/3] ARM: rmobile: Switch CPU to non-secure HYP mode for r8a7790 based boards Oleksandr Tyshchenko
2019-02-05 18:48 ` Marek Vasut
2019-02-07 15:28 ` Oleksandr
2019-02-07 15:49 ` Marek Vasut
2019-02-07 17:19 ` Oleksandr
2019-02-08 11:40 ` Oleksandr
2019-02-09 16:37 ` Marek Vasut
2019-02-12 21:20 ` Oleksandr
2019-02-26 18:37 ` Oleksandr
2019-02-27 20:50 ` Marek Vasut
2019-02-09 16:35 ` Marek Vasut [this message]
2019-02-12 19:52 ` Oleksandr
2019-03-14 0:16 ` Marek Vasut
2019-03-13 11:42 ` Ley Foon Tan
2019-03-14 11:37 ` Oleksandr
2019-03-18 10:45 ` Patrick DELAUNAY
2019-01-31 17:38 ` [U-Boot] [PATCH 2/3] ARM: rmobile: Add basic PSCI support for r8a7790 SoC Oleksandr Tyshchenko
2019-02-05 18:55 ` Marek Vasut
2019-02-08 10:52 ` Oleksandr
2019-02-09 16:32 ` Marek Vasut
2019-02-11 20:10 ` Oleksandr
2019-02-11 20:40 ` Marek Vasut
2019-02-12 19:26 ` Oleksandr
2019-02-26 19:37 ` Oleksandr
2019-02-27 20:53 ` Marek Vasut
2019-02-27 21:16 ` Oleksandr Tyshchenko
2019-01-31 17:38 ` [U-Boot] [PATCH 3/3] ARM: rmobile: Add possibility to debug main PSCI commands Oleksandr Tyshchenko
2019-02-05 18:56 ` Marek Vasut
2019-02-08 12:47 ` Oleksandr
2019-02-09 16:24 ` Marek Vasut
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=f0ada70f-ebd3-6adf-c6e8-dca5d6720656@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