altr_tse_pcs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Copyright Altera Corporation (C) 2016. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License, version 2,
  5. * as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. *
  15. * Author: Tien Hock Loh <thloh@altera.com>
  16. */
  17. #ifndef __TSE_PCS_H__
  18. #define __TSE_PCS_H__
  19. #include <linux/phy.h>
  20. #include <linux/timer.h>
  21. struct tse_pcs {
  22. struct device *dev;
  23. void __iomem *tse_pcs_base;
  24. void __iomem *sgmii_adapter_base;
  25. struct timer_list aneg_link_timer;
  26. int autoneg;
  27. };
  28. int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs);
  29. void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev,
  30. unsigned int speed);
  31. #endif /* __TSE_PCS_H__ */