Commit | Line | Data |
---|---|---|
850576cf AM |
1 | /* |
2 | * Ethernet driver for the WIZnet W5100 chip. | |
3 | * | |
4 | * Copyright (C) 2006-2008 WIZnet Co.,Ltd. | |
5 | * Copyright (C) 2012 Mike Sinkovsky <msink@permonline.ru> | |
6 | * | |
7 | * Licensed under the GPL-2 or later. | |
8 | */ | |
9 | ||
0c165ff2 AM |
10 | enum { |
11 | W5100, | |
12 | W5200, | |
35ef7d68 | 13 | W5500, |
0c165ff2 AM |
14 | }; |
15 | ||
850576cf | 16 | struct w5100_ops { |
bf2c6b90 | 17 | bool may_sleep; |
0c165ff2 | 18 | int chip_id; |
35ef7d68 AM |
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, | |
850576cf AM |
25 | int len); |
26 | int (*reset)(struct net_device *ndev); | |
27 | int (*init)(struct net_device *ndev); | |
28 | }; | |
29 | ||
30 | void *w5100_ops_priv(const struct net_device *ndev); | |
31 | ||
32 | int w5100_probe(struct device *dev, const struct w5100_ops *ops, | |
c3875ca7 AM |
33 | int sizeof_ops_priv, const void *mac_addr, int irq, |
34 | int link_gpio); | |
850576cf AM |
35 | int w5100_remove(struct device *dev); |
36 | ||
37 | extern const struct dev_pm_ops w5100_pm_ops; |