Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
macsonic.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/gfp.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/nubus.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/bitrev.h>
#include <linux/slab.h>
#include <asm/bootinfo.h>
#include <asm/pgtable.h>
#include <asm/io.h>
#include <asm/hwtest.h>
#include <asm/dma.h>
#include <asm/macintosh.h>
#include <asm/macints.h>
#include <asm/mac_via.h>
#include "sonic.h"
#include "sonic.c"

Go to the source code of this file.

Macros

#define SONIC_READ(reg)
 
#define SONIC_WRITE(reg, val)
 
#define ONBOARD_SONIC_REGISTERS   0x50F0A000
 
#define ONBOARD_SONIC_PROM_BASE   0x50f08000
 
#define DUODOCK_SONIC_REGISTERS   0xe10000
 
#define DUODOCK_SONIC_PROM_BASE   0xe12000
 
#define APPLE_SONIC_REGISTERS   0
 
#define APPLE_SONIC_PROM_BASE   0x40000
 
#define DAYNALINK_PROM_BASE   0x400000
 
#define DAYNA_SONIC_REGISTERS   0x180000
 
#define DAYNA_SONIC_MAC_ADDR   0xffe004
 
#define SONIC_READ_PROM(addr)   nubus_readb(prom_addr+addr)
 
#define INVALID_MAC(mac)
 

Enumerations

enum  macsonic_type {
  MACSONIC_DUODOCK, MACSONIC_APPLE, MACSONIC_APPLE16, MACSONIC_DAYNA,
  MACSONIC_DAYNALINK
}
 

Functions

 MODULE_DESCRIPTION ("Macintosh SONIC ethernet driver")
 
 module_param (sonic_debug, int, 0)
 
 MODULE_PARM_DESC (sonic_debug,"macsonic debug level (1-4)")
 
 MODULE_ALIAS ("platform:macsonic")
 
 module_platform_driver (mac_sonic_driver)
 

Macro Definition Documentation

#define APPLE_SONIC_PROM_BASE   0x40000

Definition at line 103 of file macsonic.c.

#define APPLE_SONIC_REGISTERS   0

Definition at line 102 of file macsonic.c.

#define DAYNA_SONIC_MAC_ADDR   0xffe004

Definition at line 113 of file macsonic.c.

#define DAYNA_SONIC_REGISTERS   0x180000

Definition at line 109 of file macsonic.c.

#define DAYNALINK_PROM_BASE   0x400000

Definition at line 106 of file macsonic.c.

#define DUODOCK_SONIC_PROM_BASE   0xe12000

Definition at line 99 of file macsonic.c.

#define DUODOCK_SONIC_REGISTERS   0xe10000

Definition at line 98 of file macsonic.c.

#define INVALID_MAC (   mac)
Value:
(memcmp(mac, "\x08\x00\x07", 3) && \
memcmp(mac, "\x00\xA0\x40", 3) && \
memcmp(mac, "\x00\x80\x19", 3) && \
memcmp(mac, "\x00\x05\x02", 3))

Definition at line 243 of file macsonic.c.

#define ONBOARD_SONIC_PROM_BASE   0x50f08000

Definition at line 87 of file macsonic.c.

#define ONBOARD_SONIC_REGISTERS   0x50F0A000

Definition at line 86 of file macsonic.c.

#define SONIC_READ (   reg)
Value:
(nubus_readw(dev->base_addr + (reg * 4) \
+ lp->reg_offset))

Definition at line 71 of file macsonic.c.

#define SONIC_READ_PROM (   addr)    nubus_readb(prom_addr+addr)

Definition at line 115 of file macsonic.c.

#define SONIC_WRITE (   reg,
  val 
)
Value:
(nubus_writew(val, dev->base_addr + (reg * 4) \
+ lp->reg_offset))

Definition at line 73 of file macsonic.c.

Enumeration Type Documentation

Enumerator:
MACSONIC_DUODOCK 
MACSONIC_APPLE 
MACSONIC_APPLE16 
MACSONIC_DAYNA 
MACSONIC_DAYNALINK 

Definition at line 89 of file macsonic.c.

Function Documentation

MODULE_ALIAS ( "platform:macsonic"  )
MODULE_DESCRIPTION ( "Macintosh SONIC ethernet driver )
module_param ( sonic_debug  ,
int  ,
 
)
MODULE_PARM_DESC ( sonic_debug  ,
"macsonic debug level (1-4)"   
)
module_platform_driver ( mac_sonic_driver  )