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