Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
greth.c File Reference
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/skbuff.h>
#include <linux/io.h>
#include <linux/crc32.h>
#include <linux/mii.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/slab.h>
#include <asm/cacheflush.h>
#include <asm/byteorder.h>
#include "greth.h"

Go to the source code of this file.

Macros

#define GRETH_DEF_MSG_ENABLE
 
#define GRETH_REGLOAD(a)   (be32_to_cpu(__raw_readl(&(a))))
 
#define GRETH_REGSAVE(a, v)   (__raw_writel(cpu_to_be32(v), &(a)))
 
#define GRETH_REGORIN(a, v)   (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) | (v))))
 
#define GRETH_REGANDIN(a, v)   (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) & (v))))
 
#define NEXT_TX(N)   (((N) + 1) & GRETH_TXBD_NUM_MASK)
 
#define SKIP_TX(N, C)   (((N) + C) & GRETH_TXBD_NUM_MASK)
 
#define NEXT_RX(N)   (((N) + 1) & GRETH_RXBD_NUM_MASK)
 

Functions

 module_param (greth_debug, int, 0)
 
 MODULE_PARM_DESC (greth_debug,"GRETH bitmapped debugging message enable value")
 
 module_param_array (macaddr, int, NULL, 0)
 
 MODULE_PARM_DESC (macaddr,"GRETH Ethernet MAC address")
 
 module_param (greth_edcl, int, 0)
 
 MODULE_PARM_DESC (greth_edcl,"GRETH EDCL usage indicator. Set to 1 if EDCL is used.")
 
 MODULE_DEVICE_TABLE (of, greth_of_match)
 
 module_platform_driver (greth_of_driver)
 
 MODULE_AUTHOR ("Aeroflex Gaisler AB.")
 
 MODULE_DESCRIPTION ("Aeroflex Gaisler Ethernet MAC driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define GRETH_DEF_MSG_ENABLE
Value:
NETIF_MSG_PROBE | \
NETIF_MSG_LINK | \
NETIF_MSG_IFDOWN | \
NETIF_MSG_IFUP | \
NETIF_MSG_RX_ERR | \
NETIF_MSG_TX_ERR)

Definition at line 49 of file greth.c.

#define GRETH_REGANDIN (   a,
  v 
)    (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) & (v))))

Definition at line 88 of file greth.c.

#define GRETH_REGLOAD (   a)    (be32_to_cpu(__raw_readl(&(a))))

Definition at line 85 of file greth.c.

#define GRETH_REGORIN (   a,
  v 
)    (GRETH_REGSAVE(a, (GRETH_REGLOAD(a) | (v))))

Definition at line 87 of file greth.c.

#define GRETH_REGSAVE (   a,
  v 
)    (__raw_writel(cpu_to_be32(v), &(a)))

Definition at line 86 of file greth.c.

#define NEXT_RX (   N)    (((N) + 1) & GRETH_RXBD_NUM_MASK)

Definition at line 92 of file greth.c.

#define NEXT_TX (   N)    (((N) + 1) & GRETH_TXBD_NUM_MASK)

Definition at line 90 of file greth.c.

#define SKIP_TX (   N,
  C 
)    (((N) + C) & GRETH_TXBD_NUM_MASK)

Definition at line 91 of file greth.c.

Function Documentation

MODULE_AUTHOR ( "Aeroflex Gaisler AB."  )
MODULE_DESCRIPTION ( "Aeroflex Gaisler Ethernet MAC driver )
MODULE_DEVICE_TABLE ( of  ,
greth_of_match   
)
MODULE_LICENSE ( "GPL"  )
module_param ( greth_debug  ,
int  ,
 
)
module_param ( greth_edcl  ,
int  ,
 
)
module_param_array ( macaddr  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( greth_debug  ,
"GRETH bitmapped debugging message enable value  
)
MODULE_PARM_DESC ( macaddr  ,
"GRETH Ethernet MAC address  
)
MODULE_PARM_DESC ( greth_edcl  ,
"GRETH EDCL usage indicator. Set to 1 if EDCL is used."   
)
module_platform_driver ( greth_of_driver  )