Commit d952bba3 authored by Binbin Zhou's avatar Binbin Zhou Committed by Lee Jones
Browse files

mfd: ls2kbmc: Add Loongson-2K BMC reset function support



Since the display is a sub-function of the Loongson-2K BMC, when the
BMC reset, the entire BMC PCIe is disconnected, including the display
which is interrupted.

Quick overview of the entire LS2K BMC reset process:

There are two types of reset methods: soft reset (BMC-initiated reboot
of IPMI reset command) and BMC watchdog reset (watchdog timeout).

First, regardless of the method, an interrupt is generated (PCIe interrupt
for soft reset/GPIO interrupt for watchdog reset);

Second, during the interrupt process, the system enters bmc_reset_work,
clears the bus/IO/mem resources of the LS7A PCI-E bridge, waits for the BMC
reset to begin, then restores the parent device's PCI configuration space,
waits for the BMC reset to complete, and finally restores the BMC PCI
configuration space.

Display restoration occurs last.

Co-developed-by: default avatarChong Qiao <qiaochong@loongson.cn>
Signed-off-by: default avatarChong Qiao <qiaochong@loongson.cn>
Reviewed-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Acked-by: default avatarCorey Minyard <corey@minyard.net>
Signed-off-by: default avatarBinbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/de4e04b42ff9ee282f86f9bb9efbf959a9848205.1756987761.git.zhoubinbin@loongson.cn


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 0d64f6d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment