Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/powerpc/platforms/82xx/pq2.c
26481 views
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
* Common PowerQUICC II code.
4
*
5
* Author: Scott Wood <[email protected]>
6
* Copyright (c) 2007 Freescale Semiconductor
7
*
8
* Based on code by Vitaly Bordug <[email protected]>
9
* pq2_restart fix by Wade Farnsworth <[email protected]>
10
* Copyright (c) 2006 MontaVista Software, Inc.
11
*/
12
13
#include <linux/kprobes.h>
14
15
#include <asm/cpm2.h>
16
#include <asm/io.h>
17
#include <asm/pci-bridge.h>
18
19
#include <platforms/82xx/pq2.h>
20
21
#define RMR_CSRE 0x00000001
22
23
void __noreturn pq2_restart(char *cmd)
24
{
25
local_irq_disable();
26
setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE);
27
28
/* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */
29
mtmsr(mfmsr() & ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR));
30
in_8(&cpm2_immr->im_clkrst.res[0]);
31
32
panic("Restart failed\n");
33
}
34
NOKPROBE_SYMBOL(pq2_restart)
35
36