public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joe Hamman <joe.hamman@embeddedspecialties.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] tsec: Allow Ten Bit Interface address to be configurable
Date: Thu, 09 Aug 2007 09:08:18 -0500	[thread overview]
Message-ID: <1186668498.6862.4.camel@server> (raw)

Allow the address of the Ten Bit Interface (TBI) to be changed in the
event of a conflict with another device.

Signed-off by: Joe Hamman <joe.hamman@embeddedspecialties.com>

diff -uprN -X ../dontdiff a/drivers/tsec.c b/drivers/tsec.c
--- a/drivers/tsec.c	2007-08-09 08:35:02.000000000 -0500
+++ b/drivers/tsec.c	2007-08-09 08:31:34.000000000 -0500
@@ -296,9 +296,9 @@ static int init_phy(struct eth_device *d
 	volatile tsec_t *regs = (volatile tsec_t *)(TSEC_BASE_ADDR);
 
 	/* Assign a Physical address to the TBI */
-	regs->tbipa = TBIPA_VALUE;
+	regs->tbipa = CFG_TBIPA_VALUE;
 	regs = (volatile tsec_t *)(TSEC_BASE_ADDR + TSEC_SIZE);
-	regs->tbipa = TBIPA_VALUE;
+	regs->tbipa = CFG_TBIPA_VALUE;
 	asm("sync");
 
 	/* Reset MII (due to new addresses) */
diff -uprN -X ../dontdiff a/drivers/tsec.h b/drivers/tsec.h
--- a/drivers/tsec.h	2007-08-09 08:35:02.000000000 -0500
+++ b/drivers/tsec.h	2007-08-09 08:31:04.000000000 -0500
@@ -70,7 +70,9 @@
 #define miim_end -2
 #define miim_read -1
 
-#define TBIPA_VALUE		0x1f
+#ifndef CFG_TBIPA_VALUE
+    #define CFG_TBIPA_VALUE	0x1f
+#endif
 #define MIIMCFG_INIT_VALUE	0x00000003
 #define MIIMCFG_RESET		0x80000000
 

             reply	other threads:[~2007-08-09 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09 14:08 Joe Hamman [this message]
2007-08-09 20:14 ` [U-Boot-Users] [PATCH] tsec: Allow Ten Bit Interface address to be configurable 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=1186668498.6862.4.camel@server \
    --to=joe.hamman@embeddedspecialties.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