Skip to contentSkip to conversation

tsec: Allow Ten Bit Interface address to be configurable

PATCH New Joe Hamman 2 participants 2 messages Aug 9, 2007

lore
Share & tools
lore

Joe Hamman

author
#0 lore raw

PATCH 1/1 tsec: Allow Ten Bit Interface address to be configurable

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 <[email protected]>

drivers/tsec.c +2 -2
diff -uprN -X ../dontdiff a/drivers/tsec.c b/drivers/tsec.c
@@ -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) */
drivers/tsec.h +3 -1
diff -uprN -X ../dontdiff a/drivers/tsec.h b/drivers/tsec.h
@@ -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
 
#1 lore raw

PATCH 1/1 tsec: Allow Ten Bit Interface address to be configurable

Quoted 4 lines · In message <1186668498.6862.4.camel@server> you wrote:

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 <[email protected]>

Added, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All these theories, diverse as they are, have two things  in  common:
they explain the observed facts, and they are completeley and utterly
wrong.                       - Terry Pratchett, _The Light Fantastic_