diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-05-20 17:33:06 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:43 -0800 |
commit | 6ef0e2a1a2d9fcfae3555501fa277f7aa5b61ad7 (patch) | |
tree | 2605e22742d826f145334ac3acc6c2409e57f6d0 | |
parent | 8be727fa296bab8f352007142e0b3b51d8faff17 (diff) |
ARM: tegra: clocks: Completely remove DVFS for FPGA platforms
Dynamic Voltage & Frequency Scaling (DVFS) is not possible on
FPGA platforms. Completely remove the DVFS code from the image
on FPGA platforms to reduce the image size.
Original-Change-Id: I4f1a8587f01e775000f48fbca7c85d75acee9c74
Reviewed-on: http://git-master/r/32466
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Rebase-Id: R08c78dd7e7bfe891a3d48de16f5a863ad5d07999
-rw-r--r-- | arch/arm/mach-tegra/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/dvfs.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/clk.h | 5 |
3 files changed, 29 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 8da37e736d4c..f6a70b92f94a 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile @@ -27,11 +27,13 @@ obj-$(CONFIG_TEGRA_PWM) += pwm.o obj-$(CONFIG_TEGRA_ARB_SEMAPHORE) += arb_sema.o obj-y += clock.o -obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += dvfs.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra3_clocks.o +ifneq ($(CONFIG_TEGRA_FPGA_PLATFORM),y) +obj-y += dvfs.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_dvfs.o obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra3_dvfs.o +endif obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_fuse.o ifneq ($(CONFIG_TEGRA_FPGA_PLATFORM),y) obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_speedo.o diff --git a/arch/arm/mach-tegra/dvfs.h b/arch/arm/mach-tegra/dvfs.h index 6de35a525411..50fe81416f9f 100644 --- a/arch/arm/mach-tegra/dvfs.h +++ b/arch/arm/mach-tegra/dvfs.h @@ -87,6 +87,7 @@ struct dvfs { struct list_head reg_node; }; +#ifndef CONFIG_TEGRA_FPGA_PLATFORM void tegra_soc_init_dvfs(void); int tegra_enable_dvfs_on_clk(struct clk *c, struct dvfs *d); int dvfs_debugfs_init(struct dentry *clk_debugfs_root); @@ -96,5 +97,25 @@ void tegra_dvfs_add_relationships(struct dvfs_relationship *rels, int n); void tegra_dvfs_rail_enable(struct dvfs_rail *rail); void tegra_dvfs_rail_disable(struct dvfs_rail *rail); bool tegra_dvfs_rail_updating(struct clk *clk); +#else +static inline void tegra_soc_init_dvfs(void) +{} +static inline int tegra_enable_dvfs_on_clk(struct clk *c, struct dvfs *d) +{ return 0; } +static inline int dvfs_debugfs_init(struct dentry *clk_debugfs_root) +{ return 0; } +static inline int tegra_dvfs_late_init(void) +{ return 0; } +static inline int tegra_dvfs_init_rails(struct dvfs_rail *dvfs_rails[], int n) +{ return 0; } +static inline void tegra_dvfs_add_relationships(struct dvfs_relationship *rels, int n) +{} +static inline void tegra_dvfs_rail_enable(struct dvfs_rail *rail) +{} +static inline void tegra_dvfs_rail_disable(struct dvfs_rail *rail) +{} +static inline bool tegra_dvfs_rail_updating(struct clk *clk) +{ return false; } +#endif #endif diff --git a/arch/arm/mach-tegra/include/mach/clk.h b/arch/arm/mach-tegra/include/mach/clk.h index 79d7fb55c3e8..3cc13f4ab68c 100644 --- a/arch/arm/mach-tegra/include/mach/clk.h +++ b/arch/arm/mach-tegra/include/mach/clk.h @@ -37,7 +37,12 @@ enum tegra_clk_ex_param { void tegra_periph_reset_deassert(struct clk *c); void tegra_periph_reset_assert(struct clk *c); +#ifndef CONFIG_TEGRA_FPGA_PLATFORM int tegra_dvfs_set_rate(struct clk *c, unsigned long rate); +#else +static inline int tegra_dvfs_set_rate(struct clk *c, unsigned long rate) +{ return 0; } +#endif unsigned long clk_get_rate_all_locked(struct clk *c); #ifdef CONFIG_ARCH_TEGRA_2x_SOC void tegra_sdmmc_tap_delay(struct clk *c, int delay); |