thunder_mdio.c (9feff969a01044c3083b552f06f7eb6416bc0524) thunder_mdio.c (fafb1c574d43b8c3acb510d925f599fee461c039)
1/*-
2 * Copyright (c) 2015 The FreeBSD Foundation
3 *
4 * This software was developed by Semihalf under
5 * the sponsorship of the FreeBSD Foundation.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 192 unchanged lines hidden (view full) ---

201 /* Set mode, IEEE CLAUSE 22 or IEEE CAUSE 45 */
202 smi_clk = mdio_reg_read(sc, SMI_CLK);
203 if (mode == MODE_IEEE_C22)
204 smi_clk &= ~SMI_CLK_MODE;
205 else
206 smi_clk |= SMI_CLK_MODE;
207 /* Enable sending 32 bit preable on SMI transactions */
208 smi_clk |= SMI_CLK_PREAMBLE;
1/*-
2 * Copyright (c) 2015 The FreeBSD Foundation
3 *
4 * This software was developed by Semihalf under
5 * the sponsorship of the FreeBSD Foundation.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 192 unchanged lines hidden (view full) ---

201 /* Set mode, IEEE CLAUSE 22 or IEEE CAUSE 45 */
202 smi_clk = mdio_reg_read(sc, SMI_CLK);
203 if (mode == MODE_IEEE_C22)
204 smi_clk &= ~SMI_CLK_MODE;
205 else
206 smi_clk |= SMI_CLK_MODE;
207 /* Enable sending 32 bit preable on SMI transactions */
208 smi_clk |= SMI_CLK_PREAMBLE;
209 /* Saved setings */
209 /* Saved settings */
210 mdio_reg_write(sc, SMI_CLK, smi_clk);
211 sc->mode = mode;
212}
213
214static int
215thunder_mdio_c45_addr(struct thunder_mdio_softc *sc, int phy, int reg)
216{
217 uint64_t smi_cmd, smi_wr_dat;

--- 295 unchanged lines hidden ---
210 mdio_reg_write(sc, SMI_CLK, smi_clk);
211 sc->mode = mode;
212}
213
214static int
215thunder_mdio_c45_addr(struct thunder_mdio_softc *sc, int phy, int reg)
216{
217 uint64_t smi_cmd, smi_wr_dat;

--- 295 unchanged lines hidden ---