30
30
#define PCI_DEVICE_ID_AMD_MI200_ROOT 0x14bb
31
31
#define PCI_DEVICE_ID_AMD_MI300_ROOT 0x14f8
32
32
33
- #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464
34
- #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
35
- #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
36
- #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
37
- #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
38
- #define PCI_DEVICE_ID_AMD_17H_MA0H_DF_F4 0x1728
39
- #define PCI_DEVICE_ID_AMD_19H_DF_F4 0x1654
40
- #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
41
- #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
42
- #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
43
- #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4
44
- #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4
45
- #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc
46
- #define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4 0x12c4
47
- #define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F4 0x16fc
48
- #define PCI_DEVICE_ID_AMD_1AH_M60H_DF_F4 0x124c
49
- #define PCI_DEVICE_ID_AMD_1AH_M70H_DF_F4 0x12bc
50
- #define PCI_DEVICE_ID_AMD_MI200_DF_F4 0x14d4
51
- #define PCI_DEVICE_ID_AMD_MI300_DF_F4 0x152c
52
-
53
33
/* Protect the PCI config register pairs used for SMN. */
54
34
static DEFINE_MUTEX (smn_mutex );
55
35
@@ -73,8 +53,6 @@ static const struct pci_device_id amd_root_ids[] = {
73
53
{}
74
54
};
75
55
76
- #define PCI_DEVICE_ID_AMD_CNB17H_F4 0x1704
77
-
78
56
static const struct pci_device_id amd_nb_misc_ids [] = {
79
57
{ PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_K8_NB_MISC ) },
80
58
{ PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_10H_NB_MISC ) },
@@ -107,35 +85,6 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
107
85
{}
108
86
};
109
87
110
- static const struct pci_device_id amd_nb_link_ids [] = {
111
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_15H_NB_F4 ) },
112
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 ) },
113
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_15H_M60H_NB_F4 ) },
114
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_16H_NB_F4 ) },
115
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 ) },
116
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_DF_F4 ) },
117
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 ) },
118
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 ) },
119
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 ) },
120
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 ) },
121
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_17H_MA0H_DF_F4 ) },
122
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_DF_F4 ) },
123
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 ) },
124
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 ) },
125
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 ) },
126
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 ) },
127
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 ) },
128
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 ) },
129
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_CNB17H_F4 ) },
130
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4 ) },
131
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_1AH_M20H_DF_F4 ) },
132
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_1AH_M60H_DF_F4 ) },
133
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_1AH_M70H_DF_F4 ) },
134
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_MI200_DF_F4 ) },
135
- { PCI_DEVICE (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_MI300_DF_F4 ) },
136
- {}
137
- };
138
-
139
88
static const struct pci_device_id hygon_root_ids [] = {
140
89
{ PCI_DEVICE (PCI_VENDOR_ID_HYGON , PCI_DEVICE_ID_AMD_17H_ROOT ) },
141
90
{}
@@ -146,11 +95,6 @@ static const struct pci_device_id hygon_nb_misc_ids[] = {
146
95
{}
147
96
};
148
97
149
- static const struct pci_device_id hygon_nb_link_ids [] = {
150
- { PCI_DEVICE (PCI_VENDOR_ID_HYGON , PCI_DEVICE_ID_AMD_17H_DF_F4 ) },
151
- {}
152
- };
153
-
154
98
const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges [] __initconst = {
155
99
{ 0x00 , 0x18 , 0x20 },
156
100
{ 0xff , 0x00 , 0x20 },
@@ -275,13 +219,11 @@ int __must_check amd_smn_write(u16 node, u32 address, u32 value)
275
219
}
276
220
EXPORT_SYMBOL_GPL (amd_smn_write );
277
221
278
-
279
222
static int amd_cache_northbridges (void )
280
223
{
281
224
const struct pci_device_id * misc_ids = amd_nb_misc_ids ;
282
- const struct pci_device_id * link_ids = amd_nb_link_ids ;
283
225
const struct pci_device_id * root_ids = amd_root_ids ;
284
- struct pci_dev * root , * misc , * link ;
226
+ struct pci_dev * root , * misc ;
285
227
struct amd_northbridge * nb ;
286
228
u16 roots_per_misc = 0 ;
287
229
u16 misc_count = 0 ;
@@ -294,7 +236,6 @@ static int amd_cache_northbridges(void)
294
236
if (boot_cpu_data .x86_vendor == X86_VENDOR_HYGON ) {
295
237
root_ids = hygon_root_ids ;
296
238
misc_ids = hygon_nb_misc_ids ;
297
- link_ids = hygon_nb_link_ids ;
298
239
}
299
240
300
241
misc = NULL ;
@@ -328,14 +269,13 @@ static int amd_cache_northbridges(void)
328
269
amd_northbridges .nb = nb ;
329
270
amd_northbridges .num = misc_count ;
330
271
331
- link = misc = root = NULL ;
272
+ misc = root = NULL ;
332
273
for (i = 0 ; i < amd_northbridges .num ; i ++ ) {
333
274
node_to_amd_nb (i )-> root = root =
334
275
next_northbridge (root , root_ids );
335
276
node_to_amd_nb (i )-> misc = misc =
336
277
next_northbridge (misc , misc_ids );
337
- node_to_amd_nb (i )-> link = link =
338
- next_northbridge (link , link_ids );
278
+ node_to_amd_nb (i )-> link = amd_node_get_func (i , 4 );
339
279
340
280
/*
341
281
* If there are more PCI root devices than data fabric/
0 commit comments