Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
bmac.c File Reference
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/crc32.h>
#include <linux/bitrev.h>
#include <linux/ethtool.h>
#include <linux/slab.h>
#include <asm/prom.h>
#include <asm/dbdma.h>
#include <asm/io.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/macio.h>
#include <asm/irq.h>
#include "bmac.h"

Go to the source code of this file.

Data Structures

struct  bmac_data
 

Macros

#define trunc_page(x)   ((void *)(((unsigned long)(x)) & ~((unsigned long)(PAGE_SIZE - 1))))
 
#define round_page(x)   trunc_page(((unsigned long)(x)) + ((unsigned long)(PAGE_SIZE - 1)))
 
#define ENET_CRCPOLY   0x04c11db7
 
#define SUNHME_MULTICAST
 
#define N_RX_RING   64
 
#define N_TX_RING   32
 
#define MAX_TX_ACTIVE   1
 
#define ETHERCRC   4
 
#define ETHERMINPACKET   64
 
#define ETHERMTU   1500
 
#define RX_BUFLEN   (ETHERMTU + 14 + ETHERCRC + 2)
 
#define TX_TIMEOUT   HZ /* 1 second */
 
#define TX_DMA_ERR   0x80
 
#define XXDEBUG(args)
 
#define PRIV_BYTES
 
#define DBDMA_SET(x)   ( ((x) | (x) << 16) )
 
#define DBDMA_CLEAR(x)   ( (x) << 16)
 
#define MIFDELAY   udelay(10)
 
#define SROMAddressLength   5
 
#define DataInOn   0x0008
 
#define DataInOff   0x0000
 
#define Clk   0x0002
 
#define ChipSelect   0x0001
 
#define SDIShiftCount   3
 
#define SD0ShiftCount   2
 
#define DelayValue   1000 /* number of microseconds */
 
#define SROMStartOffset   10 /* this is in words */
 
#define SROMReadCount   3 /* number of words to read from SROM */
 
#define SROMAddressBits   6
 
#define EnetAddressOffset   20
 

Functions

 MODULE_DEVICE_TABLE (of, bmac_match)
 
 MODULE_AUTHOR ("Randy Gobbel/Paul Mackerras")
 
 MODULE_DESCRIPTION ("PowerMac BMAC ethernet driver.")
 
 MODULE_LICENSE ("GPL")
 
 module_init (bmac_init)
 
 module_exit (bmac_exit)
 

Macro Definition Documentation

#define ChipSelect   0x0001

Definition at line 1086 of file bmac.c.

#define Clk   0x0002

Definition at line 1085 of file bmac.c.

#define DataInOff   0x0000

Definition at line 1084 of file bmac.c.

#define DataInOn   0x0008

Definition at line 1083 of file bmac.c.

#define DBDMA_CLEAR (   x)    ( (x) << 16)

Definition at line 165 of file bmac.c.

#define DBDMA_SET (   x)    ( ((x) | (x) << 16) )

Definition at line 164 of file bmac.c.

#define DelayValue   1000 /* number of microseconds */

Definition at line 1089 of file bmac.c.

#define ENET_CRCPOLY   0x04c11db7

Definition at line 43 of file bmac.c.

#define EnetAddressOffset   20

Definition at line 1093 of file bmac.c.

#define ETHERCRC   4

Definition at line 51 of file bmac.c.

#define ETHERMINPACKET   64

Definition at line 52 of file bmac.c.

#define ETHERMTU   1500

Definition at line 53 of file bmac.c.

#define MAX_TX_ACTIVE   1

Definition at line 50 of file bmac.c.

#define MIFDELAY   udelay(10)

Definition at line 240 of file bmac.c.

#define N_RX_RING   64

Definition at line 48 of file bmac.c.

#define N_TX_RING   32

Definition at line 49 of file bmac.c.

#define PRIV_BYTES
Value:
(sizeof(struct bmac_data) \
+ (N_RX_RING + N_TX_RING + 4) * sizeof(struct dbdma_cmd) \

Definition at line 142 of file bmac.c.

#define round_page (   x)    trunc_page(((unsigned long)(x)) + ((unsigned long)(PAGE_SIZE - 1)))

Definition at line 38 of file bmac.c.

#define RX_BUFLEN   (ETHERMTU + 14 + ETHERCRC + 2)

Definition at line 54 of file bmac.c.

#define SD0ShiftCount   2

Definition at line 1088 of file bmac.c.

#define SDIShiftCount   3

Definition at line 1087 of file bmac.c.

#define SROMAddressBits   6

Definition at line 1092 of file bmac.c.

#define SROMAddressLength   5

Definition at line 1082 of file bmac.c.

#define SROMReadCount   3 /* number of words to read from SROM */

Definition at line 1091 of file bmac.c.

#define SROMStartOffset   10 /* this is in words */

Definition at line 1090 of file bmac.c.

#define SUNHME_MULTICAST

Definition at line 46 of file bmac.c.

#define trunc_page (   x)    ((void *)(((unsigned long)(x)) & ~((unsigned long)(PAGE_SIZE - 1))))

Definition at line 37 of file bmac.c.

#define TX_DMA_ERR   0x80

Definition at line 58 of file bmac.c.

#define TX_TIMEOUT   HZ /* 1 second */

Definition at line 55 of file bmac.c.

#define XXDEBUG (   args)

Definition at line 60 of file bmac.c.

Function Documentation

MODULE_AUTHOR ( "Randy Gobbel/Paul Mackerras"  )
MODULE_DESCRIPTION ( "PowerMac BMAC ethernet driver."  )
MODULE_DEVICE_TABLE ( of  ,
bmac_match   
)
module_exit ( bmac_exit  )
module_init ( bmac_init  )
MODULE_LICENSE ( "GPL"  )