vireshk

Untitled

Apr 26th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. diff --git a/chips/tsb/src/tsb_unipro.c b/chips/tsb/src/tsb_unipro.c
  2. index eef497e7db7a..054322cad283 100644
  3. --- a/chips/tsb/src/tsb_unipro.c
  4. +++ b/chips/tsb/src/tsb_unipro.c
  5. @@ -51,7 +51,7 @@ typedef char ___cport_num_test[(CPORT_MAX <=
  6. * CPort Reset Proceedure, implemented according to section 5.7.8.5
  7. * from ARA_ES3_APBridge_rev091.pdf
  8. */
  9. -static int tsb_unipro_reset_cport(uint32_t cportid) {
  10. +int tsb_unipro_reset_cport(uint32_t cportid) {
  11. int rc;
  12. uint32_t tx_reset_offset, rx_reset_offset;
  13. uint32_t tx_queue_empty_offset, tx_queue_empty_bit;
  14. diff --git a/common/src/gbcore.c b/common/src/gbcore.c
  15. index 6f9272f85f76..491008278576 100644
  16. --- a/common/src/gbcore.c
  17. +++ b/common/src/gbcore.c
  18. @@ -226,6 +226,15 @@ static int gbctrl_disconnected(uint32_t cportid,
  19. 0);
  20. }
  21.  
  22. +int tsb_unipro_reset_cport(uint32_t cportid);
  23. +static int gbctrl_intf_mode_switch(uint32_t cportid,
  24. + gb_operation_header *op_header) {
  25. + tsb_unipro_reset_cport(CONTROL_CPORT);
  26. + jump_to_image();
  27. + /* should never reach here */
  28. + return 0;
  29. +}
  30. +
  31. static greybus_op_handler *handler_table[CPORT_MAX];
  32.  
  33. int common_cport_handler(uint32_t cportid,
  34. @@ -288,6 +297,7 @@ static greybus_op_handler control_cport_handlers[] = {
  35. {GB_CTRL_OP_CONNECTED, gbctrl_connected},
  36. {GB_CTRL_OP_DISCONNECTED, gbctrl_disconnected},
  37. {GB_CTRL_OP_INTERFACE_VERSION, gbctrl_get_interface_version},
  38. + {0xe, gbctrl_intf_mode_switch},
  39. {HANDLER_TABLE_END, NULL}
  40. };
Add Comment
Please, Sign In to add comment