diff options
author | Olof Johansson <olof@lixom.net> | 2013-06-14 21:11:31 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-14 21:11:31 -0400 |
commit | 7bf15412250747277cc53301d550d4894f749b12 (patch) | |
tree | 6362b5b4d68a5eb641981b0f64d472b970d03ff5 /drivers/clk | |
parent | 677b5c48bd524b40120269d973d0633d0d22ee90 (diff) | |
parent | 8f6a0b6528820f9efec36e5843181cc178fa9de8 (diff) |
Merge tag 'tegra-for-3.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc
From Stephen Warren:
ARM: tegra: core SoC support enhancements
This branch contains fixes and enhancement for core Tegra Soc support:
* CPU hotplug support for Tegra114.
* Some preliminary work on Tegra114 CPU sleep modes.
* Minor fix for EMC table DT parsing.
* tag 'tegra-for-3.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
ARM: tegra: don't pass CPU ID to tegra_{set,clear}_cpu_in_lp2
ARM: tegra: cpuidle: using IS_ENABLED for multi SoCs management in init func
ARM: tegra: hook tegra_tear_down_cpu function in the PM suspend init function
ARM: tegra: cpuidle: move the init function behind the suspend init function
ARM: tegra: remove ifdef in the tegra_resume
ARM: tegra: add cpu_disable for hotplug
ARM: tegra114: add CPU hotplug support
clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops
ARM: tegra114: add power up sequence for warm boot CPU
ARM: tegra: make tegra_resume can work for Tegra114
ARM: tegra: skip SCU and PL310 code when CPU is not Cortex-A9
ARM: tegra: add an assembly marco to check Tegra SoC ID
ARM: tegra: emc: correction of ram-code parsing from dt
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/tegra/clk-tegra114.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c index d78e16ee161c..40d939d091bf 100644 --- a/drivers/clk/tegra/clk-tegra114.c +++ b/drivers/clk/tegra/clk-tegra114.c | |||
@@ -250,6 +250,9 @@ | |||
250 | #define CLK_SOURCE_XUSB_DEV_SRC 0x60c | 250 | #define CLK_SOURCE_XUSB_DEV_SRC 0x60c |
251 | #define CLK_SOURCE_EMC 0x19c | 251 | #define CLK_SOURCE_EMC 0x19c |
252 | 252 | ||
253 | /* Tegra CPU clock and reset control regs */ | ||
254 | #define CLK_RST_CONTROLLER_CPU_CMPLX_STATUS 0x470 | ||
255 | |||
253 | static int periph_clk_enb_refcnt[CLK_OUT_ENB_NUM * 32]; | 256 | static int periph_clk_enb_refcnt[CLK_OUT_ENB_NUM * 32]; |
254 | 257 | ||
255 | static void __iomem *clk_base; | 258 | static void __iomem *clk_base; |
@@ -2000,7 +2003,25 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base) | |||
2000 | } | 2003 | } |
2001 | } | 2004 | } |
2002 | 2005 | ||
2003 | static struct tegra_cpu_car_ops tegra114_cpu_car_ops; | 2006 | /* Tegra114 CPU clock and reset control functions */ |
2007 | static void tegra114_wait_cpu_in_reset(u32 cpu) | ||
2008 | { | ||
2009 | unsigned int reg; | ||
2010 | |||
2011 | do { | ||
2012 | reg = readl(clk_base + CLK_RST_CONTROLLER_CPU_CMPLX_STATUS); | ||
2013 | cpu_relax(); | ||
2014 | } while (!(reg & (1 << cpu))); /* check CPU been reset or not */ | ||
2015 | } | ||
2016 | static void tegra114_disable_cpu_clock(u32 cpu) | ||
2017 | { | ||
2018 | /* flow controller would take care in the power sequence. */ | ||
2019 | } | ||
2020 | |||
2021 | static struct tegra_cpu_car_ops tegra114_cpu_car_ops = { | ||
2022 | .wait_for_reset = tegra114_wait_cpu_in_reset, | ||
2023 | .disable_clock = tegra114_disable_cpu_clock, | ||
2024 | }; | ||
2004 | 2025 | ||
2005 | static const struct of_device_id pmc_match[] __initconst = { | 2026 | static const struct of_device_id pmc_match[] __initconst = { |
2006 | { .compatible = "nvidia,tegra114-pmc" }, | 2027 | { .compatible = "nvidia,tegra114-pmc" }, |