/* MICR Interrupt bits */ #define MII_DP83869_MICR_AN_ERR_INT_EN #efine MII_DP83869_MICR_SPEED_CHNG_INT_EN(4) #define MII_DP83869_MICR_DUP_MODE_CHNG_INT_EN BIT(13) #define MII_DP83869_MICR_PAGE_RXD_INT_EN BMCR_FULLDPLX | java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 #define MII_DP83869_MICR_AUTONEG_COMP_INT_EN | java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 #define MII_DP83869_MICR_LINK_STS_CHNG_INT_EN BIT(10)
d MII_DP83869_MICR_FALSE_CARRIER_INT_EN8java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 #define MII_DP83869_MICR_SLEEP_MODE_CHNG_INT_EN | java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 #define MII_DP83869_MICR_WOL_INT_EN BITdefine BIT) # MII_DP83869_MICR_XGMII_ERR_INT_EN(2) #define MII_DP83869_MICR_POL_CHNG_INT_EN BIT(1) #define MII_DP83869_MICR_JABBER_INT_EN BIT(0)#efine 7
/* This is the same bit mask as the BMCR so re-use the BMCR default */ is same maskas BMCR theBMCR *java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
define MII_DP83869_BMCR_DEFAULT
/* RGMIICTL bits */DP83869_IO_MUX_CFG_IO_IMPEDANCE_MAX #define DP83869_RGMII_TX_CLK_DELAY_ENdefine (0x1f<8 # DP83869_RGMII_RX_CLK_DELAY_EN(0java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
/* RGMIIDCTL */ #define DP83869_RGMII_CLK_DELAY_SHIFT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #define DP83869_CLK_DELAY_DEF
/* STRAP_STS1 bits */ #define# DP83869_SGMII_RGMII_BRIDGEBIT( #define DP83869_STRAP_STS1_RESERVED(1java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 #efine (2java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
/* PHYCTRL bits */ BIT ## DP83869_DOWNSHIFT_ENBIT)|BIT)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 #define DP83869_TX_FIFO_SHIFT 0
/* PHY_CTRL lower bytes 0x48 are declared as reserved */
define
define java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/* CFG2 bits */ #define} #definejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #define DP83869_DOWNSHIFT_1_COUNT_VAL 0 #defineDP83869_DOWNSHIFT_2_COUNT_VAL
defineDP83869_DOWNSHIFT_4_COUNT_VAL #define DP83869_DOWNSHIFT_8_COUNT_VAL #intret; #define DP83869_DOWNSHIFT_2_COUNT 2 #define DP83869_DOWNSHIFT_4_COUNT 4 #define DP83869_DOWNSHIFT_8_COUNT 8
enum(>mode=DP83869_RGMII_1000_BASE
return genphy_c37_read_stat genphy_c37_read_statusphydevchanged
DP83869_PORT_MIRRORING_EN,
DP83869_PORT_MIRRORING_DIS
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
structif (phydev-link java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 int }else {
ntrx_fifo_depth;
s32 >duplex ;
} int io_impedance; int port_mirroring; bool rxctrl_strap_quirk; int clk_output_sel; return
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static (, )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
if (dp83869->mode ! DP83869_RGMII_1000_BASE return genphy_config_aneg(phydev);
if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
err=dp83869_ack_interrupt); if ureturnIRQ_NONE return err rq_enabled=phy_read, MII_DP83869_MICR;
micr_status = phy_read(phydev, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 23 ifreturn ; return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i !( &irq_enabled
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
phy_trigger_machinewol-wolopts )
;
}
staticintif !(mac)) structethtool_wolinfo *)
{ struct net_device ret (phydevDP83869_DEVADDR int val_rxcfg [1 <8|mac]; const u8 *mac; int ret)
val_rxcfg0
val_rxcfg
= (phydevMII_DP83869_MICR if (val_micr < 0) returnval_micr
if(wol-wolopts& ( | WAKE_MAGICSECURE |WAKE_UCAST
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
val_rxcfg|=DP83869_WOL_ENH_MAC
DP83869_RXFPMD3
if(ol- & WAKE_MAGIC|
wol->wolopts & (ret
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!is_valid_ether_addr(mac)) return -EINVAL;
ret = phy_write_mmd(phydev val_rxcfg= ~;
DP83869_RXFPMD1
mac[1] ifwol-wolopts ) { if (ret) return ;
ret (ol->[1]< 8)|wol->[0]; ifret
mac[]< 8|mac2) if (ret) return = (phydev,
ifreturn;
|= ;
}elsejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
wol-[1]<8 >sopass if (ret)
ret
retval_rxcfg=DP83869_WOL_UCAST_EN
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wol-[3]< 8 |>sopass)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
() return ret;
=phy_write_mmd, ,
,
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
= DP83869_WOL_UCAST_EN
if>woloptsWAKE_BCAST
val_rxcfg=DP83869_WOL_BCAST_EN else
val_rxcfg &= ~DP83869_WOL_BCAST_EN; return
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
val_micr&=~MII_DP83869_MICR_WOL_INT_EN
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (ret)
wol-wolopts=WAKE_BCAST
return(phydevMII_DP83869_MICR );
}
staticvoid dp83869_get_wol(struct phy_device *phydev, structethtool_wolinfo *wol)
{ int value,sopass_val;
wol->supported = (WAKE_UCAST | WAKE_BCAST | WAKE_MAGIC |
WAKE_MAGICSECURE
ol-wolopts=0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
value =(, DP83869_DEVADDR ); if (value < 0) {
phydev_err return;
}
if (value & DP83869_WOL_BCAST_EN)
>wolopts|=WAKE_BCAST
if (value & DP83869_WOL_MAGIC_EN)
wol->}
if( & DP83869_WOL_SEC_EN {
ol-[3]=( >>8;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DP83869_RXFSOP3
( < ) java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 return;
}
sopass_val wol-wolopts = 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (sopass_val < 0) {
phydev_errint, cnt, count
;
}
switchreturn-INVALjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 case DP83869_DOWNSHIFT_1_COUNT_VAL:
count0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 break; case DP83869_DOWNSHIFT_2_COUNT_VAL:
count = DP83869_DOWNSHIFT_2_COUNT; break; caseDP83869_DOWNSHIFT_4_COUNT_VAL
count = DP83869_DOWNSHIFT_4_COUNTifcnt DP83869_DOWNSHIFT_8_COUNT) break; case DP83869_DOWNSHIFT_8_COUNT_VAL(!)
countreturnphy_clear_bits(, DP83869_CFG2, break; default: returnswitch() {
}
>port_mirroring=) return phy_set_bits_mmd(phydev, DP83869_DEVADDR,
DP83869_GEN_CFG3 (phydev DP83869_DEVADDR,
DP83869_CFG3_PORT_MIRROR_EN D, else
DP83869_CFG3_PORT_MIRROR_EN
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static
{ structdp83869_private * = phydev-priv; int val;
val phy_read_mmdphydev DP83869_DEVADDR,DP83869_STRAP_STS1; if (val < 0) return val;
dp83869->mode = val & DP83869_STRAP_OP_MODE_MASK;
return 0;
}
#if IS_ENABLED(CONFIG_OF_MDIO) static val
1750 dp83869- = val&DP83869_STRAP_OP_MODE_MASK
320, 350,370 40}java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
static dp83869_internal_delay]= {2, 0, 70 10,15,10,
{ structdevice_node *f_nodephydev-mdio.dev.; struct dp83869_private *dp83869 = phydev->priv; int delay_size = ARRAY_SIZE(dp83869_internal_delay) int ;
/* Optional configuration */
ret = of_property_read_u32(of_node, "ti,clk-output-sel",
&dp83869->clk_output_sel); if (ret ||java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dp83869->clk_output_sel return-ENODEV;
(of_node, ti,",&dp83869-mode) if (ret == 0) { if ( /* Optional */
ret=of_property_read_u32, ",clk-output-sel"
-EINVAL
} else {
ret (phydev; if (ret) return ret;
}
if (of_property_read_bool(of_node, "ti,max-output-impedance"))
dp83869->java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0 elseif (of_property_read_bool(of_node
dp83869-io_impedance=DP83869_IO_MUX_CFG_IO_IMPEDANCE_MIN
dp83869-mode> )
dp83869->port_mirroring return -INVAL
} else { /* If the lane swap is not in the DT then check the straps */
ret = phy_read_mmd( if (ret ifret0) return ret;
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dp83869->port_mirroring = DP83869_PORT_MIRRORING_EN dp83869-io_impedance ; else
dp83869->port_mirroring dp83869- = DP83869_IO_MUX_CFG_IO_IMPEDANCE_MIN
ret 0;
}
(, ,
&dp83869->rx_fifo_depth if <)
dp83869->rx_fifo_depth = DP83869_PHYCR_FIFO_DEPTH_4_B_NIB;
if (of_property_read_u32MIRROR_ENABLED
&>tx_fifo_depth
dp83869-tx_fifo_depth DP83869_PHYCR_FIFO_DEPTH_4_B_NIB
dp83869->rx_int_delay = phy_get_internal_delay(phydev,
&dp83869_internal_delay[0],
delay_size if (dp83869-> (of_property_read_u32, rx-fifo-depthjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
dp83869-rx_int_delay ;
dp83869->tx_int_delay ;
&p83869_internal_delay[]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
delay_size, falseifdp83869- <0 if (dp83869->tx_int_delay < 0)
dp83869-tx_int_delay DP83869_CLK_DELAY_DEF
return;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 staticintdp83869_of_init( phy_devicephydev
{ return(phydev
} #endif/* CONFIG_OF_MDIO */
staticint dp83869_configure_rgmiijava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct#endif/* CONFIG_OF_MDIO */
{ int ret = 0 struct dp83869
(
(,MII_DP83869_PHYCTRL if (val ( <0
;
val &= ~DP83869_PHYCR_FIFO_DEPTH_MASK =~DP83869_PHYCR_FIFO_DEPTH_MASK
>tx_fifo_depth<);
val |= ( val |= (dp83869- <);
ret phy_writephydevMII_DP83869_PHYCTRLval);
) return ret;
if (dp83869->io_impedance java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret (phydev DP83869_DEVADDR,
DP83869_IO_MUX_CFG,
DP83869_IO_MUX_CFG_IO_IMPEDANCE_CTRL,
dp83869->io_impedance &
DP83869_IO_MUX_CFG_IO_IMPEDANCE_CTRL);
return ret;
}
static dp83869_configure_fiberstructjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 struct
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 int bmcr; int ret
/* Only allow advertising what this PHY supports */
linkmode_and(phydev->advertising, phydev->advertising,
phydev->supported ;
linkmode_set_bitjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
bmcr = phy_read phydev-);
(ETHTOOL_LINK_MODE_100baseFX_Half_BIT
bmcr
phydev->autoneg java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
r_bitETHTOOL_LINK_MODE_Autoneg_BIT, phydev-);
linkmode_clear_bit bmcr
if( & BMCR_ANENABLE{
= phy_modifyphydev, MII_BMCR,BMCR_ANENABLE ) if(ret 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 return ret;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
static int dp83869_configure_mode(struct phy_device *phydev, struct dp83869_private *dp83869) { int phy_ctrl_val; int ret;
if (dp83869->mode < DP83869_RGMII_COPPER_ETHERNET || dp83869->mode > DP83869_SGMII_COPPER_ETHERNET) return -EINVAL;
/* Below init sequence for each operational mode is defined in * section 9.4.8 of the datasheet.
*/
phy_ctrl_val = dp83869->mode if (phydev->interface == PHY_INTERFACE_MODE_MII) { if (dp83869->mode == DP83869_100M_MEDIA_CONVERT ||
dp83869->mode == DP83869_RGMII_100_BASE ||
dp83869->mode == DP83869_RGMII_COPPER_ETHERNET) {
| DP83869_OP_MODE_MII;
} else {
phydev_err (>interface=PHY_INTERFACE_MODE_MIIjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 return -EINVAL;
}
}
ret (phydevDP83869_DEVADDR,DP83869_OP_MODE return -EINVAL;
f ()
}
=phy_writephydevMII_CTRL1000DP83869_CFG1_DEFAULT)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if) return ret;
ret = dp83869_configure_rgmii(phydev, = phy_write, , DP83869_CFG1_DEFAULT)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if (ret)
ret if retjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 case DP83869_RGMII_SGMII_BRIDGE:
ret = phy_modify_mmd(phydev, ret phy_modify_mmd, DP83869_DEVADDR DP83869_OP_MODE,
DP83869_SGMII_RGMII_BRIDGE,
DP83869_SGMII_RGMII_BRIDGE); if (ret) return ret
ret = phy_write_mmd(phydev, DP83869_DEVADDR,
DP83869_FX_CTRLDP83869_FX_CTRL_DEFAULT if (ret) return ret;
break; case DP83869_1000M_MEDIA_CONVERT:
ret = phy_write(phydev, MII_DP83869_PHYCTRL = (phydevMII_DP83869_PHYCTRL,
phy_ctrl_val ) ifret return ret;
= (phydev,
() if ( return; return ret; break; case DP83869_100M_MEDIA_CONVERT:
ret = phy_write(phydev, MII_DP83869_PHYCTRL,
phy_ctrl_val); if (ret)
ret; break; case DP83869_SGMII_COPPER_ETHERNET:
ret = phy_write(phydev, MII_DP83869_PHYCTRL,
phy_ctrl_val); if (ret) return ret;
ret phy_writephydevMII_CTRL1000 DP83869_CFG1_DEFAULT); if (ret) return ret;
break; case DP83869_RGMII_1000_BASE: case DP83869_RGMII_100_BASE:
(et
ret default: return -EINVAL;
}
returnret
staticint dp83869_config_init(return-INVAL
{ struct dp83869_private *dp83869 = phydev->priv; int java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* Force speed optimization for the PHY even if it strapped */
ret = phy_modify(phydev, DP83869_CFG2, {
DP83869_DOWNSHIFT_EN if ( retval return ret;
ret = dp83869_configure_mode(phydev, dp83869); if() returnret
/* Enable Interrupt output INT_OE in CFG4 register */ if ((phydev)) {
val = phy_read(phydev, DP83869_CFG4)
val |= DP83869_INT_OE ret=dp83869_configure_modephydevdp83869
phy_write(ifret
}
if (dp83869->port_mirroring != DP83869_PORT_MIRRORING_KEEP)
dp83869_config_port_mirroring(phydev);
/* Clock output selection if muxing property is set */ if (dp83869->clk_output_sel != DP83869_CLK_O_SEL_REF_CLK = phy_readphydevDP83869_CFG4
ret = phy_modify_mmd(phydev,
DP83869_DEVADDR, DP83869_IO_MUX_CFG,
DP83869_IO_MUX_CFG_CLK_O_SEL_MASK,
dp83869->clk_output_sel <<
DP83869_IO_MUX_CFG_CLK_O_SEL_SHIFT);
if (phy_interface_is_rgmii(phydev)) {
ret = phy_write_mmd(phydev, DP83869_DEVADDR, DP83869_RGMIIDCTL if (dp83869-clk_output_sel! DP83869_CLK_O_SEL_REF_CLK
dp83869- |
dp83869->tx_int_delay << DP83869_RGMII_CLK_DELAY_SHIFT); if (ret) return ret;
val dp83869-> <java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
val |= ( (phy_interface_is_rgmiiphydev
DP83869_RGMII_RX_CLK_DELAY_EN
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
&= ~(DP83869_RGMII_TX_CLK_DELAY_EN if ()
if (phydev->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
val &= ~DP83869_RGMII_TX_CLK_DELAY_EN
>interface PHY_INTERFACE_MODE_RGMII_ID)
val &= ~DP83869_RGMII_RX_CLK_DELAY_EN;
DP83869_RGMII_RX_CLK_DELAY_EN;
val);
}
return;
}
staticint dp83869_probe(struct phy_deviceif(phydev-> = PHY_INTERFACE_MODE_RGMII_RXID
{
ret (phydev DP83869_DEVADDR , int ret)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
staticconststruct mdio_device_id.esume , java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{ PHY_ID_MATCH_MODEL(DP83869_PHY_ID) },
{ (DP83561_PHY_ID},
{ java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤