Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ti_wilink_st.h File Reference
#include <linux/skbuff.h>

Go to the source code of this file.

Data Structures

struct  st_proto_s
struct  st_data_s
struct  chip_version
struct  kim_data_s
struct  bts_header
struct  bts_action
struct  bts_action_send
struct  bts_action_wait
struct  bts_action_delay
struct  bts_action_serial
struct  hci_command
struct  fm_event_hdr
struct  gps_event_hdr
struct  ti_st_plat_data


#define ST_NOTEMPTY   1
#define ST_EMPTY   0
#define ST_REG_IN_PROGRESS   2
#define ST_REG_PENDING   3
#define ST_TX_SENDING   1
#define ST_TX_WAKEUP   2
#define LDISC_TIME   1000
#define CMD_RESP_TIME   800
#define CMD_WR_TIME   5000
#define MAKEWORD(a, b)
#define GPIO_HIGH   1
#define GPIO_LOW   0
#define POR_RETRY_COUNT   5
#define UART_DEV_NAME_LEN   32
#define ACTION_SERIAL   3
#define ACTION_DELAY   4
#define ACTION_REMARKS   6
#define ST_W4_PACKET_TYPE   0
#define ST_W4_HEADER   1
#define ST_W4_DATA   2
#define ST_LL_ASLEEP   0
#define ST_LL_AWAKE   2
#define ST_LL_INVALID   4
#define LL_SLEEP_IND   0x30
#define LL_SLEEP_ACK   0x31
#define LL_WAKE_UP_IND   0x32
#define LL_WAKE_UP_ACK   0x33
#define FM_MAX_FRAME_SIZE   0xFF /* TODO: */
#define FM_EVENT_HDR_SIZE   1 /* size of fm_event_hdr */
#define ST_FM_CH8_PKT   0x8


enum  proto_type { ST_BT, ST_FM, ST_GPS, ST_MAX_CHANNELS = 16 }


long st_register (struct st_proto_s *)
long st_unregister (struct st_proto_s *)
int st_get_uart_wr_room (struct st_data_s *st_gdata)
int st_int_write (struct st_data_s *, const unsigned char *, int)
long st_write (struct sk_buff *)
void st_ll_send_frame (enum proto_type, struct sk_buff *)
void st_tx_wakeup (struct st_data_s *st_data)
int st_core_init (struct st_data_s **)
void st_core_exit (struct st_data_s *)
void st_kim_ref (struct st_data_s **, int)
int gps_chrdrv_stub_write (const unsigned char *, int)
void gps_chrdrv_stub_init (void)
long st_kim_start (void *)
long st_kim_stop (void *)
void st_kim_complete (void *)
void kim_st_list_protocols (struct st_data_s *, void *)
void st_kim_recv (void *, const unsigned char *, long)
struct bts_header __attribute__ ((packed))
long st_ll_init (struct st_data_s *)
long st_ll_deinit (struct st_data_s *)
void st_ll_enable (struct st_data_s *)
void st_ll_disable (struct st_data_s *)
unsigned long st_ll_getstate (struct st_data_s *)
unsigned long st_ll_sleep_state (struct st_data_s *, unsigned char)
void st_ll_wakeup (struct st_data_s *)


u32 magic
u32 version
u8 future [24]
u8 actions [0]
u16 type
u16 size
u8 data [0]
u32 msec
u32 baud
u32 flow_control
u8 prefix
u16 opcode
u8 plen
u32 speed
struct ti_st_plat_data __attribute__

Macro Definition Documentation

#define ACTION_DELAY   4

Definition at line 295 of file ti_wilink_st.h.

#define ACTION_REMARKS   6

Definition at line 297 of file ti_wilink_st.h.


Definition at line 296 of file ti_wilink_st.h.


Definition at line 292 of file ti_wilink_st.h.

#define ACTION_SERIAL   3

Definition at line 294 of file ti_wilink_st.h.


Definition at line 293 of file ti_wilink_st.h.

#define CMD_RESP_TIME   800

Definition at line 209 of file ti_wilink_st.h.

#define CMD_WR_TIME   5000

Definition at line 210 of file ti_wilink_st.h.

#define FM_EVENT_HDR_SIZE   1 /* size of fm_event_hdr */

Definition at line 407 of file ti_wilink_st.h.

#define FM_MAX_FRAME_SIZE   0xFF /* TODO: */

Definition at line 406 of file ti_wilink_st.h.

#define GPIO_HIGH   1

Definition at line 214 of file ti_wilink_st.h.

#define GPIO_LOW   0

Definition at line 215 of file ti_wilink_st.h.


Definition at line 195 of file ti_wilink_st.h.

#define LDISC_TIME   1000

Definition at line 208 of file ti_wilink_st.h.

#define LL_SLEEP_ACK   0x31

Definition at line 373 of file ti_wilink_st.h.

#define LL_SLEEP_IND   0x30

Definition at line 372 of file ti_wilink_st.h.

#define LL_WAKE_UP_ACK   0x33

Definition at line 375 of file ti_wilink_st.h.

#define LL_WAKE_UP_IND   0x32

Definition at line 374 of file ti_wilink_st.h.

#define MAKEWORD (   a,
((unsigned short)(((unsigned char)(a)) \
| ((unsigned short)((unsigned char)(b))) << 8))

Definition at line 211 of file ti_wilink_st.h.

#define POR_RETRY_COUNT   5

Definition at line 221 of file ti_wilink_st.h.

#define ST_EMPTY   0

Definition at line 96 of file ti_wilink_st.h.

#define ST_FM_CH8_PKT   0x8

Definition at line 408 of file ti_wilink_st.h.


Definition at line 101 of file ti_wilink_st.h.

#define ST_LL_ASLEEP   0

Definition at line 365 of file ti_wilink_st.h.


Definition at line 366 of file ti_wilink_st.h.

#define ST_LL_AWAKE   2

Definition at line 367 of file ti_wilink_st.h.


Definition at line 368 of file ti_wilink_st.h.

#define ST_LL_INVALID   4

Definition at line 369 of file ti_wilink_st.h.

#define ST_NOTEMPTY   1

Definition at line 95 of file ti_wilink_st.h.

#define ST_REG_IN_PROGRESS   2

Definition at line 102 of file ti_wilink_st.h.

#define ST_REG_PENDING   3

Definition at line 103 of file ti_wilink_st.h.

#define ST_TX_SENDING   1

Definition at line 146 of file ti_wilink_st.h.

#define ST_TX_WAKEUP   2

Definition at line 147 of file ti_wilink_st.h.

#define ST_W4_DATA   2

Definition at line 362 of file ti_wilink_st.h.

#define ST_W4_HEADER   1

Definition at line 361 of file ti_wilink_st.h.

#define ST_W4_PACKET_TYPE   0

Definition at line 360 of file ti_wilink_st.h.


Definition at line 104 of file ti_wilink_st.h.

#define UART_DEV_NAME_LEN   32

Definition at line 233 of file ti_wilink_st.h.

Enumeration Type Documentation

enum proto_type

enum proto-type - The protocol on WiLink chips which share a common physical interface like UART.


Definition at line 34 of file ti_wilink_st.h.

Function Documentation

struct bts_header __attribute__ ( (packed)  )

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

void gps_chrdrv_stub_init ( void  )
int gps_chrdrv_stub_write ( const unsigned char ,
void kim_st_list_protocols ( struct st_data_s ,

Definition at line 493 of file st_core.c.

void st_core_exit ( struct st_data_s )

Definition at line 874 of file st_core.c.

int st_core_init ( struct st_data_s **  )

Definition at line 829 of file st_core.c.

int st_get_uart_wr_room ( struct st_data_s st_gdata)

Definition at line 66 of file st_core.c.

int st_int_write ( struct st_data_s ,
const unsigned char ,

st_int_write - point this to tty->driver->write or tty->ops->write depending upon the kernel version

Definition at line 84 of file st_core.c.

void st_kim_complete ( void )

Definition at line 443 of file st_kim.c.

void st_kim_recv ( void ,
const unsigned char ,

Definition at line 428 of file st_kim.c.

void st_kim_ref ( struct st_data_s **  core_data,
int  id 

st_kim_ref - reference the core's data This references the per-ST platform device in the arch/xx/ board-xx.c file. This would enable multiple such platform devices to exist on a given platform

Definition at line 660 of file st_kim.c.

long st_kim_start ( void kim_data)

functions called when 1 of the protocol drivers gets registered, these need to communicate with UIM to request ldisc installed, read chip_version, download relevant fw

st_kim_start - called from ST Core upon 1st registration This involves toggling the chip enable gpio, reading the firmware version from chip, forming the fw file name based on the chip version, requesting the fw, parsing it and perform download(send/recv).

Definition at line 456 of file st_kim.c.

long st_kim_stop ( void kim_data)

st_kim_stop - stop communication with chip. This can be called from ST Core/KIM, on the- (a) last un-register when chip need not be powered there-after, (b) upon failure to either install ldisc or download firmware. The function is responsible to (a) notify UIM about un-installation, (b) flush UART if the ldisc was installed. (c) invoke platform's chip disabling routine.

Definition at line 514 of file st_kim.c.

long st_ll_deinit ( struct st_data_s )

Definition at line 166 of file st_ll.c.

void st_ll_disable ( struct st_data_s )

Definition at line 106 of file st_ll.c.

void st_ll_enable ( struct st_data_s )

enable/disable ST LL along with KIM start/stop called by ST Core

Definition at line 99 of file st_ll.c.

unsigned long st_ll_getstate ( struct st_data_s )

various funcs used by ST core to set/get the various PM states of the chip.

Definition at line 124 of file st_ll.c.

long st_ll_init ( struct st_data_s )

Definition at line 158 of file st_ll.c.

void st_ll_send_frame ( enum  proto_type,
struct sk_buff  
unsigned long st_ll_sleep_state ( struct st_data_s ,
unsigned  char 

Definition at line 131 of file st_ll.c.

void st_ll_wakeup ( struct st_data_s )

Definition at line 112 of file st_ll.c.

Definition at line 507 of file st_core.c.

void st_tx_wakeup ( struct st_data_s st_data)

Definition at line 448 of file st_core.c.

long st_unregister ( struct st_proto_s )

Definition at line 619 of file st_core.c.

long st_write ( struct sk_buff )

st_write - internal write function, passed onto protocol drivers via the write function ptr of protocol struct

Definition at line 671 of file st_core.c.

Variable Documentation

u8 actions[0]

Definition at line 315 of file ti_wilink_st.h.

u32 baud

Definition at line 341 of file ti_wilink_st.h.

u8 data[0]

Definition at line 324 of file ti_wilink_st.h.

Definition at line 342 of file ti_wilink_st.h.

u8 future[24]

Definition at line 314 of file ti_wilink_st.h.

u32 magic

Definition at line 312 of file ti_wilink_st.h.

u32 msec

Definition at line 332 of file ti_wilink_st.h.

Definition at line 355 of file ti_wilink_st.h.

u16 plen

Definition at line 356 of file ti_wilink_st.h.

u8 prefix

Definition at line 354 of file ti_wilink_st.h.

u32 size

Definition at line 323 of file ti_wilink_st.h.

u32 speed

Definition at line 357 of file ti_wilink_st.h.

Definition at line 322 of file ti_wilink_st.h.

u32 version

Definition at line 313 of file ti_wilink_st.h.