Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
xgmac_mdio.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/phy.h>
#include <linux/mdio.h>
#include <linux/of_platform.h>
#include <linux/of_mdio.h>

Go to the source code of this file.

Data Structures

struct  tgec_mdio_controller
 

Macros

#define TIMEOUT   1000
 
#define MDIO_STAT_CLKDIV(x)   (((x>>1) & 0xff) << 8)
 
#define MDIO_STAT_BSY   (1 << 0)
 
#define MDIO_STAT_RD_ER   (1 << 1)
 
#define MDIO_CTL_DEV_ADDR(x)   (x & 0x1f)
 
#define MDIO_CTL_PORT_ADDR(x)   ((x & 0x1f) << 5)
 
#define MDIO_CTL_PRE_DIS   (1 << 10)
 
#define MDIO_CTL_SCAN_EN   (1 << 11)
 
#define MDIO_CTL_POST_INC   (1 << 14)
 
#define MDIO_CTL_READ   (1 << 15)
 
#define MDIO_DATA(x)   (x & 0xffff)
 
#define MDIO_DATA_BSY   (1 << 31)
 

Functions

 MODULE_DEVICE_TABLE (of, xgmac_mdio_match)
 
 module_platform_driver (xgmac_mdio_driver)
 
 MODULE_DESCRIPTION ("Freescale QorIQ 10G MDIO Controller")
 
 MODULE_LICENSE ("GPL v2")
 

Variables

struct tgec_mdio_controller __packed
 

Macro Definition Documentation

#define MDIO_CTL_DEV_ADDR (   x)    (x & 0x1f)

Definition at line 37 of file xgmac_mdio.c.

#define MDIO_CTL_PORT_ADDR (   x)    ((x & 0x1f) << 5)

Definition at line 38 of file xgmac_mdio.c.

#define MDIO_CTL_POST_INC   (1 << 14)

Definition at line 41 of file xgmac_mdio.c.

#define MDIO_CTL_PRE_DIS   (1 << 10)

Definition at line 39 of file xgmac_mdio.c.

#define MDIO_CTL_READ   (1 << 15)

Definition at line 42 of file xgmac_mdio.c.

#define MDIO_CTL_SCAN_EN   (1 << 11)

Definition at line 40 of file xgmac_mdio.c.

#define MDIO_DATA (   x)    (x & 0xffff)

Definition at line 44 of file xgmac_mdio.c.

#define MDIO_DATA_BSY   (1 << 31)

Definition at line 45 of file xgmac_mdio.c.

#define MDIO_STAT_BSY   (1 << 0)

Definition at line 35 of file xgmac_mdio.c.

#define MDIO_STAT_CLKDIV (   x)    (((x>>1) & 0xff) << 8)

Definition at line 34 of file xgmac_mdio.c.

#define MDIO_STAT_RD_ER   (1 << 1)

Definition at line 36 of file xgmac_mdio.c.

#define TIMEOUT   1000

Definition at line 24 of file xgmac_mdio.c.

Function Documentation

MODULE_DESCRIPTION ( "Freescale QorIQ 10G MDIO Controller"  )
MODULE_DEVICE_TABLE ( of  ,
xgmac_mdio_match   
)
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( xgmac_mdio_driver  )

Variable Documentation