From 658541c2eaa87c20540d1cdce373d0e1ba6afa68 Mon Sep 17 00:00:00 2001 From: Michael Broughton Date: Mon, 4 Dec 2006 17:27:29 +1000 Subject: [PATCH] --- yaml --- r: 42010 b: refs/heads/master c: 552984050958fc0f51bff38948d0bf4d31ea2b03 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/m68knommu/platform/5307/head.S | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4b9441c294d8..17993201f150 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1bddcc50c27c8ca39a62a1d37e3928707be8f850 +refs/heads/master: 552984050958fc0f51bff38948d0bf4d31ea2b03 diff --git a/trunk/arch/m68knommu/platform/5307/head.S b/trunk/arch/m68knommu/platform/5307/head.S index f2edb6498cd9..b9aa0ca29bfb 100644 --- a/trunk/arch/m68knommu/platform/5307/head.S +++ b/trunk/arch/m68knommu/platform/5307/head.S @@ -64,6 +64,26 @@ negl %d0 /* negate bits */ .endm +#elif defined(CONFIG_M520x) +.macro GET_MEM_SIZE + clrl %d0 + movel MCF_MBAR+MCFSIM_SDCS0, %d2 /* Get SDRAM chip select 0 config */ + andl #0x1f, %d2 /* Get only the chip select size */ + beq 3f /* Check if it is enabled */ + addql #1, %d2 /* Form exponent */ + moveql #1, %d0 + lsll %d2, %d0 /* 2 ^ exponent */ +3: + movel MCF_MBAR+MCFSIM_SDCS1, %d2 /* Get SDRAM chip select 1 config */ + andl #0x1f, %d2 /* Get only the chip select size */ + beq 4f /* Check if it is enabled */ + addql #1, %d2 /* Form exponent */ + moveql #1, %d1 + lsll %d2, %d1 /* 2 ^ exponent */ + addl %d1, %d0 /* Total size of SDRAM in d0 */ +4: +.endm + #else #error "ERROR: I don't know how to probe your boards memory size?" #endif