Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rtsx_chip.c File Reference
#include <linux/blkdev.h>
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
#include <linux/vmalloc.h>
#include "rtsx.h"
#include "rtsx_transport.h"
#include "rtsx_scsi.h"
#include "rtsx_card.h"
#include "rtsx_chip.h"
#include "rtsx_sys.h"
#include "general.h"
#include "sd.h"
#include "xd.h"
#include "ms.h"

Go to the source code of this file.

Macros

#define MAX_RW_REG_CNT   1024
 

Functions

void rtsx_disable_card_int (struct rtsx_chip *chip)
 
void rtsx_enable_card_int (struct rtsx_chip *chip)
 
void rtsx_enable_bus_int (struct rtsx_chip *chip)
 
void rtsx_disable_bus_int (struct rtsx_chip *chip)
 
int rtsx_reset_chip (struct rtsx_chip *chip)
 
int rtsx_init_chip (struct rtsx_chip *chip)
 
void rtsx_release_chip (struct rtsx_chip *chip)
 
void rtsx_polling_func (struct rtsx_chip *chip)
 
void rtsx_undo_delink (struct rtsx_chip *chip)
 
void rtsx_stop_cmd (struct rtsx_chip *chip, int card)
 
int rtsx_write_register (struct rtsx_chip *chip, u16 addr, u8 mask, u8 data)
 
int rtsx_read_register (struct rtsx_chip *chip, u16 addr, u8 *data)
 
int rtsx_write_cfg_dw (struct rtsx_chip *chip, u8 func_no, u16 addr, u32 mask, u32 val)
 
int rtsx_read_cfg_dw (struct rtsx_chip *chip, u8 func_no, u16 addr, u32 *val)
 
int rtsx_write_cfg_seq (struct rtsx_chip *chip, u8 func, u16 addr, u8 *buf, int len)
 
int rtsx_read_cfg_seq (struct rtsx_chip *chip, u8 func, u16 addr, u8 *buf, int len)
 
int rtsx_write_phy_register (struct rtsx_chip *chip, u8 addr, u16 val)
 
int rtsx_read_phy_register (struct rtsx_chip *chip, u8 addr, u16 *val)
 
int rtsx_read_efuse (struct rtsx_chip *chip, u8 addr, u8 *val)
 
int rtsx_write_efuse (struct rtsx_chip *chip, u8 addr, u8 val)
 
int rtsx_clr_phy_reg_bit (struct rtsx_chip *chip, u8 reg, u8 bit)
 
int rtsx_set_phy_reg_bit (struct rtsx_chip *chip, u8 reg, u8 bit)
 
int rtsx_check_link_ready (struct rtsx_chip *chip)
 
void rtsx_enter_L1 (struct rtsx_chip *chip)
 
void rtsx_exit_L1 (struct rtsx_chip *chip)
 
void rtsx_enter_ss (struct rtsx_chip *chip)
 
void rtsx_exit_ss (struct rtsx_chip *chip)
 
int rtsx_pre_handle_interrupt (struct rtsx_chip *chip)
 
void rtsx_do_before_power_down (struct rtsx_chip *chip, int pm_stat)
 
void rtsx_enable_aspm (struct rtsx_chip *chip)
 
void rtsx_disable_aspm (struct rtsx_chip *chip)
 
int rtsx_read_ppbuf (struct rtsx_chip *chip, u8 *buf, int buf_len)
 
int rtsx_write_ppbuf (struct rtsx_chip *chip, u8 *buf, int buf_len)
 
int rtsx_check_chip_exist (struct rtsx_chip *chip)
 
int rtsx_force_power_on (struct rtsx_chip *chip, u8 ctl)
 
int rtsx_force_power_down (struct rtsx_chip *chip, u8 ctl)
 

Macro Definition Documentation

#define MAX_RW_REG_CNT   1024

Definition at line 1419 of file rtsx_chip.c.

Function Documentation

int rtsx_check_chip_exist ( struct rtsx_chip chip)

Definition at line 2204 of file rtsx_chip.c.

int rtsx_check_link_ready ( struct rtsx_chip chip)

Definition at line 1783 of file rtsx_chip.c.

int rtsx_clr_phy_reg_bit ( struct rtsx_chip chip,
u8  reg,
u8  bit 
)

Definition at line 1745 of file rtsx_chip.c.

void rtsx_disable_aspm ( struct rtsx_chip chip)

Definition at line 2097 of file rtsx_chip.c.

void rtsx_disable_bus_int ( struct rtsx_chip chip)

Definition at line 125 of file rtsx_chip.c.

void rtsx_disable_card_int ( struct rtsx_chip chip)

Definition at line 53 of file rtsx_chip.c.

void rtsx_do_before_power_down ( struct rtsx_chip chip,
int  pm_stat 
)

Definition at line 2004 of file rtsx_chip.c.

void rtsx_enable_aspm ( struct rtsx_chip chip)

Definition at line 2068 of file rtsx_chip.c.

void rtsx_enable_bus_int ( struct rtsx_chip chip)

Definition at line 80 of file rtsx_chip.c.

void rtsx_enable_card_int ( struct rtsx_chip chip)

Definition at line 61 of file rtsx_chip.c.

void rtsx_enter_L1 ( struct rtsx_chip chip)

Definition at line 1822 of file rtsx_chip.c.

void rtsx_enter_ss ( struct rtsx_chip chip)

Definition at line 1833 of file rtsx_chip.c.

void rtsx_exit_L1 ( struct rtsx_chip chip)

Definition at line 1827 of file rtsx_chip.c.

void rtsx_exit_ss ( struct rtsx_chip chip)

Definition at line 1870 of file rtsx_chip.c.

int rtsx_force_power_down ( struct rtsx_chip chip,
u8  ctl 
)

Definition at line 2240 of file rtsx_chip.c.

int rtsx_force_power_on ( struct rtsx_chip chip,
u8  ctl 
)

Definition at line 2212 of file rtsx_chip.c.

int rtsx_init_chip ( struct rtsx_chip chip)

Definition at line 910 of file rtsx_chip.c.

void rtsx_polling_func ( struct rtsx_chip chip)

Definition at line 1111 of file rtsx_chip.c.

int rtsx_pre_handle_interrupt ( struct rtsx_chip chip)

Definition at line 1891 of file rtsx_chip.c.

int rtsx_read_cfg_dw ( struct rtsx_chip chip,
u8  func_no,
u16  addr,
u32 val 
)

Definition at line 1504 of file rtsx_chip.c.

int rtsx_read_cfg_seq ( struct rtsx_chip chip,
u8  func,
u16  addr,
u8 buf,
int  len 
)

Definition at line 1589 of file rtsx_chip.c.

int rtsx_read_efuse ( struct rtsx_chip chip,
u8  addr,
u8 val 
)

Definition at line 1690 of file rtsx_chip.c.

int rtsx_read_phy_register ( struct rtsx_chip chip,
u8  addr,
u16 val 
)

Definition at line 1659 of file rtsx_chip.c.

int rtsx_read_ppbuf ( struct rtsx_chip chip,
u8 buf,
int  buf_len 
)

Definition at line 2121 of file rtsx_chip.c.

int rtsx_read_register ( struct rtsx_chip chip,
u16  addr,
u8 data 
)

Definition at line 1445 of file rtsx_chip.c.

void rtsx_release_chip ( struct rtsx_chip chip)

Definition at line 1041 of file rtsx_chip.c.

int rtsx_reset_chip ( struct rtsx_chip chip)

Definition at line 244 of file rtsx_chip.c.

int rtsx_set_phy_reg_bit ( struct rtsx_chip chip,
u8  reg,
u8  bit 
)

Definition at line 1764 of file rtsx_chip.c.

void rtsx_stop_cmd ( struct rtsx_chip chip,
int  card 
)

rtsx_stop_cmd - stop command transfer and DMA transfer : Realtek's card reader chip : flash card type

Stop command transfer and DMA transfer. This function is called in error handler.

Definition at line 1395 of file rtsx_chip.c.

void rtsx_undo_delink ( struct rtsx_chip chip)

Definition at line 1381 of file rtsx_chip.c.

int rtsx_write_cfg_dw ( struct rtsx_chip chip,
u8  func_no,
u16  addr,
u32  mask,
u32  val 
)

Definition at line 1472 of file rtsx_chip.c.

int rtsx_write_cfg_seq ( struct rtsx_chip chip,
u8  func,
u16  addr,
u8 buf,
int  len 
)

Definition at line 1531 of file rtsx_chip.c.

int rtsx_write_efuse ( struct rtsx_chip chip,
u8  addr,
u8  val 
)

Definition at line 1714 of file rtsx_chip.c.

int rtsx_write_phy_register ( struct rtsx_chip chip,
u8  addr,
u16  val 
)

Definition at line 1635 of file rtsx_chip.c.

int rtsx_write_ppbuf ( struct rtsx_chip chip,
u8 buf,
int  buf_len 
)

Definition at line 2163 of file rtsx_chip.c.

int rtsx_write_register ( struct rtsx_chip chip,
u16  addr,
u8  mask,
u8  data 
)

Definition at line 1421 of file rtsx_chip.c.