diff --git a/include/linux/platform/tegra/emc_bwmgr.h b/include/linux/platform/tegra/emc_bwmgr.h index 9e8b5bad..d2603a03 100644 --- a/include/linux/platform/tegra/emc_bwmgr.h +++ b/include/linux/platform/tegra/emc_bwmgr.h @@ -126,130 +126,6 @@ struct bwmgr_ops *bwmgr_eff_init_t21x(void); struct bwmgr_ops *bwmgr_eff_init_t18x(void); struct bwmgr_ops *bwmgr_eff_init_t19x(void); -#if defined(CONFIG_TEGRA_BWMGR) -/** - * tegra_bwmgr_register - register an EMC Bandwidth Manager client. - * Also see tegra_bwmgr_unregister(). - * @client client id from tegra_bwmgr_client_id - * - * Returns a valid handle on successful registration, NULL on error. - */ -struct tegra_bwmgr_client *tegra_bwmgr_register( - enum tegra_bwmgr_client_id client); - -/** - * tegra_bwmgr_unregister - unregister an EMC Bandwidth Manager client. - * Callers should match register/unregister calls. - * Persistence of old requests across - * register/unregister calls is undefined. - * Also see tegra_bwmgr_set_emc() - * - * @handle handle acquired during tegra_bwmgr_register - */ -void tegra_bwmgr_unregister(struct tegra_bwmgr_client *handle); - -/** - * tegra_bwmgr_get_dram_num_channels - get the number of DRAM channels - * - * Returns the number of DRAM channels that are configured on the underlying - * platform. - */ -u8 tegra_bwmgr_get_dram_num_channels(void); - -/** - * tegra_bwmgr_get_emc_rate - get the current EMC rate. - * - * Returns current memory clock rate in Hz. - */ -unsigned long tegra_bwmgr_get_emc_rate(void); - -/** - * tegra_bwmgr_get_max_emc_rate - get the max EMC rate. - * - * Returns the max memory clock rate in Hz. - */ -unsigned long tegra_bwmgr_get_max_emc_rate(void); - -/** - * tegra_bwmgr_get_core_emc_rate - get the actual emc frequency calculated - * using the dram frequency and emc_to_dram - * conversion factor. - * - * Returns the core emc rate in Hz. - */ -unsigned long tegra_bwmgr_get_core_emc_rate(void); - -/** - * tegra_bwmgr_round_rate - round up to next EMC rate which can be provided - * - * @bw Input rate - * - * Returns the next higher rate from the Input rate that EMC can run at. - */ -unsigned long tegra_bwmgr_round_rate(unsigned long bw); - -/** - * tegra_bwmgr_set_emc - request to bwmgr to set an EMC rate parameter. - * Actual clock rate depends on aggregation of - * requests by all clients. If needed, use - * tegra_bwmgr_get_emc_rate() to get the rate after - * a tegra_bwmgr_set_emc() call. - * - * Call tegra_bwmgr_set_emc() with same request type and - * val = 0 to clear request. - * - * @handle handle acquired during tegra_bwmgr_register - * @val value to be set in Hz, 0 to clear old request of the same type - * @req chosen type from tegra_bwmgr_request_type - * - * Returns success (0) or negative errno. - */ -int tegra_bwmgr_set_emc(struct tegra_bwmgr_client *handle, unsigned long val, - enum tegra_bwmgr_request_type req); - -/** - * tegra_bwmgr_get_client_info - outputs the value previously set with - * tegra_bwmgr_set_emc or 0 if no value has been set. - * - * @handle handle acquired during tegra_bwmgr_register - * @out_val bandwidth value in Hz - * @req chosen type from tegra_bwmgr_request_type - * - * Returns success (0) or negative errno. - */ -int tegra_bwmgr_get_client_info(struct tegra_bwmgr_client *handle, - unsigned long *out_val, - enum tegra_bwmgr_request_type req); - -/** - * tegra_bwmgr_notifier_register - register a notifier callback when - * emc rate changes. Must be called from non-atomic - * context. The callback must not call any bwmgr API. - * @nb linux notifier block - * - * Returns success (0) or negative errno. - */ -int tegra_bwmgr_notifier_register(struct notifier_block *nb); - -/** - * tegra_bwmgr_notifier_unregister - unregister a notifier callback. - * @nb linux notifier block - * - * Returns success (0) or negative errno. - */ -int tegra_bwmgr_notifier_unregister(struct notifier_block *nb); - -/* - * Initialize bwmgr. - * This api would be called by .init_machine during boot. - * bwmgr clients, don't call this api. - */ -int __init bwmgr_init(void); - -void __exit bwmgr_exit(void); - -#else /* CONFIG_TEGRA_BWMGR */ - static inline struct tegra_bwmgr_client *tegra_bwmgr_register( enum tegra_bwmgr_client_id client_id) { @@ -377,5 +253,4 @@ static inline int tegra_bwmgr_notifier_unregister(struct notifier_block *nb) return 0; } -#endif /* CONFIG_TEGRA_BWMGR */ #endif /* __EMC_BWMGR_H */