Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
mac-fcc.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/phy.h>
#include <linux/of_device.h>
#include <linux/gfp.h>
#include <asm/immap_cpm2.h>
#include <asm/mpc8260.h>
#include <asm/cpm2.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include "fs_enet.h"

Go to the source code of this file.

Macros

#define W32(_p, _m, _v)   out_be32(&(_p)->_m, (_v))
 
#define R32(_p, _m)   in_be32(&(_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)   out_be16(&(_p)->_m, (_v))
 
#define R16(_p, _m)   in_be16(&(_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)   out_8(&(_p)->_m, (_v))
 
#define R8(_p, _m)   in_8(&(_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 FCC_MAX_MULTICAST_ADDRS   64
 
#define mk_mii_read(REG)   (0x60020000 | ((REG & 0x1f) << 18))
 
#define mk_mii_write(REG, VAL)   (0x50020000 | ((REG & 0x1f) << 18) | (VAL & 0xffff))
 
#define mk_mii_end   0
 
#define MAX_CR_CMD_LOOPS   10000
 
#define FCC_NAPI_RX_EVENT_MSK   (FCC_ENET_RXF | FCC_ENET_RXB)
 
#define FCC_RX_EVENT   (FCC_ENET_RXF)
 
#define FCC_TX_EVENT   (FCC_ENET_TXB)
 
#define FCC_ERR_EVENT_MSK   (FCC_ENET_TXE)
 

Variables

struct fs_ops fs_fcc_ops
 

Macro Definition Documentation

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

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

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

Definition at line 56 of file mac-fcc.c.

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

Definition at line 66 of file mac-fcc.c.

#define FCC_ERR_EVENT_MSK   (FCC_ENET_TXE)

Definition at line 129 of file mac-fcc.c.

#define FCC_MAX_MULTICAST_ADDRS   64

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

#define FCC_NAPI_RX_EVENT_MSK   (FCC_ENET_RXF | FCC_ENET_RXB)

Definition at line 126 of file mac-fcc.c.

#define FCC_RX_EVENT   (FCC_ENET_RXF)

Definition at line 127 of file mac-fcc.c.

#define FCC_TX_EVENT   (FCC_ENET_TXB)

Definition at line 128 of file mac-fcc.c.

#define MAX_CR_CMD_LOOPS   10000

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

#define mk_mii_end   0

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

#define mk_mii_read (   REG)    (0x60020000 | ((REG & 0x1f) << 18))

Definition at line 72 of file mac-fcc.c.

#define mk_mii_write (   REG,
  VAL 
)    (0x50020000 | ((REG & 0x1f) << 18) | (VAL & 0xffff))

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

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

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

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

Definition at line 54 of file mac-fcc.c.

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

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

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

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

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

Definition at line 55 of file mac-fcc.c.

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

Definition at line 65 of file mac-fcc.c.

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

Definition at line 58 of file mac-fcc.c.

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

Definition at line 53 of file mac-fcc.c.

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

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

Variable Documentation

struct fs_ops fs_fcc_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 565 of file mac-fcc.c.