From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: BCM5301X: Implement SMP support
Date: Mon, 16 Mar 2015 09:52:05 -0700 [thread overview]
Message-ID: <55070A35.4040804@gmail.com> (raw)
In-Reply-To: <1424385148-15026-1-git-send-email-zajec5@gmail.com>
On 19/02/15 14:32, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
[snip]
> +Optional sub-node properties:
> +
> +compatible = "brcm,bcm4708-sysram" SYSRAM for SMP bringup.
> + SMP-capable SoCs use part of the SYSRAM for storing
> + location of code to be executed by the extra cores.
Is this a regular kind of SRAM? If so, can you use "mmio-sram" as a
compatible fallback?
[snip]
> +
> + /*
> + * In case L1 cache has unpredictable contents at power-up
> + * clean its contents without flushing.
> + */
> + /* bl v7_l1_cache_invalidate */
You can remove that comment now
> + bl v7_invalidate_l1
> +
> + mov r0,#0
> + mcr p15,0,r0,c7,c5,0 /* Invalidate icache */
For consistency with the previous lines, you would want to space operands.
> + dsb
> + isb
> +
> + /*
> + * we've been released from the holding pen: secondary_stack
> + * should now contain the SVC stack for this core
> + */
> + b secondary_startup
> +ENDPROC(bcm5301x_secondary_startup)
> +
> + .align 2
> +1: .long .
> + .long pen_release
> diff --git a/arch/arm/mach-bcm/bcm5301x_smp.c b/arch/arm/mach-bcm/bcm5301x_smp.c
> new file mode 100644
> index 0000000..903cc0d
> --- /dev/null
> +++ b/arch/arm/mach-bcm/bcm5301x_smp.c
> @@ -0,0 +1,160 @@
> +/*
> + * Broadcom BCM470X / BCM5301X ARM platform code.
> + *
> + * Copyright (C) 2002 ARM Ltd.
> + * Copyright (C) 2015 Rafa? Mi?ecki <zajec5@gmail.com>
> + *
> + * Licensed under the GNU/GPL. See COPYING for details.
> + */
> +
> +#include <asm/cacheflush.h>
> +#include <asm/delay.h>
> +#include <asm/smp_plat.h>
> +#include <asm/smp_scu.h>
> +
> +#include <linux/clockchips.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +
> +#define SOC_ROM_LUT_OFF 0x400
> +
> +extern void bcm5301x_secondary_startup(void);
> +
> +static void __cpuinit write_pen_release(int val)
> +{
> + pen_release = val;
> + smp_wmb();
> + sync_cache_w(&pen_release);
> +}
> +
> +static DEFINE_SPINLOCK(boot_lock);
> +
> +static void __init bcm5301x_smp_secondary_set_entry(void (*entry_point)(void))
> +{
> + void __iomem *sysram_base_addr = NULL;
> + struct device_node *node;
> +
> + for_each_compatible_node(node, NULL, "brcm,bcm4708-sysram") {
> + if (!of_device_is_available(node))
> + continue;
> + sysram_base_addr = of_iomap(node, 0);
> + break;
> + }
How about of_find_compatible()? Do you expect more than one sysram node
in a DTS?
--
Florian
next prev parent reply other threads:[~2015-03-16 16:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 20:32 [PATCH RFC] ARM: BCM5301X: Implement SMP support Rafał Miłecki
2015-02-13 11:54 ` Hauke Mehrtens
2015-02-13 12:29 ` Mark Rutland
2015-02-19 22:32 ` [PATCH] " Rafał Miłecki
2015-03-11 21:23 ` Rafał Miłecki
2015-03-16 16:52 ` Florian Fainelli [this message]
2015-03-22 13:20 ` [PATCH V2] " Rafał Miłecki
2015-03-26 12:00 ` Russell King - ARM Linux
2015-10-13 22:29 ` Hauke Mehrtens
2015-10-13 22:48 ` Ray Jui
2015-10-14 13:42 ` Kapil Hali
2015-10-14 18:22 ` Hauke Mehrtens
2015-10-15 15:50 ` Kapil Hali
2015-10-22 20:30 ` Jon Mason
2015-10-23 22:36 ` Hauke Mehrtens
2015-10-15 8:17 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55070A35.4040804@gmail.com \
--to=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).