summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorEswar Nallusamy <contacteswar@gmail.com>2005-11-02 17:32:49 +0000
committerEswar Nallusamy <contacteswar@gmail.com>2005-11-02 17:32:49 +0000
commited009371030cb97571c8b8dc342f16a9fa124d59 (patch)
tree3ff2d9e14f73cbb98b5706e837adb897eb5d3c3e /src/northbridge
parent987ca8e08c3307e46dde3b35c6190c504f0cbf19 (diff)
ppc970 initial porting.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2082 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/ibm/cpc925/Config.lb2
-rw-r--r--src/northbridge/ibm/cpc925/cpc925_sdram.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/northbridge/ibm/cpc925/Config.lb b/src/northbridge/ibm/cpc925/Config.lb
index 8559c2e66a..f57ce0a075 100644
--- a/src/northbridge/ibm/cpc925/Config.lb
+++ b/src/northbridge/ibm/cpc925/Config.lb
@@ -6,7 +6,9 @@ config chip.h
initobject cpc925.o
initobject cpc925_pci.o
+initobject cpc925_sdram.o
object cpc925.o
object cpc925_pci.o
+object cpc925_sdram.o
driver cpc925_northbridge.o
diff --git a/src/northbridge/ibm/cpc925/cpc925_sdram.c b/src/northbridge/ibm/cpc925/cpc925_sdram.c
new file mode 100644
index 0000000000..1347adb6c2
--- /dev/null
+++ b/src/northbridge/ibm/cpc925/cpc925_sdram.c
@@ -0,0 +1,13 @@
+#include "ppc970.h"
+
+unsigned long sdram_size(void)
+{
+ unsigned long addr1, addr2;
+
+ addr1=inint(NB_SDRAM_BASE+NB_SDRAM_MEMMODE7)&SDRAM_MEMMODE_BASEBANKADDR;
+ addr1=addr1<<11;
+ addr2=inint(NB_SDRAM_BASE+NB_SDRAM_MEMBOUNDAD7)&SDRAM_MEMBOUNDAD_BASEBANKADDR;
+ addr2=addr2<<3;
+ return(addr1|addr2);
+
+}