]> git.sur5r.net Git - u-boot/commitdiff
mpc52xx, digsy_mtc: change phy addr for rev5 boards.
authorHeiko Schocher <hs@denx.de>
Sun, 3 Apr 2011 20:10:20 +0000 (20:10 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 27 Apr 2011 22:52:09 +0000 (00:52 +0200)
- rev5 board has phy addr 1 -> adapt CONFIG_PHY_ADDR define
  in board config file.
- also fixup the phy addr entry in dts, before booting
  Linux.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
board/digsy_mtc/digsy_mtc.c
include/configs/digsy_mtc.h

index cbfdc9edff6755b07ad3e4bc4aecc8725b51a8f4..79cb3f1343d3344fc89ca00c4445b7c805e963b2 100644 (file)
@@ -405,6 +405,9 @@ int update_flash_size (int flash_size)
 
 void ft_board_setup(void *blob, bd_t *bd)
 {
+       int phy_addr = CONFIG_PHY_ADDR;
+       char eth_path[] = "/soc5200@f0000000/mdio@3000/ethernet-phy@0";
+
        ft_cpu_setup(blob, bd);
        /*
         * There are 2 RTC nodes in the DTS, so remove
@@ -422,5 +425,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
        ft_adapt_flash_base(blob);
 #endif
+       /* fix up the phy address */
+       do_fixup_by_path(blob, eth_path, "reg", &phy_addr, sizeof(int), 0);
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
index f1613c7ac790dc38e8341737999fc2c8e86bfcc9..c738b3ab4444d1833328692738da6d4c9d5728a1 100644 (file)
  */
 #define CONFIG_MPC5xxx_FEC     1
 #define CONFIG_MPC5xxx_FEC_MII100
+#if defined(CONFIG_DIGSY_REV5)
+#define CONFIG_PHY_ADDR                0x01
+#else
 #define CONFIG_PHY_ADDR                0x00
+#endif
 #define CONFIG_PHY_RESET_DELAY 1000
 
 #define CONFIG_NETCONSOLE              /* include NetConsole support   */