USB: Obscure Maxon BP3-USB Device Support 16d8:6280 for option driver
[linux-2.6/s3c2410-cpufreq.git] / include / asm-sparc / mpmbox.h
blob0e1bc5801d8a6806de81cac2e6c11f7fa09c8463
1 /* $Id: mpmbox.h,v 1.4 1996/04/25 06:13:19 davem Exp $
2 * mpmbox.h: Interface and defines for the OpenProm mailbox
3 * facilities for MP machines under Linux.
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6 */
8 #ifndef _SPARC_MPMBOX_H
9 #define _SPARC_MPMBOX_H
11 /* The prom allocates, for each CPU on the machine an unsigned
12 * byte in physical ram. You probe the device tree prom nodes
13 * for these values. The purpose of this byte is to be able to
14 * pass messages from one cpu to another.
17 /* These are the main message types we have to look for in our
18 * Cpu mailboxes, based upon these values we decide what course
19 * of action to take.
22 /* The CPU is executing code in the kernel. */
23 #define MAILBOX_ISRUNNING 0xf0
25 /* Another CPU called romvec->pv_exit(), you should call
26 * prom_stopcpu() when you see this in your mailbox.
28 #define MAILBOX_EXIT 0xfb
30 /* Another CPU called romvec->pv_enter(), you should call
31 * prom_cpuidle() when this is seen.
33 #define MAILBOX_GOSPIN 0xfc
35 /* Another CPU has hit a breakpoint either into kadb or the prom
36 * itself. Just like MAILBOX_GOSPIN, you should call prom_cpuidle()
37 * at this point.
39 #define MAILBOX_BPT_SPIN 0xfd
41 /* Oh geese, some other nitwit got a damn watchdog reset. The party's
42 * over so go call prom_stopcpu().
44 #define MAILBOX_WDOG_STOP 0xfe
46 #ifndef __ASSEMBLY__
48 /* Handy macro's to determine a cpu's state. */
50 /* Is the cpu still in Power On Self Test? */
51 #define MBOX_POST_P(letter) ((letter) >= 0x00 && (letter) <= 0x7f)
53 /* Is the cpu at the 'ok' prompt of the PROM? */
54 #define MBOX_PROMPROMPT_P(letter) ((letter) >= 0x80 && (letter) <= 0x8f)
56 /* Is the cpu spinning in the PROM? */
57 #define MBOX_PROMSPIN_P(letter) ((letter) >= 0x90 && (letter) <= 0xef)
59 /* Sanity check... This is junk mail, throw it out. */
60 #define MBOX_BOGON_P(letter) ((letter) >= 0xf1 && (letter) <= 0xfa)
62 /* Is the cpu actively running an application/kernel-code? */
63 #define MBOX_RUNNING_P(letter) ((letter) == MAILBOX_ISRUNNING)
65 #endif /* !(__ASSEMBLY__) */
67 #endif /* !(_SPARC_MPMBOX_H) */