85xx: convert STXGP3/STXSSA over to use new LAW init code
[oweals/u-boot.git] / board / evb4510 / evb4510.c
index 72d1f4e4f556edb5e1223a4b338823d96aab97b8..13abbb70136ad9f4e1eff95bfb5468dc0e7e30b2 100644 (file)
 #include <asm/hardware.h>
 #include <command.h>
 
-/* ------------------------------------------------------------------------- */
+DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_EVB4510
 
-#define PUT_LED(val)       (PUT_REG(REG_IOPDATA, (~val)&0xFF))
-#define GET_LED()          ((~GET_REG( REG_IOPDATA)) & 0xFF)
-#define SET_LED(val)       { u32 led = GET_LED(); led |= 1 << (val);  PUT_LED( led); }
-#define CLR_LED(val)       { u32 led = GET_LED(); led &= ~(1 << (val));  PUT_LED( led); }
+/* ------------------------------------------------------------------------- */
 
 /*
  * Miscelaneous platform dependent initialisations
@@ -39,8 +37,6 @@
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        icache_enable();
 
        /* address for the kernel command line */
@@ -51,31 +47,11 @@ int board_init (void)
        PUT_REG( REG_IOPMODE, 0xFFFF);
        PUT_REG( REG_IOPDATA, 0xFF);
 
-       /* enable LED 7 to show we're alive */
-       SET_LED( 7);
-
-       /* configure free running timer 1 */
-       /* Stop timer 1 */
-       CLR_REG( REG_TMOD, TM1_RUN);
-
-       /* Configure for toggle mode */
-       SET_REG( REG_TMOD, TM1_TOGGLE);
-
-       /* Load Timer data register with count down value */
-       PUT_REG( REG_TDATA1, 0xFFFFFFFF);
-
-       /* Clear timer counter register */
-       PUT_REG( REG_TCNT1, 0x0);
-
-       /* Start timer -- count down timer */
-       SET_REG( REG_TMOD, TM1_RUN);
-
        return 0;
 }
 
 int dram_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size  = PHYS_SDRAM_1_SIZE;
 #if CONFIG_NR_DRAM_BANKS == 2
@@ -84,3 +60,5 @@ int dram_init (void)
 #endif
        return 0;
 }
+
+#endif