mbox series

[0/2] ARM: shmobile: Add support for RZ/A2

Message ID 20180712030149.91385-1-chris.brandt@renesas.com
Headers show
Series ARM: shmobile: Add support for RZ/A2 | expand

Message

Chris Brandt July 12, 2018, 3:01 a.m. UTC
Introduce RZ/A2 (R7S9210) as an SoC that can be selected.


Chris Brandt (2):
  ARM: shmobile: Add basic RZ/A2 SoC support
  dt-bindings: arm: Document RZ/A2 SoC DT bindings

 Documentation/devicetree/bindings/arm/shmobile.txt |  2 ++
 arch/arm/mach-shmobile/Kconfig                     |  6 +++++
 arch/arm/mach-shmobile/Makefile                    |  1 +
 arch/arm/mach-shmobile/setup-r7s9210.c             | 27 ++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/setup-r7s9210.c

Comments

Geert Uytterhoeven July 12, 2018, 12:54 p.m. UTC | #1
Hi Chris,

On Thu, Jul 12, 2018 at 5:02 AM Chris Brandt <chris.brandt@renesas.com> wrote:
> Add the RZ/A2 SoC to the Renesas SoC collection.
>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>

> --- /dev/null
> +++ b/arch/arm/mach-shmobile/setup-r7s9210.c
> @@ -0,0 +1,27 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * r7s9210 processor support
> + *
> + * Copyright (C) 2018  Renesas Electronics Corporation
> + * Copyright (C) 2018  Chris Brandt
> + *
> + */
> +
> +#include <linux/kernel.h>
> +
> +#include <asm/mach/arch.h>
> +
> +#include "common.h"
> +
> +static const char *const r7s9210_boards_compat_dt[] __initconst = {
> +       "renesas,r7s9210",
> +       NULL,
> +};
> +
> +DT_MACHINE_START(R7S72100_DT, "Generic R7S9210 (Flattened Device Tree)")
> +       .l2c_aux_val    = 0,
> +       .l2c_aux_mask   = ~0,
> +       .init_early     = shmobile_init_delay,
> +       .init_late      = shmobile_init_late,
> +       .dt_compat      = r7s9210_boards_compat_dt,
> +MACHINE_END

I'm wondering if you could do without any board code, i.e. without
setup-r7s9210.c?

Gr{oetje,eeting}s,

                        Geert
Geert Uytterhoeven July 12, 2018, 5:20 p.m. UTC | #2
Hi Chris,

On Thu, Jul 12, 2018 at 5:40 PM Chris Brandt <Chris.Brandt@renesas.com> wrote:
> On Thursday, July 12, 2018, Geert Uytterhoeven wrote:
> > I'm wondering if you could do without any board code, i.e. without
> > setup-r7s9210.c?
>
> I think I see them being removed for R-Car.
> But....I'm not sure how that actually works.
>
> I'll have a look.
>
> As you can see, there's really nothing in the RZ/A1 setup file either.

Yeah, that's why I asked: setup-r7s72100.c is the smallest setup file.

It uses shmobile_init_delay() to preset loops-per-jiffy, to avoid
calibrating the
delay loop, and shmobile_init_late() to make s2ram do more than s2idle.
As RZ/A doesn't have SMP, and thus there's no use for disabling secondary
CPU cores, the impact of the latter is small (read: I don't know what's the real
impact of calling cpu_idle_poll_ctrl()).

Gr{oetje,eeting}s,

                        Geert
Chris Brandt July 12, 2018, 5:33 p.m. UTC | #3
Hi Geert,

On Thursday, July 12, 2018, Geert Uytterhoeven wrote:
> Yeah, that's why I asked: setup-r7s72100.c is the smallest setup file.
> 
> It uses shmobile_init_delay() to preset loops-per-jiffy, to avoid
> calibrating the
> delay loop, and shmobile_init_late() to make s2ram do more than s2idle.
> As RZ/A doesn't have SMP, and thus there's no use for disabling secondary
> CPU cores, the impact of the latter is small (read: I don't know what's
> the real
> impact of calling cpu_idle_poll_ctrl()).

It's been quite a while, but I remember when porting RZ/A1 code that 
without those two functions, things didn't work right. Of course that was 
many releases ago.


However, one thing that I know I need is

+	.l2c_aux_val    = 0,
+	.l2c_aux_mask   = ~0,

Without that, I don't get my L2C driver loaded.

Hence:
a96bb197693e ("ARM: 8660/1: shmobile: r7s72100: Enable L2 cache")

So at least for now, I would say I still need the setup file.


Chris
Geert Uytterhoeven July 13, 2018, 10:06 a.m. UTC | #4
Hi Chris,

On Thu, Jul 12, 2018 at 7:34 PM Chris Brandt <Chris.Brandt@renesas.com> wrote:
> On Thursday, July 12, 2018, Geert Uytterhoeven wrote:
> > Yeah, that's why I asked: setup-r7s72100.c is the smallest setup file.
> >
> > It uses shmobile_init_delay() to preset loops-per-jiffy, to avoid
> > calibrating the
> > delay loop, and shmobile_init_late() to make s2ram do more than s2idle.
> > As RZ/A doesn't have SMP, and thus there's no use for disabling secondary
> > CPU cores, the impact of the latter is small (read: I don't know what's
> > the real
> > impact of calling cpu_idle_poll_ctrl()).
>
> It's been quite a while, but I remember when porting RZ/A1 code that
> without those two functions, things didn't work right. Of course that was
> many releases ago.

Right, you may not have had an early timer running yet, causing the loop
calibration to hang. May have been fixed by ostm support.

> However, one thing that I know I need is
>
> +       .l2c_aux_val    = 0,
> +       .l2c_aux_mask   = ~0,
>
> Without that, I don't get my L2C driver loaded.
>
> Hence:
> a96bb197693e ("ARM: 8660/1: shmobile: r7s72100: Enable L2 cache")
>
> So at least for now, I would say I still need the setup file.

I forgot about the L2C. Yeah, it's a pity we still need board code to
enable the PL310 cache with default settings.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html