public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: shmobile: Check MD21 at SMP boot in case of APMU
Date: Mon, 17 Feb 2014 16:21:14 +0900	[thread overview]
Message-ID: <20140217072111.GA23528@verge.net.au> (raw)
In-Reply-To: <20140217063152.21876.6981.sendpatchset@w520>

On Mon, Feb 17, 2014 at 03:31:52PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> On R-Car Gen2 SoCs such as r8a7790 and r8a7791 the hardware boot
> mode bit MD21 indicates if hardware debug mode is enabled or not.
> 
> In case hardware debug mode is enabled print a warning and refrain
> from booting secondary CPU cores. Without this patch Koelsch boards
> with SW8-4 set to OFF will hang at SMP boot.

Out of interest, is this the solution to your recent SMP troubles?

> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  Written against renesas-devel-v3.14-rc2-20140213
> 
>  arch/arm/mach-shmobile/platsmp-apmu.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- 0001/arch/arm/mach-shmobile/platsmp-apmu.c
> +++ work/arch/arm/mach-shmobile/platsmp-apmu.c	2014-02-17 15:11:15.000000000 +0900
> @@ -17,6 +17,7 @@
>  #include <asm/cp15.h>
>  #include <asm/smp_plat.h>
>  #include <mach/common.h>
> +#include <mach/rcar-gen2.h>
>  
>  static struct {
>  	void __iomem *iomem;
> @@ -136,6 +137,12 @@ void __init shmobile_smp_apmu_prepare_cp
>  
>  int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
>  {
> +	/* Refrain boot when hardware debug mode is enabled */
> +	if (rcar_gen2_read_mode_pins() & BIT(21)) {
> +		pr_warn("Unable to boot CPU%d when MD21 is set\n", cpu);
> +		return -ENOTSUPP;
> +	}
> +
>  	/* For this particular CPU register boot vector */
>  	shmobile_smp_hook(cpu, virt_to_phys(shmobile_invalidate_start), 0);
>  
> 

  reply	other threads:[~2014-02-17  7:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17  6:31 [PATCH] ARM: shmobile: Check MD21 at SMP boot in case of APMU Magnus Damm
2014-02-17  7:21 ` Simon Horman [this message]
2014-02-17  7:35   ` Magnus Damm
2014-02-17  8:53 ` Geert Uytterhoeven
2014-02-17 11:14   ` Magnus Damm

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=20140217072111.GA23528@verge.net.au \
    --to=horms@verge.net.au \
    --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