18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* include/net/ax88796.h 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright 2005 Simtec Electronics 58c2ecf20Sopenharmony_ci * Ben Dooks <ben@simtec.co.uk> 68c2ecf20Sopenharmony_ci*/ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef __NET_AX88796_PLAT_H 98c2ecf20Sopenharmony_ci#define __NET_AX88796_PLAT_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct sk_buff; 128c2ecf20Sopenharmony_cistruct net_device; 138c2ecf20Sopenharmony_cistruct platform_device; 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define AXFLG_HAS_EEPROM (1<<0) 168c2ecf20Sopenharmony_ci#define AXFLG_MAC_FROMDEV (1<<1) /* device already has MAC */ 178c2ecf20Sopenharmony_ci#define AXFLG_HAS_93CX6 (1<<2) /* use eeprom_93cx6 driver */ 188c2ecf20Sopenharmony_ci#define AXFLG_MAC_FROMPLATFORM (1<<3) /* MAC given by platform data */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistruct ax_plat_data { 218c2ecf20Sopenharmony_ci unsigned int flags; 228c2ecf20Sopenharmony_ci unsigned char wordlength; /* 1 or 2 */ 238c2ecf20Sopenharmony_ci unsigned char dcr_val; /* default value for DCR */ 248c2ecf20Sopenharmony_ci unsigned char rcr_val; /* default value for RCR */ 258c2ecf20Sopenharmony_ci unsigned char gpoc_val; /* default value for GPOC */ 268c2ecf20Sopenharmony_ci u32 *reg_offsets; /* register offsets */ 278c2ecf20Sopenharmony_ci u8 *mac_addr; /* MAC addr (only used when 288c2ecf20Sopenharmony_ci AXFLG_MAC_FROMPLATFORM is used */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci /* uses default ax88796 buffer if set to NULL */ 318c2ecf20Sopenharmony_ci void (*block_output)(struct net_device *dev, int count, 328c2ecf20Sopenharmony_ci const unsigned char *buf, int star_page); 338c2ecf20Sopenharmony_ci void (*block_input)(struct net_device *dev, int count, 348c2ecf20Sopenharmony_ci struct sk_buff *skb, int ring_offset); 358c2ecf20Sopenharmony_ci /* returns nonzero if a pending interrupt request might by caused by 368c2ecf20Sopenharmony_ci * the ax88786. Handles all interrupts if set to NULL 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci int (*check_irq)(struct platform_device *pdev); 398c2ecf20Sopenharmony_ci}; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#endif /* __NET_AX88796_PLAT_H */ 42