@@ -15,7 +15,7 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
# OPP support in (OMAP3+ only at the moment)
# XXX The OPP TWL/TPS code should only be included when a TWL/TPS
# PMIC is selected.
-ifdef CONFIG_CPU_FREQ
+ifdef CONFIG_TWL4030_POWER
obj-$(CONFIG_ARCH_OMAP3) += opp.o opp_twl_tps.o
endif
@@ -67,6 +67,14 @@ struct omap_opp_def {
struct omap_opp;
#ifdef CONFIG_CPU_FREQ
+void opp_init_cpufreq_table(enum opp_t opp_type,
+ struct cpufreq_frequency_table **table);
+#else
+static inline void opp_init_cpufreq_table(struct omap_opp *opps,
+ struct cpufreq_frequency_table **table)
+{
+}
+#endif
/**
* opp_get_voltage() - Gets the voltage corresponding to an opp
@@ -233,79 +241,4 @@ struct omap_opp * __deprecated opp_find_by_opp_id(enum opp_t opp_type,
u8 opp_id);
u8 __deprecated opp_get_opp_id(struct omap_opp *opp);
-void opp_init_cpufreq_table(enum opp_t opp_type,
- struct cpufreq_frequency_table **table);
-#else
-static inline unsigned long opp_get_voltage(const struct omap_opp *opp)
-{
- return 0;
-}
-
-static inline unsigned long opp_get_freq(const struct omap_opp *opp)
-{
- return 0;
-}
-
-static inline int opp_get_opp_count(struct omap_opp *oppl)
-{
- return 0;
-}
-
-static inline struct omap_opp *opp_find_freq_exact(struct omap_opp *oppl,
- unsigned long freq, bool enabled)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline struct omap_opp *opp_find_freq_floor(struct omap_opp *oppl,
- unsigned long *freq)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline struct omap_opp *opp_find_freq_ceil(struct omap_opp *oppl,
- unsigned long *freq)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline
-struct omap_opp __init *opp_init_list(const struct omap_opp_def *opp_defs)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline struct omap_opp *opp_add(struct omap_opp *oppl,
- const struct omap_opp_def *opp_def)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline int opp_enable(struct omap_opp *opp)
-{
- return 0;
-}
-
-static inline int opp_disable(struct omap_opp *opp)
-{
- return 0;
-}
-
-static inline struct omap_opp * __deprecated
-opp_find_by_opp_id(struct omap_opp *opps, u8 opp_id)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline u8 __deprecated opp_get_opp_id(struct omap_opp *opp)
-{
- return 0;
-}
-
-static inline void opp_init_cpufreq_table(struct omap_opp *opps,
- struct cpufreq_frequency_table **table)
-{
-}
-
-#endif /* CONFIG_CPU_FREQ */
#endif /* __ASM_ARM_OMAP_OPP_H */
@@ -352,7 +352,7 @@ int opp_disable(struct omap_opp *opp)
return 0;
}
-/* XXX document */
+#ifdef CONFIG_CPU_FREQ
void opp_init_cpufreq_table(enum opp_t opp_type,
struct cpufreq_frequency_table **table)
{
@@ -397,3 +397,4 @@ void opp_init_cpufreq_table(enum opp_t opp_type,
*table = &freq_table[0];
}
+#endif