// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Common PowerQUICC II code.3*4* Author: Scott Wood <[email protected]>5* Copyright (c) 2007 Freescale Semiconductor6*7* Based on code by Vitaly Bordug <[email protected]>8* pq2_restart fix by Wade Farnsworth <[email protected]>9* Copyright (c) 2006 MontaVista Software, Inc.10*/1112#include <linux/kprobes.h>1314#include <asm/cpm2.h>15#include <asm/io.h>16#include <asm/pci-bridge.h>1718#include <platforms/82xx/pq2.h>1920#define RMR_CSRE 0x000000012122void __noreturn pq2_restart(char *cmd)23{24local_irq_disable();25setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE);2627/* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */28mtmsr(mfmsr() & ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR));29in_8(&cpm2_immr->im_clkrst.res[0]);3031panic("Restart failed\n");32}33NOKPROBE_SYMBOL(pq2_restart)343536