aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/vexpress
AgeCommit message (Collapse)Author
2013-04-29misc: vexpress/spc: add support to get frequency table from spcViresh Kumar
SPC controller driver has already populated frequency table from firmware and not its time to share it with other frameworks like: cpufreq. This patch provides interface to get freq table from spc driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-04-29ARM: vexpress/spc: more cache flushNicolas Pitre
Not only the pointed data, but the pointer as well has to be flushed out of the cache. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-04-29misc: vexpress/spc: attempt to init the spc driver from ↵Nicolas Pitre
vexpress_spc_check_loaded() Even if it is initialized via early_INITCALL(), there are other pieces of code that also have to be initialized with early_initcall() and the relative call ordering may not always be satisfied. So try to initialize the SPC code when vexpress_spc_check_loaded() is called if that has not been done yet. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-04-29misc: vexpress/spc: change timeout to jiffies instead of microsecondsSudeep KarkadaNagesha
Both SPC OPP and COMMS request takes ~3-5ms at max with CPU wakeup enabled. The OPP change takes ~900us and COMMS ~200us if wakeup are disabled. Since all the operations are serialised in the firmware and CA7 wakeup takes ~2ms max, this could affect other SPC request when they occur at the same time. Further an SPC request could start just before jiffie is about to be updated. In order to handle any of these cases, this patch changes timeout value to 20ms. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29misc: vexpress/spc: update error handling code based on firmware responseSudeep KarkadaNagesha
The latest firmware has the following protocol for PWC_STATUS update to communicate status/faults: CA15 DVFS request: 0x0001 complete, 0x0002 error CA7 DVFS request: 0x0010 complete, 0x0020 error SPC_SYS_CFG request: 0x0100 complete, 0x0200 error This patch updates the driver to handle the error conditions based on the above protocol. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29misc: vexpress/spc: update get/set_perf to use frequency as inputSudeep KarkadaNagesha
This patch changes the input parameter of spc_get/spc_set_perf routines to frequency instead of performance index as expected by the firmware. The SPC driver now has the list of frequencies supported by the firmware, so it can map the requested frequency to the right performance index. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29misc: vexpress/spc: add support to populate frequencies from firmwareSudeep KarkadaNagesha
This patch adds support to read the SPC virtual registers that store the OPPs through SYS_CFG interface. This helps in avoiding to rely on DT for frequency to performanace index as expected by firmware. It can also be used to get other information from the firware. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29misc: vexpress/spc: avoid reading A15_CONF everytime to get A15 cluster idSudeep KarkadaNagesha
In order to compare the given cluster id with A15, the A15_CONF is read everytime. Instead read the A15 cluster id once during initialisation and store the same for all future references. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29misc: vexpress/spc: organize the offsets in proper orderSudeep KarkadaNagesha
The SCC/SPC offsets defined in spc driver are scattered a bit. Just reordering them for better readability. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
2013-04-29drivers: misc: vexpress: Enable use of SPC driver prior to secondary bringupSudeep KarkadaNagesha
This patch initializes the SPC driver before smp initialization is done. The driver is required to be able to use the power api to bring up secondary cpus. Hence its availability is mandatory at this stage.
2013-04-29drivers: misc: vexpress: Check writes to SPC registers have taken effectAchin Gupta
This patch ensures that the SPC registers written by the power api are read back to ensure that the changes have reflected. This is done to workaround any delays caused by the slow nature of the SPC interface e.g. the wfi signal being asserted to the SPC before the changes to the SPC registers have taken effect.
2013-04-29ARM: spc: initialize completion block after locking the semaphoreNicolas Pitre
Otherwise any concurrent call could reset the completion block while it is being waited for by a previous call. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-04-29ARM: bulk changes to the spc driverNicolas Pitre
Picked wholesale in the IKS tree from ARM.
2013-04-29ARM: TC2: ensure powerdown-time data is flushed from cacheDave Martin
Non-local variables used by the CCI and SPC management functions called by tc2_pm_power_down() after disabling the cache must be flushed out to main memory in advance, otherwise incoherency of those values may occur if they are sitting in the cache of some other CPU when tc2_pm_power_down() executes. This patch adds the appropriate flushing to the CCI and SPC drivers to ensure that the relevant data is available in RAM ahead of time. Because this creates a dependency on arch-specific cacheflushing functions, this patch also makes ARM_CCI and ARM_SPC depend on ARM (pending a proper tidyup of those drivers). Signed-off-by: Dave Martin <dave.martin@linaro.org>
2013-04-29drivers: arm-spc: Add function for testing if SPC driver is loadedJon Medhurst
To enable drivers which use SPC functions to safely exist in kernels which are run on hardware without SPC hardware, they need a method of detecting its presence. The new function vexpress_spc_check_loaded() provides this. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-04-29drivers: misc: vexpress: add SPC supportLorenzo Pieralisi
The TC2 core tile integrates a logic block that provides the interface between the dual cluster test-chip and the M3 microcontroller that carries out power management. The logic block, called SPC, contains several memory mapped registers to control among other things low-power states, operating points and reset control. This patch provides a driver that enables run-time control of features implemented by the SPC control logic. Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
2013-04-29drivers: vexpress: add drivers infrastructureLorenzo Pieralisi
This patch provides the new kernel infrastructure needed by versatile express boards. Drivers are moved to drivers/misc/vexpress directory, where Kconfig and Makefile are created. A coalesced include file is created to cater for all versatile express required function declarations.