Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions
sata_fsl.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <linux/libata.h>
#include <asm/io.h>
#include <linux/of_platform.h>

Go to the source code of this file.

Data Structures

struct  cmdhdr_tbl_entry
 
struct  command_desc
 
struct  prde
 
struct  sata_fsl_port_priv
 
struct  sata_fsl_host_priv
 

Enumerations

enum  {
  SATA_FSL_QUEUE_DEPTH = 16, SATA_FSL_MAX_PRD = 63, SATA_FSL_MAX_PRD_USABLE = SATA_FSL_MAX_PRD - 1, SATA_FSL_MAX_PRD_DIRECT = 16,
  SATA_FSL_HOST_FLAGS, SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, SATA_FSL_CMD_HDR_SIZE = 16, SATA_FSL_CMD_SLOT_SIZE = (SATA_FSL_MAX_CMDS * SATA_FSL_CMD_HDR_SIZE),
  SATA_FSL_CMD_DESC_CFIS_SZ = 32, SATA_FSL_CMD_DESC_SFIS_SZ = 32, SATA_FSL_CMD_DESC_ACMD_SZ = 16, SATA_FSL_CMD_DESC_RSRVD = 16,
  SATA_FSL_CMD_DESC_SIZE, SATA_FSL_CMD_DESC_OFFSET_TO_PRDT, SATA_FSL_CMD_DESC_AR_SZ = (SATA_FSL_CMD_DESC_SIZE * SATA_FSL_MAX_CMDS), SATA_FSL_PORT_PRIV_DMA_SZ,
  SATA_FSL_MAX_PORTS = 1, SATA_FSL_IRQ_FLAG = IRQF_SHARED
}
 
enum  {
  ICC_MIN_INT_COUNT_THRESHOLD = 1, ICC_MAX_INT_COUNT_THRESHOLD = ((1 << 5) - 1), ICC_MIN_INT_TICKS_THRESHOLD = 0, ICC_MAX_INT_TICKS_THRESHOLD = ((1 << 19) - 1),
  ICC_SAFE_INT_TICKS = 1
}
 
enum  {
  CQ = 0, CA = 8, CC = 0x10, CE = 0x18,
  DE = 0x20, CHBA = 0x24, HSTATUS = 0x28, HCONTROL = 0x2C,
  CQPMP = 0x30, SIGNATURE = 0x34, ICC = 0x38, ONLINE = (1 << 31),
  GOING_OFFLINE = (1 << 30), BIST_ERR = (1 << 29), CLEAR_ERROR = (1 << 27), FATAL_ERR_HC_MASTER_ERR = (1 << 18),
  FATAL_ERR_PARITY_ERR_TX = (1 << 17), FATAL_ERR_PARITY_ERR_RX = (1 << 16), FATAL_ERR_DATA_UNDERRUN = (1 << 13), FATAL_ERR_DATA_OVERRUN = (1 << 12),
  FATAL_ERR_CRC_ERR_TX = (1 << 11), FATAL_ERR_CRC_ERR_RX = (1 << 10), FATAL_ERR_FIFO_OVRFL_TX = (1 << 9), FATAL_ERR_FIFO_OVRFL_RX = (1 << 8),
  FATAL_ERROR_DECODE, INT_ON_DATA_LENGTH_MISMATCH = (1 << 12), INT_ON_FATAL_ERR = (1 << 5), INT_ON_PHYRDY_CHG = (1 << 4),
  INT_ON_SIGNATURE_UPDATE = (1 << 3), INT_ON_SNOTIFY_UPDATE = (1 << 2), INT_ON_SINGL_DEVICE_ERR = (1 << 1), INT_ON_CMD_COMPLETE = 1,
  INT_ON_ERROR, HCONTROL_ONLINE_PHY_RST = (1 << 31), HCONTROL_FORCE_OFFLINE = (1 << 30), HCONTROL_LEGACY = (1 << 28),
  HCONTROL_PARITY_PROT_MOD = (1 << 14), HCONTROL_DPATH_PARITY = (1 << 12), HCONTROL_SNOOP_ENABLE = (1 << 10), HCONTROL_PMP_ATTACHED = (1 << 9),
  HCONTROL_COPYOUT_STATFIS = (1 << 8), IE_ON_FATAL_ERR = (1 << 5), IE_ON_PHYRDY_CHG = (1 << 4), IE_ON_SIGNATURE_UPDATE = (1 << 3),
  IE_ON_SNOTIFY_UPDATE = (1 << 2), IE_ON_SINGL_DEVICE_ERR = (1 << 1), IE_ON_CMD_COMPLETE = 1, DEFAULT_PORT_IRQ_ENABLE_MASK,
  EXT_INDIRECT_SEG_PRD_FLAG = (1 << 31), DATA_SNOOP_ENABLE_V1 = (1 << 22), DATA_SNOOP_ENABLE_V2 = (1 << 28)
}
 
enum  { SSTATUS = 0, SERROR = 4, SCONTROL = 8, SNOTIFY = 0xC }
 
enum  {
  TRANSCFG = 0, TRANSSTATUS = 4, LINKCFG = 8, LINKCFG1 = 0xC,
  LINKCFG2 = 0x10, LINKSTATUS = 0x14, LINKSTATUS1 = 0x18, PHYCTRLCFG = 0x1C,
  COMMANDSTAT = 0x20
}
 
enum  { TRANSCFG_RX_WATER_MARK = (1 << 4) }
 
enum  { PHY_BIST_ENABLE = 0x01 }
 
enum  {
  CMD_DESC_RES = (1 << 11), VENDOR_SPECIFIC_BIST = (1 << 10), CMD_DESC_SNOOP_ENABLE = (1 << 9), FPDMA_QUEUED_CMD = (1 << 8),
  SRST_CMD = (1 << 7), BIST = (1 << 6), ATAPI_CMD = (1 << 5)
}
 

Functions

 module_param (intr_coalescing_count, int, S_IRUGO)
 
 MODULE_PARM_DESC (intr_coalescing_count,"INT coalescing count threshold (1..31)")
 
 module_param (intr_coalescing_ticks, int, S_IRUGO)
 
 MODULE_PARM_DESC (intr_coalescing_ticks,"INT coalescing timer threshold in AHB ticks")
 
 MODULE_DEVICE_TABLE (of, fsl_sata_match)
 
 module_platform_driver (fsl_sata_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Ashish Kalra, Freescale Semiconductor")
 
 MODULE_DESCRIPTION ("Freescale 3.0Gbps SATA controller low level driver")
 
 MODULE_VERSION ("1.10")
 

Enumeration Type Documentation

anonymous enum
Enumerator:
SATA_FSL_QUEUE_DEPTH 
SATA_FSL_MAX_PRD 
SATA_FSL_MAX_PRD_USABLE 
SATA_FSL_MAX_PRD_DIRECT 
SATA_FSL_HOST_FLAGS 
SATA_FSL_MAX_CMDS 
SATA_FSL_CMD_HDR_SIZE 
SATA_FSL_CMD_SLOT_SIZE 
SATA_FSL_CMD_DESC_CFIS_SZ 
SATA_FSL_CMD_DESC_SFIS_SZ 
SATA_FSL_CMD_DESC_ACMD_SZ 
SATA_FSL_CMD_DESC_RSRVD 
SATA_FSL_CMD_DESC_SIZE 
SATA_FSL_CMD_DESC_OFFSET_TO_PRDT 
SATA_FSL_CMD_DESC_AR_SZ 
SATA_FSL_PORT_PRIV_DMA_SZ 
SATA_FSL_MAX_PORTS 
SATA_FSL_IRQ_FLAG 

Definition at line 39 of file sata_fsl.c.

anonymous enum
Enumerator:
ICC_MIN_INT_COUNT_THRESHOLD 
ICC_MAX_INT_COUNT_THRESHOLD 
ICC_MIN_INT_TICKS_THRESHOLD 
ICC_MAX_INT_TICKS_THRESHOLD 
ICC_SAFE_INT_TICKS 

Definition at line 96 of file sata_fsl.c.

anonymous enum
Enumerator:
CQ 
CA 
CC 
CE 
DE 
CHBA 
HSTATUS 
HCONTROL 
CQPMP 
SIGNATURE 
ICC 
ONLINE 
GOING_OFFLINE 
BIST_ERR 
CLEAR_ERROR 
FATAL_ERR_HC_MASTER_ERR 
FATAL_ERR_PARITY_ERR_TX 
FATAL_ERR_PARITY_ERR_RX 
FATAL_ERR_DATA_UNDERRUN 
FATAL_ERR_DATA_OVERRUN 
FATAL_ERR_CRC_ERR_TX 
FATAL_ERR_CRC_ERR_RX 
FATAL_ERR_FIFO_OVRFL_TX 
FATAL_ERR_FIFO_OVRFL_RX 
FATAL_ERROR_DECODE 
INT_ON_DATA_LENGTH_MISMATCH 
INT_ON_FATAL_ERR 
INT_ON_PHYRDY_CHG 
INT_ON_SIGNATURE_UPDATE 
INT_ON_SNOTIFY_UPDATE 
INT_ON_SINGL_DEVICE_ERR 
INT_ON_CMD_COMPLETE 
INT_ON_ERROR 
HCONTROL_ONLINE_PHY_RST 
HCONTROL_FORCE_OFFLINE 
HCONTROL_LEGACY 
HCONTROL_PARITY_PROT_MOD 
HCONTROL_DPATH_PARITY 
HCONTROL_SNOOP_ENABLE 
HCONTROL_PMP_ATTACHED 
HCONTROL_COPYOUT_STATFIS 
IE_ON_FATAL_ERR 
IE_ON_PHYRDY_CHG 
IE_ON_SIGNATURE_UPDATE 
IE_ON_SNOTIFY_UPDATE 
IE_ON_SINGL_DEVICE_ERR 
IE_ON_CMD_COMPLETE 
DEFAULT_PORT_IRQ_ENABLE_MASK 
EXT_INDIRECT_SEG_PRD_FLAG 
DATA_SNOOP_ENABLE_V1 
DATA_SNOOP_ENABLE_V2 

Definition at line 107 of file sata_fsl.c.

anonymous enum
Enumerator:
SSTATUS 
SERROR 
SCONTROL 
SNOTIFY 

Definition at line 189 of file sata_fsl.c.

anonymous enum
Enumerator:
TRANSCFG 
TRANSSTATUS 
LINKCFG 
LINKCFG1 
LINKCFG2 
LINKSTATUS 
LINKSTATUS1 
PHYCTRLCFG 
COMMANDSTAT 

Definition at line 199 of file sata_fsl.c.

anonymous enum
Enumerator:
TRANSCFG_RX_WATER_MARK 

Definition at line 212 of file sata_fsl.c.

anonymous enum
Enumerator:
PHY_BIST_ENABLE 

Definition at line 217 of file sata_fsl.c.

anonymous enum
Enumerator:
CMD_DESC_RES 
VENDOR_SPECIFIC_BIST 
CMD_DESC_SNOOP_ENABLE 
FPDMA_QUEUED_CMD 
SRST_CMD 
BIST 
ATAPI_CMD 

Definition at line 235 of file sata_fsl.c.

Function Documentation

MODULE_AUTHOR ( "Ashish  Kalra,
Freescale Semiconductor"   
)
MODULE_DESCRIPTION ( "Freescale 3.0Gbps SATA controller low level driver"  )
MODULE_DEVICE_TABLE ( of  ,
fsl_sata_match   
)
MODULE_LICENSE ( "GPL"  )
module_param ( intr_coalescing_count  ,
int  ,
S_IRUGO   
)
module_param ( intr_coalescing_ticks  ,
int  ,
S_IRUGO   
)
MODULE_PARM_DESC ( intr_coalescing_count  ,
"INT coalescing count threshold (1..31)"   
)
MODULE_PARM_DESC ( intr_coalescing_ticks  ,
"INT coalescing timer threshold in AHB ticks  
)
module_platform_driver ( fsl_sata_driver  )
MODULE_VERSION ( "1.10"  )