From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM64: juno: add NOR flash to device tree
Date: Tue, 27 Oct 2015 12:33:34 +0000 [thread overview]
Message-ID: <20151027123334.GC3091@leverpostej> (raw)
In-Reply-To: <CACRpkdbpD+Kr01hDc7QnL4x_4=A_rnAO+G0CaMce8+5ns+bx2Q@mail.gmail.com>
On Tue, Oct 27, 2015 at 01:22:39PM +0100, Linus Walleij wrote:
> On Tue, Oct 27, 2015 at 1:01 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> > On 27/10/15 11:55, Linus Walleij wrote:
> >> On Wed, Oct 21, 2015 at 12:07 PM, Ryan Harkin <ryan.harkin@linaro.org>
> >> wrote:
> >>
> >>> FYI, in the latest Juno motherboard firmware [1], I have a file called
> >>> "blank.img" in the NOR flash at address 0x0BFC0000 that represents the
> >>> UEFI
> >>> (and now u-boot) config area at the end of the NOR flash.
> >>>
> >>> I mostly put this there so that you can "touch blank.img" to erase the
> >>> config, but also to show that the region is reserved to anyone who might
> >>> think about putting something there.
> >>
> >>
> >> Then it is safe to enable NOR flash and AFS in the kernel.
> >
> > *No*, not on Juno. If we need to enable them for other platforms, then
> > we should either disable NOR flash in DT(or even remove it completely
> > whichever is appropriate).
> >
> > Since idle is enable in defconfig and if DT has idle states, then it
> > can't boot for the reason I previously mentioned.
>
> Yeah right I remember that now. Let's say it is safe to enable
> for the tamper-security reason. There may be other reasons
> not to...
>
> If this is about different idle functionalities blocking flash
> access, what we should do is to in Kconfig make it impossible
> to compile in both deep idle states and flash support at the
> same time, as that is how the system really behaves.
>
> I.e do you mean something like this, or am I getting it wrong?
>
> index 21340e0be73e..07d91776bcfe 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -4,6 +4,7 @@
> config ARM_CPUIDLE
> bool "Generic ARM/ARM64 CPU idle Driver"
> select DT_IDLE_STATES
> + depends on !(ARCH_VEXPRESS && MTD)
> help
> Select this to enable generic cpuidle driver for ARM.
> It provides a generic idle driver whose idle states are configured
>
> Hiding hardware from the devicetree seems over the top to me,
> it is better to keep the device trees describing the actual hardware
> and the operating system to figure out how things need to be
> set up to interoperate, at config-time or run-time.
... except that the current bindings do not imply any of said
negotiation, and imply that the hardware is available for use. We'd need
new bindings to describe that.
For situations like these we typically have the node, but ensure that it
has status = "disabled". That way the DT is safe by default, and FW can
grant the OS the ability to use the hardware by replacing/removing the
status property.
It sounds like even for U-Boot, PSCI* and Non-secure OS access to the NOR
are mutually exclusive. Given the inability to describe that constraint,
the only agent that can possibly filter the DT appropriately is the FW.
* Sudeep, I assume the constraints on CPU_SUSPEND would also apply to
CPU_ON, is that correct?
Thanks,
Mark.
next prev parent reply other threads:[~2015-10-27 12:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 10:20 [PATCH] ARM64: juno: add NOR flash to device tree Linus Walleij
2015-10-15 11:58 ` Liviu Dudau
2015-10-15 15:20 ` Arnd Bergmann
2015-10-18 9:22 ` Linus Walleij
2015-10-15 15:30 ` Sudeep Holla
2015-10-18 9:25 ` Linus Walleij
2015-10-19 10:17 ` Sudeep Holla
2015-10-19 10:29 ` Mark Rutland
2015-10-19 11:19 ` Linus Walleij
2015-10-19 11:27 ` Leif Lindholm
2015-10-19 21:50 ` Linus Walleij
2015-10-19 11:39 ` Mark Rutland
2015-10-19 14:40 ` Ard Biesheuvel
2015-10-19 21:58 ` Linus Walleij
2015-10-20 14:13 ` Ard Biesheuvel
2015-10-19 21:55 ` Linus Walleij
2015-10-20 11:20 ` Leif Lindholm
[not found] ` <CAD0U-hKZM-A2N_Lpnzwkt0WmAi+kRR=UOEE4Vr2M-iTo9ikkOg@mail.gmail.com>
2015-10-27 11:55 ` Linus Walleij
2015-10-27 12:01 ` Sudeep Holla
2015-10-27 12:22 ` Linus Walleij
2015-10-27 12:33 ` Sudeep Holla
2015-10-27 21:41 ` Linus Walleij
2015-10-27 12:33 ` Mark Rutland [this message]
2015-10-27 12:41 ` Sudeep Holla
2015-10-27 21:43 ` Linus Walleij
2015-10-27 13:20 ` Ryan Harkin
2015-10-19 11:20 ` Leif Lindholm
2015-10-21 11:18 ` Ryan Harkin
2015-10-26 8:41 ` [PATCH] arm64/efi: register UEFI runtime mmio regions as iomem resources Ard Biesheuvel
2015-10-27 12:08 ` Linus Walleij
2015-10-27 12:31 ` Ard Biesheuvel
2015-11-16 12:45 ` Ard Biesheuvel
2015-10-27 11:59 ` [PATCH] ARM64: juno: add NOR flash to device tree Linus Walleij
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=20151027123334.GC3091@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).