Stephan Linz | e1fd4be | 2012-02-25 00:48:31 +0000 | [diff] [blame] | 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 14 | * SPDX-License-Identifier: GPL-2.0+ |
Stephan Linz | e1fd4be | 2012-02-25 00:48:31 +0000 | [diff] [blame] | 15 | * |
| 16 | * [0]: http://www.xilinx.com/support/documentation |
| 17 | * |
| 18 | * [S]: [0]/ip_documentation/xps_ll_temac.pdf |
| 19 | * [A]: [0]/application_notes/xapp1041.pdf |
| 20 | */ |
| 21 | #ifndef _XILINX_LL_TEMAC_MDIO_ |
| 22 | #define _XILINX_LL_TEMAC_MDIO_ |
| 23 | |
| 24 | #include <net.h> |
| 25 | #include <miiphy.h> |
| 26 | |
| 27 | #include <asm/types.h> |
| 28 | #include <asm/byteorder.h> |
| 29 | |
| 30 | #include "xilinx_ll_temac.h" |
| 31 | |
| 32 | int ll_temac_local_mdio_read(struct temac_reg *regs, int addr, int devad, |
| 33 | int regnum); |
| 34 | void ll_temac_local_mdio_write(struct temac_reg *regs, int addr, int devad, |
| 35 | int regnum, u16 value); |
| 36 | |
| 37 | int ll_temac_phy_read(struct mii_dev *bus, int addr, int devad, int regnum); |
| 38 | int ll_temac_phy_write(struct mii_dev *bus, int addr, int devad, int regnum, |
| 39 | u16 value); |
| 40 | |
| 41 | int ll_temac_phy_addr(struct mii_dev *bus); |
| 42 | |
| 43 | struct ll_temac_mdio_info { |
| 44 | struct temac_reg *regs; |
| 45 | char *name; |
| 46 | }; |
| 47 | |
| 48 | int xilinx_ll_temac_mdio_initialize(bd_t *bis, struct ll_temac_mdio_info *info); |
| 49 | |
| 50 | #endif /* _XILINX_LL_TEMAC_MDIO_ */ |