/* Architecture-specific restart for Kaen and other boards, where a GPIO line * is used to reset CPU and TPM together. * * Most of this function mimicks arm_machine_restart in process.c, except that * that function turns off caching and then flushes the cache one more time, * and we do not. This is certainly less clean but unlikely to matter as the * additional dirty cache lines do not contain critical data. * * On boards that don't implement the reset hardware we fall back to the old * method. */ static void gpio_machine_restart(char mode, const char *cmd) { tegra_pm_flush_console(); /* Disable interrupts first */ local_irq_disable(); local_fiq_disable(); /* We must flush the L2 cache for preserved / kcrashmem */ outer_flush_all(); /* Clean and invalidate caches */ flush_cache_all(); /* Reboot by resetting CPU and TPM via GPIO */ gpio_set_value(TEGRA_GPIO_RESET, 0); /* * printk should still work with interrupts disabled, but since we've * already flushed this isn't guaranteed to actually make it out. We'll * print it anyway just in case. */ printk(KERN_INFO "restart: trying legacy reboot\n"); legacy_arm_pm_restart(mode, cmd); }
static void tegra_pm_restart(char mode, const char *cmd) { tegra_pm_flush_console(); arm_machine_restart(mode, cmd); }