tsec.c (4985ca5af3767ffe13ea96e1dc26f88c81084414) | tsec.c (19580e660cc8da49f16536a8bd78c047c7bc12e5) |
---|---|
1/* 2 * Freescale Three Speed Ethernet Controller driver 3 * 4 * This software may be used and distributed according to the 5 * terms of the GNU Public License, Version 2, incorporated 6 * herein by reference. 7 * 8 * Copyright 2004, 2007 Freescale Semiconductor, Inc. --- 660 unchanged lines hidden (view full) --- 669uint mii_cis8204_setmode(uint mii_reg, struct tsec_private * priv) 670{ 671 if (priv->flags & TSEC_REDUCED) 672 return MIIM_CIS8204_EPHYCON_INIT | MIIM_CIS8204_EPHYCON_RGMII; 673 else 674 return MIIM_CIS8204_EPHYCON_INIT; 675} 676 | 1/* 2 * Freescale Three Speed Ethernet Controller driver 3 * 4 * This software may be used and distributed according to the 5 * terms of the GNU Public License, Version 2, incorporated 6 * herein by reference. 7 * 8 * Copyright 2004, 2007 Freescale Semiconductor, Inc. --- 660 unchanged lines hidden (view full) --- 669uint mii_cis8204_setmode(uint mii_reg, struct tsec_private * priv) 670{ 671 if (priv->flags & TSEC_REDUCED) 672 return MIIM_CIS8204_EPHYCON_INIT | MIIM_CIS8204_EPHYCON_RGMII; 673 else 674 return MIIM_CIS8204_EPHYCON_INIT; 675} 676 |
677uint mii_m88e1111s_setmode(uint mii_reg, struct tsec_private *priv) 678{ 679 uint mii_data = read_phy_reg(priv, mii_reg); 680 681 if (priv->flags & TSEC_REDUCED) 682 mii_data = (mii_data & 0xfff0) | 0x000b; 683 return mii_data; 684} 685 |
|
677/* Initialized required registers to appropriate values, zeroing 678 * those we don't care about (unless zero is bad, in which case, 679 * choose a more appropriate value) 680 */ 681static void init_registers(volatile tsec_t * regs) 682{ 683 /* Clear IEVENT */ 684 regs->ievent = IEVENT_INIT_CLEAR; --- 344 unchanged lines hidden (view full) --- 1029 1030struct phy_info phy_info_M88E1111S = { 1031 0x01410cc, 1032 "Marvell 88E1111S", 1033 4, 1034 (struct phy_cmd[]){ /* config */ 1035 /* Reset and configure the PHY */ 1036 {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, | 686/* Initialized required registers to appropriate values, zeroing 687 * those we don't care about (unless zero is bad, in which case, 688 * choose a more appropriate value) 689 */ 690static void init_registers(volatile tsec_t * regs) 691{ 692 /* Clear IEVENT */ 693 regs->ievent = IEVENT_INIT_CLEAR; --- 344 unchanged lines hidden (view full) --- 1038 1039struct phy_info phy_info_M88E1111S = { 1040 0x01410cc, 1041 "Marvell 88E1111S", 1042 4, 1043 (struct phy_cmd[]){ /* config */ 1044 /* Reset and configure the PHY */ 1045 {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, |
1046 {0x1b, 0x848f, &mii_m88e1111s_setmode}, |
|
1037 {0x14, 0x0cd2, NULL}, /* Delay RGMII TX and RX */ 1038 {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, 1039 {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, 1040 {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, 1041 {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init}, 1042 {miim_end,} 1043 }, 1044 (struct phy_cmd[]){ /* startup */ --- 546 unchanged lines hidden --- | 1047 {0x14, 0x0cd2, NULL}, /* Delay RGMII TX and RX */ 1048 {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, 1049 {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, 1050 {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, 1051 {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init}, 1052 {miim_end,} 1053 }, 1054 (struct phy_cmd[]){ /* startup */ --- 546 unchanged lines hidden --- |