mirror of https://gitee.com/openkylin/linux.git
ARM: tegra: dependencies for ARM .init_time cleanup
This patch is a dependency for Sebastian Hesselbarth's series that cleans up the ARM machine descriptor's .init_time hook. It may also end up being a dependency for cleanup/development in the Tegra tree, and hence is contained in its own topic branch, to allow conflicts to be easily resolved. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJSOLhuAAoJEMzrak5tbycxYu8P/1Y3lP1bQyeM+9L6zquVR/d3 Vurlx7wVP2Rjhue/DeO4JwFfM6Cbe89SEue5UtqehJ/TvVSWw2bdtLRYzMBCcFBu fXqgA1oBLlhnCPl5KwFTz4HyHeEZfClkyRdOC/Vl8lGs4fLJWk868xq0cXdB/o11 2xw9qd5FShaN+6VbZ3XUzMlBJRdddfS7XwiobJXlB66cAmRr0Wybi8ZB87OHEPHV Ug+h6tzcs46FyoOXsvXiiRA7rj/fWMbdcrrj2uao4eUTE+Az8vFVtowbmykNcnvQ N2hwbqSWCjui/gv8sxy3utt942PvXnG9HpZ0oNbxCVuQDFTcxsEFioxNinw0To/3 GsnfLEtftVS6JcIPLlux4KwRAoQYUAXaJKD5y1YBfV5Bqt51DKWUzxGnxLQbnMJd T1MncQxIYqrSX/DnbIDWfsJhEiljiTDHNsuExX1W7Aff6kPOcX2jnzLrORZyLBR0 RVM35sZimtGLguVv4RguP0KtdEv+NmM+Dm2wSXdqB/ohdMWWkcI++mMskQx7BJ12 V5u+cQIC6W62ICRvDzWbFVE0vm+5yGim3fQzFqSV29i8Yp3UBfl2R2d5PixxjrUl pNkeanYz/mFNcr2Bwan2z+2dsNR1CirJxbN5CrLpyH3nvgVIWSMC3Hv6j7LsaIfI pGETt6mC0bqcASxUjAdm =PF7O -----END PGP SIGNATURE----- Merge tag 'tegra-for-3.13-deps-for-arm-init-time-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into clk-of-init-v2_for-3.13 ARM: tegra: dependencies for ARM .init_time cleanup This patch is a dependency for Sebastian Hesselbarth's series that cleans up the ARM machine descriptor's .init_time hook. It may also end up being a dependency for cleanup/development in the Tegra tree, and hence is contained in its own topic branch, to allow conflicts to be easily resolved.
This commit is contained in:
commit
615c924feb
|
@ -24,7 +24,6 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/clk-provider.h>
|
||||
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
|
||||
|
@ -61,8 +60,7 @@ u32 tegra_uart_config[4] = {
|
|||
#ifdef CONFIG_OF
|
||||
void __init tegra_dt_init_irq(void)
|
||||
{
|
||||
of_clk_init(NULL);
|
||||
tegra_pmc_init();
|
||||
tegra_pmc_init_irq();
|
||||
tegra_init_irq();
|
||||
irqchip_init();
|
||||
tegra_legacy_irq_syscore_init();
|
||||
|
|
|
@ -285,7 +285,28 @@ static const struct of_device_id matches[] __initconst = {
|
|||
{ }
|
||||
};
|
||||
|
||||
static void __init tegra_pmc_parse_dt(void)
|
||||
void __init tegra_pmc_init_irq(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
u32 val;
|
||||
|
||||
np = of_find_matching_node(NULL, matches);
|
||||
BUG_ON(!np);
|
||||
|
||||
tegra_pmc_base = of_iomap(np, 0);
|
||||
|
||||
tegra_pmc_invert_interrupt = of_property_read_bool(np,
|
||||
"nvidia,invert-interrupt");
|
||||
|
||||
val = tegra_pmc_readl(PMC_CTRL);
|
||||
if (tegra_pmc_invert_interrupt)
|
||||
val |= PMC_CTRL_INTR_LOW;
|
||||
else
|
||||
val &= ~PMC_CTRL_INTR_LOW;
|
||||
tegra_pmc_writel(val, PMC_CTRL);
|
||||
}
|
||||
|
||||
void __init tegra_pmc_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
u32 prop;
|
||||
|
@ -296,10 +317,6 @@ static void __init tegra_pmc_parse_dt(void)
|
|||
np = of_find_matching_node(NULL, matches);
|
||||
BUG_ON(!np);
|
||||
|
||||
tegra_pmc_base = of_iomap(np, 0);
|
||||
|
||||
tegra_pmc_invert_interrupt = of_property_read_bool(np,
|
||||
"nvidia,invert-interrupt");
|
||||
tegra_pclk = of_clk_get_by_name(np, "pclk");
|
||||
WARN_ON(IS_ERR(tegra_pclk));
|
||||
|
||||
|
@ -365,17 +382,3 @@ static void __init tegra_pmc_parse_dt(void)
|
|||
|
||||
pmc_pm_data.suspend_mode = suspend_mode;
|
||||
}
|
||||
|
||||
void __init tegra_pmc_init(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
tegra_pmc_parse_dt();
|
||||
|
||||
val = tegra_pmc_readl(PMC_CTRL);
|
||||
if (tegra_pmc_invert_interrupt)
|
||||
val |= PMC_CTRL_INTR_LOW;
|
||||
else
|
||||
val &= ~PMC_CTRL_INTR_LOW;
|
||||
tegra_pmc_writel(val, PMC_CTRL);
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ bool tegra_pmc_cpu_is_powered(int cpuid);
|
|||
int tegra_pmc_cpu_power_on(int cpuid);
|
||||
int tegra_pmc_cpu_remove_clamping(int cpuid);
|
||||
|
||||
void tegra_pmc_init_irq(void);
|
||||
void tegra_pmc_init(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/sys_soc.h>
|
||||
#include <linux/usb/tegra_usb_phy.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clk/tegra.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -44,6 +45,7 @@
|
|||
#include "common.h"
|
||||
#include "fuse.h"
|
||||
#include "iomap.h"
|
||||
#include "pmc.h"
|
||||
|
||||
static void __init tegra_dt_init(void)
|
||||
{
|
||||
|
@ -51,6 +53,8 @@ static void __init tegra_dt_init(void)
|
|||
struct soc_device *soc_dev;
|
||||
struct device *parent = NULL;
|
||||
|
||||
tegra_pmc_init();
|
||||
|
||||
tegra_clocks_apply_init_table();
|
||||
|
||||
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
|
||||
|
@ -80,6 +84,12 @@ static void __init tegra_dt_init(void)
|
|||
of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
|
||||
}
|
||||
|
||||
static void __init tegra_dt_init_time(void)
|
||||
{
|
||||
of_clk_init(NULL);
|
||||
clocksource_of_init();
|
||||
}
|
||||
|
||||
static void __init paz00_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
|
||||
|
@ -119,7 +129,7 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)")
|
|||
.smp = smp_ops(tegra_smp_ops),
|
||||
.init_early = tegra_init_early,
|
||||
.init_irq = tegra_dt_init_irq,
|
||||
.init_time = clocksource_of_init,
|
||||
.init_time = tegra_dt_init_time,
|
||||
.init_machine = tegra_dt_init,
|
||||
.init_late = tegra_dt_init_late,
|
||||
.restart = tegra_assert_system_reset,
|
||||
|
|
Loading…
Reference in New Issue