]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/pm520/pm520.c
Merge with /home/stefan/git/u-boot/u-boot-ppc4xx
[karo-tx-uboot.git] / board / pm520 / pm520.c
index 619df59c90dd9d3fd593b07a4a97ca249c937b0a..14c3f1d442f0c1d0e06df7ae08053d84dc4016bb 100644 (file)
@@ -34,6 +34,8 @@
 #include "mt48lc16m16a2-75.h"
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifndef CFG_RAMBOOT
 static void sdram_start (int hi_addr)
 {
@@ -107,9 +109,9 @@ long int initdram (int board_type)
 
        /* find RAM size using SDRAM CS0 only */
        sdram_start(0);
-       test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+       test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
        sdram_start(1);
-       test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+       test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
        if (test1 > test2) {
                sdram_start(0);
                dramsize = test1;
@@ -135,10 +137,10 @@ long int initdram (int board_type)
        /* find RAM size using SDRAM CS1 only */
        if (!dramsize)
                sdram_start(0);
-       test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+       test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
        if (!dramsize) {
                sdram_start(1);
-               test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+               test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
        }
        if (test1 > test2) {
                sdram_start(0);
@@ -281,7 +283,6 @@ extern flash_info_t flash_info[];   /* info for FLASH chips */
 
 int misc_init_r (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        /* adjust flash start */
        gd->bd->bi_flashstart = flash_info[0].start[0];
        return (0);
@@ -298,7 +299,7 @@ void pci_init_board(void)
 }
 #endif
 
-#if defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET)
+#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
 
 void init_ide_reset (void)
 {
@@ -311,9 +312,9 @@ void ide_set_reset (int idereset)
        debug ("ide_reset(%d)\n", idereset);
 
 }
-#endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */
+#endif
 
-#if (CONFIG_COMMANDS & CFG_CMD_DOC)
+#if defined(CONFIG_CMD_DOC)
 extern void doc_probe (ulong physadr);
 void doc_init (void)
 {