From ce4ef74ef4ee77defd74a2f1a4062cf303990055 Mon Sep 17 00:00:00 2001 From: "luohui2320@gmail.com" Date: Sun, 8 Apr 2012 10:43:02 +0000 Subject: [PATCH] update AT91SAM9260 macb driver git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2023 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/at91sam9260/application.c | 5 ++--- bsp/at91sam9260/macb.c | 8 +++++--- bsp/at91sam9260/macb.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bsp/at91sam9260/application.c b/bsp/at91sam9260/application.c index dbdeae60b..8d272f5ae 100755 --- a/bsp/at91sam9260/application.c +++ b/bsp/at91sam9260/application.c @@ -43,7 +43,7 @@ #ifdef RT_USING_LWIP #include -#include +//#include #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 diff --git a/bsp/at91sam9260/macb.c b/bsp/at91sam9260/macb.c index e29a50437..ae18e3ffe 100755 --- a/bsp/at91sam9260/macb.c +++ b/bsp/at91sam9260/macb.c @@ -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); } } diff --git a/bsp/at91sam9260/macb.h b/bsp/at91sam9260/macb.h index 8d5950e78..4697790f6 100755 --- a/bsp/at91sam9260/macb.h +++ b/bsp/at91sam9260/macb.h @@ -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 */