mirror of https://gitee.com/openkylin/linux.git
Some two collected patches simplifying some Ux500
stuff. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJYd36dAAoJEEEQszewGV1z2QEP/3CroecfMgf7KIcZ0gz97+gU xRbGfsH24jCH51HTuTNG98QaoGy9HyOuVatkTkqRUJr1LSsbt1wACZLmlluO+aIV l1ekNcdflK9AzKJdQBlqGNX3pi+tIkiidz/uAP8UBsv2QMMAaGP2yZ2CFc4keGQB iaSwjtJJgJOvnR7jtxQrVdjErfdOcwMNZjMmuZ4rhPmL1/0+isKSGL8IZkpMr2p3 U/P3592ntQHWWzVSXVmgYk9zxO2PWZVXYnHEMEx2+mWLychz26CC/rUtWsS4xxvf gpWkRBmgYcenUl7d4Wp55foXjMdtwW5Fy2qW0Xi5Z/T7ueLfJKOUrJPdHXNBtl6I 9U8n7zXHJvwAlOxxPS96jCdZIaoqEe3qbUW4oYlZMnjzjqHjoadEq5fwCFPVbAR8 QYDQsRYjWzR96xFEmlaxr6INqZ/H1sN0LfHe6ueB6DeBJUyrb4MPspb3nIAr0Z1p Rdapk+/TdD5e/5S6l13nJgmL5+nJkmk6ui6FuDxrAyxBJPRDZwuPk3akkDaxCpVA DfbG3a9H/OMynpcF5aottxIYelihp2NWi0RNJsWkYo2hXdbhsgw4iTXnUSpxBGhp AyL+uOGkjF+Obcg5EWlEoZ9hrfUDnuNewLrAM7JX2nkz/Kw9aYGgR4Nhm7y9cpie avnjp/4O8K1r6oafZuoy =cYBt -----END PGP SIGNATURE----- Merge tag 'ux500-dev-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/soc Some two collected patches simplifying some Ux500 stuff. * tag 'ux500-dev-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: ux500: remove duplicated include from cpu-db8500.c ARM: ux500: simplify secondary boot Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
ddcb0a762b
|
@ -12,7 +12,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/irqchip.h>
|
||||
|
|
|
@ -31,10 +31,14 @@
|
|||
#define UX500_CPU1_JUMPADDR_OFFSET 0x1FF4
|
||||
#define UX500_CPU1_WAKEMAGIC_OFFSET 0x1FF0
|
||||
|
||||
static void wakeup_secondary(void)
|
||||
static void __iomem *backupram;
|
||||
|
||||
static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
struct device_node *np;
|
||||
static void __iomem *backupram;
|
||||
static void __iomem *scu_base;
|
||||
unsigned int ncores;
|
||||
int i;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "ste,dbx500-backupram");
|
||||
if (!np) {
|
||||
|
@ -48,29 +52,6 @@ static void wakeup_secondary(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* write the address of secondary startup into the backup ram register
|
||||
* at offset 0x1FF4, then write the magic number 0xA1FEED01 to the
|
||||
* backup ram register at offset 0x1FF0, which is what boot rom code
|
||||
* is waiting for. This will wake up the secondary core from WFE.
|
||||
*/
|
||||
writel(virt_to_phys(secondary_startup),
|
||||
backupram + UX500_CPU1_JUMPADDR_OFFSET);
|
||||
writel(0xA1FEED01,
|
||||
backupram + UX500_CPU1_WAKEMAGIC_OFFSET);
|
||||
|
||||
/* make sure write buffer is drained */
|
||||
mb();
|
||||
iounmap(backupram);
|
||||
}
|
||||
|
||||
static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
struct device_node *np;
|
||||
static void __iomem *scu_base;
|
||||
unsigned int ncores;
|
||||
int i;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
|
||||
if (!np) {
|
||||
pr_err("No SCU base address\n");
|
||||
|
@ -92,7 +73,19 @@ static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
|
|||
|
||||
static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
||||
{
|
||||
wakeup_secondary();
|
||||
/*
|
||||
* write the address of secondary startup into the backup ram register
|
||||
* at offset 0x1FF4, then write the magic number 0xA1FEED01 to the
|
||||
* backup ram register at offset 0x1FF0, which is what boot rom code
|
||||
* is waiting for. This will wake up the secondary core from WFE.
|
||||
*/
|
||||
writel(virt_to_phys(secondary_startup),
|
||||
backupram + UX500_CPU1_JUMPADDR_OFFSET);
|
||||
writel(0xA1FEED01,
|
||||
backupram + UX500_CPU1_WAKEMAGIC_OFFSET);
|
||||
|
||||
/* make sure write buffer is drained */
|
||||
mb();
|
||||
arch_send_wakeup_ipi_mask(cpumask_of(cpu));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue