Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/arm/mach-msm/smd_rpcrouter.c b/arch/arm/mach-msm/smd_rpcrouter.c
- index 6bb2e4e..c223170 100644
- --- a/arch/arm/mach-msm/smd_rpcrouter.c
- +++ b/arch/arm/mach-msm/smd_rpcrouter.c
- @@ -106,6 +106,9 @@ static DECLARE_WORK(work_read_data, do_read_data);
- static DECLARE_WORK(work_create_pdevs, do_create_pdevs);
- static DECLARE_WORK(work_create_rpcrouter_pdev, do_create_rpcrouter_pdev);
- +int hot_boot = 1;
- +module_param_named(hot_boot, hot_boot, int, 0);
- +
- #define RR_STATE_IDLE 0
- #define RR_STATE_HEADER 1
- #define RR_STATE_BODY 2
- @@ -404,8 +407,10 @@ static int process_control_msg(union rr_control_msg *msg, int len)
- RR("x HELLO\n");
- memset(&ctl, 0, sizeof(ctl));
- -// ctl.cmd = RPCROUTER_CTRL_CMD_HELLO;
- -// rpcrouter_send_control_msg(&ctl);
- + if (!hot_boot) {
- + ctl.cmd = RPCROUTER_CTRL_CMD_HELLO;
- + rpcrouter_send_control_msg(&ctl);
- + }
- initialized = 1;
- @@ -414,7 +419,8 @@ static int process_control_msg(union rr_control_msg *msg, int len)
- // new_server(0x31000000,0);
- // new_server(0x31000000,0);
- // new_server(0x3000000b,0); // register this for adsp
- - new_server(0x3000fffe,1);
- + if (hot_boot)
- + new_server(0x3000fffe,1);
- /* Send list of servers one at a time */
- @@ -1184,7 +1190,9 @@ int msm_rpc_unregister_server(struct msm_rpc_endpoint *ept,
- static int msm_rpcrouter_probe(struct platform_device *pdev)
- {
- int rc;
- - union rr_control_msg msg = { 0 };
- + if (hot_boot) {
- + union rr_control_msg msg = { 0 };
- + }
- /* Initialize what we need to start processing */
- INIT_LIST_HEAD(&local_endpoints);
- @@ -1221,9 +1229,11 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)
- /* disabling this makes power-off works on cdma diamond, but that
- also kills sound on some phones, so keep it enabled */
- - msg.cmd = RPCROUTER_CTRL_CMD_BYE;
- - rpcrouter_send_control_msg(&msg);
- - msleep(50);
- + if (hot_boot) {
- + msg.cmd = RPCROUTER_CTRL_CMD_BYE;
- + rpcrouter_send_control_msg(&msg);
- + msleep(50);
- + }
- // msg.cmd = RPCROUTER_CTRL_CMD_REMOVE_CLIENT;
- // rpcrouter_send_control_msg(&msg);
- @@ -1234,13 +1244,15 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)
- // msleep(50);
- /* wince rpc init */
- - msg.cmd = RPCROUTER_CTRL_CMD_HELLO;
- - rpcrouter_send_control_msg(&msg);
- - msleep(50);
- + if (hot_boot) {
- + msg.cmd = RPCROUTER_CTRL_CMD_HELLO;
- + rpcrouter_send_control_msg(&msg);
- + msleep(50);
- - process_control_msg(&msg, sizeof(msg));
- - msleep(100);
- + process_control_msg(&msg, sizeof(msg));
- + msleep(100);
- + }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement