Say Y here if the SOC supports the Tegra Video Image Compositor.
Note that this not the same as the ARM Vectored Interrupt Controller.
-config TEGRA_MC_DOMAINS
- bool "Enable MC domains"
- depends on PM_GENERIC_DOMAINS
- default n
- help
- When enabled, clock gates MC when it's not needed.
-
config TEGRA_USE_NCT
bool "Enable NCT partition access"
help
obj-y += apbio.o
obj-$(CONFIG_TEGRA_ARB_SEMAPHORE) += arb_sema.o
-obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
obj-y += dvfs.o
obj-$(CONFIG_ARCH_TEGRA_11x_SOC) += tegra11_dvfs.o
ifeq ($(CONFIG_ARCH_TEGRA_13x_SOC),y)
#include <linux/irqchip/tegra.h>
#include <linux/tegra-pm.h>
#include <linux/tegra-pmc.h>
+#include <linux/tegra_pm_domains.h>
#include <trace/events/power.h>
#include <trace/events/nvsecurity.h>
#include <mach/irqs.h>
#include <mach/tegra_smmu.h>
-#include <mach/pm_domains.h>
#include "board.h"
#include "clock.h"
+++ /dev/null
-/*
- * arch/arm/mach-tegra/pm_domains.c
- *
- * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
- *
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/module.h>
-#include <linux/pm.h>
-#include <linux/pm_runtime.h>
-#include <linux/pm_domain.h>
-
-#include <mach/pm_domains.h>
-
-#ifdef CONFIG_TEGRA_MC_DOMAINS
-#define TEGRA_PD_DEV_CALLBACK(callback, dev) \
-({ \
- int (*__routine)(struct device *__d); \
- int __ret = 0; \
- \
- if (dev->type && dev->type->pm) \
- __routine = dev->type->pm->callback; \
- else if (dev->class && dev->class->pm) \
- __routine = dev->class->pm->callback; \
- else if (dev->bus && dev->bus->pm) \
- __routine = dev->bus->pm->callback; \
- else \
- __routine = NULL; \
- \
- if (!__routine && dev->driver && dev->driver->pm) \
- __routine = dev->driver->pm->callback; \
- \
- if (__routine) \
- __ret = __routine(dev); \
- __ret; \
-})
-
-struct domain_client {
- const char *name;
- struct generic_pm_domain *domain;
-};
-
-#ifdef CONFIG_PM_SLEEP
-
-static int tegra_pd_suspend_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(suspend, dev);
-}
-
-static int tegra_pd_suspend_late(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(suspend_late, dev);
-}
-
-static int tegra_pd_resume_early(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(resume_early, dev);
-}
-
-static int tegra_pd_resume_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(resume, dev);
-}
-
-static int tegra_pd_freeze_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(freeze, dev);
-}
-
-static int tegra_pd_freeze_late(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(freeze_late, dev);
-}
-
-static int tegra_pd_thaw_early(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(thaw_early, dev);
-}
-
-static int tegra_pd_thaw_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(thaw, dev);
-}
-#else /* !CONFIG_PM_SLEEP */
-
-#define tegra_pd_suspend_dev NULL
-#define tegra_pd_suspend_late NULL
-#define tegra_pd_resume_early NULL
-#define tegra_pd_resume_dev NULL
-#define tegra_pd_freeze_dev NULL
-#define tegra_pd_freeze_late NULL
-#define tegra_pd_thaw_early NULL
-#define tegra_pd_thaw_dev NULL
-
-#endif /* !CONFIG_PM_SLEEP */
-
-static bool tegra_pd_active_wakeup(struct device *dev)
-{
- return device_may_wakeup(dev);
-}
-
-static int tegra_pd_save_dev(struct device *dev)
-{
- return 0;
-}
-
-static int tegra_pd_restore_dev(struct device *dev)
-{
- return 0;
-}
-
-static int tegra_pd_stop_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(runtime_suspend, dev);
-}
-
-static int tegra_pd_start_dev(struct device *dev)
-{
- return TEGRA_PD_DEV_CALLBACK(runtime_resume, dev);
-}
-
-struct gpd_dev_ops tegra_pd_ops = {
- .active_wakeup = tegra_pd_active_wakeup,
- .save_state = tegra_pd_save_dev,
- .restore_state = tegra_pd_restore_dev,
- .stop = tegra_pd_stop_dev,
- .start = tegra_pd_start_dev,
- .suspend = tegra_pd_suspend_dev,
- .suspend_late = tegra_pd_suspend_late,
- .resume_early = tegra_pd_resume_early,
- .resume = tegra_pd_resume_dev,
- .freeze = tegra_pd_freeze_dev,
- .freeze_late = tegra_pd_freeze_late,
- .thaw_early = tegra_pd_thaw_early,
- .thaw = tegra_pd_thaw_dev,
-};
-
-static int tegra_mc_clk_power_off(struct generic_pm_domain *genpd)
-{
- struct tegra_pm_domain *pd = to_tegra_pd(genpd);
-
- if (!pd)
- return -EINVAL;
-
- if (IS_ERR_OR_NULL(pd->clk))
- return 0;
-
- clk_disable_unprepare(pd->clk);
-
- return 0;
-}
-
-static int tegra_mc_clk_power_on(struct generic_pm_domain *genpd)
-{
- struct tegra_pm_domain *pd = to_tegra_pd(genpd);
-
- if (!pd)
- return -EINVAL;
-
- if (IS_ERR_OR_NULL(pd->clk))
- return 0;
-
- clk_prepare_enable(pd->clk);
-
- return 0;
-}
-
-static struct tegra_pm_domain tegra_nvavp = {
- .gpd.name = "tegra_nvavp",
-};
-
-static struct tegra_pm_domain tegra_mc_clk = {
- .gpd.name = "tegra_mc_clk",
- .gpd.power_off = tegra_mc_clk_power_off,
- .gpd.power_on = tegra_mc_clk_power_on,
-};
-
-static struct domain_client client_list[] = {
- { .name = "tegradc", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra30-hda", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-apbdma", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-otg", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-ehci", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-xhci", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-host1x", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra_nvavp", .domain = &tegra_mc_clk.gpd },
- { .name = "nvavp", .domain = &tegra_nvavp.gpd },
- { .name = "sdhci-tegra", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra11-se", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra12-se", .domain = &tegra_mc_clk.gpd },
- { .name = "tegra-pcie", .domain = &tegra_mc_clk.gpd },
- { .name = "gpu", .domain = &tegra_mc_clk.gpd },
- {},
-};
-
-static int __init tegra_init_pm_domain(void)
-{
- pm_genpd_init(&tegra_mc_clk.gpd, &simple_qos_governor, false);
-
- pm_genpd_init(&tegra_nvavp.gpd, &simple_qos_governor, false);
- tegra_pd_add_sd(&tegra_nvavp.gpd);
-
- return 0;
-}
-core_initcall(tegra_init_pm_domain);
-
-static struct generic_pm_domain *tegra_pd_get_domain(const char *client)
-{
- const char *s;
- struct domain_client *clients = client_list;
-
- while ((s = clients->name) != NULL) {
- if (!strncmp(s, client, strlen(s)))
- return clients->domain;
-
- clients++;
- }
- return NULL;
-}
-
-void tegra_pd_add_device(struct device *dev)
-{
- struct generic_pm_domain *master = tegra_pd_get_domain(dev_name(dev));
-
- if (!master)
- return;
-
- device_set_wakeup_capable(dev, 1);
- pm_genpd_add_device(master, dev);
- pm_genpd_dev_need_save(dev, false);
- pm_genpd_add_callbacks(dev, &tegra_pd_ops, NULL);
-}
-EXPORT_SYMBOL(tegra_pd_add_device);
-
-void tegra_pd_remove_device(struct device *dev)
-{
- struct generic_pm_domain *genpd = dev_to_genpd(dev);
-
- if (!IS_ERR_OR_NULL(genpd))
- pm_genpd_remove_device(genpd, dev);
-}
-EXPORT_SYMBOL(tegra_pd_remove_device);
-
-void tegra_pd_add_sd(struct generic_pm_domain *sd)
-{
- struct generic_pm_domain *master = tegra_pd_get_domain(sd->name);
-
- if (!master)
- return;
-
- pm_genpd_add_subdomain(master, sd);
-}
-EXPORT_SYMBOL(tegra_pd_add_sd);
-#else
-struct tegra_pm_domain tegra_mc_clk;
-EXPORT_SYMBOL(tegra_mc_clk);
-struct tegra_pm_domain tegra_mc_chain_a;
-EXPORT_SYMBOL(tegra_mc_chain_a);
-struct tegra_pm_domain tegra_mc_chain_b;
-EXPORT_SYMBOL(tegra_mc_chain_b);
-#endif
#include <linux/suspend.h>
#include <linux/pm_runtime.h>
#include <linux/platform_data/nvshm.h>
+#include <linux/tegra_pm_domains.h>
#include <mach/tegra_bb.h>
#include <mach/tegra_bbc_proxy.h>
-#include <mach/pm_domains.h>
#include <mach/tegra_emc.h>
#include "clock.h"
#include <linux/tegra-cpuidle.h>
#include <linux/irqchip/tegra.h>
#include <linux/tegra-pm.h>
+#include <linux/tegra_pm_domains.h>
#include <trace/events/power.h>
#include <trace/events/nvsecurity.h>
#include <mach/irqs.h>
#include <mach/tegra_smmu.h>
-#include <mach/pm_domains.h>
#include "board.h"
#include "clock.h"
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <linux/pm_runtime.h>
-#include <mach/pm_domains.h>
+#include <linux/tegra_pm_domains.h>
#include "tegra-se.h"
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/clk/tegra.h>
+#include <linux/tegra_pm_domains.h>
-#include <mach/pm_domains.h>
#include "dmaengine.h"
#define TEGRA_APBDMA_GENERAL 0x0
#include <linux/debugfs.h>
#include <linux/spinlock.h>
#include <linux/tegra-powergate.h>
+#include <linux/tegra_pm_domains.h>
#include <linux/sched.h>
#include <linux/input-cfboost.h>
-#include <mach/pm_domains.h>
#include "gk20a.h"
#include "debug_gk20a.h"
#include <linux/nvhost_ioctl.h>
#include <linux/dma-buf.h>
#include <linux/nvmap.h>
+#include <linux/tegra_pm_domains.h>
+
#include <mach/irqs.h>
-#include <mach/pm_domains.h>
#include "../../../arch/arm/mach-tegra/iomap.h"
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
+#include <linux/tegra_pm_domains.h>
#include <mach/powergate.h>
-#include <mach/pm_domains.h>
#include <media/soc_camera.h>
#include <media/soc_mediabus.h>
#include <linux/sched.h>
#include <linux/memblock.h>
#include <linux/anon_inodes.h>
+#include <linux/tegra_pm_domains.h>
-#include <mach/pm_domains.h>
#include <linux/pm_qos.h>
#include <linux/regulator/consumer.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
+#include <linux/tegra_pm_domains.h>
#ifndef CONFIG_ARM64
#include <asm/gpio.h>
#include <linux/platform_data/mmc-sdhci-tegra.h>
#include <mach/pinmux.h>
-#include <mach/pm_domains.h>
#include "sdhci-pltfm.h"
#include <linux/pci-tegra.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
+#include <linux/tegra_pm_domains.h>
#include <asm/sizes.h>
#include <asm/mach/pci.h>
#include <asm/io.h>
#include <mach/tegra_usb_pad_ctrl.h>
-#include <mach/pm_domains.h>
#include <mach/io_dpd.h>
#include <mach/pinmux.h>
#include <mach/pinmux-t12.h>
if GOLDFISH
source "drivers/platform/goldfish/Kconfig"
endif
-
+if ARCH_TEGRA
+source "drivers/platform/tegra/Kconfig"
+endif
--- /dev/null
+
+# Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+comment "NVIDIA Tegra options"
+
+config TEGRA_MC_DOMAINS
+ bool "Enable Tegra MC PM domain"
+ depends on PM_GENERIC_DOMAINS
+ default n
+ help
+ When enabled, clock gates MC when it's not needed.
obj-$(CONFIG_PM_SLEEP) += pm-irq.o
obj-y += pmc.o
+obj-$(CONFIG_TEGRA_MC_DOMAINS) += pm_domains.o
+
ifneq ($(CONFIG_ARM64),)
ccflags-y += -I$(srctree)/arch/arm/mach-tegra/include \
obj-y += powergate-ops-t1xx.o
obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += powergate-t12x.o
-obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
-
obj-y += dvfs.o
obj-$(CONFIG_ARCH_TEGRA_13x_SOC) += tegra13_dvfs.o
obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o
obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += tegra12_emc.o
obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += tegra_emc_dt_parse.o
+obj-$(CONFIG_TEGRA_MC_DOMAINS) += pm_domains.o
+
obj-y += flowctrl.o
obj-y += reset.o
obj-$(CONFIG_DEBUG_ICEDCC) += sysfs-dcc.o
-/* Automatically generated file; DO NOT EDIT. */
-#include "../../../arch/arm/mach-tegra/pm_domains.c"
+/*
+ * drivers/platform/tegra/pm_domains.c
+ *
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
+ *
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
+#include <linux/tegra_pm_domains.h>
+
+#ifdef CONFIG_TEGRA_MC_DOMAINS
+#define TEGRA_PD_DEV_CALLBACK(callback, dev) \
+({ \
+ int (*__routine)(struct device *__d); \
+ int __ret = 0; \
+ \
+ if (dev->type && dev->type->pm) \
+ __routine = dev->type->pm->callback; \
+ else if (dev->class && dev->class->pm) \
+ __routine = dev->class->pm->callback; \
+ else if (dev->bus && dev->bus->pm) \
+ __routine = dev->bus->pm->callback; \
+ else \
+ __routine = NULL; \
+ \
+ if (!__routine && dev->driver && dev->driver->pm) \
+ __routine = dev->driver->pm->callback; \
+ \
+ if (__routine) \
+ __ret = __routine(dev); \
+ __ret; \
+})
+
+struct domain_client {
+ const char *name;
+ struct generic_pm_domain *domain;
+};
+
+#ifdef CONFIG_PM_SLEEP
+
+static int tegra_pd_suspend_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(suspend, dev);
+}
+
+static int tegra_pd_suspend_late(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(suspend_late, dev);
+}
+
+static int tegra_pd_resume_early(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(resume_early, dev);
+}
+
+static int tegra_pd_resume_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(resume, dev);
+}
+
+static int tegra_pd_freeze_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(freeze, dev);
+}
+
+static int tegra_pd_freeze_late(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(freeze_late, dev);
+}
+
+static int tegra_pd_thaw_early(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(thaw_early, dev);
+}
+
+static int tegra_pd_thaw_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(thaw, dev);
+}
+#else /* !CONFIG_PM_SLEEP */
+
+#define tegra_pd_suspend_dev NULL
+#define tegra_pd_suspend_late NULL
+#define tegra_pd_resume_early NULL
+#define tegra_pd_resume_dev NULL
+#define tegra_pd_freeze_dev NULL
+#define tegra_pd_freeze_late NULL
+#define tegra_pd_thaw_early NULL
+#define tegra_pd_thaw_dev NULL
+
+#endif /* !CONFIG_PM_SLEEP */
+
+static bool tegra_pd_active_wakeup(struct device *dev)
+{
+ return device_may_wakeup(dev);
+}
+
+static int tegra_pd_save_dev(struct device *dev)
+{
+ return 0;
+}
+
+static int tegra_pd_restore_dev(struct device *dev)
+{
+ return 0;
+}
+
+static int tegra_pd_stop_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(runtime_suspend, dev);
+}
+
+static int tegra_pd_start_dev(struct device *dev)
+{
+ return TEGRA_PD_DEV_CALLBACK(runtime_resume, dev);
+}
+
+struct gpd_dev_ops tegra_pd_ops = {
+ .active_wakeup = tegra_pd_active_wakeup,
+ .save_state = tegra_pd_save_dev,
+ .restore_state = tegra_pd_restore_dev,
+ .stop = tegra_pd_stop_dev,
+ .start = tegra_pd_start_dev,
+ .suspend = tegra_pd_suspend_dev,
+ .suspend_late = tegra_pd_suspend_late,
+ .resume_early = tegra_pd_resume_early,
+ .resume = tegra_pd_resume_dev,
+ .freeze = tegra_pd_freeze_dev,
+ .freeze_late = tegra_pd_freeze_late,
+ .thaw_early = tegra_pd_thaw_early,
+ .thaw = tegra_pd_thaw_dev,
+};
+
+static int tegra_mc_clk_power_off(struct generic_pm_domain *genpd)
+{
+ struct tegra_pm_domain *pd = to_tegra_pd(genpd);
+
+ if (!pd)
+ return -EINVAL;
+
+ if (IS_ERR_OR_NULL(pd->clk))
+ return 0;
+
+ clk_disable_unprepare(pd->clk);
+
+ return 0;
+}
+
+static int tegra_mc_clk_power_on(struct generic_pm_domain *genpd)
+{
+ struct tegra_pm_domain *pd = to_tegra_pd(genpd);
+
+ if (!pd)
+ return -EINVAL;
+
+ if (IS_ERR_OR_NULL(pd->clk))
+ return 0;
+
+ clk_prepare_enable(pd->clk);
+
+ return 0;
+}
+
+static struct tegra_pm_domain tegra_nvavp = {
+ .gpd.name = "tegra_nvavp",
+};
+
+static struct tegra_pm_domain tegra_mc_clk = {
+ .gpd.name = "tegra_mc_clk",
+ .gpd.power_off = tegra_mc_clk_power_off,
+ .gpd.power_on = tegra_mc_clk_power_on,
+};
+
+static struct domain_client client_list[] = {
+ { .name = "tegradc", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra30-hda", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-apbdma", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-otg", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-ehci", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-xhci", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-host1x", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra_nvavp", .domain = &tegra_mc_clk.gpd },
+ { .name = "nvavp", .domain = &tegra_nvavp.gpd },
+ { .name = "sdhci-tegra", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra11-se", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra12-se", .domain = &tegra_mc_clk.gpd },
+ { .name = "tegra-pcie", .domain = &tegra_mc_clk.gpd },
+ { .name = "gpu", .domain = &tegra_mc_clk.gpd },
+ {},
+};
+
+static int __init tegra_init_pm_domain(void)
+{
+ pm_genpd_init(&tegra_mc_clk.gpd, &simple_qos_governor, false);
+
+ pm_genpd_init(&tegra_nvavp.gpd, &simple_qos_governor, false);
+ tegra_pd_add_sd(&tegra_nvavp.gpd);
+
+ return 0;
+}
+core_initcall(tegra_init_pm_domain);
+
+static struct generic_pm_domain *tegra_pd_get_domain(const char *client)
+{
+ const char *s;
+ struct domain_client *clients = client_list;
+
+ while ((s = clients->name) != NULL) {
+ if (!strncmp(s, client, strlen(s)))
+ return clients->domain;
+
+ clients++;
+ }
+ return NULL;
+}
+
+void tegra_pd_add_device(struct device *dev)
+{
+ struct generic_pm_domain *master = tegra_pd_get_domain(dev_name(dev));
+
+ if (!master)
+ return;
+
+ device_set_wakeup_capable(dev, 1);
+ pm_genpd_add_device(master, dev);
+ pm_genpd_dev_need_save(dev, false);
+ pm_genpd_add_callbacks(dev, &tegra_pd_ops, NULL);
+}
+EXPORT_SYMBOL(tegra_pd_add_device);
+
+void tegra_pd_remove_device(struct device *dev)
+{
+ struct generic_pm_domain *genpd = dev_to_genpd(dev);
+
+ if (!IS_ERR_OR_NULL(genpd))
+ pm_genpd_remove_device(genpd, dev);
+}
+EXPORT_SYMBOL(tegra_pd_remove_device);
+
+void tegra_pd_add_sd(struct generic_pm_domain *sd)
+{
+ struct generic_pm_domain *master = tegra_pd_get_domain(sd->name);
+
+ if (!master)
+ return;
+
+ pm_genpd_add_subdomain(master, sd);
+}
+EXPORT_SYMBOL(tegra_pd_add_sd);
+#else
+struct tegra_pm_domain tegra_mc_clk;
+EXPORT_SYMBOL(tegra_mc_clk);
+struct tegra_pm_domain tegra_mc_chain_a;
+EXPORT_SYMBOL(tegra_mc_chain_a);
+struct tegra_pm_domain tegra_mc_chain_b;
+EXPORT_SYMBOL(tegra_mc_chain_b);
+#endif
#include <linux/usb/tegra_usb_phy.h>
-#include <mach/pm_domains.h>
+#include <linux/tegra_pm_domains.h>
#include <linux/pm_qos.h>
/* HACK! This needs to come from DT */
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/tegra-fuse.h>
+#include <linux/tegra_pm_domains.h>
#include <mach/tegra_usb_pad_ctrl.h>
#include <mach/tegra_usb_pmc.h>
-#include <mach/pm_domains.h>
#include <mach/mc.h>
#include <mach/xusb.h>
#include <linux/gpio.h>
#include <linux/regulator/consumer.h>
#include <linux/usb/hcd.h>
+#include <linux/tegra_pm_domains.h>
-#include <mach/pm_domains.h>
#include <mach/tegra_usb_pad_ctrl.h>
#define USB_PHY_WAKEUP 0x408
#endif
#include <linux/of_irq.h>
#include <linux/of_address.h>
+#include <linux/tegra_pm_domains.h>
#define CREATE_TRACE_POINTS
#include <trace/events/display.h>
#include <linux/nvhost.h>
#include <linux/nvhost_ioctl.h>
#include <mach/latency_allowance.h>
-#include <mach/pm_domains.h>
#include "dc_reg.h"
#include "dc_config.h"
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/tegra-soc.h>
+#include <linux/tegra_pm_domains.h>
#include "dev.h"
#include <trace/events/nvhost.h>
#include <linux/nvhost.h>
#include <linux/nvhost_ioctl.h>
-#include <mach/pm_domains.h>
-
#include "debug.h"
#include "bus_client.h"
#include "nvhost_acm.h"
#include <linux/of_platform.h>
#include <linux/irq.h>
#include <linux/workqueue.h>
-
-#include <mach/pm_domains.h>
+#include <linux/tegra_pm_domains.h>
#include "dev.h"
#include "bus_client.h"
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
-
-#include <mach/pm_domains.h>
+#include <linux/tegra_pm_domains.h>
#include "dev.h"
#include "msenc.h"
#include <linux/tegra-soc.h>
#include <trace/events/nvhost.h>
#include <linux/platform_data/tegra_edp.h>
+#include <linux/tegra_pm_domains.h>
#include <mach/mc.h>
-#include <mach/pm_domains.h>
#include "nvhost_acm.h"
#include "nvhost_channel.h"
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
+#include <linux/tegra_pm_domains.h>
-#include <mach/pm_domains.h>
#include <mach/hardware.h>
#include "dev.h"
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/clk/tegra.h>
+#include <linux/tegra_pm_domains.h>
-#include <mach/pm_domains.h>
#include <media/tegra_v4l2_camera.h>
#include "dev.h"
#include <linux/dma-mapping.h>
#include <linux/tegra-powergate.h>
#include <linux/tegra-soc.h>
+#include <linux/tegra_pm_domains.h>
#include "dev.h"
#include "class_ids.h"
#include "t124/hardware_t124.h" /* for nvhost opcodes*/
#include "t124/t124.h"
-#include <mach/pm_domains.h>
#include "../../../../../arch/arm/mach-tegra/iomap.h"
/*
- * arch/arm/mach-tegra/include/mach/pm_domains.h
+ * include/linux/tegra_pm_domains.h
*
* Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef _MACH_TEGRA_PM_DOMAINS_H_
-#define _MACH_TEGRA_PM_DOMAINS_H_
+#ifndef _INCLUDE_TEGRA_PM_DOMAINS_H_
+#define _INCLUDE_TEGRA_PM_DOMAINS_H_
#include <linux/clk.h>
#include <linux/pm_domain.h>
static inline void tegra_pd_add_sd(struct generic_pm_domain *sd) { }
#endif /* CONFIG_TEGRA_MC_DOMAINS */
-#endif /* _MACH_TEGRA_PM_DOMAINS_H_ */
+#endif /* _INCLUDE_TEGRA_PM_DOMAINS_H_ */
#endif
#ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA
#include <linux/tegra-powergate.h>
-#include <mach/pm_domains.h>
+#include <linux/tegra_pm_domains.h>
#endif
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;