]> git.sur5r.net Git - u-boot/commitdiff
tsec: Allow Ten Bit Interface address to be configurable
authorJoe Hamman <joe.hamman@embeddedspecialties.com>
Thu, 9 Aug 2007 14:08:18 +0000 (09:08 -0500)
committerWolfgang Denk <wd@denx.de>
Thu, 9 Aug 2007 20:10:44 +0000 (22:10 +0200)
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>

drivers/tsec.c
drivers/tsec.h

index 60bef9af39472c4fc4a6623a7070845ba698afd4..c9e7f97e7fbaa1de9696d243d3e1cf47c4ee5f44 100644 (file)
@@ -296,9 +296,9 @@ static int init_phy(struct eth_device *dev)
        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) */
index 7bf3dee2b6859ae67860c0b12a69ab1791ccfea3..2f0092ad59888d6502ca245a0da5634b940f558d 100644 (file)
@@ -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