diff options
author | Andy Gross <agross@codeaurora.org> | 2015-09-11 17:01:16 -0400 |
---|---|---|
committer | Andy Gross <agross@codeaurora.org> | 2015-09-23 13:00:43 -0400 |
commit | 50b956f3d85cdea130866f33613416431d60f396 (patch) | |
tree | c501ac4a3c447321366b7d9a891cdb6af10bca0b | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
firmware: qcom: scm: Add function stubs for ARM64
This patch adds stubs for the SCM functions exposed in the QCOM SCM API.
Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
-rw-r--r-- | drivers/firmware/Kconfig | 8 | ||||
-rw-r--r-- | drivers/firmware/Makefile | 3 | ||||
-rw-r--r-- | drivers/firmware/qcom_scm-64.c | 63 |
3 files changed, 73 insertions, 1 deletions
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index d8de6a8dd4de..665efca59487 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig | |||
@@ -139,6 +139,14 @@ config QCOM_SCM | |||
139 | bool | 139 | bool |
140 | depends on ARM || ARM64 | 140 | depends on ARM || ARM64 |
141 | 141 | ||
142 | config QCOM_SCM_32 | ||
143 | def_bool y | ||
144 | depends on QCOM_SCM && ARM | ||
145 | |||
146 | config QCOM_SCM_64 | ||
147 | def_bool y | ||
148 | depends on QCOM_SCM && ARM64 | ||
149 | |||
142 | source "drivers/firmware/broadcom/Kconfig" | 150 | source "drivers/firmware/broadcom/Kconfig" |
143 | source "drivers/firmware/google/Kconfig" | 151 | source "drivers/firmware/google/Kconfig" |
144 | source "drivers/firmware/efi/Kconfig" | 152 | source "drivers/firmware/efi/Kconfig" |
diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile index 000830fc6707..2ee83474a3c1 100644 --- a/drivers/firmware/Makefile +++ b/drivers/firmware/Makefile | |||
@@ -13,7 +13,8 @@ obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o | |||
13 | obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o | 13 | obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o |
14 | obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o | 14 | obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o |
15 | obj-$(CONFIG_QCOM_SCM) += qcom_scm.o | 15 | obj-$(CONFIG_QCOM_SCM) += qcom_scm.o |
16 | obj-$(CONFIG_QCOM_SCM) += qcom_scm-32.o | 16 | obj-$(CONFIG_QCOM_SCM_64) += qcom_scm-64.o |
17 | obj-$(CONFIG_QCOM_SCM_32) += qcom_scm-32.o | ||
17 | CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) | 18 | CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) |
18 | 19 | ||
19 | obj-y += broadcom/ | 20 | obj-y += broadcom/ |
diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c new file mode 100644 index 000000000000..bb6555f6d63b --- /dev/null +++ b/drivers/firmware/qcom_scm-64.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* Copyright (c) 2015, The Linux Foundation. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <linux/qcom_scm.h> | ||
16 | |||
17 | /** | ||
18 | * qcom_scm_set_cold_boot_addr() - Set the cold boot address for cpus | ||
19 | * @entry: Entry point function for the cpus | ||
20 | * @cpus: The cpumask of cpus that will use the entry point | ||
21 | * | ||
22 | * Set the cold boot address of the cpus. Any cpu outside the supported | ||
23 | * range would be removed from the cpu present mask. | ||
24 | */ | ||
25 | int __qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) | ||
26 | { | ||
27 | return -ENOTSUPP; | ||
28 | } | ||
29 | |||
30 | /** | ||
31 | * qcom_scm_set_warm_boot_addr() - Set the warm boot address for cpus | ||
32 | * @entry: Entry point function for the cpus | ||
33 | * @cpus: The cpumask of cpus that will use the entry point | ||
34 | * | ||
35 | * Set the Linux entry point for the SCM to transfer control to when coming | ||
36 | * out of a power down. CPU power down may be executed on cpuidle or hotplug. | ||
37 | */ | ||
38 | int __qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus) | ||
39 | { | ||
40 | return -ENOTSUPP; | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * qcom_scm_cpu_power_down() - Power down the cpu | ||
45 | * @flags - Flags to flush cache | ||
46 | * | ||
47 | * This is an end point to power down cpu. If there was a pending interrupt, | ||
48 | * the control would return from this function, otherwise, the cpu jumps to the | ||
49 | * warm boot entry point set for this cpu upon reset. | ||
50 | */ | ||
51 | void __qcom_scm_cpu_power_down(u32 flags) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | int __qcom_scm_is_call_available(u32 svc_id, u32 cmd_id) | ||
56 | { | ||
57 | return -ENOTSUPP; | ||
58 | } | ||
59 | |||
60 | int __qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp) | ||
61 | { | ||
62 | return -ENOTSUPP; | ||
63 | } | ||