Lines Matching refs:sam_eth_device
50 static struct rt_sam_eth sam_eth_device; variable
68 result = eth_device_ready(&sam_eth_device.parent); in rt_sam_gmac_rxcb()
90 rt_memcpy(filter.mac, sam_eth_device.mac_addr, NETIF_MAX_HWADDR_LEN); in rt_sam_gmac_init()
137 rt_memcpy(args, sam_eth_device.mac_addr, 6); in rt_sam_eth_control()
294 sam_eth_device.link_speed = GMAC_SPEED_100MBPS; in rt_sam_eth_monitor()
299 sam_eth_device.link_speed = GMAC_SPEED_10MBPS; in rt_sam_eth_monitor()
305 sam_eth_device.link_mode = GMAC_FULL_DUPLEX; in rt_sam_eth_monitor()
310 sam_eth_device.link_mode = GMAC_HALF_DUPLEX; in rt_sam_eth_monitor()
345 sam_eth_device.macif = &MACIF; in rt_hw_sam_eth_init()
346 sam_eth_device.phyif = &MACIF_PHY_desc; in rt_hw_sam_eth_init()
348 sam_eth_device.link_speed = GMAC_SPEED_100MBPS; in rt_hw_sam_eth_init()
349 sam_eth_device.link_mode = GMAC_FULL_DUPLEX; in rt_hw_sam_eth_init()
355 io_read(&(I2C_0.io), sam_eth_device.mac_addr, 6); in rt_hw_sam_eth_init()
358 memset(sam_eth_device.mac_addr, 0x11, 6); in rt_hw_sam_eth_init()
361 sam_eth_device.parent.parent.init = rt_sam_eth_init; in rt_hw_sam_eth_init()
362 sam_eth_device.parent.parent.open = rt_sam_eth_open; in rt_hw_sam_eth_init()
363 sam_eth_device.parent.parent.close = rt_sam_eth_close; in rt_hw_sam_eth_init()
364 sam_eth_device.parent.parent.read = rt_sam_eth_read; in rt_hw_sam_eth_init()
365 sam_eth_device.parent.parent.write = rt_sam_eth_write; in rt_hw_sam_eth_init()
366 sam_eth_device.parent.parent.control = rt_sam_eth_control; in rt_hw_sam_eth_init()
367 sam_eth_device.parent.parent.user_data = (void *)&sam_eth_device; in rt_hw_sam_eth_init()
369 sam_eth_device.parent.eth_rx = rt_sam_eth_rx; in rt_hw_sam_eth_init()
370 sam_eth_device.parent.eth_tx = rt_sam_eth_tx; in rt_hw_sam_eth_init()
372 rt_sam_gmac_init(&sam_eth_device); in rt_hw_sam_eth_init()
375 state = eth_device_init(&(sam_eth_device.parent), "e0"); in rt_hw_sam_eth_init()
390 sam_eth_device.phy_monitor_timer = rt_timer_create("phylnk", in rt_hw_sam_eth_init()
392 (void *)&sam_eth_device, in rt_hw_sam_eth_init()
396 if (RT_NULL != sam_eth_device.phy_monitor_timer) in rt_hw_sam_eth_init()
398 rt_timer_start(sam_eth_device.phy_monitor_timer); in rt_hw_sam_eth_init()
406 sam_eth_device.phy_monitor_tid = rt_thread_create("phy", in rt_hw_sam_eth_init()
408 (void *)&sam_eth_device, in rt_hw_sam_eth_init()
412 if (sam_eth_device.phy_monitor_tid != RT_NULL) in rt_hw_sam_eth_init()
414 rt_thread_startup(sam_eth_device.phy_monitor_tid); in rt_hw_sam_eth_init()