From patchwork Thu Oct 29 10:52:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 56448 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 n9TAue7g016657 for ; Thu, 29 Oct 2009 10:57:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753956AbZJ2K5I (ORCPT ); Thu, 29 Oct 2009 06:57:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753910AbZJ2K5I (ORCPT ); Thu, 29 Oct 2009 06:57:08 -0400 Received: from mail-yx0-f187.google.com ([209.85.210.187]:61187 "EHLO mail-yx0-f187.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753956AbZJ2K5H (ORCPT ); Thu, 29 Oct 2009 06:57:07 -0400 Received: by yxe17 with SMTP id 17so1523692yxe.33 for ; Thu, 29 Oct 2009 03:57:12 -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=vWqPaalB05Fnw+VWqzidnJV9cjMvxKd/w7yubKYlE78=; b=D8IpvLCBMj9ZBj+Ip7d8l5m4f/aFAXfgHnKXVnA+KG3NvZpAMRGtjg4N8jS9pwbU4w xHJLNnz+5CrbjDQMN+6ykD/Qm586RTwfvaDjfrGybN0q4WZmnL/swEyWGBtQ6e/AYp66 B4/zTRX1IfdXAY8BTzWx6OrKkRBuptaNAckt4= 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=ioOhxw6X9b0hHhinxEoI9UToc6M9abaUl1O+0IsBRakuWpnjEU3xXqMjmyJB2VTUHq qMOW4oDjsLsVjdIly1RyEi2KJPebYHr9sw20siBb71rBt61Y623Hrfle+A4zo9M2dYHl TjWkBXUdQTxbIkrYQ8JKZ22diaiTYPyfsHmcQ= Received: by 10.150.45.34 with SMTP id s34mr11109339ybs.274.1256813832485; Thu, 29 Oct 2009 03:57:12 -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 6sm697631ywc.9.2009.10.29.03.57.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Oct 2009 03:57:12 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 29 Oct 2009 19:52:15 +0900 Message-Id: <20091029105215.29078.73642.sendpatchset@rxone.opensource.se> In-Reply-To: <20091029105131.29078.26418.sendpatchset@rxone.opensource.se> References: <20091029105131.29078.26418.sendpatchset@rxone.opensource.se> Subject: [PATCH 05/07] sh: Add kfr2r09 specific memory pre/post sleep code Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org --- 0001/arch/sh/boards/mach-kfr2r09/Makefile +++ work/arch/sh/boards/mach-kfr2r09/Makefile 2009-10-29 16:53:19.000000000 +0900 @@ -1,2 +1,2 @@ -obj-y := setup.o +obj-y := setup.o sdram.o obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o --- /dev/null +++ work/arch/sh/boards/mach-kfr2r09/sdram.S 2009-10-29 16:54:57.000000000 +0900 @@ -0,0 +1,52 @@ +/* + * KFR2R09 sdram self/auto-refresh setup code + * + * Copyright (C) 2009 Magnus Damm + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include + +/* code to enter and leave self-refresh. must be self-contained. + * this code will be copied to on-chip memory and executed from there. + */ + .balign 4 +ENTRY(kfr2r09_sdram_enter_start) + + /* DBSC: put memory in self-refresh mode */ + + ED 0xFD000010, 0x00000000 /* DBEN */ + ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ + ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ + ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */ + ED 0xFD000040, 0x00000001 /* DBRFPDN0 */ + + rts + nop + +ENTRY(kfr2r09_sdram_enter_end) + + .balign 4 +ENTRY(kfr2r09_sdram_leave_start) + + /* DBSC: put memory in auto-refresh mode */ + + ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ + WAIT 1 + ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ + ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */ + ED 0xFD000010, 0x00000001 /* DBEN */ + ED 0xFD000040, 0x00010000 /* DBRFPDN0 */ + + rts + nop + +ENTRY(kfr2r09_sdram_leave_end) --- 0001/arch/sh/boards/mach-kfr2r09/setup.c +++ work/arch/sh/boards/mach-kfr2r09/setup.c 2009-10-29 16:53:19.000000000 +0900 @@ -21,6 +21,7 @@ #include #include #include