Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177910
b: refs/heads/master
c: 70ab711
h: refs/heads/master
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Dec 17, 2009
1 parent 67794b4 commit f13ae23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb1ed9e117098269de3c0dfff816dff453dd4b59
refs/heads/master: 70ab711df44ada438973ceba0213121afeb8e8b3
21 changes: 2 additions & 19 deletions trunk/arch/mips/loongson/lemote-2f/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <loongson.h>

#include <cs5536/cs5536.h>
#include "ec_kb3310b.h"

static void reset_cpu(void)
{
Expand Down Expand Up @@ -75,30 +76,12 @@ static void fl2f_shutdown(void)

/* reset support for yeeloong2f and mengloong2f notebook */

/*
* The following registers are determined by the EC index configuration.
* 1. fill the PORT_HIGH as EC register high part.
* 2. fill the PORT_LOW as EC register low part.
* 3. fill the PORT_DATA as EC register write data or get the data from it.
*/

#define EC_IO_PORT_HIGH 0x0381
#define EC_IO_PORT_LOW 0x0382
#define EC_IO_PORT_DATA 0x0383
#define REG_RESET_HIGH 0xF4 /* reset the machine auto-clear : rd/wr */
#define REG_RESET_LOW 0xEC
#define BIT_RESET_ON (1 << 0)

void ml2f_reboot(void)
{
reset_cpu();

/* sending an reset signal to EC(embedded controller) */
outb(REG_RESET_HIGH, EC_IO_PORT_HIGH);
outb(REG_RESET_LOW, EC_IO_PORT_LOW);
mmiowb();
outb(BIT_RESET_ON, EC_IO_PORT_DATA);
mmiowb();
ec_write(REG_RESET, BIT_RESET_ON);
}

#define yl2f89_reboot ml2f_reboot
Expand Down

0 comments on commit f13ae23

Please sign in to comment.