Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mvs/mvs.h
Show First 20 Lines • Show All 386 Lines • ▼ Show 20 Lines | |||||
#define SATA_PHYM9_GEN2 0x398 | #define SATA_PHYM9_GEN2 0x398 | ||||
#define SATA_PHYM9_GEN1 0x39c | #define SATA_PHYM9_GEN1 0x39c | ||||
#define SATA_PHYCFG_OFS 0x3a0 /* 65nm SoCs only */ | #define SATA_PHYCFG_OFS 0x3a0 /* 65nm SoCs only */ | ||||
#define MVS_MAX_PORTS 8 | #define MVS_MAX_PORTS 8 | ||||
#define MVS_MAX_SLOTS 32 | #define MVS_MAX_SLOTS 32 | ||||
/* Pessimistic prognosis on number of required S/G entries */ | /* Pessimistic prognosis on number of required S/G entries */ | ||||
#define MVS_SG_ENTRIES (btoc(MAXPHYS) + 1) | #define MVS_SG_ENTRIES (btoc(maxphys) + 1) | ||||
/* EDMA Command Request Block (CRQB) Data */ | /* EDMA Command Request Block (CRQB) Data */ | ||||
struct mvs_crqb { | struct mvs_crqb { | ||||
uint32_t cprdbl; /* cPRD Desriptor Table Base Low Address */ | uint32_t cprdbl; /* cPRD Desriptor Table Base Low Address */ | ||||
uint32_t cprdbh; /* cPRD Desriptor Table Base High Address */ | uint32_t cprdbh; /* cPRD Desriptor Table Base High Address */ | ||||
uint16_t ctrlflg; /* Control Flags */ | uint16_t ctrlflg; /* Control Flags */ | ||||
#define MVS_CRQB_READ 0x0001 | #define MVS_CRQB_READ 0x0001 | ||||
#define MVS_CRQB_TAG_MASK 0x003e | #define MVS_CRQB_TAG_MASK 0x003e | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | enum mvs_slot_states { | ||||
MVS_SLOT_EXECUTING | MVS_SLOT_EXECUTING | ||||
}; | }; | ||||
struct mvs_slot { | struct mvs_slot { | ||||
device_t dev; /* Device handle */ | device_t dev; /* Device handle */ | ||||
int slot; /* Number of this slot */ | int slot; /* Number of this slot */ | ||||
int tag; /* Used command tag */ | int tag; /* Used command tag */ | ||||
enum mvs_slot_states state; /* Slot state */ | enum mvs_slot_states state; /* Slot state */ | ||||
u_int eprd_offset; /* EPRD offset */ | |||||
union ccb *ccb; /* CCB occupying slot */ | union ccb *ccb; /* CCB occupying slot */ | ||||
struct ata_dmaslot dma; /* DMA data of this slot */ | struct ata_dmaslot dma; /* DMA data of this slot */ | ||||
struct callout timeout; /* Execution timeout */ | struct callout timeout; /* Execution timeout */ | ||||
}; | }; | ||||
struct mvs_device { | struct mvs_device { | ||||
int revision; | int revision; | ||||
int mode; | int mode; | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |