Here is a collection of fixes (and some intermixed cleanups) that were considered less important and thus not included in the later parts of the 3.9-rc cycle. It's a bit all over the map, contents wise. A series of ux500 fixes and cleanups, a bunch of various fixes for OMAP and tegra, and some for Freescale i.MX and even Qualcomm MSM. Note that there's also a patch on this branch to globally turn off -Wmaybe-uninitialized when building with -Os. It's been posted several times by Arnd and no dissent was raised, but nobody seemed interested to pick it up. So here it is, as the topmost patch. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJRggtQAAoJEIwa5zzehBx3TmYP/i4Kt3JDYEbYyAqNsH3nb0mN 3kLwViUxDdS/aZCXEaNYLwZBUgl1Zyz3oRd39zFCo4dRM2uG1AW+lC73AP3/eW6n 2oHxI43xzwjDNPxRkiipB4NXPyIoIdbRXM6/QIxXzM9zD3MJXj7BpBBpDgGAsLov BQ2r28idxZE6jB4puPjVZCuyG5UMjA0Ko2Fp2em7QXarQBBscDvhAtjqNZ3JPtlN thASsou1B8805J7jf5G8Wz6fNeVJg2wlWMgE9ywJpKFbut4cGM4riS/QvB0fTe6d tmkCae0bw3UD+D+N1gYcZpeGve8oPSHbeyhrSPAfI/wAVBh0J397MgJW5/f0vW8p DffLjQI+S450Kw0Bab41Tn0JnMnXtYUo56yjemdxa/NQJF34ycBFQ3HOm6nFxo7U 6tce2O775uvG0+rJfDbX6M+Mu7QoIi0p8sOdg0/W+pFK08xvaezsOc1NjqTvuYoC s/2LYiIJqVG6tFVU0i/46duQhdp0I/Oj7wXtFXH0ZvZPBz0cDaSU3irB3QA9pNt5 PI6JEBg0FUPUork24gShSUf7un4Itrjlq20HTkC9/z1skx87PbB3Wa7A8jnHeFme tpuPRvmfBWhIhp06AIA8znhDik9xuJ4B7ypsFNM0VyoV/qx+TSIHbViVQuwcOf9b nAidtuhMjE+P2sAu+VGU =bzsu -----END PGP SIGNATURE----- Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC non-critical fixes from Olof Johansson: "Here is a collection of fixes (and some intermixed cleanups) that were considered less important and thus not included in the later parts of the 3.9-rc cycle. It's a bit all over the map, contents wise. A series of ux500 fixes and cleanups, a bunch of various fixes for OMAP and tegra, and some for Freescale i.MX and even Qualcomm MSM. Note that there's also a patch on this branch to globally turn off -Wmaybe-uninitialized when building with -Os. It's been posted several times by Arnd and no dissent was raised, but nobody seemed interested to pick it up. So here it is, as the topmost patch." * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits) Turn off -Wmaybe-uninitialized when building with -Os ARM: orion5x: include linux/cpu.h ARM: tegra: call cpu_do_idle from C code ARM: u300: fix ages old copy/paste bug ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7 ARM: tegra: solve adr range issue with THUMB2_KERNEL enabled ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled ARM: tegra: fix build error when THUMB2_KERNEL enabled ARM: msm: Fix uncompess.h tx underrun check ARM: vexpress: Remove A9 PMU compatible values for non-A9 platforms ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS" ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD" ARM: mach-imx: mach-imx6q: Fix sparse warnings ARM: mach-imx: src: Include "common.h ARM: mach-imx: gpc: Include "common.h" ARM: mach-imx: avic: Staticize *avic_base ARM: mach-imx: tzic: Staticize *tzic_base ARM: mach-imx: clk: Include "clk.h" ARM: mach-imx: clk-busy: Staticize clk_busy_mux_ops ...
89 lines
2.1 KiB
C
89 lines
2.1 KiB
C
/*
|
|
* Copyright 2011 Freescale Semiconductor, Inc.
|
|
* Copyright 2011 Linaro Ltd.
|
|
*
|
|
* The code contained herein is licensed under the GNU General Public
|
|
* License. You may obtain a copy of the GNU General Public License
|
|
* Version 2 or later at the following locations:
|
|
*
|
|
* http://www.opensource.org/licenses/gpl-license.html
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/io.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_address.h>
|
|
#include <linux/smp.h>
|
|
#include <asm/smp_plat.h>
|
|
#include "common.h"
|
|
|
|
#define SRC_SCR 0x000
|
|
#define SRC_GPR1 0x020
|
|
#define BP_SRC_SCR_WARM_RESET_ENABLE 0
|
|
#define BP_SRC_SCR_CORE1_RST 14
|
|
#define BP_SRC_SCR_CORE1_ENABLE 22
|
|
|
|
static void __iomem *src_base;
|
|
|
|
void imx_enable_cpu(int cpu, bool enable)
|
|
{
|
|
u32 mask, val;
|
|
|
|
cpu = cpu_logical_map(cpu);
|
|
mask = 1 << (BP_SRC_SCR_CORE1_ENABLE + cpu - 1);
|
|
val = readl_relaxed(src_base + SRC_SCR);
|
|
val = enable ? val | mask : val & ~mask;
|
|
writel_relaxed(val, src_base + SRC_SCR);
|
|
}
|
|
|
|
void imx_set_cpu_jump(int cpu, void *jump_addr)
|
|
{
|
|
cpu = cpu_logical_map(cpu);
|
|
writel_relaxed(virt_to_phys(jump_addr),
|
|
src_base + SRC_GPR1 + cpu * 8);
|
|
}
|
|
|
|
u32 imx_get_cpu_arg(int cpu)
|
|
{
|
|
cpu = cpu_logical_map(cpu);
|
|
return readl_relaxed(src_base + SRC_GPR1 + cpu * 8 + 4);
|
|
}
|
|
|
|
void imx_set_cpu_arg(int cpu, u32 arg)
|
|
{
|
|
cpu = cpu_logical_map(cpu);
|
|
writel_relaxed(arg, src_base + SRC_GPR1 + cpu * 8 + 4);
|
|
}
|
|
|
|
void imx_src_prepare_restart(void)
|
|
{
|
|
u32 val;
|
|
|
|
/* clear enable bits of secondary cores */
|
|
val = readl_relaxed(src_base + SRC_SCR);
|
|
val &= ~(0x7 << BP_SRC_SCR_CORE1_ENABLE);
|
|
writel_relaxed(val, src_base + SRC_SCR);
|
|
|
|
/* clear persistent entry register of primary core */
|
|
writel_relaxed(0, src_base + SRC_GPR1);
|
|
}
|
|
|
|
void __init imx_src_init(void)
|
|
{
|
|
struct device_node *np;
|
|
u32 val;
|
|
|
|
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-src");
|
|
src_base = of_iomap(np, 0);
|
|
WARN_ON(!src_base);
|
|
|
|
/*
|
|
* force warm reset sources to generate cold reset
|
|
* for a more reliable restart
|
|
*/
|
|
val = readl_relaxed(src_base + SRC_SCR);
|
|
val &= ~(1 << BP_SRC_SCR_WARM_RESET_ENABLE);
|
|
writel_relaxed(val, src_base + SRC_SCR);
|
|
}
|