@@ -211,7 +211,7 @@ static int __set_scrub_rate(struct amd64_pvt *pvt, u32 new_bw, u32 min_rate)
211
211
212
212
scrubval = scrubrates [i ].scrubval ;
213
213
214
- if (pvt -> fam == 0x17 ) {
214
+ if (pvt -> fam == 0x17 || pvt -> fam == 0x18 ) {
215
215
__f17h_set_scrubval (pvt , scrubval );
216
216
} else if (pvt -> fam == 0x15 && pvt -> model == 0x60 ) {
217
217
f15h_select_dct (pvt , 0 );
@@ -264,6 +264,7 @@ static int get_scrub_rate(struct mem_ctl_info *mci)
264
264
break ;
265
265
266
266
case 0x17 :
267
+ case 0x18 :
267
268
amd64_read_pci_cfg (pvt -> F6 , F17H_SCR_BASE_ADDR , & scrubval );
268
269
if (scrubval & BIT (0 )) {
269
270
amd64_read_pci_cfg (pvt -> F6 , F17H_SCR_LIMIT_ADDR , & scrubval );
@@ -1044,6 +1045,7 @@ static void determine_memory_type(struct amd64_pvt *pvt)
1044
1045
goto ddr3 ;
1045
1046
1046
1047
case 0x17 :
1048
+ case 0x18 :
1047
1049
if ((pvt -> umc [0 ].dimm_cfg | pvt -> umc [1 ].dimm_cfg ) & BIT (5 ))
1048
1050
pvt -> dram_type = MEM_LRDDR4 ;
1049
1051
else if ((pvt -> umc [0 ].dimm_cfg | pvt -> umc [1 ].dimm_cfg ) & BIT (4 ))
@@ -3202,8 +3204,13 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
3202
3204
pvt -> ops = & family_types [F17_M10H_CPUS ].ops ;
3203
3205
break ;
3204
3206
}
3207
+ /* fall through */
3208
+ case 0x18 :
3205
3209
fam_type = & family_types [F17_CPUS ];
3206
3210
pvt -> ops = & family_types [F17_CPUS ].ops ;
3211
+
3212
+ if (pvt -> fam == 0x18 )
3213
+ family_types [F17_CPUS ].ctl_name = "F18h" ;
3207
3214
break ;
3208
3215
3209
3216
default :
@@ -3442,6 +3449,7 @@ static const struct x86_cpu_id amd64_cpuids[] = {
3442
3449
{ X86_VENDOR_AMD , 0x15 , X86_MODEL_ANY , X86_FEATURE_ANY , 0 },
3443
3450
{ X86_VENDOR_AMD , 0x16 , X86_MODEL_ANY , X86_FEATURE_ANY , 0 },
3444
3451
{ X86_VENDOR_AMD , 0x17 , X86_MODEL_ANY , X86_FEATURE_ANY , 0 },
3452
+ { X86_VENDOR_HYGON , 0x18 , X86_MODEL_ANY , X86_FEATURE_ANY , 0 },
3445
3453
{ }
3446
3454
};
3447
3455
MODULE_DEVICE_TABLE (x86cpu , amd64_cpuids );
0 commit comments