Merge branch 'master' of git://git.denx.de/u-boot-nios
[oweals/u-boot.git] / include / configs / MPC8260ADS.h
index d6e44773d4f7f92363327e6ce8feb91875728ea0..ffd37fd933968b1a693020ac88ddde78147af2b6 100644 (file)
@@ -17,6 +17,8 @@
  * Vitaly Bordug <vbordug@ru.mvista.com>
  * Added support for PCI bridge on MPC8272ADS
  *
+ * Copyright (C) Freescale Semiconductor, Inc. 2006-2009.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -79,6 +81,7 @@
 #endif /* CONFIG_ADSTYPE == CONFIG_SYS_8272ADS */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1    /* Call board_early_init_f      */
+#define CONFIG_RESET_PHY_R     1       /* Call reset_phy()             */
 
 /* allow serial and ethaddr to be overwritten */
 #define CONFIG_ENV_OVERWRITE
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT      2               /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ( \
+                               (immap_t *) CONFIG_SYS_IMMR, MDIO_PORT )
+#define MDC_DECLARE    MDIO_DECLARE
 
 #if CONFIG_ADSTYPE == CONFIG_SYS_8272ADS
 #define CONFIG_SYS_MDIO_PIN    0x00002000      /* PC18 */
 #define CONFIG_OF_LIBFDT       1
 #define CONFIG_OF_BOARD_SETUP  1
 #if defined(CONFIG_OF_LIBFDT)
-#define OF_CPU                 "cpu@0"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 #endif
 
 #define CONFIG_HAS_ETH1
 #endif
 
+#define CONFIG_NETDEV eth0
+#define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */
+
+#define XMK_STR(x)     #x
+#define MK_STR(x)      XMK_STR(x)
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "netdev=" MK_STR(CONFIG_NETDEV) "\0"                            \
+       "tftpflash=tftpboot $loadaddr $uboot; "                         \
+               "protect off " MK_STR(TEXT_BASE) " +$filesize; "        \
+               "erase " MK_STR(TEXT_BASE) " +$filesize; "              \
+               "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; "      \
+               "protect on " MK_STR(TEXT_BASE) " +$filesize; "         \
+               "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0"     \
+       "fdtaddr=400000\0"                                              \
+       "console=ttyCPM0\0"                                             \
+       "setbootargs=setenv bootargs "                                  \
+               "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
+       "setipargs=setenv bootargs nfsroot=$serverip:$rootpath "         \
+               "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+               "root=$rootdev rw console=$console,$baudrate $othbootargs\0"
+
+#define CONFIG_NFSBOOTCOMMAND                                          \
+       "setenv rootdev /dev/nfs;"                                      \
+       "run setipargs;"                                                \
+       "tftp $loadaddr $bootfile;"                                     \
+       "tftp $fdtaddr $fdtfile;"                                       \
+       "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_RAMBOOTCOMMAND                                          \
+       "setenv rootdev /dev/ram;"                                      \
+       "run setbootargs;"                                              \
+       "tftp $ramdiskaddr $ramdiskfile;"                               \
+       "tftp $loadaddr $bootfile;"                                     \
+       "tftp $fdtaddr $fdtfile;"                                       \
+       "bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#undef MK_STR
+#undef XMK_STR
+
 #endif /* __CONFIG_H */