Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /* include/net/ax88796.h
0003  *
0004  * Copyright 2005 Simtec Electronics
0005  *  Ben Dooks <ben@simtec.co.uk>
0006 */
0007 
0008 #ifndef __NET_AX88796_PLAT_H
0009 #define __NET_AX88796_PLAT_H
0010 
0011 #include <linux/types.h>
0012 
0013 struct sk_buff;
0014 struct net_device;
0015 struct platform_device;
0016 
0017 #define AXFLG_HAS_EEPROM        (1<<0)
0018 #define AXFLG_MAC_FROMDEV       (1<<1)  /* device already has MAC */
0019 #define AXFLG_HAS_93CX6         (1<<2)  /* use eeprom_93cx6 driver */
0020 #define AXFLG_MAC_FROMPLATFORM      (1<<3)  /* MAC given by platform data */
0021 
0022 struct ax_plat_data {
0023     unsigned int     flags;
0024     unsigned char    wordlength;    /* 1 or 2 */
0025     unsigned char    dcr_val;   /* default value for DCR */
0026     unsigned char    rcr_val;   /* default value for RCR */
0027     unsigned char    gpoc_val;  /* default value for GPOC */
0028     u32     *reg_offsets;   /* register offsets */
0029     u8      *mac_addr;  /* MAC addr (only used when
0030                        AXFLG_MAC_FROMPLATFORM is used */
0031 
0032     /* uses default ax88796 buffer if set to NULL */
0033     void (*block_output)(struct net_device *dev, int count,
0034             const unsigned char *buf, int star_page);
0035     void (*block_input)(struct net_device *dev, int count,
0036             struct sk_buff *skb, int ring_offset);
0037     /* returns nonzero if a pending interrupt request might be caused by
0038      * the ax88796. Handles all interrupts if set to NULL
0039      */
0040     int (*check_irq)(struct platform_device *pdev);
0041 };
0042 
0043 /* exported from ax88796.c for xsurf100.c  */
0044 extern void ax_NS8390_reinit(struct net_device *dev);
0045 
0046 #endif /* __NET_AX88796_PLAT_H */