source: rtems/c/src/lib/libcpu/m68k/mcf5225x/include/fec.h @ 14782ec0

4.104.115
Last change on this file since 14782ec0 was 14782ec0, checked in by Joel Sherrill <joel.sherrill@…>, on 04/05/10 at 17:11:48

2010-04-05 Thomas Znidar <t.znidar@…>

  • Makefile.am, configure.ac, preinstall.am: Add mcf5225x support.
  • mcf5225x/include/fec.h, mcf5225x/include/mcf5225x.h, mcf5225x/network/fec.c: New files.
  • Property mode set to 100644
File size: 666 bytes
Line 
1#ifndef FEC_H
2#define FEC_H
3
4#include <arch/sys_arch.h>
5#include <lwip/netif.h>
6#include <stdbool.h>
7
8struct if_config {
9        u8_t flags;
10        u8_t hwaddr_len;
11        u16_t mtu;
12        u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
13        sys_thread_t net_task;
14        void(*phy_init)(void);
15        u8_t name[2];
16};
17
18extern err_t mcf5225xif_init(struct netif *);
19extern void handle_rx_frame(struct netif*);
20
21extern void smi_init(u32_t);
22extern void smi_write(u8_t,u8_t,u16_t);
23extern u16_t smi_read(u8_t,u8_t);
24
25#define MAX_FRAME_LEN           1518
26#define MTU_SIZE  (MAX_FRAME_LEN-18)
27#define MSCR_MII_SPEED(clk)  ((clk/5000000+1)<<1)
28#define PHY_ADDR                        1
29#define PHY_REG_ID1             2       
30#define PHY_REG_ID2             3       
31
32#endif /* FEC_H */
Note: See TracBrowser for help on using the repository browser.