From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] mpc52xx, digsy_mtc: change phy addr for rev5 boards.
Date: Mon, 4 Apr 2011 08:10:20 +0200 [thread overview]
Message-ID: <1301897422-27326-2-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1301897422-27326-1-git-send-email-hs@denx.de>
- 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>
---
board/digsy_mtc/digsy_mtc.c | 5 +++++
include/configs/digsy_mtc.h | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/board/digsy_mtc/digsy_mtc.c b/board/digsy_mtc/digsy_mtc.c
index cbfdc9e..79cb3f1 100644
--- a/board/digsy_mtc/digsy_mtc.c
+++ b/board/digsy_mtc/digsy_mtc.c
@@ -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 at f0000000/mdio at 3000/ethernet-phy at 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) */
diff --git a/include/configs/digsy_mtc.h b/include/configs/digsy_mtc.h
index d9be2b5..d4ca30e 100644
--- a/include/configs/digsy_mtc.h
+++ b/include/configs/digsy_mtc.h
@@ -348,7 +348,11 @@
*/
#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 */
--
1.7.4
next prev parent reply other threads:[~2011-04-04 6:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 6:10 [U-Boot] [PATCH 0/3] powerpc, mpc52xx: update for digsy_mtc support Heiko Schocher
2011-04-04 6:10 ` Heiko Schocher [this message]
2011-04-04 9:44 ` [U-Boot] [PATCH 1/3] mpc52xx, digsy_mtc: change phy addr for rev5 boards Detlev Zundel
2011-04-27 22:52 ` Wolfgang Denk
2011-04-04 6:10 ` [U-Boot] [PATCH 2/3] mtd, cfi: introduce void flash_protect_default(void) Heiko Schocher
2011-04-07 8:21 ` Stefan Roese
2011-04-04 6:10 ` [U-Boot] [PATCH 3/3] mpc52xx, digsy_mtc: protect default flash sectors Heiko Schocher
2011-04-27 22:52 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301897422-27326-2-git-send-email-hs@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox