Vamsi Krishna | 5b94471 | 2012-06-29 18:36:23 -0700 | [diff] [blame] | 1 | Introduction |
| 2 | -------------- |
| 3 | ksbridge is a simple misc device which bridges Kickstart application |
| 4 | to HSIC h/w. Driver supports two instances, one instance for |
| 5 | flash-less-boot/ram-dumps and other instance for EFS Sync. |
| 6 | |
| 7 | Initialization |
| 8 | -------------- |
| 9 | Create two bridge instances and register for usb devices 0x9008 and |
| 10 | 0x9048/0x904C. Misc device name depends on the USB PID. |
| 11 | For PID: 9008, misc device name is ks_bridge and for PID:9048/904C, |
| 12 | misc device name is efs_bridge. After KS opens the misc device, IN |
| 13 | URBs will be submitted to H/W; By default IN URBS are configured |
| 14 | to 20. |
| 15 | |
| 16 | TX PATH |
| 17 | ------- |
| 18 | Transmit path is very simple. Bridge driver will exposes write system |
| 19 | call to kickstart. Data from write call will be put into a list and a |
| 20 | work is scheduled to take the data from the list and write to HSIC. |
| 21 | |
| 22 | Functions: |
| 23 | ksb_fs_write: System call invoked when kickstart writes the data |
| 24 | ksb_tomdm_work: Work function which submits data to HSIC h/w. |
| 25 | |
| 26 | Data Structures: |
| 27 | to_mdm_list: Data is stored in this list |
| 28 | to_mdm_work: mapped to ksb_tomdm_work function |
| 29 | |
| 30 | RX PATH |
| 31 | ------- |
| 32 | During initialization 20 IN URBs are submitted to hsic controller. In |
| 33 | completion handler of each URB, buffer is de-queued and add to a list. |
| 34 | Read function is woken-up. A new buffer is created and submitted to |
| 35 | controller. |
| 36 | |
| 37 | Functions: |
| 38 | ksb_fs_read: system call invoked by ks when it tries to read the data |
| 39 | ksb_rx_cb: rx urb completion handler |
| 40 | ksb_start_rx_work: function called during initialization. |
| 41 | |
| 42 | Data Structures: |
| 43 | ks_wait_q: read system call will block on this queue until data is |
| 44 | available or device is disconnected |
| 45 | to_ks_list: data queued to this list by rx urb completion handler, |
| 46 | later de-queued by read system call. |