soc: tegra: add t21x panic handler
This commit is contained in:
1 parent
08bd2cf2fd
commit
63f7efc319
1 file changed
+19
@@ -419,6 +419,8 @@ struct tegra_pmc_soc {
|
||||
bool has_usb_sleepwalk;
|
||||
bool supports_core_domain;
|
||||
bool has_single_mmio_aperture;
|
||||
|
||||
bool cboot_panic_notifier;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -505,6 +507,7 @@ struct tegra_pmc {
|
||||
unsigned long *wake_cntrl_level_map;
|
||||
|
||||
struct notifier_block reboot_notifier;
|
||||
struct notifier_block panic_notifier;
|
||||
struct syscore syscore;
|
||||
|
||||
/* Pending wake IRQ processing */
|
||||
@@ -3199,6 +3202,20 @@ static int tegra_pmc_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
if (pmc->soc->cboot_panic_notifier) {
|
||||
pmc->panic_notifier.notifier_call = tegra_pmc_panic_handler;
|
||||
pmc->panic_notifier.priority = INT_MAX-1;
|
||||
|
||||
err = atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&pmc->panic_notifier);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"unable to register panic notifier, %d\n",
|
||||
err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
err = devm_register_sys_off_handler(&pdev->dev,
|
||||
SYS_OFF_MODE_RESTART,
|
||||
SYS_OFF_PRIO_LOW,
|
||||
@@ -4018,6 +4035,7 @@ static const struct tegra_pmc_soc tegra210_pmc_soc = {
|
||||
.has_blink_output = true,
|
||||
.has_usb_sleepwalk = true,
|
||||
.has_single_mmio_aperture = true,
|
||||
.cboot_panic_notifier = true,
|
||||
};
|
||||
|
||||
static const char * const tegra210b01_powergates[] = {
|
||||
@@ -4079,6 +4097,7 @@ static const struct tegra_pmc_soc tegra210b01_pmc_soc = {
|
||||
.has_blink_output = true,
|
||||
.has_usb_sleepwalk = true,
|
||||
.has_single_mmio_aperture = true,
|
||||
.cboot_panic_notifier = true,
|
||||
};
|
||||
|
||||
static const struct tegra_io_pad_soc tegra186_io_pads[] = {
|
||||
|
||||
Reference in new issue
Block a user