12874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later 2e00c5498SScott Wood /* 3e00c5498SScott Wood * Common PowerQUICC II code. 4e00c5498SScott Wood * 5e00c5498SScott Wood * Author: Scott Wood <scottwood@freescale.com> 6e00c5498SScott Wood * Copyright (c) 2007 Freescale Semiconductor 7e00c5498SScott Wood * 8e00c5498SScott Wood * Based on code by Vitaly Bordug <vbordug@ru.mvista.com> 9e00c5498SScott Wood * pq2_restart fix by Wade Farnsworth <wfarnsworth@mvista.com> 10e00c5498SScott Wood * Copyright (c) 2006 MontaVista Software, Inc. 11e00c5498SScott Wood */ 12e00c5498SScott Wood 131740f15aSChristophe Leroy #include <linux/kprobes.h> 141740f15aSChristophe Leroy 15e00c5498SScott Wood #include <asm/cpm2.h> 16e00c5498SScott Wood #include <asm/io.h> 17e00c5498SScott Wood #include <asm/pci-bridge.h> 18e00c5498SScott Wood 19e00c5498SScott Wood #include <platforms/82xx/pq2.h> 20e00c5498SScott Wood 21e00c5498SScott Wood #define RMR_CSRE 0x00000001 22e00c5498SScott Wood pq2_restart(char * cmd)2395ec77c0SDaniel Axtensvoid __noreturn pq2_restart(char *cmd) 24e00c5498SScott Wood { 25e00c5498SScott Wood local_irq_disable(); 26e00c5498SScott Wood setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE); 27e00c5498SScott Wood 28e00c5498SScott Wood /* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */ 29e00c5498SScott Wood mtmsr(mfmsr() & ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR)); 30e00c5498SScott Wood in_8(&cpm2_immr->im_clkrst.res[0]); 31e00c5498SScott Wood 32e00c5498SScott Wood panic("Restart failed\n"); 33e00c5498SScott Wood } 341740f15aSChristophe Leroy NOKPROBE_SYMBOL(pq2_restart) 35