From 72d43419400f31d9eb634466446e3ceddce30be7 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Wed, 29 Jun 2016 15:28:29 -0500 Subject: firmware: qcom_scm: Add missing is_available API Add back function that was dropped when reworking the SCM code. Signed-off-by: Andy Gross --- drivers/firmware/qcom_scm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 84330c5..89c3775 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -308,6 +308,14 @@ static const struct reset_control_ops qcom_scm_pas_reset_ops = { .deassert = qcom_scm_pas_reset_deassert, }; +/** + * qcom_scm_is_available() - Checks if SCM is available + */ +bool qcom_scm_is_available(void) +{ + return !!__scm; +} +EXPORT_SYMBOL(qcom_scm_is_available); static int qcom_scm_probe(struct platform_device *pdev) { -- cgit v1.1 From 6c8e99d874c96200ce985d19b407d49ed3306226 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Fri, 1 Jul 2016 23:04:03 -0500 Subject: firmware: qcom: scm: Change initcall to subsys The patch changes the initcall for SCM to use subsys_initcall instead of arch_initcall. This corrects the order so that we don't probe defer when trying to get clks which causes issues later when the spm driver makes calls to qcom_set_warm_boot_addr(). The order became an issue due to the changes to use arch_initcall_sync for of_platform_default_populate_init(). Signed-off-by: Andy Gross --- drivers/firmware/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 89c3775..e64a501 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -415,7 +415,7 @@ static int __init qcom_scm_init(void) return platform_driver_register(&qcom_scm_driver); } -arch_initcall(qcom_scm_init); +subsys_initcall(qcom_scm_init); static void __exit qcom_scm_exit(void) { -- cgit v1.1