From patchwork Fri Nov 27 05:16:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 63270 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 nAR5LpAb008903 for ; Fri, 27 Nov 2009 05:21:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750753AbZK0FVm (ORCPT ); Fri, 27 Nov 2009 00:21:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751002AbZK0FVm (ORCPT ); Fri, 27 Nov 2009 00:21:42 -0500 Received: from mail-yw0-f182.google.com ([209.85.211.182]:41029 "EHLO mail-yw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbZK0FVl (ORCPT ); Fri, 27 Nov 2009 00:21:41 -0500 Received: by ywh12 with SMTP id 12so1377176ywh.21 for ; Thu, 26 Nov 2009 21:21:47 -0800 (PST) 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 :subject; bh=eceHzlRBazlnxGrDL5Tlxsha61kBU39JzJOKSENpMqc=; b=BRpgqS5j2ST1espmEvF49/XixrnJLwIaZTB8gVQHn8R7Zh/ez3Rl/IKkNGnWGIppeK EEiJSZ//mw9j25ME0rV4YZjO5xD52wNiohJGut8C2IHRh9jEcwVAOk0Bq2ZVuppUmEKM R/YBodiSXwDlL5p4Eq+oe5fyaQg5/GWTQdpps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=HrsjQa7H73I/4pVpPUPfGJ3/bXOegO9ZXnbSGLQnEjzyzCJRBAY+AJVvpO2Pdlx/cN qTKUNIKePIHb0xHb0MXxkUfyW6J9pefDC/C7fHDhUl9IG7Cv/0O+K/miBP1r83dZ+7Xk cAOd0murOqkupbRFD7MjlUrtW7DripfvIO+vk= Received: by 10.90.20.19 with SMTP id 19mr877297agt.106.1259299307725; Thu, 26 Nov 2009 21:21:47 -0800 (PST) Received: from rxone.opensource.se (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 6sm671424yxg.48.2009.11.26.21.21.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Nov 2009 21:21:47 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Fri, 27 Nov 2009 14:16:21 +0900 Message-Id: <20091127051621.24738.14619.sendpatchset@rxone.opensource.se> Subject: [PATCH] sh: Add CPG save/restore code for sh7724 R-standby Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7724.c 2009-11-27 14:07:07.000000000 +0900 @@ -941,6 +941,9 @@ static struct { /* RWDT */ unsigned short rwtcnt; unsigned short rwtcsr; + /* CPG */ + unsigned long irdaclk; + unsigned long spuclk; } sh7724_rstandby_state; static int sh7724_pre_sleep_notifier_call(struct notifier_block *nb, @@ -998,6 +1001,10 @@ static int sh7724_pre_sleep_notifier_cal sh7724_rstandby_state.rwtcsr |= 0xa500; __raw_writew(sh7724_rstandby_state.rwtcsr & 0x07, 0xa4520004); + /* CPG */ + sh7724_rstandby_state.irdaclk = __raw_readl(0xa4150018); /* IRDACLKCR */ + sh7724_rstandby_state.spuclk = __raw_readl(0xa415003c); /* SPUCLKCR */ + return NOTIFY_DONE; } @@ -1052,6 +1059,10 @@ static int sh7724_post_sleep_notifier_ca __raw_writew(sh7724_rstandby_state.rwtcnt, 0xa4520000); /* RWTCNT */ __raw_writew(sh7724_rstandby_state.rwtcsr, 0xa4520004); /* RWTCSR */ + /* CPG */ + __raw_writel(sh7724_rstandby_state.irdaclk, 0xa4150018); /* IRDACLKCR */ + __raw_writel(sh7724_rstandby_state.spuclk, 0xa415003c); /* SPUCLKCR */ + return NOTIFY_DONE; }