[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-279-g88493df
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-04-20 10:11:44
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 88493df210c67eb2ccb1c27f9e1c95370ff7ba30 (commit)
from d289c434f204eb6a1c49ecb31df6e5610483b9fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 88493df210c67eb2ccb1c27f9e1c95370ff7ba30
Author: Eric Jarrige <eri...@ar...>
Date: Fri Apr 20 12:22:54 2012 +0200
[TOOLS] APF51: support U-Boot version with RAM detect and reduced set of variables
-----------------------------------------------------------------------
Summary of changes:
software/uboot_recover/apf51_recover.py | 123 ++++++++++++++++--------------
1 files changed, 66 insertions(+), 57 deletions(-)
diff --git a/software/uboot_recover/apf51_recover.py b/software/uboot_recover/apf51_recover.py
index 634d1b5..efb96b4 100644
--- a/software/uboot_recover/apf51_recover.py
+++ b/software/uboot_recover/apf51_recover.py
@@ -245,47 +245,47 @@ class apf51Bootloader:
def initIOMUX(self):
print "SDRAM INIT IOMUX APF",
# RAS
- self.put("73FA84A4","00000006","l")
+ self.put("73FA84A4","00000005","l")
# CAS
- self.put("73FA84A8","00000006","l")
+ self.put("73FA84A8","00000005","l")
# SDWE
- self.put("73FA84AC","000000E6","l")
+ self.put("73FA84AC","000000E5","l")
# SDCKE0
- self.put("73FA84B0","000000E6","l")
+ self.put("73FA84B0","000000E5","l")
# SDCKE1
- self.put("73FA84B4","000000E6","l")
+ self.put("73FA84B4","000000E5","l")
# SDCLK
- self.put("73FA84B8","000000E6","l")
+ self.put("73FA84B8","000000E7","l")
# SDQS0
- self.put("73FA84BC","000000C6","l")
+ self.put("73FA84BC","000000C4","l")
# SDQS1
- self.put("73FA84C0","000000C6","l")
+ self.put("73FA84C0","000000C4","l")
# SDQS2
- self.put("73FA84C4","000000C6","l")
+ self.put("73FA84C4","000000C4","l")
# SDQS3
- self.put("73FA84C8","000000C6","l")
+ self.put("73FA84C8","000000C4","l")
# CS0
- self.put("73FA84CC","000000E6","l")
+ self.put("73FA84CC","000000E5","l")
# CS1
- self.put("73FA84D0","000000E6","l")
+ self.put("73FA84D0","000000E4","l")
# DQM0
- self.put("73FA84D4","000000E6","l")
+ self.put("73FA84D4","000000E4","l")
# DQM1
- self.put("73FA84D8","000000E6","l")
+ self.put("73FA84D8","000000E4","l")
# DQM2
- self.put("73FA84DC","000000E6","l")
+ self.put("73FA84DC","000000E4","l")
# DQM3
- self.put("73FA84E0","000000E6","l")
+ self.put("73FA84E0","000000E4","l")
# DDRPKS
self.put("73FA8820","00000040","l")
# DRAM_B4
- self.put("73FA882C","00000006","l")
+ self.put("73FA882C","00000004","l")
# PKEDDR
self.put("73FA8838","00000080","l")
# DDR_A0
- self.put("73FA883C","00000006","l")
+ self.put("73FA883C","00000004","l")
# DDR_A1
- self.put("73FA8848","00000006","l")
+ self.put("73FA8848","00000004","l")
# DRAM_SR_B0
self.put("73FA8878","00000000","l")
# DDRAPKS
@@ -301,42 +301,20 @@ class apf51Bootloader:
# DRAM_SR_B4
self.put("73FA889C","00000000","l")
# DRAM_B0
- self.put("73FA88A4","00000006","l")
+ self.put("73FA88A4","00000004","l")
# DRAM_B1
- self.put("73FA88AC","00000006","l")
+ self.put("73FA88AC","00000004","l")
# DDR_SR_A0
- self.put("73FA88B0","00000000","l")
+ self.put("73FA88B0","00000001","l")
# DRAM_B2
- self.put("73FA88B8","00000006","l")
+ self.put("73FA88B8","00000004","l")
# DDR_SR_A1
- self.put("73FA88BC","00000000","l")
+ self.put("73FA88BC","00000001","l")
- def initSDRAM2(self):
- print "SDRAM INIT2 APF",
- #ESDCTL0: 13 ROW, 10 COL, 32Bit
- self.put("83FD9008","82220000","l")
- #ESDSCR: Precharge command
- self.put("83FD9014","0400800C","l")
- #ESDSCR: Refresh command
- self.put("83FD9014","00008014","l")
- #ESDSCR: Refresh command
- self.put("83FD9014","00008014","l")
- #ESDSCR: LMR with CAS=3 and BL=3 (Burst Length = 8)
- self.put("83FD9014","0033801C","l")
- #ESDSCR: EMR with full Drive strength
- self.put("83FD9014","0000801E","l")
- #ESDCTL0: 13 ROW, 10 COL, 32Bit, SREF=4
- self.put("83FD9008","B2420000","l")
- #ESDCFG0: tRFC:22clks, tXSR:28clks, tXP:3clks, tWTR:2clk, tRP:3clks, tMRD:2clks
- #tRAS:8clks, tRRD:2clks, tWR:3clks, tRCD:3clks, tRC:11clks
- self.put("83FD900C","C33574AA","l")
- #ESDMISC: AP=10, Bank interleaving on, MIF3 en, RALAT=2
- self.put("83FD9010","000a1700","l")
-
- def initSDRAM1(self, sdramType):
+ def initSDRAM1(self):
print "SDRAM INIT1 APF",
#ESDCTL0: 13 ROW, 10 COL, 32Bit
- self.put("83FD9000","82220000","l")
+ self.put("83FD9000","83220000","l")
# self.put("83FD9000","82120000","l") # 64MB
#ESDSCR: Precharge command
self.put("83FD9014","04008008","l")
@@ -348,15 +326,39 @@ class apf51Bootloader:
self.put("83FD9014","00338018","l")
#ESDSCR: EMR with full Drive strength
self.put("83FD9014","0000801a","l")
+ self.put("83FD9014","00008000","l")
#ESDCTL0: 13 ROW, 10 COL, 32Bit, SREF=4
- self.put("83FD9000","B2220000","l")
+ self.put("83FD9000","B3220000","l")
# self.put("83FD9000","D2120000","l") # 64MB
#ESDCFG0: tRFC:22clks, tXSR:28clks, tXP:3clks, tWTR:2clk, tRP:3clks, tMRD:2clks
#tRAS:8clks, tRRD:2clks, tWR:3clks, tRCD:3clks, tRC:11clks
- self.put("83FD9004","c33574aa","l")
+ self.put("83FD9004","501574AA","l")
# self.put("83FD9004","FFFFFFFF","l") # 64MB
#ESDMISC: AP=10, Bank interleaving on, MIF3 en, RALAT=2
- self.put("83FD9010","c00a5680","l")
+ #self.put("83FD9010","c00a5680","l")
+
+ def initSDRAM2(self):
+ print "SDRAM INIT2 APF",
+ #ESDCTL0: 13 ROW, 10 COL, 32Bit
+ self.put("83FD9008","83220000","l")
+ #ESDSCR: Precharge command
+ self.put("83FD9014","0400800C","l")
+ #ESDSCR: Refresh command
+ self.put("83FD9014","00008014","l")
+ #ESDSCR: Refresh command
+ self.put("83FD9014","00008014","l")
+ #ESDSCR: LMR with CAS=3 and BL=3 (Burst Length = 8)
+ self.put("83FD9014","0033801C","l")
+ #ESDSCR: EMR with full Drive strength
+ self.put("83FD9014","0000801E","l")
+ self.put("83FD9014","00008004","l")
+ #ESDCTL0: 13 ROW, 10 COL, 32Bit, SREF=4
+ self.put("83FD9008","B3220000","l")
+ #ESDCFG0: tRFC:22clks, tXSR:28clks, tXP:3clks, tWTR:2clk, tRP:3clks, tMRD:2clks
+ #tRAS:8clks, tRRD:2clks, tWR:3clks, tRCD:3clks, tRC:11clks
+ self.put("83FD900C","501574AA","l")
+ #ESDMISC: AP=10, Bank interleaving on, MIF3 en, RALAT=2
+ self.put("83FD9010","000A5680","l")
def consoleDump(tid):
while 1:
@@ -436,10 +438,10 @@ class UBoot:
self.serial.write("\003")
return self.__getOutput()
- def flash(self):
+ def flash(self, addr, size):
""" Ask U-Boot to flash itself """
self.serial.flushInput()
- self.serial.write("run flash_uboot\n")
+ self.serial.write("setenv fileaddr "+addr+"; setenv filesize "+fsize+";run flash_uboot\n")
try:
ret = self.__getOutput()
except Error,e:
@@ -538,7 +540,7 @@ if __name__ == "__main__":
port = '/dev/ttyACM0'
try:
- ser = serial.Serial(port, SPEED, timeout=2)
+ ser = serial.Serial(port, SPEED, timeout=4)
except Exception, msg:
print "unable to open serial port %s !" % port
print msg
@@ -552,9 +554,16 @@ if __name__ == "__main__":
apfBootloader.getStatus()
apfBootloader.initIOMUX()
- apfBootloader.initSDRAM1("APF51")
+ apfBootloader.initSDRAM1()
+ apfBootloader.initSDRAM2()
#clear configuration request
- apfBootloader.put("83FD9014","00000000","l")
+ apfBootloader.put("83FD9014", "00000000","l")
+ apfBootloader.put("83FD9034", "20020000", "l")
+ apfBootloader.put("83FD9020", "00F48000", "l")
+ apfBootloader.put("83FD9024", "00F48000", "l")
+ apfBootloader.put("83FD9028", "00F48000", "l")
+ apfBootloader.put("83FD902C", "00F48000", "l")
+ apfBootloader.put("83FD9030", "00F48000", "l")
#testRAM()
print "--- Successfully initialized APF51, now loading U-Boot"
@@ -573,7 +582,7 @@ if __name__ == "__main__":
eraseAll = raw_input('\n--- Would you like to erase the environment variables ? y/N: ')
if eraseAll == 'y':
uboot.resetEnv()
- uboot.flash()
+ uboot.flash("90000000", fsize)
print "\n--- U-Boot successfully recovered !"
print "--- Now you can remove miniUSB OTG cable and bootstrap jumper. Then, restart your board"
hooks/post-receive
--
armadeus
|