aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/dcr.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-12-20 23:39:31 -0500
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2007-12-23 14:14:13 -0500
commitd23f5099297c0f017ba4fb165dc9879bda11f9ce (patch)
tree0a43ca1a2090643290f02115526875bdf6390a10 /arch/powerpc/boot/dcr.h
parent007b6aa8114550c59373c751ac9cc9f356a0a81f (diff)
[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library
This adds a function to the bootwrapper 4xx library to decode memory size on 440SPE processors. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/boot/dcr.h')
-rw-r--r--arch/powerpc/boot/dcr.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h
index 83b88aa92888..8e7ee2a4298f 100644
--- a/arch/powerpc/boot/dcr.h
+++ b/arch/powerpc/boot/dcr.h
@@ -14,12 +14,20 @@
14#define DCRN_SDRAM0_CFGADDR 0x010 14#define DCRN_SDRAM0_CFGADDR 0x010
15#define DCRN_SDRAM0_CFGDATA 0x011 15#define DCRN_SDRAM0_CFGDATA 0x011
16 16
17#define SDRAM0_READ(offset) ({\
18 mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
19 mfdcr(DCRN_SDRAM0_CFGDATA); })
20#define SDRAM0_WRITE(offset, data) ({\
21 mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
22 mtdcr(DCRN_SDRAM0_CFGDATA, data); })
23
17#define SDRAM0_B0CR 0x40 24#define SDRAM0_B0CR 0x40
18#define SDRAM0_B1CR 0x44 25#define SDRAM0_B1CR 0x44
19#define SDRAM0_B2CR 0x48 26#define SDRAM0_B2CR 0x48
20#define SDRAM0_B3CR 0x4c 27#define SDRAM0_B3CR 0x4c
21 28
22static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2CR, SDRAM0_B3CR }; 29static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR,
30 SDRAM0_B2CR, SDRAM0_B3CR };
23 31
24#define SDRAM_CONFIG_BANK_ENABLE 0x00000001 32#define SDRAM_CONFIG_BANK_ENABLE 0x00000001
25#define SDRAM_CONFIG_SIZE_MASK 0x000e0000 33#define SDRAM_CONFIG_SIZE_MASK 0x000e0000