Skip to content

Commit

Permalink
Merge tag 'renesas-arm-soc-for-v6.7-tag1' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/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.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Oct 18, 2023
2 parents 646fe2e + 435d422 commit f46ada0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions arch/arm/mach-shmobile/pm-rcar-gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ void __init rcar_gen2_pm_init(void)
{
void __iomem *p;
u32 bar;
static int once;
struct device_node *np;
bool has_a7 = false;
bool has_a15 = false;
struct resource res;
int error;

if (once++)
if (!request_mem_region(0, SZ_256K, "Boot Area")) {
pr_err("Failed to request boot area\n");
return;
}

for_each_of_cpu_node(np) {
if (of_device_is_compatible(np, "arm,cortex-a15"))
Expand Down
9 changes: 8 additions & 1 deletion arch/arm/mach-shmobile/smp-r8a7779.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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) */
writel(__pa(shmobile_boot_vector), base + AVECR);
Expand Down
10 changes: 8 additions & 2 deletions arch/arm/mach-shmobile/smp-sh73a0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
void __iomem *ap = ioremap(AP_BASE, PAGE_SIZE);
void __iomem *sysc = ioremap(SYSC_BASE, PAGE_SIZE);
void __iomem *ap, *sysc;

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) */
ap = ioremap(AP_BASE, PAGE_SIZE);
sysc = ioremap(SYSC_BASE, PAGE_SIZE);
writel(0, ap + APARMBAREA); /* 4k */
writel(__pa(shmobile_boot_vector), sysc + SBAR);
iounmap(sysc);
Expand Down

0 comments on commit f46ada0

Please sign in to comment.