Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux/fpc-iii.git] / drivers / net / ethernet / wiznet / w5100.h
blob17983a3b8d6c6ad4339ed654249d436ce7c08669
1 /*
2 * Ethernet driver for the WIZnet W5100 chip.
4 * Copyright (C) 2006-2008 WIZnet Co.,Ltd.
5 * Copyright (C) 2012 Mike Sinkovsky <msink@permonline.ru>
7 * Licensed under the GPL-2 or later.
8 */
10 enum {
11 W5100,
12 W5200,
13 W5500,
16 struct w5100_ops {
17 bool may_sleep;
18 int chip_id;
19 int (*read)(struct net_device *ndev, u32 addr);
20 int (*write)(struct net_device *ndev, u32 addr, u8 data);
21 int (*read16)(struct net_device *ndev, u32 addr);
22 int (*write16)(struct net_device *ndev, u32 addr, u16 data);
23 int (*readbulk)(struct net_device *ndev, u32 addr, u8 *buf, int len);
24 int (*writebulk)(struct net_device *ndev, u32 addr, const u8 *buf,
25 int len);
26 int (*reset)(struct net_device *ndev);
27 int (*init)(struct net_device *ndev);
30 void *w5100_ops_priv(const struct net_device *ndev);
32 int w5100_probe(struct device *dev, const struct w5100_ops *ops,
33 int sizeof_ops_priv, const void *mac_addr, int irq,
34 int link_gpio);
35 int w5100_remove(struct device *dev);
37 extern const struct dev_pm_ops w5100_pm_ops;