summaryrefslogtreecommitdiffstats
path: root/arch/x86/cpu/sc520/sc520_sdram.c
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-11-08 02:33:14 +0000
committerGraeme Russ <graeme.russ@gmail.com>2011-11-29 21:01:26 +1100
commit01a0f5a1ebba7eeccf13fc5992ed59e8614fd58a (patch)
treec4336883b65a2a3217393ab92829e786ab82cd4a /arch/x86/cpu/sc520/sc520_sdram.c
parent717979fdd752b80e031001c871a4fa2f84b3e3f6 (diff)
downloadtalos-obmc-uboot-01a0f5a1ebba7eeccf13fc5992ed59e8614fd58a.tar.gz
talos-obmc-uboot-01a0f5a1ebba7eeccf13fc5992ed59e8614fd58a.zip
cosmetic: checkpatch cleanup of arch/x86/cpu/sc520/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'arch/x86/cpu/sc520/sc520_sdram.c')
-rw-r--r--arch/x86/cpu/sc520/sc520_sdram.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/x86/cpu/sc520/sc520_sdram.c b/arch/x86/cpu/sc520/sc520_sdram.c
index 57e4e7ddc3..9dc13342e3 100644
--- a/arch/x86/cpu/sc520/sc520_sdram.c
+++ b/arch/x86/cpu/sc520/sc520_sdram.c
@@ -40,9 +40,6 @@ static void sc520_set_dram_timing(void);
static void sc520_set_dram_refresh_rate(void);
static void sc520_enable_dram_refresh(void);
static void sc520_enable_sdram(void);
-#if CONFIG_SYS_SDRAM_ECC_ENABLE
-static void sc520_enable_ecc(void)
-#endif
int dram_init_f(void)
{
@@ -51,9 +48,6 @@ int dram_init_f(void)
sc520_set_dram_refresh_rate();
sc520_enable_dram_refresh();
sc520_enable_sdram();
-#if CONFIG_SYS_SDRAM_ECC_ENABLE
- sc520_enable_ecc();
-#endif
return 0;
}
@@ -426,53 +420,6 @@ static void sc520_sizemem(void)
writel(0x00000000, &sc520_mmcr->par[4]);
}
-#if CONFIG_SYS_SDRAM_ECC_ENABLE
-static void sc520_enable_ecc(void)
-
- /* A nominal memory test: just a byte at each address line */
- movl %eax, %ecx
- shrl $0x1, %ecx
- movl $0x1, %edi
-memtest0:
- movb $0xa5, (%edi)
- cmpb $0xa5, (%edi)
- jne out
- shrl $0x1, %ecx
- andl %ecx, %ecx
- jz set_ecc
- shll $0x1, %edi
- jmp memtest0
-
-set_ecc:
- /* clear all ram with a memset */
- movl %eax, %ecx
- xorl %esi, %esi
- xorl %edi, %edi
- xorl %eax, %eax
- shrl $0x2, %ecx
- cld
- rep stosl
-
- /* enable read, write buffers */
- movb $0x11, %al
- movl $DBCTL, %edi
- movb %al, (%edi)
-
- /* enable NMI mapping for ECC */
- movl $ECCINT, %edi
- movb $0x10, %al
- movb %al, (%edi)
-
- /* Turn on ECC */
- movl $ECCCTL, %edi
- movb $0x05, %al
- movb %al,(%edi)
-
-out:
- jmp init_ecc_ret
-}
-#endif
-
int dram_init(void)
{
ulong dram_ctrl;
OpenPOWER on IntegriCloud