X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Finca-ip_sw.c;h=f0f62deaf8e0d0e95dd0c4682c58c70823100e8e;hb=10cbe3b6a4b2289906fc94bb26810191607ee748;hp=a079b600307e296ae5ae675495804d4548d33eb2;hpb=7daf2ebe9196dd67131a06d85049c3a8a08ca413;p=u-boot diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c index a079b60030..f0f62deaf8 100644 --- a/drivers/net/inca-ip_sw.c +++ b/drivers/net/inca-ip_sw.c @@ -26,11 +26,9 @@ #include -#if defined(CONFIG_CMD_NET) \ - && defined(CONFIG_NET_MULTI) && defined(CONFIG_INCA_IP_SWITCH) - #include #include +#include #include #include @@ -160,7 +158,7 @@ static int initialized = 0; static int inca_switch_init(struct eth_device *dev, bd_t * bis); -static int inca_switch_send(struct eth_device *dev, volatile void *packet, int length); +static int inca_switch_send(struct eth_device *dev, void *packet, int length); static int inca_switch_recv(struct eth_device *dev); static void inca_switch_halt(struct eth_device *dev); static void inca_init_switch_chip(void); @@ -202,7 +200,7 @@ int inca_switch_initialize(bd_t * bis) printf("Leaving inca_switch_initialize()\n"); #endif - return 1; + return 0; } @@ -293,9 +291,7 @@ static int inca_switch_init(struct eth_device *dev, bd_t * bis) /* Initialize RxDMA. */ DMA_READ_REG(INCA_IP_DMA_DMA_RXISR, v); -#if 0 - printf("RX status = 0x%08X\n", v); -#endif + debug("RX status = 0x%08X\n", v); /* Writing to the FRDA of CHANNEL. */ @@ -308,9 +304,7 @@ static int inca_switch_init(struct eth_device *dev, bd_t * bis) /* Initialize TxDMA. */ DMA_READ_REG(INCA_IP_DMA_DMA_TXISR, v); -#if 0 - printf("TX status = 0x%08X\n", v); -#endif + debug("TX status = 0x%08X\n", v); /* Writing to the FRDA of CHANNEL. */ @@ -340,7 +334,7 @@ static int inca_switch_init(struct eth_device *dev, bd_t * bis) } -static int inca_switch_send(struct eth_device *dev, volatile void *packet, int length) +static int inca_switch_send(struct eth_device *dev, void *packet, int length) { int i; int res = -1; @@ -758,7 +752,7 @@ static int inca_amdix(void) (0x1 << 31) | /* RA */ (0x0 << 30) | /* Read */ (0x6 << 21) | /* LAN */ - (6 << 16)); /* PHY_ANER */ + (6 << 16)); /* MII_EXPANSION */ do { SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg6); } while (phyReg6 & (1 << 31)); @@ -771,7 +765,7 @@ static int inca_amdix(void) (0x1 << 31) | /* RA */ (0x0 << 30) | /* Read */ (0x6 << 21) | /* LAN */ - (4 << 16)); /* PHY_ANAR */ + (4 << 16)); /* MII_ADVERTISE */ do { SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg4); } while (phyReg4 & (1 << 31)); @@ -784,7 +778,7 @@ static int inca_amdix(void) (0x1 << 31) | /* RA */ (0x0 << 30) | /* Read */ (0x6 << 21) | /* LAN */ - (5 << 16)); /* PHY_ANLPAR */ + (5 << 16)); /* MII_LPA */ do { SW_READ_REG(INCA_IP_Switch_MDIO_ACC, phyReg5); } while (phyReg5 & (1 << 31)); @@ -813,5 +807,3 @@ Fail: return -1; } #endif /* CONFIG_INCA_IP_SWITCH_AMDIX */ - -#endif