public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tor Krill <tor@excito.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] Allow PHY addresses on kirkwood egiga to be non continuous.
Date: Thu, 24 Jun 2010 09:55:16 +0200	[thread overview]
Message-ID: <1277366121-14683-2-git-send-email-tor@excito.com> (raw)
In-Reply-To: <1277366121-14683-1-git-send-email-tor@excito.com>

Changing its configuration from PHY_BASE_ADR single value to use
CONFIG_PHY_ADDRS as an array with adresses.

Signed-off-by: Tor Krill <tor@excito.com>
---
 drivers/net/kirkwood_egiga.c |    3 ++-
 drivers/net/kirkwood_egiga.h |    8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 932792e..7993e51 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -629,6 +629,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
 	int devnum;
 	char *s;
 	u8 used_ports[MAX_KWGBE_DEVS] = CONFIG_KIRKWOOD_EGIGA_PORTS;
+	u8 port_addr[MAX_KWGBE_DEVS] = PHY_ADDRS;
 
 	for (devnum = 0; devnum < MAX_KWGBE_DEVS; devnum++) {
 		/*skip if port is configured not to use */
@@ -712,7 +713,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
 		miiphy_register(dev->name, smi_reg_read, smi_reg_write);
 		/* Set phy address of the port */
 		miiphy_write(dev->name, KIRKWOOD_PHY_ADR_REQUEST,
-				KIRKWOOD_PHY_ADR_REQUEST, PHY_BASE_ADR + devnum);
+				KIRKWOOD_PHY_ADR_REQUEST, port_addr[devnum]);
 #endif
 	}
 	return 0;
diff --git a/drivers/net/kirkwood_egiga.h b/drivers/net/kirkwood_egiga.h
index 30c773c..6ff3bb7 100644
--- a/drivers/net/kirkwood_egiga.h
+++ b/drivers/net/kirkwood_egiga.h
@@ -30,11 +30,11 @@
 
 #define MAX_KWGBE_DEVS	2	/*controller has two ports */
 
-/* PHY_BASE_ADR is board specific and can be configured */
-#if defined (CONFIG_PHY_BASE_ADR)
-#define PHY_BASE_ADR		CONFIG_PHY_BASE_ADR
+/* PHY addresses is board specific and can be configured */
+#if defined (CONFIG_PHY_ADDRS)
+#define PHY_ADDRS		CONFIG_PHY_ADDRS
 #else
-#define PHY_BASE_ADR		0x08	/* default phy base addr */
+#define PHY_ADDRS		{0x08,0x09}	/* default phy base addr */
 #endif
 
 /* Constants */
-- 
1.7.0.4

  reply	other threads:[~2010-06-24  7:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24  7:55 [U-Boot] [PATCH 0/6] Update kirkwood egiga to allow dynamic phy addrs Tor Krill
2010-06-24  7:55 ` Tor Krill [this message]
2010-06-24  7:55 ` [U-Boot] [PATCH 2/6] Convert Suen3 board to use array of " Tor Krill
2010-06-24  7:55 ` [U-Boot] [PATCH 3/6] Convert Sheevaplug " Tor Krill
2010-06-24  7:55 ` [U-Boot] [PATCH 4/6] Convert OpenRD " Tor Krill
2010-06-24  7:55 ` [U-Boot] [PATCH 5/6] Convert Guruplug " Tor Krill
2010-06-24  7:55 ` [U-Boot] [PATCH 6/6] Convert rd6281a " Tor Krill
2010-06-24  9:11 ` [U-Boot] [PATCH 0/6] Update kirkwood egiga to allow dynamic " Wolfgang Denk
2010-06-24  9:17   ` Tor Krill
  -- strict thread matches above, loose matches on Subject: below --
2010-06-24  9:00 Tor Krill
2010-06-24  9:00 ` [U-Boot] [PATCH 1/6] Allow PHY addresses on kirkwood egiga to be non continuous Tor Krill
2010-06-24  9:12   ` Wolfgang Denk
2010-06-23 16:04 [U-Boot] [PATCH 0/6] Update kirkwood egiga to allow dynamic phy addrs Tor Krill
2010-06-23 16:04 ` [U-Boot] [PATCH 1/6] Allow PHY addresses on kirkwood egiga to be non continuous Tor Krill

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=1277366121-14683-2-git-send-email-tor@excito.com \
    --to=tor@excito.com \
    --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