From patchwork Fri Oct 30 04:24:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 56563 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9U4TS9O030529 for ; Fri, 30 Oct 2009 04:29:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710AbZJ3E3m (ORCPT ); Fri, 30 Oct 2009 00:29:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753491AbZJ3E3m (ORCPT ); Fri, 30 Oct 2009 00:29:42 -0400 Received: from mail-gx0-f216.google.com ([209.85.217.216]:44522 "EHLO mail-gx0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754003AbZJ3E3l (ORCPT ); Fri, 30 Oct 2009 00:29:41 -0400 Received: by mail-gx0-f216.google.com with SMTP id 8so439697gxk.1 for ; Thu, 29 Oct 2009 21:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=AVQMN9/t44yNGSToaQj/5U8xn7r5h+Nf8fmGwBtDwZE=; b=xeSjqXpPoYxOT1INvgKAd7WTlgUBL/rYNeAxdMWTnvNBnRAridAH7ZzEbVjSEFJrpy uTBEAKyttQoWP6Unyr6w288/xuINipTqX7DZdHJdvJKIhzA+imaxKaAM9TdV70I2tfUf wHmbIy31vFx9rODiPd7oztImRfZUV7Zd/68jk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=J9DIq9/+gj4dq+iOA6IcyYKykFaQK+G4uaHpvp7acQHeEx1PBye7cAoSNed1Ct1qzT xjaJMXN4bb6dg2UopxU0ap8+249CbL80z4kJED6THdhZbZi32t/q90yO1h46etyXvpp9 62HsfLuk/EQqqnMDjMyyz0oxmPlG3wCPm4Zwk= Received: by 10.90.121.17 with SMTP id t17mr2896315agc.57.1256876986544; Thu, 29 Oct 2009 21:29:46 -0700 (PDT) Received: from rxone.opensource.se (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 15sm1208622yxh.4.2009.10.29.21.29.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Oct 2009 21:29:45 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Fri, 30 Oct 2009 13:24:48 +0900 Message-Id: <20091030042448.11783.78397.sendpatchset@rxone.opensource.se> In-Reply-To: <20091030042331.11783.88942.sendpatchset@rxone.opensource.se> References: <20091030042331.11783.88942.sendpatchset@rxone.opensource.se> Subject: [PATCH 09/09] sh: Add KFR2R09 specific memory pre/post R-standby code Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0006/arch/sh/boards/mach-kfr2r09/sdram.S +++ work/arch/sh/boards/mach-kfr2r09/sdram.S 2009-10-29 17:16:31.000000000 +0900 @@ -39,6 +39,10 @@ ENTRY(kfr2r09_sdram_leave_start) /* DBSC: put memory in auto-refresh mode */ + mov.l @(SH_SLEEP_MODE, r5), r0 + tst #SUSP_SH_RSTANDBY, r0 + bf resume_rstandby + ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ WAIT 1 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ @@ -49,4 +53,28 @@ ENTRY(kfr2r09_sdram_leave_start) rts nop +resume_rstandby: + + /* DBSC: re-initialize and put in auto-refresh */ + + ED 0xFD000108, 0x40000301 /* DBPDCNT0 */ + ED 0xFD000020, 0x011B0002 /* DBCONF */ + ED 0xFD000030, 0x03060E02 /* DBTR0 */ + ED 0xFD000034, 0x01020102 /* DBTR1 */ + ED 0xFD000038, 0x01090406 /* DBTR2 */ + ED 0xFD000008, 0x00000004 /* DBKIND */ + ED 0xFD000040, 0x00000001 /* DBRFPDN0 */ + ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ + ED 0xFD000018, 0x00000001 /* DBCKECNT */ + WAIT 1 + ED 0xFD000010, 0x00000001 /* DBEN */ + ED 0xFD000044, 0x000004AF /* DBRFPDN1 */ + ED 0xFD000048, 0x20CF0037 /* DBRFPDN2 */ + ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */ + ED 0xFD000108, 0x40000300 /* DBPDCNT0 */ + ED 0xFD000040, 0x00010000 /* DBRFPDN0 */ + + rts + nop + ENTRY(kfr2r09_sdram_leave_end) --- 0006/arch/sh/boards/mach-kfr2r09/setup.c +++ work/arch/sh/boards/mach-kfr2r09/setup.c 2009-10-29 17:11:14.000000000 +0900 @@ -453,7 +453,8 @@ extern char kfr2r09_sdram_leave_end; static int __init kfr2r09_devices_setup(void) { /* register board specific self-refresh code */ - sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, + sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF | + SUSP_SH_RSTANDBY, &kfr2r09_sdram_enter_start, &kfr2r09_sdram_enter_end, &kfr2r09_sdram_leave_start,