Skip to contentSkip to conversation

firmware: qcom: scm: Add function stubs for ARM64

PATCH Superseded Andy Gross 2 participants 3 messages Sep 11, 2015 Arm Qualcomm mailing list

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Andy Gross

author
#0 lore raw

PATCH 1/1 firmware: qcom: scm: Add function stubs for ARM64

This patch adds stubs for the SCM functions exposed in the QCOM SCM API.

---
 drivers/firmware/Makefile      |    4 +++
 drivers/firmware/qcom_scm-64.c |   63 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 drivers/firmware/qcom_scm-64.c
drivers/firmware/Makefile +4 -0
index 4a4b897..2f810c2 100644
@@ -12,8 +12,12 @@ obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
 obj-$(CONFIG_ISCSI_IBFT)	+= iscsi_ibft.o
 obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm.o
+ifdef CONFIG_ARM64
+obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-64.o
+else
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-32.o
 CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
+endif
 
 obj-y				+= broadcom/
 obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
drivers/firmware/qcom_scm-64.c new file +63 -0

63 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw
Quoted 14 lines · Andy Gross

This patch adds stubs for the SCM functions exposed in the QCOM SCM API.

---
 drivers/firmware/Makefile      |    4 +++
 drivers/firmware/qcom_scm-64.c |   63 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 drivers/firmware/qcom_scm-64.c
drivers/firmware/Makefile +0 -0
index 4a4b897..2f810c2 100644

drivers/firmware/Makefile obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o · line 20

Quoted 9 lines
drivers/firmware/Makefile +4 -0
@@ -12,8 +12,12 @@ obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
 obj-$(CONFIG_ISCSI_IBFT)	+= iscsi_ibft.o
 obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm.o
+ifdef CONFIG_ARM64
+obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-64.o
+else
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-32.o
 CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
+endif

Can we not start doing stuff like this. Use the Kconfig to control what you build, not the Makefile system.

config QCOM_SCM_32

	def_bool y
	depends on QCOM_SCM && ARM

config QCOM_SCM_64

	def_bool y
	depends on QCOM_SCM && ARM64

and then use those in the makefile.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
author
#2 lore raw
Quoted 29 lines · Russell King - ARM Linux
Quoted 14 lines · Andy Gross

This patch adds stubs for the SCM functions exposed in the QCOM SCM API.

---
 drivers/firmware/Makefile      |    4 +++
 drivers/firmware/qcom_scm-64.c |   63 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 drivers/firmware/qcom_scm-64.c
drivers/firmware/Makefile +0 -0
index 4a4b897..2f810c2 100644

drivers/firmware/Makefile obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o · line 20

Quoted 9 lines
drivers/firmware/Makefile +4 -0
@@ -12,8 +12,12 @@ obj-$(CONFIG_ISCSI_IBFT_FIND)	+= iscsi_ibft_find.o
 obj-$(CONFIG_ISCSI_IBFT)	+= iscsi_ibft.o
 obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm.o
+ifdef CONFIG_ARM64
+obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-64.o
+else
 obj-$(CONFIG_QCOM_SCM)		+= qcom_scm-32.o
 CFLAGS_qcom_scm-32.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
+endif

Can we not start doing stuff like this. Use the Kconfig to control what you build, not the Makefile system.

config QCOM_SCM_32

Quoted 8 lines
	def_bool y
	depends on QCOM_SCM && ARM

config QCOM_SCM_64

	def_bool y
	depends on QCOM_SCM && ARM64

and then use those in the makefile.

That's a fair implementation. There is going to be a bit of work going into getting the 64 bit SCM un-stubbed. So I can respin to incorporate your comments or we can wait for the unstubbing.

Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project