Release 4.14 arch/mips/jazz/reset.c
// SPDX-License-Identifier: GPL-2.0
/*
* Reset a Jazz machine.
*
* We don't trust the firmware so we do it the classic way by poking and
* stabbing at the keyboard controller ...
*/
#include <linux/jiffies.h>
#include <asm/jazz.h>
#define KBD_STAT_IBF 0x02
/* Keyboard input buffer full */
static void jazz_write_output(unsigned char val)
{
int status;
do {
status = jazz_kh->command;
} while (status & KBD_STAT_IBF);
jazz_kh->data = val;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
static void jazz_write_command(unsigned char val)
{
int status;
do {
status = jazz_kh->command;
} while (status & KBD_STAT_IBF);
jazz_kh->command = val;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
static unsigned char jazz_read_status(void)
{
return jazz_kh->command;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 14 | 100.00% | 1 | 100.00% |
Total | 14 | 100.00% | 1 | 100.00% |
static inline void kb_wait(void)
{
unsigned long start = jiffies;
unsigned long timeout = start + HZ/2;
do {
if (! (jazz_read_status() & 0x02))
return;
} while (time_before_eq(jiffies, timeout));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 27 | 55.10% | 1 | 33.33% |
Andrew Morton | 12 | 24.49% | 1 | 33.33% |
Ralf Bächle | 10 | 20.41% | 1 | 33.33% |
Total | 49 | 100.00% | 3 | 100.00% |
void jazz_machine_restart(char *command)
{
while(1) {
kb_wait();
jazz_write_command(0xd1);
kb_wait();
jazz_write_output(0x00);
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 23 | 74.19% | 2 | 66.67% |
Andrew Morton | 8 | 25.81% | 1 | 33.33% |
Total | 31 | 100.00% | 3 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 110 | 62.15% | 1 | 16.67% |
Linus Torvalds (pre-git) | 55 | 31.07% | 2 | 33.33% |
Ralf Bächle | 10 | 5.65% | 1 | 16.67% |
Greg Kroah-Hartman | 1 | 0.56% | 1 | 16.67% |
Rusty Russell | 1 | 0.56% | 1 | 16.67% |
Total | 177 | 100.00% | 6 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.