coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sata.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _BROADWELL_SATA_H_
4 #define _BROADWELL_SATA_H_
5 
6 #define SATA_SIRI 0xa0 /* SATA Indexed Register Index */
7 #define SATA_SIRD 0xa4 /* SATA Indexed Register Data */
8 #define SATA_SP 0xd0 /* Scratchpad */
9 
10 /* SATA IOBP Registers */
11 #define SATA_IOBP_SP0_SECRT88 0xea002688
12 #define SATA_IOBP_SP1_SECRT88 0xea002488
13 #define SATA_IOBP_SP2_SECRT88 0xea002288
14 #define SATA_IOBP_SP3_SECRT88 0xea002088
15 
16 #define SATA_SECRT88_VADJ_MASK 0xff
17 #define SATA_SECRT88_VADJ_SHIFT 16
18 
19 #define SATA_IOBP_SP0DTLE_DATA 0xea002750
20 #define SATA_IOBP_SP0DTLE_EDGE 0xea002754
21 #define SATA_IOBP_SP1DTLE_DATA 0xea002550
22 #define SATA_IOBP_SP1DTLE_EDGE 0xea002554
23 #define SATA_IOBP_SP2DTLE_DATA 0xea002350
24 #define SATA_IOBP_SP2DTLE_EDGE 0xea002354
25 #define SATA_IOBP_SP3DTLE_DATA 0xea002150
26 #define SATA_IOBP_SP3DTLE_EDGE 0xea002154
27 
28 #define SATA_DTLE_MASK 0xF
29 #define SATA_DTLE_DATA_SHIFT 24
30 #define SATA_DTLE_EDGE_SHIFT 16
31 
32 /* PCI Configuration Space (D31:F1): IDE */
33 #define INTR_LN 0x3c
34 #define IDE_TIM_PRI 0x40 /* IDE timings, primary */
35 #define IDE_DECODE_ENABLE (1 << 15)
36 #define IDE_SITRE (1 << 14)
37 #define IDE_ISP_5_CLOCKS (0 << 12)
38 #define IDE_ISP_4_CLOCKS (1 << 12)
39 #define IDE_ISP_3_CLOCKS (2 << 12)
40 #define IDE_RCT_4_CLOCKS (0 << 8)
41 #define IDE_RCT_3_CLOCKS (1 << 8)
42 #define IDE_RCT_2_CLOCKS (2 << 8)
43 #define IDE_RCT_1_CLOCKS (3 << 8)
44 #define IDE_DTE1 (1 << 7)
45 #define IDE_PPE1 (1 << 6)
46 #define IDE_IE1 (1 << 5)
47 #define IDE_TIME1 (1 << 4)
48 #define IDE_DTE0 (1 << 3)
49 #define IDE_PPE0 (1 << 2)
50 #define IDE_IE0 (1 << 1)
51 #define IDE_TIME0 (1 << 0)
52 #define IDE_TIM_SEC 0x42 /* IDE timings, secondary */
53 
54 #define IDE_SDMA_CNT 0x48 /* Synchronous DMA control */
55 #define IDE_SSDE1 (1 << 3)
56 #define IDE_SSDE0 (1 << 2)
57 #define IDE_PSDE1 (1 << 1)
58 #define IDE_PSDE0 (1 << 0)
59 
60 #define IDE_SDMA_TIM 0x4a
61 
62 #define IDE_CONFIG 0x54 /* IDE I/O Configuration Register */
63 #define SIG_MODE_SEC_NORMAL (0 << 18)
64 #define SIG_MODE_SEC_TRISTATE (1 << 18)
65 #define SIG_MODE_SEC_DRIVELOW (2 << 18)
66 #define SIG_MODE_PRI_NORMAL (0 << 16)
67 #define SIG_MODE_PRI_TRISTATE (1 << 16)
68 #define SIG_MODE_PRI_DRIVELOW (2 << 16)
69 #define FAST_SCB1 (1 << 15)
70 #define FAST_SCB0 (1 << 14)
71 #define FAST_PCB1 (1 << 13)
72 #define FAST_PCB0 (1 << 12)
73 #define SCB1 (1 << 3)
74 #define SCB0 (1 << 2)
75 #define PCB1 (1 << 1)
76 #define PCB0 (1 << 0)
77 
78 #endif