]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/jornada/setup.S
Merge git://git.denx.de/u-boot-x86
[karo-tx-uboot.git] / board / jornada / setup.S
index 885e02f7dbcfde187ed150924aaa86bf298594f4..da9f00646dab5316f8e40ba4b6ca5660ca8a0a4d 100644 (file)
@@ -5,23 +5,7 @@
  *                    Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
  * 2004 (c) MontaVista Software, Inc.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 
@@ -112,12 +96,13 @@ gafr_set:  .long   0x08600000
 .globl lowlevel_init
 lowlevel_init:
 
-       /* set output and direction of pins */
-       ldr r0, PPC_BASE
-       ldr r1, pin_set_out
-       str r1, [r0, #PPSR]
-       ldr r1, pin_set_dir
-       str r1, [r0, #PPDR]
+
+       /* this is required for flashing */
+       ldr     r0, PPC_BASE
+       ldr     r1, pin_set_out
+       str     r1, [r0, #PPSR]
+       ldr     r1, pin_set_dir
+       str     r1, [r0, #PPDR]
 
        /* Setting up the memory and stuff */
        /***********************************/
@@ -190,6 +175,11 @@ lowlevel_init:
        ldr     r3, [r2]
 .endr
 
+       ldr     r2, [r0, #MDCNFG]
+       orr     r2, r2, #0x00000003
+       orr     r2, r2, #0x00030000
+       str     r2, [r0, #MDCNFG]
+
        ldr     r1, msc0
        str     r1, [r0, #MSC0]
        ldr     r1, msc1
@@ -198,13 +188,7 @@ lowlevel_init:
        str     r1, [r0, #MSC2]
        ldr     r1, smcnfg
        str     r1, [r0, #SMCNFG]
-       ldr     r1, mdcnfg
-       str     r1, [r0, #MDCNFG]
        ldr     r1, mecr
        str     r1, [r0, #MECR]
 
-       /* enable SDRAM */
-       orr     r1, r1, #0x00000001
-       str     r1, [r0, #MDCNFG]
-
        mov     pc, lr