blob: 0d770ac83f70b5ee5d54df5e56559c997cd19f10 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * linux/arch/parisc/kernel/pa7300lc.c
4 * - PA7300LC-specific functions
5 *
6 * Copyright (C) 2000 Philipp Rumpf */
7
8#include <linux/sched.h>
Ingo Molnarb17b0152017-02-08 18:51:35 +01009#include <linux/sched/debug.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <linux/smp.h>
11#include <linux/kernel.h>
12#include <asm/io.h>
13#include <asm/ptrace.h>
14#include <asm/machdep.h>
15
16/* CPU register indices */
17
18#define MIOC_STATUS 0xf040
19#define MIOC_CONTROL 0xf080
20#define MDERRADD 0xf0e0
21#define DMAERR 0xf0e8
22#define DIOERR 0xf0ec
23#define HIDMAMEM 0xf0f4
24
25/* this returns the HPA of the CPU it was called on */
26static u32 cpu_hpa(void)
27{
28 return 0xfffb0000;
29}
30
31static void pa7300lc_lpmc(int code, struct pt_regs *regs)
32{
33 u32 hpa;
34 printk(KERN_WARNING "LPMC on CPU %d\n", smp_processor_id());
35
36 show_regs(regs);
37
38 hpa = cpu_hpa();
39 printk(KERN_WARNING
40 "MIOC_CONTROL %08x\n" "MIOC_STATUS %08x\n"
41 "MDERRADD %08x\n" "DMAERR %08x\n"
42 "DIOERR %08x\n" "HIDMAMEM %08x\n",
43 gsc_readl(hpa+MIOC_CONTROL), gsc_readl(hpa+MIOC_STATUS),
44 gsc_readl(hpa+MDERRADD), gsc_readl(hpa+DMAERR),
45 gsc_readl(hpa+DIOERR), gsc_readl(hpa+HIDMAMEM));
46}
47
48void pa7300lc_init(void)
49{
50 cpu_lpmc = pa7300lc_lpmc;
51}