Commit f46ada00 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'renesas-arm-soc-for-v6.7-tag1' of...

Merge tag 'renesas-arm-soc-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/arm

Renesas ARM SoC updates for v6.7

  - Reserve boot area when SMP is enabled to prevent conflicts with
    FLASH,
  - Miscellaneous fixes and improvements.

* tag 'renesas-arm-soc-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: shmobile: sh73a0: Reserve boot area when SMP is enabled
  ARM: shmobile: r8a7779: Reserve boot area when SMP is enabled
  ARM: shmobile: rcar-gen2: Reserve boot area when SMP is enabled
  ARM: shmobile: rcar-gen2: Remove unneeded once handling

Link: https://lore.kernel.org/r/cover.1695985421.git.geert+renesas@glider.beSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 646fe2e4 435d4226
...@@ -46,15 +46,16 @@ void __init rcar_gen2_pm_init(void) ...@@ -46,15 +46,16 @@ void __init rcar_gen2_pm_init(void)
{ {
void __iomem *p; void __iomem *p;
u32 bar; u32 bar;
static int once;
struct device_node *np; struct device_node *np;
bool has_a7 = false; bool has_a7 = false;
bool has_a15 = false; bool has_a15 = false;
struct resource res; struct resource res;
int error; int error;
if (once++) if (!request_mem_region(0, SZ_256K, "Boot Area")) {
pr_err("Failed to request boot area\n");
return; return;
}
for_each_of_cpu_node(np) { for_each_of_cpu_node(np) {
if (of_device_is_compatible(np, "arm,cortex-a15")) if (of_device_is_compatible(np, "arm,cortex-a15"))
......
...@@ -38,7 +38,14 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle) ...@@ -38,7 +38,14 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus) static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
{ {
void __iomem *base = ioremap(HPBREG_BASE, 0x1000); void __iomem *base;
if (!request_mem_region(0, SZ_4K, "Boot Area")) {
pr_err("Failed to request boot area\n");
return;
}
base = ioremap(HPBREG_BASE, 0x1000);
/* Map the reset vector (in headsmp-scu.S, headsmp.S) */ /* Map the reset vector (in headsmp-scu.S, headsmp.S) */
writel(__pa(shmobile_boot_vector), base + AVECR); writel(__pa(shmobile_boot_vector), base + AVECR);
......
...@@ -44,10 +44,16 @@ static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle) ...@@ -44,10 +44,16 @@ static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus) static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
{ {
void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE); void __iomem *ap, *sysc;
void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE);
if (!request_mem_region(0, SZ_4K, "Boot Area")) {
pr_err("Failed to request boot area\n");
return;
}
/* Map the reset vector (in headsmp.S) */ /* Map the reset vector (in headsmp.S) */
ap = ioremap(AP_BASE, PAGE_SIZE);
sysc = ioremap(SYSC_BASE, PAGE_SIZE);
writel(0, ap + APARMBAREA); /* 4k */ writel(0, ap + APARMBAREA); /* 4k */
writel(__pa(shmobile_boot_vector), sysc + SBAR); writel(__pa(shmobile_boot_vector), sysc + SBAR);
iounmap(sysc); iounmap(sysc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment