Renesas ARM SoC updates for v6.7

- Reserve boot area when SMP is enabled to prevent conflicts with
     FLASH,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZRadGAAKCRCKwlD9ZEnx
 cJuhAQC7NmZBW2gywDPFk9tNVyFVumzByj1RcRyhHCd6IjwkBgEAwKd5fr0Z0BLo
 0nVN3CWBVltVDYuNcCD6FPdvND3ZXgU=
 =6JNN
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUv3qsACgkQYKtH/8kJ
 Uifqfg//UBbpzhmpxWAiKRr/Lgd4SyjxhRdMq44YMCAcZaZfFYths4Ka2wP9Ys+d
 8UzZHoR9AL4CNdx9/DCki5GCvg8mZ0R2UyWaZ0qdpkfEpUgipjo+d+Gyj6tCZx3V
 BQQdbv6i55cbYOUxtcLeibrjpCCnGi+lYsKkrEcp81CtPxpKJXOOpj+ovqnXGXQz
 eHTLuMxYMjq5OOaIgNTUtaPopmwfiGJYKn9hIdfzWlO6LbjLJgtRY02SmrVTI4XA
 DogAk63LGDq+AlBtY9ZZ3nlnTK9NVzsD7D+gDnxnG8MJUva8StQZANGps1rEn/ED
 NI7hUEZqt+mEs64SJa6yY48pgr+4KsmPpVFk6EDRbOTKYuywt8ZvNpzQWuJVOkUB
 RR2emyCPx3A1FY+OyS4hcbZN+0piABqwSO6PErkR48G66kQ21Z8UuqDKYKuzF2HL
 kVut9rmY6pkPZe9ZFp07nkDM99trEVwiHYtqmGX6MeBWBG3Mg2YaXBAtwFzcahED
 UOaUShjtpHKs/BaEZb6Rp18H2VbgefBBchz9yxPe0O5xAUmeZ30gYOOx4Ps5WhLN
 Uces4p5Hju4UmcFy3zccWDyqFtbx7t+YFjrT9xuUwa1lwRhnMJqA/sstVtQ2d0LZ
 HA9Zn6yYGkoWm1f0d1CpkG09qFFWkBzonQ5f9T4bzw6njOMs9bw=
 =B1Fl
 -----END PGP SIGNATURE-----

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.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2023-10-18 15:33:30 +02:00
commit f46ada004d
3 changed files with 19 additions and 5 deletions

View File

@ -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"))

View File

@ -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);

View File

@ -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);