Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
macb.c File Reference
#include <linux/clk.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/dma-mapping.h>
#include <linux/platform_data/macb.h>
#include <linux/platform_device.h>
#include <linux/phy.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_net.h>
#include "macb.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define RX_BUFFER_SIZE   128
 
#define RX_RING_SIZE   512
 
#define RX_RING_BYTES   (sizeof(struct dma_desc) * RX_RING_SIZE)
 
#define RX_OFFSET   2
 
#define TX_RING_SIZE   128
 
#define DEF_TX_RING_PENDING   (TX_RING_SIZE - 1)
 
#define TX_RING_BYTES   (sizeof(struct dma_desc) * TX_RING_SIZE)
 
#define TX_RING_GAP(bp)   (TX_RING_SIZE - (bp)->tx_pending)
 
#define TX_BUFFS_AVAIL(bp)
 
#define NEXT_TX(n)   (((n) + 1) & (TX_RING_SIZE - 1))
 
#define NEXT_RX(n)   (((n) + 1) & (RX_RING_SIZE - 1))
 
#define MACB_TX_WAKEUP_THRESH   (TX_RING_SIZE / 4)
 
#define MACB_RX_INT_FLAGS
 
#define macb_suspend   NULL
 
#define macb_resume   NULL
 

Functions

 module_init (macb_init)
 
 module_exit (macb_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Cadence MACB/GEM Ethernet driver")
 
 MODULE_AUTHOR ("Haavard Skinnemoen (Atmel)")
 
 MODULE_ALIAS ("platform:macb")
 

Macro Definition Documentation

#define DEF_TX_RING_PENDING   (TX_RING_SIZE - 1)

Definition at line 40 of file macb.c.

#define macb_resume   NULL

Definition at line 1503 of file macb.c.

#define MACB_RX_INT_FLAGS
Value:
(MACB_BIT(RCOMP) | MACB_BIT(RXUBR) \
| MACB_BIT(ISR_ROVR))

Definition at line 56 of file macb.c.

#define macb_suspend   NULL

Definition at line 1502 of file macb.c.

#define MACB_TX_WAKEUP_THRESH   (TX_RING_SIZE / 4)

Definition at line 54 of file macb.c.

#define NEXT_RX (   n)    (((n) + 1) & (RX_RING_SIZE - 1))

Definition at line 51 of file macb.c.

#define NEXT_TX (   n)    (((n) + 1) & (TX_RING_SIZE - 1))

Definition at line 49 of file macb.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 11 of file macb.c.

#define RX_BUFFER_SIZE   128

Definition at line 32 of file macb.c.

#define RX_OFFSET   2

Definition at line 37 of file macb.c.

#define RX_RING_BYTES   (sizeof(struct dma_desc) * RX_RING_SIZE)

Definition at line 34 of file macb.c.

#define RX_RING_SIZE   512

Definition at line 33 of file macb.c.

#define TX_BUFFS_AVAIL (   bp)
Value:
(((bp)->tx_tail <= (bp)->tx_head) ? \
(bp)->tx_tail + (bp)->tx_pending - (bp)->tx_head : \
(bp)->tx_tail - (bp)->tx_head - TX_RING_GAP(bp))

Definition at line 45 of file macb.c.

#define TX_RING_BYTES   (sizeof(struct dma_desc) * TX_RING_SIZE)

Definition at line 41 of file macb.c.

#define TX_RING_GAP (   bp)    (TX_RING_SIZE - (bp)->tx_pending)

Definition at line 43 of file macb.c.

#define TX_RING_SIZE   128

Definition at line 39 of file macb.c.

Function Documentation

MODULE_ALIAS ( "platform:macb"  )
MODULE_AUTHOR ( "Haavard Skinnemoen (Atmel)"  )
MODULE_DESCRIPTION ( "Cadence MACB/GEM Ethernet driver )
module_exit ( macb_exit  )
module_init ( macb_init  )
MODULE_LICENSE ( "GPL"  )