|
@@ -285,13 +285,10 @@ 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 prop;
|
|
|
- enum tegra_suspend_mode suspend_mode;
|
|
|
- u32 core_good_time[2] = {0, 0};
|
|
|
- u32 lp0_vec[2] = {0, 0};
|
|
|
+ u32 val;
|
|
|
|
|
|
np = of_find_matching_node(NULL, matches);
|
|
|
BUG_ON(!np);
|
|
@@ -300,6 +297,26 @@ static void __init tegra_pmc_parse_dt(void)
|
|
|
|
|
|
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;
|
|
|
+ enum tegra_suspend_mode suspend_mode;
|
|
|
+ u32 core_good_time[2] = {0, 0};
|
|
|
+ u32 lp0_vec[2] = {0, 0};
|
|
|
+
|
|
|
+ np = of_find_matching_node(NULL, matches);
|
|
|
+ BUG_ON(!np);
|
|
|
+
|
|
|
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);
|
|
|
-}
|