1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <cpu/x86/msr.h>
4 #include <cpu/amd/msr.h>
5 #include <device/device.h>
6 #include <southbridge/amd/common/amd_pci_util.h>
8 static const u8 mainboard_picr_data
[] = {
9 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x0A, 0xF1, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,
10 0x09, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14 0x1F, 0x1F, 0x1F, 0x1F
16 static const u8 mainboard_intr_data
[0x54] = {
17 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,
18 0x09, 0x1F, 0x1F, 0x10, 0x1F, 0x10, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x05, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x12, 0x11, 0x12, 0x11, 0x12, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 0x11, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
22 0x10, 0x11, 0x12, 0x13
26 static void pirq_setup(void)
28 intr_data_ptr
= mainboard_intr_data
;
29 picr_data_ptr
= mainboard_picr_data
;
32 /*************************************************
33 * enable the dedicated function in thatcher board.
34 *************************************************/
35 static void mainboard_enable(struct device
*dev
)
41 msr
= rdmsr(LS_CFG_MSR
);
43 wrmsr(LS_CFG_MSR
, msr
);
45 msr
= rdmsr(DC_CFG_MSR
);
48 wrmsr(DC_CFG_MSR
, msr
);
50 msr
= rdmsr(BU_CFG_MSR
);
52 wrmsr(BU_CFG_MSR
, msr
);
55 struct chip_operations mainboard_ops
= {
56 .enable_dev
= mainboard_enable
,