Advertisement
Guest User

Untitled

a guest
May 2nd, 2012
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. diff --git a/arch/arm/mach-msm/smd_rpcrouter.c b/arch/arm/mach-msm/smd_rpcrouter.c
  2. index 6bb2e4e..c223170 100644
  3. --- a/arch/arm/mach-msm/smd_rpcrouter.c
  4. +++ b/arch/arm/mach-msm/smd_rpcrouter.c
  5. @@ -106,6 +106,9 @@ static DECLARE_WORK(work_read_data, do_read_data);
  6. static DECLARE_WORK(work_create_pdevs, do_create_pdevs);
  7. static DECLARE_WORK(work_create_rpcrouter_pdev, do_create_rpcrouter_pdev);
  8.  
  9. +int hot_boot = 1;
  10. +module_param_named(hot_boot, hot_boot, int, 0);
  11. +
  12. #define RR_STATE_IDLE 0
  13. #define RR_STATE_HEADER 1
  14. #define RR_STATE_BODY 2
  15. @@ -404,8 +407,10 @@ static int process_control_msg(union rr_control_msg *msg, int len)
  16.  
  17. RR("x HELLO\n");
  18. memset(&ctl, 0, sizeof(ctl));
  19. -// ctl.cmd = RPCROUTER_CTRL_CMD_HELLO;
  20. -// rpcrouter_send_control_msg(&ctl);
  21. + if (!hot_boot) {
  22. + ctl.cmd = RPCROUTER_CTRL_CMD_HELLO;
  23. + rpcrouter_send_control_msg(&ctl);
  24. + }
  25.  
  26. initialized = 1;
  27.  
  28. @@ -414,7 +419,8 @@ static int process_control_msg(union rr_control_msg *msg, int len)
  29. // new_server(0x31000000,0);
  30. // new_server(0x31000000,0);
  31. // new_server(0x3000000b,0); // register this for adsp
  32. - new_server(0x3000fffe,1);
  33. + if (hot_boot)
  34. + new_server(0x3000fffe,1);
  35.  
  36.  
  37. /* Send list of servers one at a time */
  38. @@ -1184,7 +1190,9 @@ int msm_rpc_unregister_server(struct msm_rpc_endpoint *ept,
  39. static int msm_rpcrouter_probe(struct platform_device *pdev)
  40. {
  41. int rc;
  42. - union rr_control_msg msg = { 0 };
  43. + if (hot_boot) {
  44. + union rr_control_msg msg = { 0 };
  45. + }
  46.  
  47. /* Initialize what we need to start processing */
  48. INIT_LIST_HEAD(&local_endpoints);
  49. @@ -1221,9 +1229,11 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)
  50.  
  51. /* disabling this makes power-off works on cdma diamond, but that
  52. also kills sound on some phones, so keep it enabled */
  53. - msg.cmd = RPCROUTER_CTRL_CMD_BYE;
  54. - rpcrouter_send_control_msg(&msg);
  55. - msleep(50);
  56. + if (hot_boot) {
  57. + msg.cmd = RPCROUTER_CTRL_CMD_BYE;
  58. + rpcrouter_send_control_msg(&msg);
  59. + msleep(50);
  60. + }
  61.  
  62. // msg.cmd = RPCROUTER_CTRL_CMD_REMOVE_CLIENT;
  63. // rpcrouter_send_control_msg(&msg);
  64. @@ -1234,13 +1244,15 @@ static int msm_rpcrouter_probe(struct platform_device *pdev)
  65. // msleep(50);
  66.  
  67. /* wince rpc init */
  68. - msg.cmd = RPCROUTER_CTRL_CMD_HELLO;
  69. - rpcrouter_send_control_msg(&msg);
  70. - msleep(50);
  71. + if (hot_boot) {
  72. + msg.cmd = RPCROUTER_CTRL_CMD_HELLO;
  73. + rpcrouter_send_control_msg(&msg);
  74. + msleep(50);
  75.  
  76.  
  77. - process_control_msg(&msg, sizeof(msg));
  78. - msleep(100);
  79. + process_control_msg(&msg, sizeof(msg));
  80. + msleep(100);
  81. + }
  82.  
  83. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement