Skip to contentSkip to conversation

MSM RPC Patches

PATCH In review Niranjana Vishwanathapura 2 participants 7 messages Dec 15, 2010

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/5 msm: rpc: shared memory rpc router

The RPC router provides access to the RPC services running on the baseband core from kernel.

---
 drivers/misc/Kconfig             |    8 +
 drivers/misc/Makefile            |    1 +
 drivers/misc/msm_rpcrouter.h     |  151 +++++
 drivers/misc/msm_smd_rpcrouter.c | 1255 ++++++++++++++++++++++++++++++++++++++
 drivers/misc/msm_smd_rpcrouter.h |  184 ++++++
 5 files changed, 1599 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/msm_rpcrouter.h
 create mode 100644 drivers/misc/msm_smd_rpcrouter.c
 create mode 100644 drivers/misc/msm_smd_rpcrouter.h
drivers/misc/Kconfig +8 -0
index 4d073f1..651836d 100644
@@ -452,6 +452,14 @@ config PCH_PHUB
 	  To compile this driver as a module, choose M here: the module will
 	  be called pch_phub.
 
+config MSM_ONCRPCROUTER
+	depends on MSM_SMD
+	default n
+	bool "MSM ONCRPC router support"
+	help
+	  Support for the MSM ONCRPC router for rpc communitation with
+	  baseband processor.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 98009cc..3bb65b1 100644
@@ -42,3 +42,4 @@ obj-$(CONFIG_ARM_CHARLCD)	+= arm-charlcd.o
 obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
 obj-y				+= ti-st/
 obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
+obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter.o
drivers/misc/msm_rpcrouter.h new file +151 -0

151 lines not on this page · raw message

drivers/misc/msm_smd_rpcrouter.c new file +1255 -0

1,255 lines not on this page · raw message

drivers/misc/msm_smd_rpcrouter.h new file +184 -0

184 lines not on this page · raw message

Signature · 4 lines
1.5.6.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#2 lore raw

PATCH 2/5 msm: rpc: Add userspace rpc support.

In reply to Niranjana Vishwanathapura

Allow rpc clients in userspace to communicate with rpc server in remote processor.

---
 drivers/misc/Makefile                   |    1 +
 drivers/misc/msm_smd_rpcrouter.c        |   53 ++---
 drivers/misc/msm_smd_rpcrouter.h        |   18 ++
 drivers/misc/msm_smd_rpcrouter_device.c |  347 +++++++++++++++++++++++++++++++
 include/linux/msm_rpcrouter.h           |   36 ++++
 5 files changed, 426 insertions(+), 29 deletions(-)
 create mode 100644 drivers/misc/msm_smd_rpcrouter_device.c
 create mode 100644 include/linux/msm_rpcrouter.h
drivers/misc/Makefile +1 -0
index 3bb65b1..d7a00e4 100644
@@ -43,3 +43,4 @@ obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
 obj-y				+= ti-st/
 obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter.o
+obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_device.o
drivers/misc/msm_smd_rpcrouter.c +24 -29

110 lines not on this page · raw message

drivers/misc/msm_smd_rpcrouter.h +18 -0
index 4d3adeb..dd915f5 100644
@@ -181,4 +181,22 @@ struct msm_rpc_endpoint {
 	dev_t dev;
 };
 
+/* shared between smd_rpcrouter*.c */
+
+int __msm_rpc_read(struct msm_rpc_endpoint *ept,
+		   struct rr_fragment **frag,
+		   unsigned len, long timeout);
+
+struct msm_rpc_endpoint *msm_rpcrouter_create_local_endpoint(dev_t dev);
+int msm_rpcrouter_destroy_local_endpoint(struct msm_rpc_endpoint *ept);
+
+int msm_rpcrouter_create_server_cdev(struct rr_server *server);
+int msm_rpcrouter_create_server_pdev(struct rr_server *server);
+
+int msm_rpcrouter_init_devices(void);
+void msm_rpcrouter_exit_devices(void);
+
+extern dev_t msm_rpcrouter_devno;
+extern struct class *msm_rpcrouter_class;
+
 #endif /* _MSM_SMD_RPCROUTER_H */
drivers/misc/msm_smd_rpcrouter_device.c new file +347 -0

347 lines not on this page · raw message

include/linux/msm_rpcrouter.h new file +36 -0
new file mode 100644
index 0000000..e6749ac
@@ -0,0 +1,36 @@
+/* include/linux/msm_rpcrouter.h
+ *
+ * Copyright (C) 2007 Google, Inc.
+ * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+ * Author: San Mehat <[email protected]>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+#ifndef __LINUX_MSM_RPCROUTER_H
+#define __LINUX_MSM_RPCROUTER_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define RPC_ROUTER_VERSION_V1 0x00010000
+
+#define RPC_ROUTER_IOCTL_MAGIC (0xC1)
+
+#define RPC_ROUTER_IOCTL_GET_VERSION \
+	_IOR(RPC_ROUTER_IOCTL_MAGIC, 0, unsigned int)
+
+#define RPC_ROUTER_IOCTL_GET_MTU \
+	_IOR(RPC_ROUTER_IOCTL_MAGIC, 1, unsigned int)
+
+#define RPC_ROUTER_IOCTL_GET_MINOR_VERSION \
+	_IOW(RPC_ROUTER_IOCTL_MAGIC, 2, unsigned int)
+
+#endif /* __LINUX_MSM_RPCROUTER_H */
Signature · 4 lines
1.5.6.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#3 lore raw

PATCH 3/5 msm: rpc: Add support for RPC servers

In reply to Niranjana Vishwanathapura

Add support for RPC servers on host processor so that clients on remote processor can talk to it.

---
 drivers/misc/Makefile                    |    1 +
 drivers/misc/msm_rpcrouter.h             |   17 +++
 drivers/misc/msm_smd_rpcrouter.c         |   43 ++++++
 drivers/misc/msm_smd_rpcrouter_servers.c |  221 ++++++++++++++++++++++++++++++
 4 files changed, 282 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/msm_smd_rpcrouter_servers.c
drivers/misc/Makefile +1 -0
index d7a00e4..8f1dbf4 100644
@@ -44,3 +44,4 @@ obj-y				+= ti-st/
 obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_device.o
+obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_servers.o
drivers/misc/msm_rpcrouter.h +17 -0
index 935e714..2c83a74 100644
@@ -132,6 +132,10 @@ int msm_rpc_read(struct msm_rpc_endpoint *ept,
 		 void **data, unsigned len, long timeout);
 void msm_rpc_setup_req(struct rpc_request_hdr *hdr,
 		       uint32_t prog, uint32_t vers, uint32_t proc);
+int msm_rpc_register_server(struct msm_rpc_endpoint *ept,
+			    uint32_t prog, uint32_t vers);
+int msm_rpc_unregister_server(struct msm_rpc_endpoint *ept,
+			      uint32_t prog, uint32_t vers);
 
 /* simple blocking rpc call
  *
@@ -148,4 +152,17 @@ int msm_rpc_call(struct msm_rpc_endpoint *ept, uint32_t proc,
 		 void *request, int request_size,
 		 long timeout);
 
+struct msm_rpc_server {
+	struct list_head list;
+	uint32_t flags;
+
+	uint32_t prog;
+	uint32_t vers;
+
+	int (*rpc_call)(struct msm_rpc_server *server,
+			struct rpc_request_hdr *req, unsigned len);
+};
+
+int msm_rpc_create_server(struct msm_rpc_server *server);
+
 #endif /* _MSM_RPCROUTER_H */
drivers/misc/msm_smd_rpcrouter.c +43 -0

49 lines not on this page · raw message

drivers/misc/msm_smd_rpcrouter_servers.c new file +221 -0

221 lines not on this page · raw message

Signature · 4 lines
1.5.6.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#4 lore raw

PATCH 4/5 msm: rpc: dog keepalive rpc server support

In reply to Niranjana Vishwanathapura

Add dog keepalive rpc server to handle watchdog events from remote processor.

---
 drivers/misc/Kconfig                        |    7 +++
 drivers/misc/Makefile                       |    1 +
 drivers/misc/msm_rpc_server_dog_keepalive.c |   56 +++++++++++++++++++++++++++
 3 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/msm_rpc_server_dog_keepalive.c
drivers/misc/Kconfig +7 -0
index 651836d..345e79c 100644
@@ -460,6 +460,13 @@ config MSM_ONCRPCROUTER
 	  Support for the MSM ONCRPC router for rpc communitation with
 	  baseband processor.
 
+config MSM_RPCSERVER_WATCHDOG
+	depends on MSM_ONCRPCROUTER
+	default n
+	bool "Watchdog RPC server"
+	help
+	  The dog_keepalive server handles watchdog events.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 8f1dbf4..432ad7f 100644
@@ -45,3 +45,4 @@ obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_device.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_servers.o
+obj-$(CONFIG_MSM_RPCSERVER_WATCHDOG)	+= msm_rpc_server_dog_keepalive.o
drivers/misc/msm_rpc_server_dog_keepalive.c new file +56 -0

56 lines not on this page · raw message

Signature · 4 lines
1.5.6.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#5 lore raw

PATCH 5/5 msm: rpc: ping modem client driver

In reply to Niranjana Vishwanathapura

Ping rpc client driver which talks to remote Ping rpc server. This is a test module to ensure working of rpc clients from kernel.

---
 drivers/misc/Kconfig                   |    7 +
 drivers/misc/Makefile                  |    1 +
 drivers/misc/msm_ping_mdm_rpc_client.c |  268 ++++++++++++++++++++++++++++++++
 3 files changed, 276 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/msm_ping_mdm_rpc_client.c
drivers/misc/Kconfig +7 -0
index 345e79c..f5c9b25 100644
@@ -467,6 +467,13 @@ config MSM_RPCSERVER_WATCHDOG
 	help
 	  The dog_keepalive server handles watchdog events.
 
+config MSM_RPC_PING
+	depends on MSM_ONCRPCROUTER && DEBUG_FS
+	default n
+	bool "MSM rpc ping"
+	help
+	  Implements MSM rpc ping test module.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 432ad7f..2f272f6 100644
@@ -46,3 +46,4 @@ obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_device.o
 obj-$(CONFIG_MSM_ONCRPCROUTER)	+= msm_smd_rpcrouter_servers.o
 obj-$(CONFIG_MSM_RPCSERVER_WATCHDOG)	+= msm_rpc_server_dog_keepalive.o
+obj-$(CONFIG_MSM_RPC_PING)		+= msm_ping_mdm_rpc_client.o
drivers/misc/msm_ping_mdm_rpc_client.c new file +268 -0

268 lines not on this page · raw message

Signature · 4 lines
1.5.6.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#6 lore raw
In reply to Niranjana Vishwanathapura

Niranjana,

Quoted 2 lines · Niranjana Vishwanathapura

This set of patches include MSM RPC Router, a test Ping RPC client driver and MSM RPC Dog Keepalive Server driver.

What is RPC router ? Can you please provide more description on what this does and how it is used ?

Quoted 9 lines

Niranjana Vishwanathapura <[email protected]>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 3 lines
Thank you,
Best regards,
Hari Kanigeri