* [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg
@ 2015-10-15 6:59 Simon Horman
2015-10-15 11:06 ` Sergei Shtylyov
2015-10-26 4:34 ` Simon Horman
0 siblings, 2 replies; 3+ messages in thread
From: Simon Horman @ 2015-10-15 6:59 UTC (permalink / raw)
To: linux-sh
Use new boot mode reg infrastructure to obtain the mode pin
value when initialising SMP for r8a7791 SoC.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/smp-r8a7791.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index b2508c0d276b..595499834293 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -20,6 +20,8 @@
#include <asm/smp_plat.h>
+#include <misc/boot-mode-reg.h>
+
#include "common.h"
#include "platsmp-apmu.h"
#include "r8a7791.h"
@@ -45,8 +47,17 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
static int r8a7791_smp_boot_secondary(unsigned int cpu,
struct task_struct *idle)
{
+ int err;
+ u32 mode;
+
+ err = boot_mode_reg_get(&mode);
+ if (err) {
+ pr_warn("Unable retrieve boot mode register\n");
+ return err;
+ }
+
/* Error out when hardware debug mode is enabled */
- if (rcar_gen2_read_mode_pins() & BIT(21)) {
+ if (mode & BIT(21)) {
pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
return -ENOTSUPP;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg
2015-10-15 6:59 [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg Simon Horman
@ 2015-10-15 11:06 ` Sergei Shtylyov
2015-10-26 4:34 ` Simon Horman
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2015-10-15 11:06 UTC (permalink / raw)
To: linux-sh
On 10/15/2015 9:59 AM, Simon Horman wrote:
> Use new boot mode reg infrastructure to obtain the mode pin
> value when initialising SMP for r8a7791 SoC.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/mach-shmobile/smp-r8a7791.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
> index b2508c0d276b..595499834293 100644
> --- a/arch/arm/mach-shmobile/smp-r8a7791.c
> +++ b/arch/arm/mach-shmobile/smp-r8a7791.c
[...]
> @@ -45,8 +47,17 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
> static int r8a7791_smp_boot_secondary(unsigned int cpu,
> struct task_struct *idle)
> {
> + int err;
> + u32 mode;
> +
> + err = boot_mode_reg_get(&mode);
> + if (err) {
> + pr_warn("Unable retrieve boot mode register\n");
There's "to" missing in this string.
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg
2015-10-15 6:59 [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg Simon Horman
2015-10-15 11:06 ` Sergei Shtylyov
@ 2015-10-26 4:34 ` Simon Horman
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2015-10-26 4:34 UTC (permalink / raw)
To: linux-sh
On Thu, Oct 15, 2015 at 02:06:49PM +0300, Sergei Shtylyov wrote:
> On 10/15/2015 9:59 AM, Simon Horman wrote:
>
> >Use new boot mode reg infrastructure to obtain the mode pin
> >value when initialising SMP for r8a7791 SoC.
> >
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> > arch/arm/mach-shmobile/smp-r8a7791.c | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> >diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
> >index b2508c0d276b..595499834293 100644
> >--- a/arch/arm/mach-shmobile/smp-r8a7791.c
> >+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
> [...]
> >@@ -45,8 +47,17 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
> > static int r8a7791_smp_boot_secondary(unsigned int cpu,
> > struct task_struct *idle)
> > {
> >+ int err;
> >+ u32 mode;
> >+
> >+ err = boot_mode_reg_get(&mode);
> >+ if (err) {
> >+ pr_warn("Unable retrieve boot mode register\n");
>
> There's "to" missing in this string.
Thanks, I'll fix that.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-26 4:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 6:59 [PATCH/RFC 4/6] arm: shmobile: r8a7791: Obtain MD pin value using boot-mode-reg Simon Horman
2015-10-15 11:06 ` Sergei Shtylyov
2015-10-26 4:34 ` Simon Horman
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).