summaryrefslogtreecommitdiff
path: root/cleopatre/u-boot-1.1.6/drivers
diff options
context:
space:
mode:
authordraskovic2009-02-06 16:57:23 +0000
committerdraskovic2009-02-06 16:57:23 +0000
commitcf2fcb9f41fde2112711c4e088856694b7365c0f (patch)
tree410355c80ebc45e574139b16ce63393334d29865 /cleopatre/u-boot-1.1.6/drivers
parentda4a6ccf283f93275a58e286b352f89bad51da30 (diff)
[CLEO][UBOOT] Eth driver code clean
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@3943 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre/u-boot-1.1.6/drivers')
-rw-r--r--cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
index 886099317a..e121c10087 100644
--- a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
+++ b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
@@ -547,16 +547,14 @@ static void init_dma_desc_rings (void)
PRINTK ("allocate and init the DMA RX/TX lists\n");
/* Clean out uncached buffers */
-
- //flush_cache (&dma, sizeof (struct dma_t));
+ flush_cache (&dma, sizeof (struct dma_t));
/* Allocate memory for the DMA RX/TX buffer descriptors */
dma_rx = (volatile spcmac_dma_des *) (&dma.desc_rx[0]);
dma_tx = (volatile spcmac_dma_des *) (&dma.desc_tx[0]);
cur_rx = 0;
-
-cur_tx = 0;
+ cur_tx = 0;
if ((dma_rx == NULL) || (dma_tx == NULL)) {
printf ("%s:ERROR allocating the DMA Tx/Rx desc\n",
@@ -773,11 +771,11 @@ int spcmac_eth_tx (volatile uchar * data, int len)
uint now = get_timer (0);
uint status = 0;
- unsigned int value;
- int pos;
+ unsigned int value;
+ int pos;
- pos = cur_tx;
- p += pos;
+ pos = cur_tx;
+ p += pos;
while ((p->des0 & OWN_BIT)
&& (get_timer (now) < CONFIG_SPCMAC_TX_TIMEOUT)) {
@@ -825,7 +823,7 @@ int spcmac_eth_tx (volatile uchar * data, int len)
check_tx_error_summary (p->des0);
- if (p->des1 & DES1_CONTROL_TER)
+ if (p->des1 & DES1_CONTROL_TER)
pos = 0;
else
pos++;