1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/pci_ops.h>
4 #include <soc/crashlog.h>
5 #include <soc/pci_devs.h>
7 static uint32_t read_msm_config_reg(uint32_t func
, uint32_t reg
)
9 uint32_t pcie_offset
= PCI_DEV(MSM_BUS
, MSM_DEV
, func
);
10 return pci_s_read_config32(pcie_offset
, reg
);
13 static void write_msm_config_reg(uint32_t func
, uint32_t reg
, uint32_t value
)
15 uint32_t pcie_offset
= PCI_DEV(MSM_BUS
, MSM_DEV
, func
);
16 pci_s_write_config32(pcie_offset
, reg
, value
);
19 void disable_cpu_crashlog(void)
22 ctl
= read_msm_config_reg(MSM_FUN
, CRASHLOG_CTL
);
23 ctl
|= CRASHLOG_CTL_DIS
;
24 write_msm_config_reg(MSM_FUN
, CRASHLOG_CTL
, ctl
);
25 ctl
= read_msm_config_reg(MSM_FUN_PMON
, BIOS_CRASHLOG_CTL
);
26 ctl
|= CRASHLOG_CTL_DIS
;
27 write_msm_config_reg(MSM_FUN_PMON
, BIOS_CRASHLOG_CTL
, ctl
);