xilinx_ll_temac_mdio.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Xilinx xps_ll_temac ethernet driver for u-boot
  3. *
  4. * MDIO bus access interface
  5. *
  6. * Copyright (C) 2011 - 2012 Stephan Linz <linz@li-pro.net>
  7. * Copyright (C) 2008 - 2011 Michal Simek <monstr@monstr.eu>
  8. * Copyright (C) 2008 - 2011 PetaLogix
  9. *
  10. * Based on Yoshio Kashiwagi kashiwagi@co-nss.co.jp driver
  11. * Copyright (C) 2008 Nissin Systems Co.,Ltd.
  12. * March 2008 created
  13. *
  14. * This program is free software; you can redistribute it and/or modify it
  15. * under the terms of the GNU General Public License as published by the
  16. * Free Software Foundation; either version 2 of the License, or (at your
  17. * option) any later version.
  18. *
  19. * [0]: http://www.xilinx.com/support/documentation
  20. *
  21. * [S]: [0]/ip_documentation/xps_ll_temac.pdf
  22. * [A]: [0]/application_notes/xapp1041.pdf
  23. */
  24. #ifndef _XILINX_LL_TEMAC_MDIO_
  25. #define _XILINX_LL_TEMAC_MDIO_
  26. #include <net.h>
  27. #include <miiphy.h>
  28. #include <asm/types.h>
  29. #include <asm/byteorder.h>
  30. #include "xilinx_ll_temac.h"
  31. int ll_temac_local_mdio_read(struct temac_reg *regs, int addr, int devad,
  32. int regnum);
  33. void ll_temac_local_mdio_write(struct temac_reg *regs, int addr, int devad,
  34. int regnum, u16 value);
  35. int ll_temac_phy_read(struct mii_dev *bus, int addr, int devad, int regnum);
  36. int ll_temac_phy_write(struct mii_dev *bus, int addr, int devad, int regnum,
  37. u16 value);
  38. int ll_temac_phy_addr(struct mii_dev *bus);
  39. struct ll_temac_mdio_info {
  40. struct temac_reg *regs;
  41. char *name;
  42. };
  43. int xilinx_ll_temac_mdio_initialize(bd_t *bis, struct ll_temac_mdio_info *info);
  44. #endif /* _XILINX_LL_TEMAC_MDIO_ */