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:
luohui2320@gmail.com 2012-04-08 10:43:02 +00:00
parent 7494880ac2
commit ce4ef74ef4
3 changed files with 8 additions and 7 deletions

View File

@ -43,7 +43,7 @@
#ifdef RT_USING_LWIP
#include <netif/ethernetif.h>
#include <arch/sys_arch_init.h>
//#include <arch/sys_arch_init.h>
#include "macb.h"
#endif
@ -128,10 +128,9 @@ void rt_init_thread_entry(void* parameter)
eth_system_device_init();
rt_hw_macb_init();
/* re-init device driver */
//rt_device_init_all();
rt_device_init_all();
/* init lwip system */
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n");
}
#endif

View File

@ -324,13 +324,15 @@ void macb_update_link(struct rt_macb_eth *macb)
rt_kprintf("%s: link up (%dMbps/%s-duplex)\n",
dev->parent.name, macb->speed,
DUPLEX_FULL == macb->duplex ? "Full":"Half");
macb->parent.link_status = 1;
//macb->parent.link_status = 1;
//netif_set_link_up(macb->parent.netif);
} else {
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);
}
}

View File

@ -330,7 +330,7 @@ struct dma_desc {
#define MACB_TX_USED_OFFSET 31
#define MACB_TX_USED_SIZE 1
void rt_hw_macb_init();
extern void rt_hw_macb_init();
#endif /* _MACB_H */