linux/drivers/net/ethernet/wiznet/w5100.h
<<
>>
Prefs
   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
  10enum {
  11        W5100,
  12        W5200,
  13        W5500,
  14};
  15
  16struct 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);
  28};
  29
  30void *w5100_ops_priv(const struct net_device *ndev);
  31
  32int 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);
  35int w5100_remove(struct device *dev);
  36
  37extern const struct dev_pm_ops w5100_pm_ops;
  38