Release 4.14 arch/sparc/prom/misc_32.c
// SPDX-License-Identifier: GPL-2.0
/*
* misc.c: Miscellaneous prom functions that don't belong
* anywhere else.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <asm/openprom.h>
#include <asm/oplib.h>
#include <asm/auxio.h>
extern void restore_current(void);
DEFINE_SPINLOCK(prom_lock);
/* Reset and reboot the machine with the command 'bcommand'. */
void
prom_reboot(char *bcommand)
{
unsigned long flags;
spin_lock_irqsave(&prom_lock, flags);
(*(romvec->pv_reboot))(bcommand);
/* Never get here. */
restore_current();
spin_unlock_irqrestore(&prom_lock, flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 45 | 100.00% | 4 | 100.00% |
Total | 45 | 100.00% | 4 | 100.00% |
/* Forth evaluate the expression contained in 'fstring'. */
void
prom_feval(char *fstring)
{
unsigned long flags;
if(!fstring || fstring[0] == 0)
return;
spin_lock_irqsave(&prom_lock, flags);
if(prom_vers == PROM_V0)
(*(romvec->pv_fortheval.v0_eval))(strlen(fstring), fstring);
else
(*(romvec->pv_fortheval.v2_eval))(fstring);
restore_current();
spin_unlock_irqrestore(&prom_lock, flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 85 | 100.00% | 4 | 100.00% |
Total | 85 | 100.00% | 4 | 100.00% |
EXPORT_SYMBOL(prom_feval);
/* Drop into the prom, with the chance to continue with the 'go'
* prom command.
*/
void
prom_cmdline(void)
{
unsigned long flags;
spin_lock_irqsave(&prom_lock, flags);
(*(romvec->pv_abort))();
restore_current();
spin_unlock_irqrestore(&prom_lock, flags);
set_auxio(AUXIO_LED, 0);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 42 | 87.50% | 4 | 80.00% |
Eric Brower | 6 | 12.50% | 1 | 20.00% |
Total | 48 | 100.00% | 5 | 100.00% |
/* Drop into the prom, but completely terminate the program.
* No chance of continuing.
*/
void __noreturn
prom_halt(void)
{
unsigned long flags;
again:
spin_lock_irqsave(&prom_lock, flags);
(*(romvec->pv_halt))();
/* Never get here. */
restore_current();
spin_unlock_irqrestore(&prom_lock, flags);
goto again; /* PROM is out to get me -DaveM */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 48 | 97.96% | 5 | 83.33% |
Sam Ravnborg | 1 | 2.04% | 1 | 16.67% |
Total | 49 | 100.00% | 6 | 100.00% |
typedef void (*sfunc_t)(void);
/* Set prom sync handler to call function 'funcp'. */
void
prom_setsync(sfunc_t funcp)
{
if(!funcp) return;
*romvec->pv_synchook = funcp;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
/* Get the idprom and stuff it into buffer 'idbuf'. Returns the
* format type. 'num_bytes' is the number of bytes that your idbuf
* has space for. Returns 0xff on error.
*/
unsigned char
prom_get_idprom(char *idbuf, int num_bytes)
{
int len;
len = prom_getproplen(prom_root_node, "idprom");
if((len>num_bytes) || (len==-1)) return 0xff;
if(!prom_getproperty(prom_root_node, "idprom", idbuf, num_bytes))
return idbuf[0];
return 0xff;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 66 | 100.00% | 2 | 100.00% |
Total | 66 | 100.00% | 2 | 100.00% |
/* Get the major prom version number. */
int
prom_version(void)
{
return romvec->pv_romvers;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
/* Get the prom plugin-revision. */
int
prom_getrev(void)
{
return prom_rev;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 10 | 100.00% | 1 | 100.00% |
Total | 10 | 100.00% | 1 | 100.00% |
/* Get the prom firmware print revision. */
int
prom_getprev(void)
{
return prom_prev;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 10 | 100.00% | 1 | 100.00% |
Total | 10 | 100.00% | 1 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 384 | 94.81% | 6 | 50.00% |
Sam Ravnborg | 9 | 2.22% | 2 | 16.67% |
Eric Brower | 6 | 1.48% | 1 | 8.33% |
Thomas Gleixner | 4 | 0.99% | 1 | 8.33% |
Greg Kroah-Hartman | 1 | 0.25% | 1 | 8.33% |
Adrian Bunk | 1 | 0.25% | 1 | 8.33% |
Total | 405 | 100.00% | 12 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.