Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173474
b: refs/heads/master
c: c4b973f
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Nov 4, 2009
1 parent 801eed6 commit 770a7da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a37c6c7aec38a693f87ee5ccc6e60a5b3ee700f2
refs/heads/master: c4b973f532206e1a67b1beae654b44c8be26fc44
14 changes: 14 additions & 0 deletions trunk/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,9 @@ static struct {
unsigned char imr10;
unsigned char imr11;
unsigned char imr12;
/* RWDT */
unsigned short rwtcnt;
unsigned short rwtcsr;
} sh7724_rstandby_state;

static int sh7724_pre_sleep_notifier_call(struct notifier_block *nb,
Expand Down Expand Up @@ -920,6 +923,13 @@ static int sh7724_pre_sleep_notifier_call(struct notifier_block *nb,
sh7724_rstandby_state.imr11 = __raw_readb(0xa40800ac); /* IMR11 */
sh7724_rstandby_state.imr12 = __raw_readb(0xa40800b0); /* IMR12 */

/* RWDT */
sh7724_rstandby_state.rwtcnt = __raw_readb(0xa4520000); /* RWTCNT */
sh7724_rstandby_state.rwtcnt |= 0x5a00;
sh7724_rstandby_state.rwtcsr = __raw_readb(0xa4520004); /* RWTCSR */
sh7724_rstandby_state.rwtcsr |= 0xa500;
__raw_writew(sh7724_rstandby_state.rwtcsr & 0x07, 0xa4520004);

return NOTIFY_DONE;
}

Expand Down Expand Up @@ -970,6 +980,10 @@ static int sh7724_post_sleep_notifier_call(struct notifier_block *nb,
__raw_writeb(sh7724_rstandby_state.imr11, 0xa40800ac); /* IMR11 */
__raw_writeb(sh7724_rstandby_state.imr12, 0xa40800b0); /* IMR12 */

/* RWDT */
__raw_writew(sh7724_rstandby_state.rwtcnt, 0xa4520000); /* RWTCNT */
__raw_writew(sh7724_rstandby_state.rwtcsr, 0xa4520004); /* RWTCSR */

return NOTIFY_DONE;
}

Expand Down

0 comments on commit 770a7da

Please sign in to comment.