You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
powerpc: Convert fsl_rstcr_restart to a reset handler
Convert fsl_rstcr_restart into a function to be registered with register_reset_handler(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> [scottwood: Converted mvme7100 as well] Signed-off-by: Scott Wood <oss@buserror.net>
This commit is contained in:
committed by
Scott Wood
parent
ad24747304
commit
7120438e5d
@@ -72,7 +72,6 @@ define_machine(bsc9132_qds) {
|
||||
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -59,7 +59,6 @@ define_machine(bsc9131_rdb) {
|
||||
.setup_arch = bsc913x_rdb_setup_arch,
|
||||
.init_IRQ = bsc913x_rdb_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -65,7 +65,6 @@ define_machine(c293_pcie) {
|
||||
.setup_arch = c293_pcie_setup_arch,
|
||||
.init_IRQ = c293_pcie_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -225,7 +225,6 @@ define_machine(corenet_generic) {
|
||||
#else
|
||||
.get_irq = mpic_get_coreint_irq,
|
||||
#endif
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PPC64
|
||||
|
||||
@@ -215,7 +215,6 @@ define_machine(ge_imp3a) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -77,7 +77,6 @@ define_machine(mpc8536_ds) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -170,7 +170,6 @@ define_machine(mpc85xx_ads) {
|
||||
.init_IRQ = mpc85xx_ads_pic_init,
|
||||
.show_cpuinfo = mpc85xx_ads_show_cpuinfo,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -83,7 +83,8 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
static void __noreturn mpc85xx_cds_restart(char *cmd)
|
||||
static int mpc85xx_cds_restart(struct notifier_block *this,
|
||||
unsigned long mode, void *cmd)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
u_char tmp;
|
||||
@@ -108,12 +109,25 @@ static void __noreturn mpc85xx_cds_restart(char *cmd)
|
||||
}
|
||||
|
||||
/*
|
||||
* If we can't find the VIA chip (maybe the P2P bridge is disabled)
|
||||
* or the VIA chip reset didn't work, just use the default reset.
|
||||
* If we can't find the VIA chip (maybe the P2P bridge is
|
||||
* disabled) or the VIA chip reset didn't work, just return
|
||||
* and let default reset sequence happen.
|
||||
*/
|
||||
fsl_rstcr_restart(NULL);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static int mpc85xx_cds_restart_register(void)
|
||||
{
|
||||
static struct notifier_block restart_handler;
|
||||
|
||||
restart_handler.notifier_call = mpc85xx_cds_restart;
|
||||
restart_handler.priority = 192;
|
||||
|
||||
return register_restart_handler(&restart_handler);
|
||||
}
|
||||
machine_arch_initcall(mpc85xx_cds, mpc85xx_cds_restart_register);
|
||||
|
||||
|
||||
static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
|
||||
{
|
||||
u_char c;
|
||||
@@ -380,11 +394,8 @@ define_machine(mpc85xx_cds) {
|
||||
.show_cpuinfo = mpc85xx_cds_show_cpuinfo,
|
||||
.get_irq = mpic_get_irq,
|
||||
#ifdef CONFIG_PCI
|
||||
.restart = mpc85xx_cds_restart,
|
||||
.pcibios_fixup_bus = mpc85xx_cds_fixup_bus,
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#else
|
||||
.restart = fsl_rstcr_restart,
|
||||
#endif
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
|
||||
@@ -204,7 +204,6 @@ define_machine(mpc8544_ds) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -219,7 +218,6 @@ define_machine(mpc8572_ds) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -234,7 +232,6 @@ define_machine(p2020_ds) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -393,7 +393,6 @@ define_machine(mpc8568_mds) {
|
||||
.setup_arch = mpc85xx_mds_setup_arch,
|
||||
.init_IRQ = mpc85xx_mds_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PCI
|
||||
@@ -413,7 +412,6 @@ define_machine(mpc8569_mds) {
|
||||
.setup_arch = mpc85xx_mds_setup_arch,
|
||||
.init_IRQ = mpc85xx_mds_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PCI
|
||||
@@ -434,7 +432,6 @@ define_machine(p1021_mds) {
|
||||
.setup_arch = mpc85xx_mds_setup_arch,
|
||||
.init_IRQ = mpc85xx_mds_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
@@ -213,7 +213,6 @@ define_machine(p2020_rdb) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -228,7 +227,6 @@ define_machine(p1020_rdb) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -243,7 +241,6 @@ define_machine(p1021_rdb_pc) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -258,7 +255,6 @@ define_machine(p2020_rdb_pc) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -273,7 +269,6 @@ define_machine(p1025_rdb) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -288,7 +283,6 @@ define_machine(p1020_mbg_pc) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -303,7 +297,6 @@ define_machine(p1020_utm_pc) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -318,7 +311,6 @@ define_machine(p1020_rdb_pc) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -333,7 +325,6 @@ define_machine(p1020_rdb_pd) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
@@ -348,7 +339,6 @@ define_machine(p1024_rdb) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -66,7 +66,6 @@ define_machine(mvme2500) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -79,7 +79,6 @@ define_machine(p1010_rdb) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -568,7 +568,6 @@ define_machine(p1022_ds) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -148,7 +148,6 @@ define_machine(p1022_rdk) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -110,7 +110,6 @@ define_machine(p1023_rdb) {
|
||||
.setup_arch = mpc85xx_rdb_setup_arch,
|
||||
.init_IRQ = mpc85xx_rdb_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
@@ -91,7 +91,6 @@ define_machine(ppa8548) {
|
||||
.init_IRQ = ppa8548_pic_init,
|
||||
.show_cpuinfo = ppa8548_show_cpuinfo,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -77,7 +77,6 @@ define_machine(qemu_e500) {
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
#endif
|
||||
.get_irq = mpic_get_coreint_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
@@ -130,7 +130,6 @@ define_machine(sbc8548) {
|
||||
.init_IRQ = sbc8548_pic_init,
|
||||
.show_cpuinfo = sbc8548_show_cpuinfo,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
#ifdef CONFIG_PCI
|
||||
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
|
||||
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
|
||||
|
||||
@@ -91,7 +91,6 @@ define_machine(socrates) {
|
||||
.setup_arch = socrates_setup_arch,
|
||||
.init_IRQ = socrates_pic_init,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user