Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
dp83640.c File Reference
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mii.h>
#include <linux/module.h>
#include <linux/net_tstamp.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/ptp_classify.h>
#include <linux/ptp_clock_kernel.h>
#include "dp83640_reg.h"

Go to the source code of this file.

Data Structures

struct  phy_rxts
 
struct  phy_txts
 
struct  rxts
 
struct  dp83640_private
 
struct  dp83640_clock
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DP83640_PHY_ID   0x20005ce1
 
#define PAGESEL   0x13
 
#define LAYER4   0x02
 
#define LAYER2   0x01
 
#define MAX_RXTS   64
 
#define N_EXT_TS   6
 
#define PSF_PTPVER   2
 
#define PSF_EVNT   0x4000
 
#define PSF_RX   0x2000
 
#define PSF_TX   0x1000
 
#define EXT_EVENT   1
 
#define CAL_EVENT   7
 
#define CAL_TRIGGER   7
 
#define PER_TRIGGER   6
 
#define ADJTIME_FIX   16
 
#define SKB_PTP_TYPE(__skb)   (*(unsigned int *)((__skb)->cb))
 
#define BROADCAST_ADDR   31
 

Enumerations

enum  {
  CALIBRATE_GPIO, PEROUT_GPIO, EXTTS0_GPIO, EXTTS1_GPIO,
  EXTTS2_GPIO, EXTTS3_GPIO, EXTTS4_GPIO, EXTTS5_GPIO,
  GPIO_TABLE_SIZE
}
 

Functions

 module_param (chosen_phy, int, 0444)
 
 module_param_array (gpio_tab, ushort, NULL, 0444)
 
 MODULE_PARM_DESC (chosen_phy,"The address of the PHY to use for the ancillary clock features")
 
 MODULE_PARM_DESC (gpio_tab,"Which GPIO line to use for which purpose: cal,perout,extts1,...,extts6")
 
 MODULE_DESCRIPTION ("National Semiconductor DP83640 PHY driver")
 
 MODULE_AUTHOR ("Richard Cochran <richardcochran@gmail.at>")
 
 MODULE_LICENSE ("GPL")
 
 module_init (dp83640_init)
 
 module_exit (dp83640_exit)
 
 MODULE_DEVICE_TABLE (mdio, dp83640_tbl)
 

Macro Definition Documentation

#define ADJTIME_FIX   16

Definition at line 52 of file dp83640.c.

#define BROADCAST_ADDR   31

Definition at line 169 of file dp83640.c.

#define CAL_EVENT   7

Definition at line 47 of file dp83640.c.

#define CAL_TRIGGER   7

Definition at line 48 of file dp83640.c.

#define DP83640_PHY_ID   0x20005ce1

Definition at line 36 of file dp83640.c.

#define EXT_EVENT   1

Definition at line 46 of file dp83640.c.

#define LAYER2   0x01

Definition at line 39 of file dp83640.c.

#define LAYER4   0x02

Definition at line 38 of file dp83640.c.

#define MAX_RXTS   64

Definition at line 40 of file dp83640.c.

#define N_EXT_TS   6

Definition at line 41 of file dp83640.c.

#define PAGESEL   0x13

Definition at line 37 of file dp83640.c.

#define PER_TRIGGER   6

Definition at line 49 of file dp83640.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 21 of file dp83640.c.

#define PSF_EVNT   0x4000

Definition at line 43 of file dp83640.c.

#define PSF_PTPVER   2

Definition at line 42 of file dp83640.c.

#define PSF_RX   0x2000

Definition at line 44 of file dp83640.c.

#define PSF_TX   0x1000

Definition at line 45 of file dp83640.c.

#define SKB_PTP_TYPE (   __skb)    (*(unsigned int *)((__skb)->cb))

Definition at line 60 of file dp83640.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
CALIBRATE_GPIO 
PEROUT_GPIO 
EXTTS0_GPIO 
EXTTS1_GPIO 
EXTTS2_GPIO 
EXTTS3_GPIO 
EXTTS4_GPIO 
EXTTS5_GPIO 
GPIO_TABLE_SIZE 

Definition at line 136 of file dp83640.c.

Function Documentation

MODULE_AUTHOR ( "Richard Cochran <richardcochran@gmail.at>"  )
MODULE_DESCRIPTION ( "National Semiconductor DP83640 PHY driver )
MODULE_DEVICE_TABLE ( mdio  ,
dp83640_tbl   
)
module_exit ( dp83640_exit  )
module_init ( dp83640_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( chosen_phy  ,
int  ,
0444   
)
module_param_array ( gpio_tab  ,
ushort  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( chosen_phy  ,
"The address of the PHY to use for the ancillary clock features  
)
MODULE_PARM_DESC ( gpio_tab  ,
"Which GPIO line to use for which purpose:  cal,
perout  ,
extts1  ,
  ...,
extts6"   
)