Path: blob/master/arch/sh/boards/mach-migor/sdram.S
15126 views
/*1* Migo-R sdram self/auto-refresh setup code2*3* Copyright (C) 2009 Magnus Damm4*5* This file is subject to the terms and conditions of the GNU General Public6* License. See the file "COPYING" in the main directory of this archive7* for more details.8*/910#include <linux/sys.h>11#include <linux/errno.h>12#include <linux/linkage.h>13#include <asm/asm-offsets.h>14#include <asm/suspend.h>15#include <asm/romimage-macros.h>1617/* code to enter and leave self-refresh. must be self-contained.18* this code will be copied to on-chip memory and executed from there.19*/20.balign 421ENTRY(migor_sdram_enter_start)2223/* SBSC: disable power down and put in self-refresh mode */24mov.l 1f, r425mov.l 2f, r126mov.l @r4, r227or r1, r228mov.l 3f, r329and r3, r230mov.l r2, @r43132rts33nop3435.balign 4361: .long 0xfe400008 /* SDCR0 */372: .long 0x00000400383: .long 0xffff7fff39ENTRY(migor_sdram_enter_end)4041.balign 442ENTRY(migor_sdram_leave_start)4344/* SBSC: set auto-refresh mode */45mov.l 1f, r446mov.l @r4, r047mov.l 4f, r148and r1, r049mov.l r0, @r450mov.l 6f, r451mov.l 8f, r052mov.l @r4, r153mov #-1, r454add r4, r155or r1, r056mov.l 7f, r157mov.l r0, @r15859rts60nop6162.balign 4631: .long 0xfe400008 /* SDCR0 */644: .long 0xfffffbff656: .long 0xfe40001c /* RTCOR */667: .long 0xfe400018 /* RTCNT */678: .long 0xa55a000068ENTRY(migor_sdram_leave_end)697071