summaryrefslogtreecommitdiffstats
path: root/drivers/net/xilinx_ll_temac_mdio.h
diff options
context:
space:
mode:
authorStephan Linz <linz@li-pro.net>2012-02-25 00:48:31 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-04-04 09:36:19 -0500
commitdf48265036dc7332d488ded34aa298f7f5bf3513 (patch)
tree178742a61fd899d5b4b2a0fe55943dc8291053a8 /drivers/net/xilinx_ll_temac_mdio.h
parent1295f08c7e778a258cba779263ba03b0c86f8a6e (diff)
downloadtalos-obmc-uboot-df48265036dc7332d488ded34aa298f7f5bf3513.tar.gz
talos-obmc-uboot-df48265036dc7332d488ded34aa298f7f5bf3513.zip
net: ll_temac: Add LL TEMAC driver to u-boot
Xilinx LocalLink Tri-Mode Ether MAC driver can be used by Xilinx Microblaze or Xilinx ppc405/440 in SDMA and FIFO mode. DCR or XPS bus can be used. The driver uses and requires MII and PHYLIB. CP: 4 warnings: 'Use of volatile is usually wrong' I won't fix this, because it depends on the network driver subsystem. Reported-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Stephan Linz <linz@li-pro.net>
Diffstat (limited to 'drivers/net/xilinx_ll_temac_mdio.h')
-rw-r--r--drivers/net/xilinx_ll_temac_mdio.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/net/xilinx_ll_temac_mdio.h b/drivers/net/xilinx_ll_temac_mdio.h
new file mode 100644
index 0000000000..8d8fabdd19
--- /dev/null
+++ b/drivers/net/xilinx_ll_temac_mdio.h
@@ -0,0 +1,53 @@
+/*
+ * Xilinx xps_ll_temac ethernet driver for u-boot
+ *
+ * MDIO bus access interface
+ *
+ * Copyright (C) 2011 - 2012 Stephan Linz <linz@li-pro.net>
+ * Copyright (C) 2008 - 2011 Michal Simek <monstr@monstr.eu>
+ * Copyright (C) 2008 - 2011 PetaLogix
+ *
+ * Based on Yoshio Kashiwagi kashiwagi@co-nss.co.jp driver
+ * Copyright (C) 2008 Nissin Systems Co.,Ltd.
+ * March 2008 created
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * [0]: http://www.xilinx.com/support/documentation
+ *
+ * [S]: [0]/ip_documentation/xps_ll_temac.pdf
+ * [A]: [0]/application_notes/xapp1041.pdf
+ */
+#ifndef _XILINX_LL_TEMAC_MDIO_
+#define _XILINX_LL_TEMAC_MDIO_
+
+#include <net.h>
+#include <miiphy.h>
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+
+#include "xilinx_ll_temac.h"
+
+int ll_temac_local_mdio_read(struct temac_reg *regs, int addr, int devad,
+ int regnum);
+void ll_temac_local_mdio_write(struct temac_reg *regs, int addr, int devad,
+ int regnum, u16 value);
+
+int ll_temac_phy_read(struct mii_dev *bus, int addr, int devad, int regnum);
+int ll_temac_phy_write(struct mii_dev *bus, int addr, int devad, int regnum,
+ u16 value);
+
+int ll_temac_phy_addr(struct mii_dev *bus);
+
+struct ll_temac_mdio_info {
+ struct temac_reg *regs;
+ char *name;
+};
+
+int xilinx_ll_temac_mdio_initialize(bd_t *bis, struct ll_temac_mdio_info *info);
+
+#endif /* _XILINX_LL_TEMAC_MDIO_ */
OpenPOWER on IntegriCloud