platform: tegra: add MC config
Adeel Raza [Thu, 10 Jul 2014 17:04:22 +0000 (10:04 -0700)]
Add config for enabling/disabling Tegra MC code.

Bug 1509349

Change-Id: I83b0ca2679da569724984abc8a0b7856376e74cf
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: http://git-master/r/436710
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

drivers/platform/tegra/Kconfig
drivers/platform/tegra/Makefile

index a3aa5e3..a07ab26 100644 (file)
 
 comment "NVIDIA Tegra options"
 
+config TEGRA_MC
+       bool "Tegra MC"
+       default y
+       help
+         Enable Tegra MC.
+
 config TEGRA_MC_DOMAINS
        bool "Enable Tegra MC PM domain"
+       depends on TEGRA_MC
        depends on PM_GENERIC_DOMAINS
        default n
        help
index e18b694..58e38cc 100644 (file)
@@ -14,7 +14,7 @@ obj-$(CONFIG_TEGRA_BOOTLOADER_DEBUG)    += tegra_bootloader_debug.o
 obj-$(CONFIG_TEGRA_CAMERA_MIPI_CAL)     += mipi-cal.o
 obj-$(CONFIG_TEGRA_NVADSP)             += nvadsp/
 
-obj-y += mc/
+obj-$(CONFIG_TEGRA_MC) += mc/
 obj-y += nvdumper/
 obj-$(CONFIG_PM_SLEEP) += pm-irq.o
 obj-y += pmc.o
@@ -103,9 +103,11 @@ obj-$(CONFIG_ARCH_TEGRA_13x_SOC)         += cpuquiet.o
 endif
 endif
 
-obj-y += latency_allowance.o
+obj-$(CONFIG_TEGRA_MC) += latency_allowance.o
+ifeq ($(CONFIG_TEGRA_MC),y)
 obj-$(CONFIG_ARCH_TEGRA_12x_SOC)        += tegra12x_la.o
 obj-$(CONFIG_ARCH_TEGRA_21x_SOC)        += tegra12x_la.o
+endif
 
 obj-$(CONFIG_ARCH_TEGRA_13x_SOC)        += tegra13_speedo.o
 obj-$(CONFIG_ARCH_TEGRA_21x_SOC)        += tegra21_speedo.o
@@ -113,12 +115,14 @@ obj-$(CONFIG_ARCH_TEGRA_21x_SOC)        += tegra21_speedo.o
 obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += tegra3_actmon.o
 obj-$(CONFIG_ARCH_TEGRA_21x_SOC) += tegra3_actmon.o
 
+ifeq ($(CONFIG_TEGRA_MC),y)
 obj-y += tegra_emc.o
 
 obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += tegra12_emc.o
 obj-$(CONFIG_ARCH_TEGRA_12x_SOC) += tegra_emc_dt_parse.o
 obj-$(CONFIG_ARCH_TEGRA_21x_SOC) += tegra_emc_dt_parse.o
 obj-y += tegra_emc_therm.o
+endif
 
 obj-$(CONFIG_TEGRA_MC_DOMAINS) += pm_domains.o
 obj-y += bond_out.o