linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v15 07/12] ARM: dts: append hip04 dts
Date: Tue, 29 Jul 2014 18:33:37 +0100	[thread overview]
Message-ID: <20140729173336.GA748@leverpostej> (raw)
In-Reply-To: <CAOesGMi6xLwFkjctNJsJ63WYaMhrJgjNyST4qiUpa42e4biBjQ@mail.gmail.com>

On Tue, Jul 29, 2014 at 06:01:48PM +0100, Olof Johansson wrote:
> On Tue, Jul 29, 2014 at 5:32 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Tue, Jul 29, 2014 at 03:44:40AM +0100, Haojian Zhuang wrote:
> >> On 29 July 2014 02:06, Mark Rutland <mark.rutland@arm.com> wrote:
> >> > On Mon, Jul 28, 2014 at 02:57:51PM +0100, Haojian Zhuang wrote:
> >> >> Add hip04-d01.dts & hip04.dtsi for hip04 SoC platform.
> >> >>
> >> >> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
> >> >> ---
> >> >>  arch/arm/boot/dts/Makefile      |   1 +
> >> >>  arch/arm/boot/dts/hip04-d01.dts |  39 ++++++
> >> >>  arch/arm/boot/dts/hip04.dtsi    | 267 ++++++++++++++++++++++++++++++++++++++++
> >> >>  3 files changed, 307 insertions(+)
> >> >>  create mode 100644 arch/arm/boot/dts/hip04-d01.dts
> >> >>  create mode 100644 arch/arm/boot/dts/hip04.dtsi
> >> >>
> >> >> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> >> >> index 721525e..6587bbf 100644
> >> >> --- a/arch/arm/boot/dts/Makefile
> >> >> +++ b/arch/arm/boot/dts/Makefile
> >> >> @@ -86,6 +86,7 @@ dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb
> >> >>  dtb-$(CONFIG_ARCH_HIX5HD2) += hix5hd2-dkb.dtb
> >> >>  dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
> >> >>         ecx-2000.dtb
> >> >> +dtb-$(CONFIG_ARCH_HIP04) += hip04-d01.dtb
> >> >>  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
> >> >>         integratorcp.dtb
> >> >>  dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \
> >> >> diff --git a/arch/arm/boot/dts/hip04-d01.dts b/arch/arm/boot/dts/hip04-d01.dts
> >> >> new file mode 100644
> >> >> index 0000000..661c8e5
> >> >> --- /dev/null
> >> >> +++ b/arch/arm/boot/dts/hip04-d01.dts
> >> >> @@ -0,0 +1,39 @@
> >> >> +/*
> >> >> + *  Copyright (C) 2013-2014 Linaro Ltd.
> >> >> + *  Author: Haojian Zhuang <haojian.zhuang@linaro.org>
> >> >> + *
> >> >> + *  This program is free software; you can redistribute it and/or modify
> >> >> + *  it under the terms of the GNU General Public License version 2 as
> >> >> + *  publishhed by the Free Software Foundation.
> >> >> + */
> >> >> +
> >> >> +/dts-v1/;
> >> >> +
> >> >> +/* For bootwrapper */
> >> >> +/memreserve/ 0x10c00000 0x00010000;
> >> >
> >> > How exactly is this bootwrapper used? Is the kernel compiled into it?
> >> >
> >> > It might make more sense for the wrapper build system to inject
> >> > bootwrapper-related properties. Then the DTB is less likely to
> >> > amalgamate hacks to workaround differences between versions, and can be
> >> > used on systems without a wrapper without throwing away some memory.
> >> >
> >>
> >> In this platform, we relied on the bootwrapper. If I discard this,
> >> I'll fail to bring up all secondary cores.
> >
> > What loads the boot wrapper into memory, and from where?
> >
> > In another reply you mentioned you're using UEFI. Is this wrapper
> > considered part of your UEFI implementation? If so it should be reserved
> > in the UEFI memory map, and there should be no need of memory nodes or
> > memreserves -- all that should come from UEFI.
> 
> There's no UEFI memory map parsing on 32-bit, is there?

Apparently not, so this can be ignored. Sorry for the noise.

That said I'm slightly confused by the decision to use UEFI given that
we can't use the standard EFI boot mechanism and services on 32-bit.

> > What exactly is the boot wrapper in charge of?
> >
> > What is the split in responsiblity between the wrapper and the kernel?
> 
> Sounds like it's just the trampoline code that's executed at CPU
> spin-up time. I wouldn't be surprised if there's a register somewhere
> on the same controller that you poke the cpu to life that you can
> write what address for it to start executing at, or at least some
> other location where it can be redirected somewhere else. It's very
> unlikely a wired-in address in hardware. Or so I hope. :-)

Me too.

> >> >> +               };
> >> >> +
> >> >> +               fabric: fabric {
> >> >> +                       compatible = "hisilicon,hip04-fabric";
> >> >> +                       reg = <0x302a000 0x1000>;
> >> >
> >> > How is this going to be used?
> >> >
> >>
> >> Fabric could configure snoop filter of multiple cluster. I don't have
> >> the manual. I only know this.
> >
> > Is this accessible to the non-secure side?
> >
> > If the firmware is currently programming things correctly then we
> > shouldn't need this for now.
> 
> with MCPM clusters get powered up and down, it's not uncommon to have
> to take them out of coherence domains.

Sure, but that won't be possible if those registers are secure-only
given the comments that secondaries are demoted to hyp by the wrapper.
That might be possible to work around, but we might be in for further
pain given the primary is already in a non-secure mode.

It might be that this is useful for performance monitoring on the
non-secure side anyway, but without a user it might make more sense to
just drop the node for now.

> >> >> +               };
> >> >> +
> >> >> +               dual_timer0: dual_timer at 3000000 {
> >> >> +                       compatible = "arm,sp804", "arm,primecell";
> >> >> +                       reg = <0x3000000 0x1000>;
> >> >> +                       interrupts = <0 224 4>;
> >> >> +                       clocks = <&clock HIP04_CLK_50M>;
> >> >> +                       clock-names = "apb_pclk";
> >> >> +               };
> >> >
> >> > I thought sp804 had two clocks (one for AMBA and one for the actual
> >> > timer). What's going on here?
> >> >
> >>
> >> If only one clock is configured at here, sp804 driver believes that
> >> clk2 is same as clk1.
> >
> > I'm not keen on relying on that. It's arguably a bug in the driver.
> 
> The driver should warn, but we can't make it fail on it now. :(

Yeah. I should revive my series for that. So far everyone seems to be
happy with just hacking around it :(

Thanks,
Mark.

  reply	other threads:[~2014-07-29 17:33 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 13:57 [PATCH v15 00/12] enable Hisilicon HiP04 Haojian Zhuang
2014-07-28 13:57 ` [PATCH v15 01/12] irq: gic: support hip04 gic Haojian Zhuang
2014-07-28 17:38   ` Marc Zyngier
2014-07-29 13:05     ` Arnd Bergmann
2014-07-29 13:19       ` Will Deacon
2014-07-29 13:41       ` Marc Zyngier
2014-07-28 13:57 ` [PATCH v15 02/12] ARM: mcpm: support 4 clusters Haojian Zhuang
2014-07-28 13:57 ` [PATCH v15 03/12] ARM: hisi: enable MCPM implementation Haojian Zhuang
2014-07-28 13:57 ` [PATCH v15 04/12] ARM: hisi: enable HiP04 Haojian Zhuang
2014-07-28 14:38   ` Arnd Bergmann
2014-07-28 13:57 ` [PATCH v15 05/12] document: dt: add the binding on HiP04 Haojian Zhuang
2014-07-28 14:41   ` Arnd Bergmann
2014-07-28 13:57 ` [PATCH v15 06/12] document: dt: add the binding on HiP04 clock Haojian Zhuang
2014-07-28 17:54   ` Mark Rutland
2014-07-29  2:25     ` Haojian Zhuang
2014-07-29  9:55       ` Arnd Bergmann
2014-07-29 10:40         ` Haojian Zhuang
2014-07-29 12:38       ` Mark Rutland
2014-07-28 13:57 ` [PATCH v15 07/12] ARM: dts: append hip04 dts Haojian Zhuang
2014-07-28 18:06   ` Mark Rutland
2014-07-29  2:44     ` Haojian Zhuang
2014-07-29  3:53       ` Olof Johansson
2014-07-29  4:00         ` Olof Johansson
2014-08-01 12:02           ` Haojian Zhuang
2014-07-29 10:58         ` Haojian Zhuang
2014-07-29 16:56           ` Olof Johansson
2014-07-29 11:12         ` Will Deacon
2014-07-29 11:32           ` Haojian Zhuang
2014-07-29 12:13             ` Will Deacon
2014-07-29 12:15               ` Haojian Zhuang
2014-07-29 12:22                 ` Will Deacon
2014-07-29 12:32       ` Mark Rutland
2014-07-29 17:01         ` Olof Johansson
2014-07-29 17:33           ` Mark Rutland [this message]
2014-07-30 11:26           ` Leif Lindholm
2014-07-28 13:57 ` [PATCH v15 08/12] ARM: config: append lpae configuration Haojian Zhuang
2014-07-29  4:05   ` Olof Johansson
2014-07-29 10:43     ` Haojian Zhuang
2014-07-31  1:01       ` Olof Johansson
2014-07-31  2:24         ` Haojian Zhuang
2014-07-31  3:55           ` Olof Johansson
2014-07-31  5:30             ` Haojian Zhuang
2014-07-31 14:41               ` Arnd Bergmann
2014-08-01 12:16                 ` Haojian Zhuang
2014-07-28 13:57 ` [PATCH v15 09/12] ARM: config: append hip04_defconfig Haojian Zhuang
2014-07-29  4:07   ` Olof Johansson
2014-07-28 13:57 ` [PATCH v15 10/12] ARM: hisi: enable erratum 798181 of A15 on HiP04 Haojian Zhuang
2014-07-29  4:08   ` Olof Johansson
2014-07-29 10:41     ` Haojian Zhuang
2014-07-28 13:57 ` [PATCH v15 11/12] virt: arm: support hip04 gic Haojian Zhuang
2014-07-28 18:00   ` Marc Zyngier
2014-07-29  2:31     ` Haojian Zhuang
2014-07-29  8:47       ` Marc Zyngier
2014-07-28 13:57 ` [PATCH v15 12/12] ARM: debug: add HiP04 debug uart Haojian Zhuang
2014-07-28 14:43 ` [PATCH v15 00/12] enable Hisilicon HiP04 Arnd Bergmann

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=20140729173336.GA748@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).