|
|
@ -36,10 +36,6 @@ |
|
|
|
#include "target/eeprom.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
#include "target/ls1a.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//sw: ioctl in linux to be fixed
|
|
|
|
#define SIOCDEVPRIVATE 0x89f0 |
|
|
@ -509,26 +505,16 @@ s32 synopGMAC_setup_tx_desc_queue(synopGMACdevice * gmacdev,u32 no_of_desc, u32 |
|
|
|
|
|
|
|
DmaDesc *first_desc = NULL; |
|
|
|
//DmaDesc *second_desc = NULL;
|
|
|
|
dma_addr_t dma_addr; |
|
|
|
//dma_addr_t dma_addr;
|
|
|
|
gmacdev->TxDescCount = 0; |
|
|
|
|
|
|
|
TR("Total size of memory required for Tx Descriptors in Ring Mode = 0x%08x\n",((sizeof(DmaDesc) * no_of_desc))); |
|
|
|
// first_desc = plat_alloc_consistent_dmaable_memory (pcidev, sizeof(DmaDesc) * no_of_desc,&dma_addr);
|
|
|
|
#if defined(LOONGSON_2G5536) ||defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
first_desc = (DmaDesc *)plat_alloc_consistent_dmaable_memory (sizeof(DmaDesc) * no_of_desc, &dma_addr); |
|
|
|
else |
|
|
|
first_desc = (DmaDesc *)plat_alloc_memory(sizeof(DmaDesc) * no_of_desc+15); //sw: 128 aligned
|
|
|
|
#else |
|
|
|
first_desc = (DmaDesc *)plat_alloc_memory(sizeof(DmaDesc) * no_of_desc+15); |
|
|
|
#endif |
|
|
|
if(first_desc == NULL){ |
|
|
|
TR("Error in Tx Descriptors memory allocation\n"); |
|
|
|
return -ESYNOPGMACNOMEM; |
|
|
|
} |
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
#endif |
|
|
|
first_desc = ((u32)first_desc) & ~15; |
|
|
|
|
|
|
|
|
|
|
@ -536,17 +522,11 @@ s32 synopGMAC_setup_tx_desc_queue(synopGMACdevice * gmacdev,u32 no_of_desc, u32 |
|
|
|
gmacdev->TxDescCount = no_of_desc; |
|
|
|
gmacdev->TxDesc = first_desc; |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
gmacdev->TxDescDma = dma_addr; |
|
|
|
} else { |
|
|
|
bf1 = (DmaDesc *)CACHED_TO_UNCACHED((unsigned long)(gmacdev->TxDesc)); |
|
|
|
//gmacdev->TxDescDma = (unsigned long)vtophys((unsigned long)bf1);
|
|
|
|
gmacdev->TxDescDma = (unsigned long)UNCACHED_TO_PHYS((unsigned long)bf1); |
|
|
|
} |
|
|
|
#else |
|
|
|
bf1 = (DmaDesc *)CACHED_TO_UNCACHED((unsigned long)(gmacdev->TxDesc)); |
|
|
|
gmacdev->TxDescDma = (unsigned long)UNCACHED_TO_PHYS((unsigned long)bf1); |
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
|
|
|
|
gmacdev->TxDescDma &= 0x0fffffff; |
|
|
|
gmacdev->TxDescDma |= 0x00000000; |
|
|
|
#endif |
|
|
@ -613,25 +593,16 @@ s32 synopGMAC_setup_rx_desc_queue(synopGMACdevice * gmacdev,u32 no_of_desc, u32 |
|
|
|
DmaDesc * bf1; |
|
|
|
DmaDesc *first_desc = NULL; |
|
|
|
//DmaDesc *second_desc = NULL;
|
|
|
|
dma_addr_t dma_addr; |
|
|
|
//dma_addr_t dma_addr;
|
|
|
|
gmacdev->RxDescCount = 0; |
|
|
|
|
|
|
|
TR("total size of memory required for Rx Descriptors in Ring Mode = 0x%08x\n",((sizeof(DmaDesc) * no_of_desc))); |
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
first_desc = (DmaDesc *)plat_alloc_consistent_dmaable_memory (sizeof(DmaDesc) * no_of_desc, &dma_addr); |
|
|
|
else |
|
|
|
first_desc = (DmaDesc *)plat_alloc_memory (sizeof(DmaDesc) * no_of_desc+15);//sw: 2word aligned
|
|
|
|
#else |
|
|
|
first_desc = (DmaDesc *)plat_alloc_memory (sizeof(DmaDesc) * no_of_desc+15); |
|
|
|
#endif |
|
|
|
// first_desc = plat_alloc_consistent_dmaable_memory (pcidev, sizeof(DmaDesc) * no_of_desc, &dma_addr);
|
|
|
|
first_desc = plat_alloc_memory (sizeof(DmaDesc) * no_of_desc+15); //sw: 2word aligned
|
|
|
|
if(first_desc == NULL){ |
|
|
|
TR("Error in Rx Descriptor Memory allocation in Ring mode\n"); |
|
|
|
return -ESYNOPGMACNOMEM; |
|
|
|
} |
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
#endif |
|
|
|
first_desc = (DmaDesc *)((u32)first_desc & ~15); |
|
|
|
|
|
|
|
|
|
|
@ -639,21 +610,16 @@ s32 synopGMAC_setup_rx_desc_queue(synopGMACdevice * gmacdev,u32 no_of_desc, u32 |
|
|
|
gmacdev->RxDesc = first_desc; |
|
|
|
// gmacdev->RxDescDma = dma_addr;
|
|
|
|
|
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
gmacdev->RxDescDma = dma_addr; |
|
|
|
} else { |
|
|
|
bf1 = (DmaDesc *)CACHED_TO_UNCACHED((unsigned long)(gmacdev->RxDesc)); |
|
|
|
gmacdev->RxDescDma = (unsigned long)UNCACHED_TO_PHYS((unsigned long)bf1); |
|
|
|
} |
|
|
|
#else |
|
|
|
bf1 = (DmaDesc *)CACHED_TO_UNCACHED((unsigned long)(gmacdev->RxDesc)); |
|
|
|
//gmacdev->RxDescDma = (unsigned long)vtophys((unsigned long)bf1);
|
|
|
|
gmacdev->RxDescDma = (unsigned long)UNCACHED_TO_PHYS((unsigned long)bf1); |
|
|
|
//gmacdev->RxDesc = bf1;
|
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
gmacdev->RxDescDma |= 0x00000000; |
|
|
|
#endif |
|
|
|
// gmacdev->RxDescDma = (dma_addr_t) first_desc;
|
|
|
|
|
|
|
|
for(i = 0; i < gmacdev -> RxDescCount; i++){ |
|
|
|
for(i =0; i < gmacdev -> RxDescCount; i++){ |
|
|
|
synopGMAC_rx_desc_init_ring(gmacdev->RxDesc + i, i == gmacdev->RxDescCount-1); |
|
|
|
#if SYNOP_TOP_DEBUG |
|
|
|
TR("%02d %08x \n",i, (unsigned int)(gmacdev->RxDesc + i)); |
|
|
@ -1008,11 +974,6 @@ void synop_handle_received_data(struct synopGMACNetworkAdapter* tp) |
|
|
|
; |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
dma_addr1 = plat_dma_map_single(gmacdev,data1,RX_BUF_SIZE,SYNC_R); |
|
|
|
} |
|
|
|
#endif |
|
|
|
len = synopGMAC_get_rx_desc_frame_length(status) - 4; //Not interested in Ethernet CRC bytes
|
|
|
|
bcopy((char *)data1, mtod(skb, char *), len); |
|
|
|
|
|
|
@ -1054,10 +1015,6 @@ void synop_handle_received_data(struct synopGMACNetworkAdapter* tp) |
|
|
|
|
|
|
|
ether_input(ifp, eh, skb); |
|
|
|
memset((u32)data1,0,RX_BUF_SIZE); |
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
pci_sync_cache(NULL, (vm_offset_t)data1, RX_BUF_SIZE, SYNC_W); |
|
|
|
#endif |
|
|
|
adapter->synopGMACNetStats.rx_packets++; |
|
|
|
adapter->synopGMACNetStats.rx_bytes += len; |
|
|
|
} |
|
|
@ -1069,12 +1026,8 @@ void synop_handle_received_data(struct synopGMACNetworkAdapter* tp) |
|
|
|
adapter->synopGMACNetStats.rx_length_errors += synopGMAC_is_rx_frame_length_errors(status); |
|
|
|
} |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
dma_addr1 = (unsigned long)CACHED_TO_PHYS((unsigned long)(data1)); |
|
|
|
} |
|
|
|
#else |
|
|
|
dma_addr1 = (unsigned long)CACHED_TO_PHYS((unsigned long)(data1)); |
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
dma_addr1 |= 0x00000000; |
|
|
|
#endif |
|
|
|
desc_index = synopGMAC_set_rx_qptr(gmacdev,dma_addr1, RX_BUF_SIZE, (u32)data1,0,0,0); |
|
|
@ -1142,9 +1095,9 @@ int synopGMAC_intr_handler(struct synopGMACNetworkAdapter * tp) |
|
|
|
if(dma_status_reg == 0) |
|
|
|
return 0; |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
#endif |
|
|
|
//if(dma_status_reg & 0x04) //sw: dbg
|
|
|
|
// printf("Tx Desc Unavailable! 0x%x \n",dma_status_reg);
|
|
|
|
|
|
|
|
if(dma_status_reg == 0x660004) //sw: dbg
|
|
|
|
return 0; |
|
|
|
|
|
|
@ -1294,13 +1247,9 @@ int synopGMAC_intr_handler(struct synopGMACNetworkAdapter * tp) |
|
|
|
// return -ESYNOPGMACNOMEM;
|
|
|
|
} |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) || defined(LOONGSON_2G5536) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
dma_addr = plat_dma_map_single(gmacdev,skb,RX_BUF_SIZE,SYNC_R); |
|
|
|
else |
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(skb)); |
|
|
|
#else |
|
|
|
//dma_addr = (u32)skb;
|
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(skb)); |
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
dma_addr |= 0x00000000; |
|
|
|
#endif |
|
|
|
status = synopGMAC_set_rx_qptr(gmacdev,dma_addr,RX_BUF_SIZE, (u32)skb,0,0,0); |
|
|
@ -1439,10 +1388,9 @@ unsigned long synopGMAC_linux_open(struct synopGMACNetworkAdapter *tp) |
|
|
|
#endif |
|
|
|
/*Attach the device to MAC struct This will configure all the required base addresses
|
|
|
|
such as Mac base, configuration base, phy base address(out of 32 possible phys )*/ |
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
synopGMAC_set_mac_addr(gmacdev,GmacAddr0High,GmacAddr0Low, PInetdev->dev_addr); |
|
|
|
#else |
|
|
|
// synopGMAC_attach(synopGMACadapter->synopGMACdev,(u32) synopGMACMappedAddr + MACBASE,(u32) synopGMACMappedAddr + DMABASE, DEFAULT_PHY_BASE);
|
|
|
|
//synopGMAC_attach(adapter->synopGMACdev,(u64) synopGMACMappedAddr + MACBASE,(u64) synopGMACMappedAddr + DMABASE, DEFAULT_PHY_BASE,PInetdev->dev_addr);
|
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
synopGMAC_set_mac_addr(adapter->synopGMACdev, GmacAddr0High, GmacAddr0Low, PInetdev->dev_addr); |
|
|
|
#endif |
|
|
|
/*Lets read the version of ip in to device structure*/ |
|
|
@ -1536,22 +1484,20 @@ unsigned long synopGMAC_linux_open(struct synopGMACNetworkAdapter *tp) |
|
|
|
break; |
|
|
|
// return -ESYNOPGMACNOMEM;
|
|
|
|
} |
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
dma_addr = plat_dma_map_single(gmacdev,skb,RX_BUF_SIZE,SYNC_R); |
|
|
|
} else { |
|
|
|
skb1 = (u32)CACHED_TO_UNCACHED((unsigned long)(skb)); |
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(skb1)); |
|
|
|
} |
|
|
|
#else |
|
|
|
|
|
|
|
skb1 = (u32)CACHED_TO_UNCACHED((unsigned long)(skb)); |
|
|
|
//dma_addr = (unsigned long)vtophys((unsigned long)(skb1));
|
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(skb1)); |
|
|
|
|
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
dma_addr &= 0x0fffffff; |
|
|
|
dma_addr |= 0x00000000; |
|
|
|
#endif |
|
|
|
// TR("rx_buf_PTR:%x, skb1:%x, dma_addr%x\n",skb, skb1, dma_addr);
|
|
|
|
|
|
|
|
|
|
|
|
// dbgdesc = gmacdev->RxNextDesc + 12;
|
|
|
|
//status = synopGMAC_set_rx_qptr_init(gmacdev,dma_addr,RX_BUF_SIZE, (u32)skb,0,0,0);
|
|
|
|
status = synopGMAC_set_rx_qptr(gmacdev,dma_addr,RX_BUF_SIZE, (u32)skb,0,0,0); |
|
|
|
//pci_sync_cache(0, (vm_offset_t)skb, len, SYNC_W);
|
|
|
|
//printf("==rx sync cache\n");
|
|
|
@ -1770,9 +1716,6 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
return -1; |
|
|
|
} |
|
|
|
#ifdef FIX_CACHE_ADDR_UNALIGNED /*fixed by tangyt 2011-03-20*/ |
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
#endif |
|
|
|
while(bf1 & 0x10) |
|
|
|
{ |
|
|
|
plat_free_memory((void *)(bf1)); |
|
|
@ -1800,11 +1743,6 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
//sw: i don't know weather it's right
|
|
|
|
m_copydata(skb, 0, len,(char *)bf1); |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
dma_addr = plat_dma_map_single(gmacdev,bf1,len,SYNC_W); |
|
|
|
} |
|
|
|
#endif |
|
|
|
/*
|
|
|
|
if(len < 64) |
|
|
|
len = 64; |
|
|
@ -1814,9 +1752,6 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
printf("==tx pkg len: %d",len); |
|
|
|
#endif |
|
|
|
//sw: dbg
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) |
|
|
|
#endif |
|
|
|
eh = mtod(skb, struct ether_header *); |
|
|
|
#if SYNOP_TX_DEBUG |
|
|
|
dumppkghd(eh,0); |
|
|
@ -1836,20 +1771,16 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
plat_free_memory(skb); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G5536) || defined(LOONGSON_2G1A) |
|
|
|
if (gmacdev->MacBase != LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
bf2 = (u32)CACHED_TO_UNCACHED((unsigned long)bf1); |
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(bf2)); |
|
|
|
} |
|
|
|
#else |
|
|
|
bf2 = (u32)CACHED_TO_UNCACHED((unsigned long)bf1); |
|
|
|
//dma_addr = (unsigned long)vtophys((unsigned long)(bf2));
|
|
|
|
dma_addr = (unsigned long)UNCACHED_TO_PHYS((unsigned long)(bf2)); |
|
|
|
|
|
|
|
#if (!defined(LOONGSON_2G5536))&&(!defined(LOONGSON_2G1A)) |
|
|
|
dma_addr &= 0x0fffffff; |
|
|
|
dma_addr |= 0x00000000; |
|
|
|
#endif |
|
|
|
|
|
|
|
//status = synopGMAC_set_tx_qptr(gmacdev, dma_addr, TX_BUF_SIZE, bf1,0,0,0,offload_needed);
|
|
|
|
// status = synopGMAC_set_tx_qptr(gmacdev, dma_addr, TX_BUF_SIZE, bf1,0,0,0,offload_needed);
|
|
|
|
|
|
|
|
status = synopGMAC_set_tx_qptr(gmacdev, dma_addr, len, bf1,0,0,0,offload_needed,&index,dpr); |
|
|
|
// printf("synopGMAC_set_tx_qptr: index = %d, dma_addr = %08x, len = %02x, buf1 = %08x\n", index, dma_addr, len, bf1);
|
|
|
@ -1865,7 +1796,7 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
#if SYNOP_TX_DEBUG |
|
|
|
TR("%s No More Free Tx Descriptors\n",__FUNCTION__); |
|
|
|
#endif |
|
|
|
//dev_kfree_skb (skb); //with this, system used to freeze.. ??
|
|
|
|
// dev_kfree_skb (skb); //with this, system used to freeze.. ??
|
|
|
|
return -EBUSY; |
|
|
|
} |
|
|
|
} |
|
|
@ -1914,8 +1845,8 @@ s32 synopGMAC_linux_xmit_frames(struct ifnet* ifp) |
|
|
|
*/ |
|
|
|
struct net_device_stats * synopGMAC_linux_get_stats(struct synopGMACNetworkAdapter *tp) |
|
|
|
{ |
|
|
|
TR("%s called \n",__FUNCTION__); |
|
|
|
return( &(((struct synopGMACNetworkAdapter *)(tp))->synopGMACNetStats) ); |
|
|
|
TR("%s called \n",__FUNCTION__); |
|
|
|
return( &(((struct synopGMACNetworkAdapter *)(tp))->synopGMACNetStats) ); |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
@ -2024,47 +1955,18 @@ void set_phy_manu(synopGMACdevice * gmacdev) |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
static int rtl88e1111_config_init(synopGMACdevice *gmacdev) |
|
|
|
{ |
|
|
|
int retval, err; |
|
|
|
u16 data; |
|
|
|
|
|
|
|
synopGMAC_read_phy_reg(gmacdev->MacBase,gmacdev->PhyBase,0x14,&data); |
|
|
|
data = data | 0x82; |
|
|
|
err = synopGMAC_write_phy_reg(gmacdev->MacBase,gmacdev->PhyBase,0x14,data); |
|
|
|
synopGMAC_read_phy_reg(gmacdev->MacBase,gmacdev->PhyBase,0x00,&data); |
|
|
|
data = data | 0x8000; |
|
|
|
err = synopGMAC_write_phy_reg(gmacdev->MacBase,gmacdev->PhyBase,0x00,data); |
|
|
|
|
|
|
|
if (err < 0) |
|
|
|
return err; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(LOONGSON_2G1A) |
|
|
|
int init_phy(synopGMACdevice *gmacdev) |
|
|
|
#else |
|
|
|
int init_phy(struct synopGMACdevice *gmacdev) |
|
|
|
#endif |
|
|
|
{ |
|
|
|
int retval; |
|
|
|
#if defined(LOONGSON_2G1A) || defined(LOONGSON_2G5536) |
|
|
|
u16 data; |
|
|
|
if (gmacdev->MacBase == LS1A_GMAC0_REG_BASE + MACBASE) { |
|
|
|
synopGMAC_read_phy_reg(gmacdev->MacBase,gmacdev->PhyBase,2,&data); |
|
|
|
if(data == 0x141) |
|
|
|
rtl88e1111_config_init(gmacdev); |
|
|
|
return 0; |
|
|
|
} else { |
|
|
|
retval = rtl8211_config_init(gmacdev); |
|
|
|
return retval; |
|
|
|
} |
|
|
|
#else |
|
|
|
|
|
|
|
//retval = bcm54xx_config_init(gmacdev);
|
|
|
|
|
|
|
|
retval = rtl8211_config_init(gmacdev); |
|
|
|
// synopGMAC_phy_loopback(gmacdev, SYNOP_PHY_LOOPBACK);
|
|
|
|
//if(retval != 0)
|
|
|
|
return retval; |
|
|
|
#endif |
|
|
|
// return 0;
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2693,12 +2595,12 @@ s32 synopGMAC_init_network_interface(char* xname,u64 synopGMACMappedAddr) |
|
|
|
struct synopGMACNetworkAdapter * synopGMACadapter; |
|
|
|
|
|
|
|
static int syn_num; |
|
|
|
|
|
|
|
{ |
|
|
|
if(0x90000c0000000000LL == synopGMACMappedAddr) |
|
|
|
parseenv(0,mac_addr0); |
|
|
|
else |
|
|
|
parseenv(1,mac_addr0); |
|
|
|
|
|
|
|
} |
|
|
|
#else |
|
|
|
s32 synopGMAC_init_network_interface(char* xname, struct device *sc ) |
|
|
|
{ |
|
|
|