Update latest codes
[platform/kernel/u-boot.git] / board / atmel / at91rm9200dk / at91rm9200dk.c
index c564f73..49b5fe3 100644 (file)
  */
 
 #include <common.h>
+#include <exports.h>
+#include <netdev.h>
 #include <asm/arch/AT91RM9200.h>
+#include <asm/io.h>
+
+#if defined(CONFIG_DRIVER_ETHER)
 #include <at91rm9200_net.h>
 #include <dm9161.h>
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -47,13 +53,23 @@ int board_init (void)
        /* so we do _nothing_ here */
 
        /* arch number of AT91RM9200DK-Board */
-       gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200;
+       gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200DK;
        /* adress of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
        return 0;
 }
 
+void board_reset (void)
+{
+       AT91PS_PIO pio = AT91C_BASE_PIOA;
+
+       /* Clear PA19 to trigger the hard reset */
+       writel(0x00080000, pio->PIO_CODR);
+       writel(0x00080000, pio->PIO_OER);
+       writel(0x00080000, pio->PIO_PER);
+}
+
 int dram_init (void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM;
@@ -85,6 +101,15 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
 #endif
 #endif /* CONFIG_DRIVER_ETHER */
 
+#ifdef CONFIG_DRIVER_AT91EMAC
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+       rc = at91emac_register(bis, 0);
+       return rc;
+}
+#endif
+
 /*
  * Disk On Chip (NAND) Millenium initialization.
  * The NAND lives in the CS2* space