]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/esd/vom405/vom405.c
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / board / esd / vom405 / vom405.c
index 8be552e2ea2511e3c2ae750db8b654670d022221..a481acaea14cde465539cb4026e7cb098942801b 100755 (executable)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <command.h>
 #include <malloc.h>
 
@@ -30,14 +31,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void lxt971_no_sleep(void);
 
-/* fpga configuration data - not compressed, generated by bin2c */
-const unsigned char fpgadata[] =
-{
-#include "fpgadata.c"
-};
-int filesize = sizeof(fpgadata);
-
-
 int board_early_init_f (void)
 {
        /*
@@ -68,17 +61,16 @@ int board_early_init_f (void)
        /*
         * Reset CPLD via GPIO12 (CS3) pin
         */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(0x80000000 >> 12));
+       out_be32((void *)GPIO0_OR,
+                in_be32((void *)GPIO0_OR) & ~(0x80000000 >> 12));
        udelay(1000); /* wait 1ms */
-       out32(GPIO0_OR, in32(GPIO0_OR) | (0x80000000 >> 12));
+       out_be32((void *)GPIO0_OR,
+                in_be32((void *)GPIO0_OR) | (0x80000000 >> 12));
        udelay(1000); /* wait 1ms */
 
        return 0;
 }
 
-
-/* ------------------------------------------------------------------------- */
-
 int misc_init_r (void)
 {
        /* adjust flash start and offset */
@@ -88,18 +80,16 @@ int misc_init_r (void)
        return (0);
 }
 
-
 /*
  * Check Board Identity:
  */
-
 int checkboard (void)
 {
        char str[64];
        int i = getenv_r ("serial#", str, sizeof(str));
        int flashcnt;
        int delay;
-       volatile unsigned char *led_reg = (unsigned char *)((ulong)CAN_BA + 0x1000);
+       u8 *led_reg = (u8 *)(CAN_BA + 0x1000);
 
        puts ("Board: ");
 
@@ -109,43 +99,24 @@ int checkboard (void)
                puts(str);
        }
 
-       printf(" (PLD-Version=%02d)\n", *led_reg);
+       printf(" (PLD-Version=%02d)\n", in_8(led_reg));
 
        /*
         * Flash LEDs
         */
        for (flashcnt = 0; flashcnt < 3; flashcnt++) {
-               *led_reg = 0x40;        /* LED_B..D off */
+               out_8(led_reg, 0x40);        /* LED_B..D off */
                for (delay = 0; delay < 100; delay++)
                        udelay(1000);
-               *led_reg = 0x47;        /* LED_B..D on */
+               out_8(led_reg, 0x47);        /* LED_B..D on */
                for (delay = 0; delay < 50; delay++)
                        udelay(1000);
        }
-       *led_reg = 0x40;
+       out_8(led_reg, 0x40);
 
        return 0;
 }
 
-/* ------------------------------------------------------------------------- */
-
-long int initdram (int board_type)
-{
-       unsigned long val;
-
-       mtdcr(memcfga, mem_mb0cf);
-       val = mfdcr(memcfgd);
-
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
-       return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP