]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-tegra/tegra.c
ARM: tegra: split tegra_pmc_init() in two
[karo-tx-linux.git] / arch / arm / mach-tegra / tegra.c
index 5b8605547a09113a65daaf65b902d9a6098fe522..4da271df2e6cc5d6431a14b3befbff04c32fa784 100644 (file)
@@ -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 @@ out:
        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,