OSDN Git Service

cpufreq: qoriq: optimize the CPU frequency switching time
authorTang Yuantian <Yuantian.Tang@freescale.com>
Thu, 4 Jun 2015 06:25:42 +0000 (14:25 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Jun 2015 13:47:28 +0000 (15:47 +0200)
commit8a95c1441c799bb0f0d31cdb11523d91923d51a7
treed6358c3e046df318e397dbfd1779c1b22f23f12e
parent431920edfd675ba74949415aace0a4eae07073e3
cpufreq: qoriq: optimize the CPU frequency switching time

Each time the CPU switches its frequency, the clock nodes in
DTS are walked through to find proper clock source. This is
very time-consuming, for example, it is up to 500+ us on T4240.
Besides, switching time varies from clock to clock.
To optimize this, each input clock of CPU is buffered, so that
it can be picked up instantly when needed.

Since for each CPU each input clock is stored in a pointer
which takes 4 or 8 bytes memory and normally there are several
input clocks per CPU, that will not take much memory as well.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/qoriq-cpufreq.c