Skip to contentSkip to conversation

support for 2 DRAM banks and FLASH bank with 16MB in KS8695

PATCH New Bernstein 2 participants 2 messages Nov 4, 2010 – Nov 14, 2010 Arm/actions semi architecture

lore
Share & tools
lore

Bernstein

#0 lore raw

PATCH 1/1 support for 2 DRAM banks and FLASH bank with 16MB in KS8695

Hello,

The patch attached add support for a flash bank size of 16 MB and for a second DRAM bank for the KS8695 (ARM9 core) depending on the configuration.

A better solution would be to calculate the values for the registers (only some shifts are needed) but this was the lazy implementation.

I hope, I don't make to much mistakes in the presentation of my patch because it is the first patch I publish to this list. Sadly I don't have access to the development PC any more because it was a project for a subsidiary company and I finished the project at end of September.

---

cpu/arm920t/ks8695/lowlevel_init.S 2010-01-29 11:38:04.000000000 +0100 renamed from cpu/arm920t/ks8695/lowlevel_init.S 2009-12-15 23:20:54.000000000 +0100 +21 -2
diff --unified --recursive --new-file u-boot-2009.11/cpu/arm920t/ks8695/lowlevel_init.S u-boot-2009.11.new/cpu/arm920t/ks8695/lowlevel_init.S
@@ -96,7 +96,17 @@
        str     r2, [r1]                /* large flash map */
        ldr     pc, =(highflash+0x02000000-0x00f00000)  /* jump to high flash address */
 highflash:
-       ldr     r2, =0x8fe00040
+#if (PHYS_FLASH_BANK_SIZE == 0x01000000)
+       ldr     r2, =0xbfe00071         /* 16MB and start at 32MB */
+       str     r2, [r1]                /* remap flash range */
+       ldr     r1, =(KS8695_IO_BASE+KS8695_MEM_CTRL1)
+       ldr     r2, =0xc0300000
+       str     r2, [r1]                /* flash2 region unused */
+       ldr     r1, =(KS8695_IO_BASE+KS8695_MEM_GENERAL)
+       ldr     r2, =0x30000003         /* data width 32 */
+       str     r2, [r1]                /* enable first flash select */
+#else
+       ldr     r2, =0x8fe00040         /* 4MB start at 32MB */
        str     r2, [r1]                /* remap flash range */
 
        /*
@@ -111,6 +121,7 @@
        ldr     r1, =(KS8695_IO_BASE+KS8695_MEM_GENERAL)
        ldr     r2, =0x30000005
        str     r2, [r1]                /* enable both flash selects */
+#endif
 
 #ifdef CONFIG_CM41xx
        /*
@@ -138,7 +149,15 @@
 #endif
        str     r2, [r1]                /* configure sdram bank0 setup */
        ldr     r1, =(KS8695_IO_BASE+KS8695_SDRAM_CTRL1)
-       mov     r2, #0
+#if (CONFIG_NR_DRAM_BANKS == 2)
+#if (PHYS_SDRAM_2_SIZE == 0x02000000)
+       ldr     r2, =0xFFE0000E         /* 32MB and start at 32MB */
+#else
+       ldr     r2, =0x7FD0000E         /* 16MB and start at 16MB */
+#endif
+#else  /* CONFIG_NR_DRAM_BANKS == 2 */
+       mov     r2, #0                  /* no second SDRAM bank */
+#endif /* CONFIG_NR_DRAM_BANKS == 2 */
        str     r2, [r1]                /* configure sdram bank1 setup */
 
        ldr     r1, =(KS8695_IO_BASE+KS8695_SDRAM_GENERAL)

--

_________________________________________________
Michael Bernstein
NOC

Controlware GmbH
Waldstrasse 92, 63128 Dietzenbach, GERMANY
Tel.: +49 6074 858-177
Fax: +49 6074 858-148
Michael.Bernstein at controlware.de www.controlware.de
_________________________________________________
State-of-the-art Technology for Worldwide Telecommunications <<< Dienstleistung nach Ma? >>>

Emergency Response Services
Schnelle und zuverl?ssige Unterst?tzung bei IT-Sicherheitsvorf?llen aller Art. Weitere Infos unter http://www.controlware.de/ers

Diese E-Mail kann vertrauliche oder rechtlich gesch?tzte Informationen enthalten. Wenn Sie nicht der beabsichtigte Empf?nger sind, informieren Sie bitte sofort den Absender und l?schen Sie diese E-Mail. Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen ist nicht gestattet.

The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited.

Controlware GmbH Kommunikationssysteme
Telefon: (0 60 74) 8 58-0
E-Mail: info at controlware.de
http://www.controlware.de

Sitz: 63128 Dietzenbach, Registergericht: Offenbach a.M., HRB Nr. 6431, USt.-Id.-Nr. DE 113539225
Gesch?ftsf?hrung: Helmut E. W?rner (Vorsitzender), Bernd Schwefing, Hubert Potthoff Beirat: Dr. Gert Sieger (Vorsitzender), Dr. Peter Pag?, Kurt Sibold

#1 lore raw

PATCH 1/1 support for 2 DRAM banks and FLASH bank with 16MB in KS8695

Dear "Bernstein, Michael",

Quoted 4 lines · In message <EC8E3D9A08FBD540BB1137DDACCB0ABD995EFE82FE@NTEXCCR.controlware.de>…

The patch attached add support for a flash bank size of 16 MB and for a second DRAM bank for the KS8695 (ARM9 core) depending on the configuration.

A better solution would be to calculate the values for the registers (only some shifts are needed) but this was the lazy implementation.

Please restrict the line length in the commit message to 70 characters or less.

Quoted 1 line

I hope, I don't make to much mistakes in the presentation of my patch because it is the first patch I publish to this list. Sadly I don't have access to the development PC any more because it was a project for a subsidiary co> mpany and I finished the project at end of September.

Such comments should not be part of the commit message, so please move this into the comment section.

Please see
http://www.denx.de/wiki/view/U-Boot/Patches#Commit_message_conventions
and
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Computers are not intelligent.  They only think they are.