update AT91SAM9260 macb driver
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2023 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
7494880ac2
commit
ce4ef74ef4
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
#ifdef RT_USING_LWIP
|
||||||
#include <netif/ethernetif.h>
|
#include <netif/ethernetif.h>
|
||||||
#include <arch/sys_arch_init.h>
|
//#include <arch/sys_arch_init.h>
|
||||||
#include "macb.h"
|
#include "macb.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -128,10 +128,9 @@ void rt_init_thread_entry(void* parameter)
|
|||||||
eth_system_device_init();
|
eth_system_device_init();
|
||||||
rt_hw_macb_init();
|
rt_hw_macb_init();
|
||||||
/* re-init device driver */
|
/* re-init device driver */
|
||||||
//rt_device_init_all();
|
rt_device_init_all();
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
rt_kprintf("TCP/IP initialized!\n");
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -324,13 +324,15 @@ void macb_update_link(struct rt_macb_eth *macb)
|
|||||||
rt_kprintf("%s: link up (%dMbps/%s-duplex)\n",
|
rt_kprintf("%s: link up (%dMbps/%s-duplex)\n",
|
||||||
dev->parent.name, macb->speed,
|
dev->parent.name, macb->speed,
|
||||||
DUPLEX_FULL == macb->duplex ? "Full":"Half");
|
DUPLEX_FULL == macb->duplex ? "Full":"Half");
|
||||||
macb->parent.link_status = 1;
|
//macb->parent.link_status = 1;
|
||||||
|
//netif_set_link_up(macb->parent.netif);
|
||||||
} else {
|
} else {
|
||||||
rt_kprintf("%s: link down\n", dev->parent.name);
|
rt_kprintf("%s: link down\n", dev->parent.name);
|
||||||
macb->parent.link_status = 0;
|
//macb->parent.link_status = 0;
|
||||||
|
//netif_set_link_down(macb->parent.netif);
|
||||||
}
|
}
|
||||||
|
|
||||||
eth_device_linkchange(&macb->parent, RT_TRUE);
|
//eth_device_linkchange(&macb->parent, RT_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ struct dma_desc {
|
|||||||
#define MACB_TX_USED_OFFSET 31
|
#define MACB_TX_USED_OFFSET 31
|
||||||
#define MACB_TX_USED_SIZE 1
|
#define MACB_TX_USED_SIZE 1
|
||||||
|
|
||||||
void rt_hw_macb_init();
|
extern void rt_hw_macb_init();
|
||||||
|
|
||||||
#endif /* _MACB_H */
|
#endif /* _MACB_H */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user