aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/vexpress
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-07-25 15:01:40 +0100
committerJon Medhurst <tixy@linaro.org>2013-04-29 09:43:11 +0100
commit0cb6b75d8bd32750432a9c2ac544321b3fa2d894 (patch)
treea845f2aa861d34e0ea35c8ba02f7ad0c7dcaa2e7 /drivers/misc/vexpress
parent7fb3e6503a5a7f79c703db69d928d502ce28bd5b (diff)
downloadvexpress-lsk-0cb6b75d8bd32750432a9c2ac544321b3fa2d894.tar.gz
drivers: arm-spc: Add function for testing if SPC driver is loaded
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>
Diffstat (limited to 'drivers/misc/vexpress')
-rw-r--r--drivers/misc/vexpress/arm-spc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/vexpress/arm-spc.c b/drivers/misc/vexpress/arm-spc.c
index 23cee9df576..6453d5b0ac5 100644
--- a/drivers/misc/vexpress/arm-spc.c
+++ b/drivers/misc/vexpress/arm-spc.c
@@ -281,6 +281,13 @@ int vexpress_spc_wfi_cpustat(int cluster)
}
EXPORT_SYMBOL_GPL(vexpress_spc_wfi_cpustat);
+static bool vexpress_spc_loaded;
+
+bool vexpress_spc_check_loaded(void)
+{
+ return vexpress_spc_loaded;
+}
+EXPORT_SYMBOL_GPL(vexpress_spc_check_loaded);
static int __devinit vexpress_spc_driver_probe(struct platform_device *pdev)
{
@@ -317,6 +324,7 @@ static int __devinit vexpress_spc_driver_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, info);
pr_info("vexpress_spc loaded at %p\n", info->baseaddr);
+ vexpress_spc_loaded = true;
return ret;
ioremap_err: