Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e87d10b2 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'renesas-soc2-for-v3.17' of...

Merge tag 'renesas-soc2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

Merge "Second Round of Renesas ARM Based SoC Updates for v3.17" from Simon
Horman:

* Suspend on non-SMP update for r8a7790
* Move r8a7791.h out of mach directory.
  This is part of a multi-stage effort to move headers
  out of that directory.

* tag 'renesas-soc2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas

:
  ARM: shmobile: Allow r8a7791 to build non-SMP APMU code
  ARM: shmobile: Move r8a7791 reset code to pm-r8a7791.c
  ARM: shmobile: Allow r8a7790 to build non-SMP APMU code
  ARM: shmobile: Move r8a7790 reset code to pm-r8a7790.c
  ARM: shmobile: Use __init for APMU suspend init function
  ARM: shmobile: Adjust APMU code to build for non-SMP
  ARM: shmobile: Allow use of boot code for non-SMP case
  ARM: shmobile: Move r8a7791.h

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents e1ddcdef bfe4cfa8
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -34,17 +34,19 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
obj-$(CONFIG_ARCH_R7S72100)	+= clock-r7s72100.o
endif

# CPU reset vector handling objects
cpu-y				:= platsmp.o headsmp.o
cpu-$(CONFIG_ARCH_R8A7790)	+= platsmp-apmu.o
cpu-$(CONFIG_ARCH_R8A7791)	+= platsmp-apmu.o

# SMP objects
smp-y				:= platsmp.o headsmp.o
smp-y				:= $(cpu-y)
smp-$(CONFIG_ARCH_SH73A0)	+= smp-sh73a0.o headsmp-scu.o platsmp-scu.o
smp-$(CONFIG_ARCH_R8A7779)	+= smp-r8a7779.o headsmp-scu.o platsmp-scu.o
smp-$(CONFIG_ARCH_R8A7790)	+= smp-r8a7790.o platsmp-apmu.o
smp-$(CONFIG_ARCH_R8A7791)	+= smp-r8a7791.o platsmp-apmu.o
smp-$(CONFIG_ARCH_R8A7790)	+= smp-r8a7790.o
smp-$(CONFIG_ARCH_R8A7791)	+= smp-r8a7791.o
smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o

# IRQ objects
obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o

# PM objects
obj-$(CONFIG_SUSPEND)		+= suspend.o
obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
@@ -53,8 +55,11 @@ obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o pm-rmobile.o
obj-$(CONFIG_ARCH_R8A7779)	+= pm-r8a7779.o pm-rcar.o
obj-$(CONFIG_ARCH_R8A7790)	+= pm-r8a7790.o pm-rcar.o
obj-$(CONFIG_ARCH_R8A7791)	+= pm-r8a7791.o pm-rcar.o
obj-$(CONFIG_ARCH_R8A7790)	+= pm-r8a7790.o pm-rcar.o $(cpu-y)
obj-$(CONFIG_ARCH_R8A7791)	+= pm-r8a7791.o pm-rcar.o $(cpu-y)

# IRQ objects
obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o

# Board objects
ifdef CONFIG_ARCH_SHMOBILE_MULTI
+3 −1
Original line number Diff line number Diff line
@@ -23,11 +23,13 @@
#include <linux/kernel.h>
#include <linux/of_platform.h>
#include <linux/platform_data/rcar-du.h>
#include <mach/r8a7791.h>

#include <asm/mach/arch.h>

#include "clock.h"
#include "common.h"
#include "irqs.h"
#include "r8a7791.h"
#include "rcar-gen2.h"

/* DU */
+3 −1
Original line number Diff line number Diff line
@@ -45,11 +45,13 @@
#include <linux/spi/flash.h>
#include <linux/spi/rspi.h>
#include <linux/spi/spi.h>
#include <mach/r8a7791.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>

#include "common.h"
#include "irqs.h"
#include "r8a7791.h"
#include "rcar-gen2.h"

/* DU */
+8 −5
Original line number Diff line number Diff line
@@ -10,14 +10,17 @@
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/linkage.h>
#include <linux/threads.h>
#include <asm/memory.h>

#ifdef CONFIG_SMP
ENTRY(shmobile_invalidate_start)
	bl	v7_invalidate_l1
	b	secondary_startup
ENDPROC(shmobile_invalidate_start)
#endif

/*
 * Reset vector for secondary CPUs.
@@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr:

shmobile_smp_boot_next:
	add	r1, r1, #1
	cmp	r1, #CONFIG_NR_CPUS
	cmp	r1, #NR_CPUS
	blo	shmobile_smp_boot_find_mpidr

	b	shmobile_smp_sleep
@@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep)

	.globl	shmobile_smp_mpidr
shmobile_smp_mpidr:
1:	.space	CONFIG_NR_CPUS * 4
1:	.space	NR_CPUS * 4
	.globl	shmobile_smp_fn
shmobile_smp_fn:
2:	.space	CONFIG_NR_CPUS * 4
2:	.space	NR_CPUS * 4
	.globl	shmobile_smp_arg
shmobile_smp_arg:
3:	.space	CONFIG_NR_CPUS * 4
3:	.space	NR_CPUS * 4
+8 −5
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/of_address.h>
#include <linux/smp.h>
#include <linux/suspend.h>
#include <linux/threads.h>
#include <asm/cacheflush.h>
#include <asm/cp15.h>
#include <asm/proc-fns.h>
@@ -25,13 +26,13 @@
static struct {
	void __iomem *iomem;
	int bit;
} apmu_cpus[CONFIG_NR_CPUS];
} apmu_cpus[NR_CPUS];

#define WUPCR_OFFS 0x10
#define PSTR_OFFS 0x40
#define CPUNCR_OFFS(n) (0x100 + (0x10 * (n)))

static int apmu_power_on(void __iomem *p, int bit)
static int __maybe_unused apmu_power_on(void __iomem *p, int bit)
{
	/* request power on */
	writel_relaxed(BIT(bit), p + WUPCR_OFFS);
@@ -50,7 +51,7 @@ static int apmu_power_off(void __iomem *p, int bit)
	return 0;
}

static int apmu_power_off_poll(void __iomem *p, int bit)
static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit)
{
	int k;

@@ -73,7 +74,7 @@ static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu))

static void apmu_init_cpu(struct resource *res, int cpu, int bit)
{
	if (apmu_cpus[cpu].iomem)
	if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
		return;

	apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
@@ -137,6 +138,7 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus)
	apmu_parse_cfg(apmu_init_cpu);
}

#ifdef CONFIG_SMP
int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
	/* For this particular CPU register boot vector */
@@ -144,6 +146,7 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)

	return apmu_wrap(cpu, apmu_power_on);
}
#endif

#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
/* nicked from arch/arm/mach-exynos/hotplug.c */
@@ -237,7 +240,7 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
	return 0;
}

void shmobile_smp_apmu_suspend_init(void)
void __init shmobile_smp_apmu_suspend_init(void)
{
	shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
}
Loading