aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Reiss <michael.f.reiss@freescale.com>2007-04-13 02:26:19 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:01:04 -0400
commitd5b9049df25f38b3eaf3af48d494b0747aae4349 (patch)
treed2f99a2fc097a9e0c7752f681b7fadc13b2987d1
parent7563907eb8aad8f15b6a39fa6d863c091d83ef48 (diff)
ucc_geth: Implement Transmit on Demand support
Transmit on Demand: Fix spelling in config option, and make it actually enable TOD. Signed-off-by: Michael Reiss <michael.f.reiss@freescale.com> Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c3
-rw-r--r--drivers/net/Kconfig4
-rw-r--r--drivers/net/ucc_geth.c15
-rw-r--r--include/asm-powerpc/ucc_fast.h3
4 files changed, 15 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index a457ac1c6639..66137bf2dfb0 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -210,6 +210,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
210 uf_regs = uccf->uf_regs; 210 uf_regs = uccf->uf_regs;
211 uccf->p_ucce = (u32 *) & (uf_regs->ucce); 211 uccf->p_ucce = (u32 *) & (uf_regs->ucce);
212 uccf->p_uccm = (u32 *) & (uf_regs->uccm); 212 uccf->p_uccm = (u32 *) & (uf_regs->uccm);
213#ifdef CONFIG_UGETH_TX_ON_DEMAND
214 uccf->p_utodr = (u16 *) & (uf_regs->utodr);
215#endif
213#ifdef STATISTICS 216#ifdef STATISTICS
214 uccf->tx_frames = 0; 217 uccf->tx_frames = 0;
215 uccf->rx_frames = 0; 218 uccf->rx_frames = 0;
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 87d69752d86a..545c405a5cb0 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2292,8 +2292,8 @@ config UGETH_FILTERING
2292 bool "Mac address filtering support" 2292 bool "Mac address filtering support"
2293 depends on UCC_GETH 2293 depends on UCC_GETH
2294 2294
2295config UGETH_TX_ON_DEMOND 2295config UGETH_TX_ON_DEMAND
2296 bool "Transmit on Demond support" 2296 bool "Transmit on Demand support"
2297 depends on UCC_GETH 2297 depends on UCC_GETH
2298 2298
2299config MV643XX_ETH 2299config MV643XX_ETH
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 1a16ab20b39e..60844a6f4928 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -1626,14 +1626,6 @@ static int init_phy(struct net_device *dev)
1626} 1626}
1627 1627
1628 1628
1629#ifdef CONFIG_UGETH_TX_ON_DEMOND
1630static int ugeth_transmit_on_demand(struct ucc_geth_private *ugeth)
1631{
1632 struct ucc_fastransmit_on_demand(ugeth->uccf);
1633
1634 return 0;
1635}
1636#endif
1637 1629
1638static int ugeth_graceful_stop_tx(struct ucc_geth_private *ugeth) 1630static int ugeth_graceful_stop_tx(struct ucc_geth_private *ugeth)
1639{ 1631{
@@ -3343,6 +3335,9 @@ static void ucc_geth_timeout(struct net_device *dev)
3343static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) 3335static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
3344{ 3336{
3345 struct ucc_geth_private *ugeth = netdev_priv(dev); 3337 struct ucc_geth_private *ugeth = netdev_priv(dev);
3338#ifdef CONFIG_UGETH_TX_ON_DEMAND
3339 struct ucc_fast_private *uccf;
3340#endif
3346 u8 *bd; /* BD pointer */ 3341 u8 *bd; /* BD pointer */
3347 u32 bd_status; 3342 u32 bd_status;
3348 u8 txQ = 0; 3343 u8 txQ = 0;
@@ -3401,6 +3396,10 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
3401 out_be16(ugeth->p_cpucount[txQ], ugeth->cpucount[txQ]); 3396 out_be16(ugeth->p_cpucount[txQ], ugeth->cpucount[txQ]);
3402 } 3397 }
3403 3398
3399#ifdef CONFIG_UGETH_TX_ON_DEMAND
3400 uccf = ugeth->uccf;
3401 out_be16(uccf->p_utodr, UCC_FAST_TOD);
3402#endif
3404 spin_unlock_irq(&ugeth->lock); 3403 spin_unlock_irq(&ugeth->lock);
3405 3404
3406 return 0; 3405 return 0;
diff --git a/include/asm-powerpc/ucc_fast.h b/include/asm-powerpc/ucc_fast.h
index 39d1c90fd2ca..f529f70b1d82 100644
--- a/include/asm-powerpc/ucc_fast.h
+++ b/include/asm-powerpc/ucc_fast.h
@@ -159,6 +159,9 @@ struct ucc_fast_private {
159 struct ucc_fast *uf_regs; /* a pointer to memory map of UCC regs. */ 159 struct ucc_fast *uf_regs; /* a pointer to memory map of UCC regs. */
160 u32 *p_ucce; /* a pointer to the event register in memory. */ 160 u32 *p_ucce; /* a pointer to the event register in memory. */
161 u32 *p_uccm; /* a pointer to the mask register in memory. */ 161 u32 *p_uccm; /* a pointer to the mask register in memory. */
162#ifdef CONFIG_UGETH_TX_ON_DEMAND
163 u16 *p_utodr; /* pointer to the transmit on demand register */
164#endif
162 int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ 165 int enabled_tx; /* Whether channel is enabled for Tx (ENT) */
163 int enabled_rx; /* Whether channel is enabled for Rx (ENR) */ 166 int enabled_rx; /* Whether channel is enabled for Rx (ENR) */
164 int stopped_tx; /* Whether channel has been stopped for Tx 167 int stopped_tx; /* Whether channel has been stopped for Tx