comparison packages/devs/eth/phy/current/include/eth_phy.h @ 2960:31c9ab39babe

* doc/eth_phy.sgml, include/eth_phy.h: Add Ethernet Gigabit Mode * cdl/phy_eth_drivers.cdl: Add new PHY support * src/IP101A.c, src/IP101A.h: Contributed by Edgar Grimberg * src/VSC8244.c, src/VSC8244.h: Contributed by Christophe Coutand * src/VSC8641.c, src/VSC8641.h: Contributed by Sachin Sushil Chaddha
author jld
date Tue, 15 Jun 2010 08:25:04 +0000
parents 74dbf4c3f2e1
children
comparison
equal deleted inserted replaced
2959:eb303059b6e5 2960:31c9ab39babe
8 // 8 //
9 //========================================================================== 9 //==========================================================================
10 // ####ECOSGPLCOPYRIGHTBEGIN#### 10 // ####ECOSGPLCOPYRIGHTBEGIN####
11 // ------------------------------------------- 11 // -------------------------------------------
12 // This file is part of eCos, the Embedded Configurable Operating System. 12 // This file is part of eCos, the Embedded Configurable Operating System.
13 // Copyright (C) 2003 Free Software Foundation, Inc. 13 // Copyright (C) 2003, 2010 Free Software Foundation, Inc.
14 // 14 //
15 // eCos is free software; you can redistribute it and/or modify it under 15 // eCos is free software; you can redistribute it and/or modify it under
16 // the terms of the GNU General Public License as published by the Free 16 // the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 or (at your option) any later 17 // Software Foundation; either version 2 or (at your option) any later
18 // version. 18 // version.
82 82
83 #define ETH_PHY_REG_LEVEL_ACCESS_FUNS(_l,_init,_reset,_put_reg,_get_reg) \ 83 #define ETH_PHY_REG_LEVEL_ACCESS_FUNS(_l,_init,_reset,_put_reg,_get_reg) \
84 static eth_phy_access_t _l = {PHY_REG_LEVEL_ACCESS_TYPE, false, _init, _reset, \ 84 static eth_phy_access_t _l = {PHY_REG_LEVEL_ACCESS_TYPE, false, _init, _reset, \
85 {.reg_level_ops = {_put_reg, _get_reg}}} 85 {.reg_level_ops = {_put_reg, _get_reg}}}
86 86
87 #define ETH_PHY_STAT_LINK 0x0001 // Link up/down 87 #define ETH_PHY_STAT_LINK 0x0001 // Link up/down
88 #define ETH_PHY_STAT_100MB 0x0002 // Connection is 100Mb/10Mb 88 #define ETH_PHY_STAT_100MB 0x0002 // Connection is 100Mb/10Mb
89 #define ETH_PHY_STAT_FDX 0x0004 // Connection is full/half duplex 89 #define ETH_PHY_STAT_FDX 0x0004 // Connection is full/half duplex
90 #define ETH_PHY_STAT_1000MB 0x0008 // Connection is 1Gb
90 91
91 externC bool _eth_phy_init(eth_phy_access_t *f); 92 externC bool _eth_phy_init(eth_phy_access_t *f);
92 externC void _eth_phy_reset(eth_phy_access_t *f); 93 externC void _eth_phy_reset(eth_phy_access_t *f);
93 externC int _eth_phy_state(eth_phy_access_t *f); 94 externC int _eth_phy_state(eth_phy_access_t *f);
94 externC int _eth_phy_cfg(eth_phy_access_t *f, int mode); 95 externC int _eth_phy_cfg(eth_phy_access_t *f, int mode);