linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] firmware: arm_scpi: remove dvfs_get packed structure
@ 2016-06-06 15:36 Sudeep Holla
  2016-06-06 15:36 ` [PATCH 2/3] firmware: arm_scpi: mark scpi_get_sensor_value as static Sudeep Holla
  2016-06-06 15:36 ` [PATCH 3/3] firmware: arm_scpi: make it depend on MAILBOX instead of ARM_MHU Sudeep Holla
  0 siblings, 2 replies; 3+ messages in thread
From: Sudeep Holla @ 2016-06-06 15:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sudeep Holla, Jon Medhurst, linux-arm-kernel

dvfs_get packed structure is used to read the DVFS/OPP index from the
firmware. It just contains a single byte that needs no packing making
the whole structure defination unnecessary.

This patch replaces the unnecessary dvfs_get packed structure with an
unsigned byte.

Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scpi.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 7e3e595c9f30..279fb84f69e1 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -210,10 +210,6 @@ struct dvfs_info {
 	} opps[MAX_DVFS_OPPS];
 } __packed;

-struct dvfs_get {
-	u8 index;
-} __packed;
-
 struct dvfs_set {
 	u8 domain;
 	u8 index;
@@ -431,11 +427,11 @@ static int scpi_clk_set_val(u16 clk_id, unsigned long rate)
 static int scpi_dvfs_get_idx(u8 domain)
 {
 	int ret;
-	struct dvfs_get dvfs;
+	u8 dvfs_idx;

 	ret = scpi_send_message(SCPI_CMD_GET_DVFS, &domain, sizeof(domain),
-				&dvfs, sizeof(dvfs));
-	return ret ? ret : dvfs.index;
+				&dvfs_idx, sizeof(dvfs_idx));
+	return ret ? ret : dvfs_idx;
 }

 static int scpi_dvfs_set_idx(u8 domain, u8 index)
--
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] firmware: arm_scpi: mark scpi_get_sensor_value as static
  2016-06-06 15:36 [PATCH 1/3] firmware: arm_scpi: remove dvfs_get packed structure Sudeep Holla
@ 2016-06-06 15:36 ` Sudeep Holla
  2016-06-06 15:36 ` [PATCH 3/3] firmware: arm_scpi: make it depend on MAILBOX instead of ARM_MHU Sudeep Holla
  1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2016-06-06 15:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sudeep Holla, Jon Medhurst, linux-arm-kernel

scpi_get_sensor_value like other scpi operations needs to be static.
This patch marks it as static to be consistent with others.

Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/arm_scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 279fb84f69e1..51c6db0774cc 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -522,7 +522,7 @@ static int scpi_sensor_get_info(u16 sensor_id, struct scpi_sensor_info *info)
 	return ret;
 }

-int scpi_sensor_get_value(u16 sensor, u64 *val)
+static int scpi_sensor_get_value(u16 sensor, u64 *val)
 {
 	__le16 id = cpu_to_le16(sensor);
 	struct sensor_value buf;
--
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] firmware: arm_scpi: make it depend on MAILBOX instead of ARM_MHU
  2016-06-06 15:36 [PATCH 1/3] firmware: arm_scpi: remove dvfs_get packed structure Sudeep Holla
  2016-06-06 15:36 ` [PATCH 2/3] firmware: arm_scpi: mark scpi_get_sensor_value as static Sudeep Holla
@ 2016-06-06 15:36 ` Sudeep Holla
  1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2016-06-06 15:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sudeep Holla, Jon Medhurst, linux-arm-kernel

ARM_SCPI_PROTOCOL can be used with any mailbox and not just ARM MHU
mailbox controller. This patch drops it's dependency on ARM_MHU and
make it depend on just mailbox framework.

Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index 6664f1108c7c..41abdc54815e 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -10,7 +10,7 @@ config ARM_PSCI_FW

 config ARM_SCPI_PROTOCOL
 	tristate "ARM System Control and Power Interface (SCPI) Message Protocol"
-	depends on ARM_MHU
+	depends on MAILBOX
 	help
 	  System Control and Power Interface (SCPI) Message Protocol is
 	  defined for the purpose of communication between the Application
--
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-06 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 15:36 [PATCH 1/3] firmware: arm_scpi: remove dvfs_get packed structure Sudeep Holla
2016-06-06 15:36 ` [PATCH 2/3] firmware: arm_scpi: mark scpi_get_sensor_value as static Sudeep Holla
2016-06-06 15:36 ` [PATCH 3/3] firmware: arm_scpi: make it depend on MAILBOX instead of ARM_MHU Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).