mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
![Linus Torvalds](/assets/img/avatar_default.png)
These updates have been kept in a separate branch mostly because they rely on updates to the respective clk drivers to keep the shared header files in sync. This includes two branches for arm64 dt updates, both following up on earlier changes for the same platforms that are already merged: Samsung: - add USB3 support in Exynos7 - minor PM related updates Amlogic: - new machines: WeTek Set-top-boxes - various devices added to DT There are also a couple of bugfixes that trickled in since the start of the merge window: - The moxart_defconfig was not building the intended platform - CPU-hotplug was broken on ux500 - Coresight was broken on Juno (never worked) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAWLmRS2CrR//JCVInAQKrkQ//bd8TCGXA0tRwDMEGejtWChZcNkGZDaer sNMyE/c1p5+/4euSmf3jW1JsIx4JDtjr0psKeRpgYId8GVdvaYceFbSMJl6o9hDc pm3sqb66xEgrWQoSBA2Urz/RhSIrxkYbuTpYbN4teV9I/IFgTUggaBSzfkq3SLRE bEVSbCw0S/6t3vJgW4CKCI75+a3NexqImvi8txNwueQQMnDLnOkG97vMUQJgDq0j E+CeOk0mvlGF+TiVoAhUxT3YIt8azUTfUVw7CBIRvo/49sUCiETk6xie93FaC7GI Tmg9KK+oZhrmqt8PBGkikxQMHATnKrfJbMNi/K6nrxW91ylSkwTN/7jfhSjFDrdI 4WNB2x3u6KUnQ0XOKVY36gUnV8kJ/2K9pTZpq0K7m4czo8YAid9LumvDnqhPI0Xg fXxq3YBx7AfzsdBL3+nQ7AH3tr9Bvt01kMZwYwNgpqtglEBScAgzyrPG/yyTBFq7 KOkoyNojTaHZHcDtYqSaxYls+2tdeyvYuQJ7QGQ5DJCW99NgbRuFfIUJvgwRPoKt 13ioIJxDUHmemR6xFURWVH1dPkkqwtJht7us5jcxuxBL9ZhmEb6vophvyxj62zTZ 8A+PE3cC1azhKph7rVrUl9KEoYZzedwDaTGBNpYz1gN7DxDvWHYINEPB4bBLzYmv uWsSYVbV2Qs= =A3U6 -----END PGP SIGNATURE----- Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC late DT updates from Arnd Bergmann: "These updates have been kept in a separate branch mostly because they rely on updates to the respective clk drivers to keep the shared header files in sync. This includes two branches for arm64 dt updates, both following up on earlier changes for the same platforms that are already merged: Samsung: - add USB3 support in Exynos7 - minor PM related updates Amlogic: - new machines: WeTek Set-top-boxes - various devices added to DT There are also a couple of bugfixes that trickled in since the start of the merge window: - The moxart_defconfig was not building the intended platform - CPU-hotplug was broken on ux500 - Coresight was broken on Juno (never worked)" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits) ARM: deconfig: fix the moxart defconfig ARM: ux500: resume the second core properly arm64: dts: juno: update definition for programmable replicator arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost arm64: dts: exynos: Add USB 3.0 controller node for Exynos7 arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7 pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e ARM64: dts: meson-gxbb-p200: add ADC laddered keys ARM64: dts: meson: meson-gx: add the SAR ADC ARM64: dts: meson-gxl: add the pwm_ao_b pin ARM64: dts: meson-gx: add the missing pwm_AO_ab node clk: gxbb: fix CLKID_ETH defined twice ARM64: dts: meson-gxl: rename Nexbox A95x for consistency clk: gxbb: add the SAR ADC clocks and expose them dt-bindings: amlogic: Add WeTek boards ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play dt-bindings: vendor-prefix: Add wetek vendor prefix ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes ...
105 lines
2.6 KiB
C
105 lines
2.6 KiB
C
/*
|
|
* Copyright (C) 2002 ARM Ltd.
|
|
* Copyright (C) 2008 STMicroelctronics.
|
|
* Copyright (C) 2009 ST-Ericsson.
|
|
* Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
|
|
*
|
|
* This file is based on arm realview platform
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/device.h>
|
|
#include <linux/smp.h>
|
|
#include <linux/io.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_address.h>
|
|
|
|
#include <asm/cacheflush.h>
|
|
#include <asm/smp_plat.h>
|
|
#include <asm/smp_scu.h>
|
|
|
|
#include "db8500-regs.h"
|
|
|
|
/* Magic triggers in backup RAM */
|
|
#define UX500_CPU1_JUMPADDR_OFFSET 0x1FF4
|
|
#define UX500_CPU1_WAKEMAGIC_OFFSET 0x1FF0
|
|
|
|
static void __iomem *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, "ste,dbx500-backupram");
|
|
if (!np) {
|
|
pr_err("No backupram base address\n");
|
|
return;
|
|
}
|
|
backupram = of_iomap(np, 0);
|
|
of_node_put(np);
|
|
if (!backupram) {
|
|
pr_err("No backupram remap\n");
|
|
return;
|
|
}
|
|
|
|
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
|
|
if (!np) {
|
|
pr_err("No SCU base address\n");
|
|
return;
|
|
}
|
|
scu_base = of_iomap(np, 0);
|
|
of_node_put(np);
|
|
if (!scu_base) {
|
|
pr_err("No SCU remap\n");
|
|
return;
|
|
}
|
|
|
|
scu_enable(scu_base);
|
|
ncores = scu_get_core_count(scu_base);
|
|
for (i = 0; i < ncores; i++)
|
|
set_cpu_possible(i, true);
|
|
iounmap(scu_base);
|
|
}
|
|
|
|
static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|
{
|
|
/*
|
|
* 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(__pa_symbol(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;
|
|
}
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
void ux500_cpu_die(unsigned int cpu)
|
|
{
|
|
wfi();
|
|
}
|
|
#endif
|
|
|
|
static const struct smp_operations ux500_smp_ops __initconst = {
|
|
.smp_prepare_cpus = ux500_smp_prepare_cpus,
|
|
.smp_boot_secondary = ux500_boot_secondary,
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
.cpu_die = ux500_cpu_die,
|
|
#endif
|
|
};
|
|
CPU_METHOD_OF_DECLARE(ux500_smp, "ste,dbx500-smp", &ux500_smp_ops);
|