Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
mac-scc.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/bitops.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include "fs_enet.h"

Go to the source code of this file.

Macros

#define __fs_out32(addr, x)   out_be32(addr, x)
 
#define __fs_out16(addr, x)   out_be16(addr, x)
 
#define __fs_in32(addr)   in_be32(addr)
 
#define __fs_in16(addr)   in_be16(addr)
 
#define __fs_out8(addr, x)   out_8(addr, x)
 
#define __fs_in8(addr)   in_8(addr)
 
#define W32(_p, _m, _v)   __fs_out32(&(_p)->_m, (_v))
 
#define R32(_p, _m)   __fs_in32(&(_p)->_m)
 
#define S32(_p, _m, _v)   W32(_p, _m, R32(_p, _m) | (_v))
 
#define C32(_p, _m, _v)   W32(_p, _m, R32(_p, _m) & ~(_v))
 
#define W16(_p, _m, _v)   __fs_out16(&(_p)->_m, (_v))
 
#define R16(_p, _m)   __fs_in16(&(_p)->_m)
 
#define S16(_p, _m, _v)   W16(_p, _m, R16(_p, _m) | (_v))
 
#define C16(_p, _m, _v)   W16(_p, _m, R16(_p, _m) & ~(_v))
 
#define W8(_p, _m, _v)   __fs_out8(&(_p)->_m, (_v))
 
#define R8(_p, _m)   __fs_in8(&(_p)->_m)
 
#define S8(_p, _m, _v)   W8(_p, _m, R8(_p, _m) | (_v))
 
#define C8(_p, _m, _v)   W8(_p, _m, R8(_p, _m) & ~(_v))
 
#define SCC_MAX_MULTICAST_ADDRS   64
 
#define SCC_RESET_DELAY   50
 
#define SCC_NAPI_RX_EVENT_MSK   (SCCE_ENET_RXF | SCCE_ENET_RXB)
 
#define SCC_RX_EVENT   (SCCE_ENET_RXF)
 
#define SCC_TX_EVENT   (SCCE_ENET_TXB)
 
#define SCC_ERR_EVENT_MSK   (SCCE_ENET_TXE | SCCE_ENET_BSY)
 

Variables

struct fs_ops fs_scc_ops
 

Macro Definition Documentation

#define __fs_in16 (   addr)    in_be16(addr)

Definition at line 62 of file mac-scc.c.

#define __fs_in32 (   addr)    in_be32(addr)

Definition at line 61 of file mac-scc.c.

#define __fs_in8 (   addr)    in_8(addr)

Definition at line 64 of file mac-scc.c.

#define __fs_out16 (   addr,
  x 
)    out_be16(addr, x)

Definition at line 60 of file mac-scc.c.

#define __fs_out32 (   addr,
  x 
)    out_be32(addr, x)

Definition at line 59 of file mac-scc.c.

#define __fs_out8 (   addr,
  x 
)    out_8(addr, x)

Definition at line 63 of file mac-scc.c.

#define C16 (   _p,
  _m,
  _v 
)    W16(_p, _m, R16(_p, _m) & ~(_v))

Definition at line 76 of file mac-scc.c.

#define C32 (   _p,
  _m,
  _v 
)    W32(_p, _m, R32(_p, _m) & ~(_v))

Definition at line 71 of file mac-scc.c.

#define C8 (   _p,
  _m,
  _v 
)    W8(_p, _m, R8(_p, _m) & ~(_v))

Definition at line 81 of file mac-scc.c.

#define R16 (   _p,
  _m 
)    __fs_in16(&(_p)->_m)

Definition at line 74 of file mac-scc.c.

#define R32 (   _p,
  _m 
)    __fs_in32(&(_p)->_m)

Definition at line 69 of file mac-scc.c.

#define R8 (   _p,
  _m 
)    __fs_in8(&(_p)->_m)

Definition at line 79 of file mac-scc.c.

#define S16 (   _p,
  _m,
  _v 
)    W16(_p, _m, R16(_p, _m) | (_v))

Definition at line 75 of file mac-scc.c.

#define S32 (   _p,
  _m,
  _v 
)    W32(_p, _m, R32(_p, _m) | (_v))

Definition at line 70 of file mac-scc.c.

#define S8 (   _p,
  _m,
  _v 
)    W8(_p, _m, R8(_p, _m) | (_v))

Definition at line 80 of file mac-scc.c.

#define SCC_ERR_EVENT_MSK   (SCCE_ENET_TXE | SCCE_ENET_BSY)

Definition at line 121 of file mac-scc.c.

#define SCC_MAX_MULTICAST_ADDRS   64

Definition at line 83 of file mac-scc.c.

#define SCC_NAPI_RX_EVENT_MSK   (SCCE_ENET_RXF | SCCE_ENET_RXB)

Definition at line 118 of file mac-scc.c.

#define SCC_RESET_DELAY   50

Definition at line 88 of file mac-scc.c.

#define SCC_RX_EVENT   (SCCE_ENET_RXF)

Definition at line 119 of file mac-scc.c.

#define SCC_TX_EVENT   (SCCE_ENET_TXB)

Definition at line 120 of file mac-scc.c.

#define W16 (   _p,
  _m,
  _v 
)    __fs_out16(&(_p)->_m, (_v))

Definition at line 73 of file mac-scc.c.

#define W32 (   _p,
  _m,
  _v 
)    __fs_out32(&(_p)->_m, (_v))

Definition at line 68 of file mac-scc.c.

#define W8 (   _p,
  _m,
  _v 
)    __fs_out8(&(_p)->_m, (_v))

Definition at line 78 of file mac-scc.c.

Variable Documentation

struct fs_ops fs_scc_ops
Initial value:
= {
.setup_data = setup_data,
.cleanup_data = cleanup_data,
.set_multicast_list = set_multicast_list,
.restart = restart,
.stop = stop,
.napi_clear_rx_event = napi_clear_rx_event,
.napi_enable_rx = napi_enable_rx,
.napi_disable_rx = napi_disable_rx,
.rx_bd_done = rx_bd_done,
.tx_kickstart = tx_kickstart,
.get_int_events = get_int_events,
.clear_int_events = clear_int_events,
.ev_error = ev_error,
.get_regs = get_regs,
.get_regs_len = get_regs_len,
.tx_restart = tx_restart,
.allocate_bd = allocate_bd,
.free_bd = free_bd,
}

Definition at line 465 of file mac-scc.c.