Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
mips
cobalt
reset.c
Go to the documentation of this file.
1
/*
2
* Cobalt Reset operations
3
*
4
* This file is subject to the terms and conditions of the GNU General Public
5
* License. See the file "COPYING" in the main directory of this archive
6
* for more details.
7
*
8
* Copyright (C) 1995, 1996, 1997 by Ralf Baechle
9
* Copyright (C) 2001 by Liam Davies (
[email protected]
)
10
*/
11
#include <
linux/init.h
>
12
#include <
linux/io.h
>
13
#include <
linux/leds.h
>
14
15
#include <asm/processor.h>
16
17
#include <cobalt.h>
18
19
#define RESET_PORT ((void __iomem *)CKSEG1ADDR(0x1c000000))
20
#define RESET 0x0f
21
22
DEFINE_LED_TRIGGER
(power_off_led_trigger);
23
24
static
int
__init
ledtrig_power_off_init(
void
)
25
{
26
led_trigger_register_simple
(
"power-off"
, &power_off_led_trigger);
27
return
0;
28
}
29
device_initcall
(ledtrig_power_off_init);
30
31
void
cobalt_machine_halt
(
void
)
32
{
33
/*
34
* turn on power off LED on RaQ
35
*/
36
led_trigger_event
(power_off_led_trigger,
LED_FULL
);
37
38
local_irq_disable
();
39
while
(1) {
40
if
(
cpu_wait
)
41
cpu_wait
();
42
}
43
}
44
45
void
cobalt_machine_restart
(
char
*
command
)
46
{
47
writeb
(
RESET
,
RESET_PORT
);
48
49
/* we should never get here */
50
cobalt_machine_halt
();
51
}
Generated on Thu Jan 10 2013 13:00:19 for Linux Kernel by
1.8.2