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

Go to the source code of this file.

Macros

#define SD_MAX_RETRY_COUNT   3
 
#define WAIT_DATA_READY_RTY_CNT   255
 

Functions

int sd_select_card (struct rtsx_chip *chip, int select)
 
int sd_switch_clock (struct rtsx_chip *chip)
 
int sd_pull_ctl_enable (struct rtsx_chip *chip)
 
int reset_sd_card (struct rtsx_chip *chip)
 
void sd_stop_seq_mode (struct rtsx_chip *chip)
 
int sd_rw (struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, u16 sector_cnt)
 
int soft_reset_sd_card (struct rtsx_chip *chip)
 
int ext_sd_send_cmd_get_rsp (struct rtsx_chip *chip, u8 cmd_idx, u32 arg, u8 rsp_type, u8 *rsp, int rsp_len, int special_check)
 
int ext_sd_get_rsp (struct rtsx_chip *chip, int len, u8 *rsp, u8 rsp_type)
 
int sd_pass_thru_mode (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int sd_execute_no_data (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int sd_execute_read_data (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int sd_execute_write_data (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int sd_get_cmd_rsp (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int sd_hw_rst (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
void sd_cleanup_work (struct rtsx_chip *chip)
 
int sd_power_off_card3v3 (struct rtsx_chip *chip)
 
int release_sd_card (struct rtsx_chip *chip)
 

Macro Definition Documentation

#define SD_MAX_RETRY_COUNT   3

Definition at line 33 of file sd.c.

#define WAIT_DATA_READY_RTY_CNT   255

Definition at line 3092 of file sd.c.

Function Documentation

int ext_sd_get_rsp ( struct rtsx_chip chip,
int  len,
u8 rsp,
u8  rsp_type 
)

Definition at line 3597 of file sd.c.

int ext_sd_send_cmd_get_rsp ( struct rtsx_chip chip,
u8  cmd_idx,
u32  arg,
u8  rsp_type,
u8 rsp,
int  rsp_len,
int  special_check 
)

Definition at line 3472 of file sd.c.

int release_sd_card ( struct rtsx_chip chip)

Definition at line 4532 of file sd.c.

int reset_sd_card ( struct rtsx_chip chip)

Definition at line 2953 of file sd.c.

void sd_cleanup_work ( struct rtsx_chip chip)

Definition at line 4491 of file sd.c.

int sd_execute_no_data ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 3745 of file sd.c.

int sd_execute_read_data ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 3853 of file sd.c.

int sd_execute_write_data ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 4069 of file sd.c.

int sd_get_cmd_rsp ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 4390 of file sd.c.

int sd_hw_rst ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 4428 of file sd.c.

int sd_pass_thru_mode ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 3637 of file sd.c.

int sd_power_off_card3v3 ( struct rtsx_chip chip)

Definition at line 4502 of file sd.c.

int sd_pull_ctl_enable ( struct rtsx_chip chip)

Definition at line 2011 of file sd.c.

int sd_rw ( struct scsi_cmnd srb,
struct rtsx_chip chip,
u32  start_sector,
u16  sector_cnt 
)

Definition at line 3194 of file sd.c.

int sd_select_card ( struct rtsx_chip chip,
int  select 
)

Definition at line 702 of file sd.c.

void sd_stop_seq_mode ( struct rtsx_chip chip)

Definition at line 3123 of file sd.c.

int sd_switch_clock ( struct rtsx_chip chip)

Definition at line 1896 of file sd.c.

int soft_reset_sd_card ( struct rtsx_chip chip)

Definition at line 3467 of file sd.c.