devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Martin Blumenstingl
	<martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
	carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Carlo Caione <carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH v4 4/7] ARM: meson: Add SMP bringup code for Meson8 and Meson8b
Date: Sun, 23 Jul 2017 09:33:40 -0700	[thread overview]
Message-ID: <7B0CB90C-DFC3-4ECD-B342-A26BEEE52852@gmail.com> (raw)
In-Reply-To: <20170722191946.22938-5-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

On July 22, 2017 12:19:43 PM PDT, Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:
>This adds the necessary SMP-operations and startup code to use the
>additional cores on the Amlogic Meson8/Meson8m2 (both are using the
>same
>sequence) and Meson8b (using a slightly difference sequence) SoCs.
>
>Signed-off-by: Carlo Caione <carlo@endlessm.com>
>[add Meson8/Meson8m2 support and allow taking CPU cores offline as
>well]
>Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>---

>+static void meson_smp_begin_secondary_boot(unsigned int cpu)
>+{
>+	/*
>+	 * Set the entry point before powering on the CPU through the SCU.
>This
>+	 * is needed if the CPU is in "warm" state (= after rebooting the
>+	 * system without power-cycling, or when taking the CPU offline and
>+	 * then taking it online again.
>+	 */
>+	writel(virt_to_phys(secondary_startup),
>+	       sram_base + MESON_SMP_SRAM_CPU_CTRL_ADDR_REG(cpu));

Please use __pa_symbol() since secondary startup is a kernel image symbol.

>+
>+	/*
>+	 * SCU Power on CPU (needs to be done before starting the CPU,
>+	 * otherwise the secondary CPU will not start).
>+	 */
>+	scu_cpu_power_enable(scu_base, cpu);
>+}
>+
>+static int meson_smp_finalize_secondary_boot(unsigned int cpu)
>+{
>+	unsigned long timeout;
>+
>+	timeout = jiffies + (10 * HZ);
>+	while (readl(sram_base + MESON_SMP_SRAM_CPU_CTRL_ADDR_REG(cpu))) {
>+		if (!time_before(jiffies, timeout)) {
>+			pr_err("Timeout while waiting for CPU%d status\n",
>+			       cpu);
>+			return -ETIMEDOUT;
>+		}
>+	}
>+
>+	writel(virt_to_phys(secondary_startup),
>+	       sram_base + MESON_SMP_SRAM_CPU_CTRL_ADDR_REG(cpu));

Same here.

Thanks!

-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-07-23 16:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22 19:19 [PATCH v4 0/7] SMP and CPU hotplug support for Meson8/Meson8b Martin Blumenstingl
     [not found] ` <20170722191946.22938-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-22 19:19   ` [PATCH v4 1/7] dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation Martin Blumenstingl
     [not found]     ` <20170722191946.22938-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-25  7:59       ` Neil Armstrong
2017-07-22 19:19   ` [PATCH v4 2/7] ARM: smp_scu: add a helper for powering on a specific CPU Martin Blumenstingl
2017-07-22 19:19   ` [PATCH v4 3/7] ARM: smp_scu: allow the platform code to read the SCU CPU status Martin Blumenstingl
2017-07-22 19:19   ` [PATCH v4 4/7] ARM: meson: Add SMP bringup code for Meson8 and Meson8b Martin Blumenstingl
     [not found]     ` <20170722191946.22938-5-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-23 16:33       ` Florian Fainelli [this message]
2017-07-22 19:19   ` [PATCH v4 5/7] clk: meson: meson8b: export the CPU soft reset lines Martin Blumenstingl
     [not found]     ` <20170722191946.22938-6-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-25  8:00       ` Neil Armstrong
2017-07-22 19:19   ` [PATCH v4 6/7] ARM: dts: meson8: add support for booting the secondary CPU cores Martin Blumenstingl
     [not found]     ` <20170722191946.22938-7-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-25  8:00       ` Neil Armstrong
2017-07-22 19:19   ` [PATCH v4 7/7] ARM: dts: meson8b: " Martin Blumenstingl
     [not found]     ` <20170722191946.22938-8-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-07-25  8:01       ` Neil Armstrong

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=7B0CB90C-DFC3-4ECD-B342-A26BEEE52852@gmail.com \
    --to=f.fainelli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org \
    --cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
    --cc=linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).