summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorMartin Chi <mchi@nvidia.com>2014-03-06 15:29:24 +0800
committerMartin Chi <mchi@nvidia.com>2014-03-07 02:06:39 -0800
commit999473d3bc585a06efcd44522ee084cc46cc68f5 (patch)
treef764c29f6677725c6968d96f8ad1e93cb2e1e69a /drivers/usb
parent88d300eec9b76f79d522da454375f6c12ca2797e (diff)
usb: host: tegra: boost 200MHz cpu freq for hsic
Boost different cpu frequency (based upon TEGRA_EHCI_BOOST_CPU_FREQ) for different USB host, For HSIC(the 2nd USB instance), boost CPU to 200MHz whenthe usb bus is active and remove the boost when usb bus is suspended. bug 1473011 bug 1475568 Change-Id: Ic3e4ea93707c9bf7a6db36ff95aeb3e60bb1bd78 Signed-off-by: Martin Chi <mchi@nvidia.com> Reviewed-on: http://git-master/r/378242 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-tegra.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 3ca867a636e9..a32b784704cd 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -62,6 +62,7 @@ struct tegra_ehci_hcd {
bool has_hostpc;
#ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ
bool boost_enable;
+ int boost_cpu_target_freq;
bool boost_requested;
bool cpu_boost_in_work;
struct delayed_work boost_cpu_freq_work;
@@ -174,7 +175,7 @@ static void tegra_ehci_boost_cpu_frequency_work(struct work_struct *work)
if (tegra->boost_enable)
pm_qos_update_request(
&tegra->boost_cpu_freq_req,
- (s32)CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ * 1000);
+ tegra->boost_cpu_target_freq * 1000);
}
}
#endif
@@ -428,7 +429,7 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
if (pm_qos_request_active(&tegra->boost_cpu_freq_req)
&& tegra->boost_enable)
pm_qos_update_request(&tegra->boost_cpu_freq_req,
- (s32)CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ * 1000);
+ tegra->boost_cpu_target_freq * 1000);
tegra->cpu_boost_in_work = false;
#endif
@@ -529,7 +530,7 @@ static ssize_t store_boost_enable(struct device *dev,
&& pm_qos_request_active(&tegra->boost_cpu_freq_req))
pm_qos_update_request(
&tegra->boost_cpu_freq_req,
- (s32)CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ * 1000);
+ tegra->boost_cpu_target_freq * 1000);
else if (old_boost && !new_boost
&& pm_qos_request_active(&tegra->boost_cpu_freq_req))
pm_qos_update_request(&tegra->boost_cpu_freq_req,
@@ -581,10 +582,13 @@ static int tegra_ehci_probe(struct platform_device *pdev)
#ifdef CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ
tegra->boost_requested = false;
/* Add boost enable/disable knob, disable for modem */
- if (instance == 1)
- tegra->boost_enable = false;
- else
+ if (instance == 1) {
+ tegra->boost_enable = true;
+ tegra->boost_cpu_target_freq = 200;
+ } else {
tegra->boost_enable = true;
+ tegra->boost_cpu_target_freq = CONFIG_TEGRA_EHCI_BOOST_CPU_FREQ;
+ }
err = device_create_file(hcd->self.controller, &dev_attr_boost_enable);
if (err < 0)
goto fail_sysfs;