VoodooSDHCI

VoodooSDHCI Svn Source Tree

Root/trunk/SDHCI_Register_Map.h

  • Property svn:executable set to *
1#include "License.h"
2#include "SD_Misc.h"
3
4struct __attribute__ ((__packed__)) SDHCIRegMap_t {
5volatile UInt32 SDMASysAddr;//0x00
6volatile UInt16 BlockSize;//0x04
7volatile UInt16 BlockCount;//0x06
8volatile UInt32 Argument;//0x08
9volatile UInt16 TransferMode;//0x0C
10volatile UInt16 Command;//0x0E
11volatile UInt32 Response[4];//0x10
12volatile UInt32 BufferDataPort;//0x20
13volatile UInt32 PresentState;//0x24
14volatile UInt8 HostControl;//0x28
15volatile UInt8 PowerControl;//0x29
16volatile UInt8 BlockGapControl;//0x2A
17volatile UInt8 WakeupControl;//0x2B
18volatile UInt16 ClockControl;//0x2C
19volatile UInt8 TimeoutControl;//0x2E
20volatile UInt8 SoftwareReset;//0x2F
21volatile UInt16 NormalIntStatus;//0x30
22volatile UInt16 ErrorIntStatus;//0x32
23volatile UInt16 NormalIntStatusEn;//0x34
24volatile UInt16 ErrorIntStatusEn;//0x36
25volatile UInt16 NormalIntSignalEn;//0x38
26volatile UInt16 ErrorIntSignalEn;//0x3A
27volatile UInt16 CMD12ErrorStatus;//0x3C
28volatile UInt16 Reserved0;//0x3E
29volatile UInt32 Capabilities[2];//0x40
30volatile UInt32 MaxCurrentCap[2];//0x48
31volatile UInt16 ForceEventCMD12ErrStatus;//0x50
32volatile UInt16 ForceEventErrorIntStatus;//0x52
33volatile UInt8 AMDAErrorStatus;//0x54
34volatile UInt8 Reserved1;//0x55
35volatile UInt16 Reserved2;//0x56
36volatile UInt32 ADMASystemAddr[2];//0x58
37volatile UInt16 ReservedArray[78];//0x60
38volatile UInt16 SlotIntStatus;//0xFC
39volatile UInt16 HostControllerVer;//0xFE
40};
41
42//PresentState
43#define CMDLineLevelBIT24
44#define DAT3LevelBIT23
45#define DAT2LevelBIT22
46#define DAT1LevelBIT21
47#define DAT0LevelBIT20
48#define WPSwitchLevelBIT19
49#define CardDetectLevelBIT18
50#define CardStateStable BIT17
51#define CardInsertedBIT16
52#define BuffReadEnBIT11
53#define BuffWriteEnBIT10
54#define ReadXferActiveBIT9
55#define WriteXferActiveBIT8
56#define DATLineActiveBIT2
57#define ComInhibitDATBIT1
58#define ComInhibitCMDBIT0
59
60//HostControl
61#define CDSigSelectionBIT7
62#define CDTestLevelBIT6
63#define DMASelSDMA0
64#define DMASel32ADMA2BIT3
65#define DMASel64ADMA2BIT4|BIT3
66#define HighSpeedEnBIT2
67#define DataXferWidthBIT1
68#define LedControlBIT0
69
70//PowerControl
71#define HC3v30xE
72#define HC3v00xD
73#define HC1v80xA
74#define SDPowerBIT0
75
76//ClockControl
77#define DIV256BIT16
78#define DIV128BIT15
79#defineDIV64BIT14
80#define DIV32BIT13
81#define DIV16BIT12
82#define DIV8BIT11
83#define DIV4BIT10
84#defineDIV2BIT9
85#define SDClockEnBIT2
86#define SDClockStableBIT1
87#define InternalClockEn BIT0
88
89//Capabilities
90#define CR64SysBusBIT28
91#defineCR1v8SupportBIT26
92#define CR3v0SupportBIT25
93#define CR3v3SupportBIT24
94#define SusRsmSupportBIT23
95#define SDMASupportBIT22
96#define HighSpSupportBIT21
97#define ADMA2SupportBIT19
98#define BlockLen5120
99#define BlockLen1024BIT16
100#define BlockLen2048BIT17
101#define BaseClockMaskBIT13|BIT12|BIT11|BIT10|BIT9|BIT8
102#define TOutClockUnitBIT7
103#define TOutClockMaskBIT5|BIT4|BIT3|BIT2|BIT1|BIT0
104
105//MaxCurrentCap
106#define MaxCur1v8MaskBIT23|BIT22|BIT21|BIT20|BIT19|BIT18|BIT17|BIT16
107#define MaxCur3v0MaskBIT15|BIT14|BIT13|BIT12|BIT11|BIT10|BIT9|BIT8
108#define MaxCur3v3MaskBIT7|BIT6|BIT5|BIT4|BIT3|BIT2|BIT1|BIT0
109
110//HostControllerVer
111#define VendorVerMaskBIT15|BIT14|BIT13|BIT12|BIT11|BIT10|BIT9|BIT8
112#define SpecVerMaskBIT7|BIT6|BIT5|BIT4|BIT3|BIT2|BIT1|BIT0
113
114//SoftwareReset
115#define CMD_RESETBIT1
116#define DAT_RESETBIT2
117#define FULL_RESETBIT0
118
119//NormalIntStatus
120#define ErrorInterruptBIT15
121#define CardInterruptBIT8
122#define CardRemovalBIT7
123#define CardInsertionBIT6
124#define BuffReadReadyBIT5
125#define BuffWriteReadyBIT4
126#defineDMAInterruptBIT3
127#define BlockGapEventBIT2
128#defineXferCompleteBIT1
129#defineCmdCompleteBIT0
130
131//ErrorIntStatus
132#define ADMAErrorBIT9
133#define AutoCMD12ErrorBIT8
134#define CurLimitErrorBIT7
135#define DatEndBitErrorBIT6
136#define DatCRCErrorBIT5
137#define DatTimeoutErrorBIT4
138#define CmdIndexErrorBIT3
139#define CmdEndBitErrorBIT2
140#define CmdCRCErrorBIT1
141#define CmdTimeoutErrorBIT0
142
143

Archive Download this file

Revision: HEAD