* [PATCH] tsec: Allow Ten Bit Interface to be configurable
@ 2007-08-13 22:28 Joe Hamman
2007-08-14 2:07 ` Xilinx EMAC driver for Linux in polling mode Leonid
0 siblings, 1 reply; 2+ messages in thread
From: Joe Hamman @ 2007-08-13 22:28 UTC (permalink / raw)
To: galak; +Cc: linuxppc-embedded
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 --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 81ef81c..ba67b3b 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2276,6 +2276,14 @@ config GFAR_NAPI
bool "NAPI Support"
depends on GIANFAR
+config GFAR_TBIPA_VALUE
+ hex "Ten Bit Interface Port Address Value"
+ depends on GIANFAR
+ range 0 0x1f if BFIN_MAC_USE_L1
+ default "0x1f"
+ help
+ Select an address that does not conflict with other addresses on the board.
+
config UCC_GETH
tristate "Freescale QE Gigabit Ethernet"
depends on QUICC_ENGINE
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index f926905..91ae0d3 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -490,15 +490,15 @@ static void gfar_configure_serdes(struct net_device *dev)
/* Initialise TBI i/f to communicate with serdes (lynx phy) */
/* Single clk mode, mii mode off(for aerdes communication) */
- gfar_local_mdio_write(regs, TBIPA_VALUE, MII_TBICON, TBICON_CLK_SELECT);
+ gfar_local_mdio_write(regs, CONFIG_GFAR_TBIPA_VALUE, MII_TBICON, TBICON_CLK_SELECT);
/* Supported pause and full-duplex, no half-duplex */
- gfar_local_mdio_write(regs, TBIPA_VALUE, MII_ADVERTISE,
+ gfar_local_mdio_write(regs, CONFIG_GFAR_TBIPA_VALUE, MII_ADVERTISE,
ADVERTISE_1000XFULL | ADVERTISE_1000XPAUSE |
ADVERTISE_1000XPSE_ASYM);
/* ANEG enable, restart ANEG, full duplex mode, speed[1] set */
- gfar_local_mdio_write(regs, TBIPA_VALUE, MII_BMCR, BMCR_ANENABLE |
+ gfar_local_mdio_write(regs, CONFIG_GFAR_TBIPA_VALUE, MII_BMCR, BMCR_ANENABLE |
BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000);
}
@@ -547,7 +547,7 @@ static void init_registers(struct net_device *dev)
gfar_write(&priv->regs->minflr, MINFLR_INIT_SETTINGS);
/* Assign the TBI an address which won't conflict with the PHYs */
- gfar_write(&priv->regs->tbipa, TBIPA_VALUE);
+ gfar_write(&priv->regs->tbipa, CONFIG_GFAR_TBIPA_VALUE);
}
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index d8e779c..0fd1c02 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -131,7 +131,6 @@ extern const char gfar_driver_version[];
#define DEFAULT_RXCOUNT 16
#define DEFAULT_RXTIME 4
-#define TBIPA_VALUE 0x1f
#define MIIMCFG_INIT_VALUE 0x00000007
#define MIIMCFG_RESET 0x80000000
#define MIIMIND_BUSY 0x00000001
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Xilinx EMAC driver for Linux in polling mode.
2007-08-13 22:28 [PATCH] tsec: Allow Ten Bit Interface to be configurable Joe Hamman
@ 2007-08-14 2:07 ` Leonid
0 siblings, 0 replies; 2+ messages in thread
From: Leonid @ 2007-08-14 2:07 UTC (permalink / raw)
To: linuxppc-embedded
Does anyboady have adapter.c file (or any source code) for Linux kernel
driver for Xilinx EMAC IP core, WORKING in POLLING mode? For certain
reasons I cannot use interrupt in my system.
Thanks,
Leonid.=20
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-14 2:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 22:28 [PATCH] tsec: Allow Ten Bit Interface to be configurable Joe Hamman
2007-08-14 2:07 ` Xilinx EMAC driver for Linux in polling mode Leonid
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.