Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
marvell.c File Reference
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/unistd.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/marvell_phy.h>
#include <linux/of.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Macros

#define MII_MARVELL_PHY_PAGE   22
 
#define MII_M1011_IEVENT   0x13
 
#define MII_M1011_IEVENT_CLEAR   0x0000
 
#define MII_M1011_IMASK   0x12
 
#define MII_M1011_IMASK_INIT   0x6400
 
#define MII_M1011_IMASK_CLEAR   0x0000
 
#define MII_M1011_PHY_SCR   0x10
 
#define MII_M1011_PHY_SCR_AUTO_CROSS   0x0060
 
#define MII_M1145_PHY_EXT_CR   0x14
 
#define MII_M1145_RGMII_RX_DELAY   0x0080
 
#define MII_M1145_RGMII_TX_DELAY   0x0002
 
#define MII_M1111_PHY_LED_CONTROL   0x18
 
#define MII_M1111_PHY_LED_DIRECT   0x4100
 
#define MII_M1111_PHY_LED_COMBINE   0x411c
 
#define MII_M1111_PHY_EXT_CR   0x14
 
#define MII_M1111_RX_DELAY   0x80
 
#define MII_M1111_TX_DELAY   0x2
 
#define MII_M1111_PHY_EXT_SR   0x1b
 
#define MII_M1111_HWCFG_MODE_MASK   0xf
 
#define MII_M1111_HWCFG_MODE_COPPER_RGMII   0xb
 
#define MII_M1111_HWCFG_MODE_FIBER_RGMII   0x3
 
#define MII_M1111_HWCFG_MODE_SGMII_NO_CLK   0x4
 
#define MII_M1111_HWCFG_MODE_COPPER_RTBI   0x9
 
#define MII_M1111_HWCFG_FIBER_COPPER_AUTO   0x8000
 
#define MII_M1111_HWCFG_FIBER_COPPER_RES   0x2000
 
#define MII_M1111_COPPER   0
 
#define MII_M1111_FIBER   1
 
#define MII_88E1121_PHY_MSCR_PAGE   2
 
#define MII_88E1121_PHY_MSCR_REG   21
 
#define MII_88E1121_PHY_MSCR_RX_DELAY   BIT(5)
 
#define MII_88E1121_PHY_MSCR_TX_DELAY   BIT(4)
 
#define MII_88E1121_PHY_MSCR_DELAY_MASK   (~(0x3 << 4))
 
#define MII_88E1318S_PHY_MSCR1_REG   16
 
#define MII_88E1318S_PHY_MSCR1_PAD_ODD   BIT(6)
 
#define MII_88E1121_PHY_LED_CTRL   16
 
#define MII_88E1121_PHY_LED_PAGE   3
 
#define MII_88E1121_PHY_LED_DEF   0x0030
 
#define MII_M1011_PHY_STATUS   0x11
 
#define MII_M1011_PHY_STATUS_1000   0x8000
 
#define MII_M1011_PHY_STATUS_100   0x4000
 
#define MII_M1011_PHY_STATUS_SPD_MASK   0xc000
 
#define MII_M1011_PHY_STATUS_FULLDUPLEX   0x2000
 
#define MII_M1011_PHY_STATUS_RESOLVED   0x0800
 
#define MII_M1011_PHY_STATUS_LINK   0x0400
 

Functions

 MODULE_DESCRIPTION ("Marvell PHY driver")
 
 MODULE_AUTHOR ("Andy Fleming")
 
 MODULE_LICENSE ("GPL")
 
 module_init (marvell_init)
 
 module_exit (marvell_exit)
 
 MODULE_DEVICE_TABLE (mdio, marvell_tbl)
 

Macro Definition Documentation

#define MII_88E1121_PHY_LED_CTRL   16

Definition at line 83 of file marvell.c.

#define MII_88E1121_PHY_LED_DEF   0x0030

Definition at line 85 of file marvell.c.

#define MII_88E1121_PHY_LED_PAGE   3

Definition at line 84 of file marvell.c.

#define MII_88E1121_PHY_MSCR_DELAY_MASK   (~(0x3 << 4))

Definition at line 78 of file marvell.c.

#define MII_88E1121_PHY_MSCR_PAGE   2

Definition at line 74 of file marvell.c.

#define MII_88E1121_PHY_MSCR_REG   21

Definition at line 75 of file marvell.c.

#define MII_88E1121_PHY_MSCR_RX_DELAY   BIT(5)

Definition at line 76 of file marvell.c.

#define MII_88E1121_PHY_MSCR_TX_DELAY   BIT(4)

Definition at line 77 of file marvell.c.

#define MII_88E1318S_PHY_MSCR1_PAD_ODD   BIT(6)

Definition at line 81 of file marvell.c.

#define MII_88E1318S_PHY_MSCR1_REG   16

Definition at line 80 of file marvell.c.

#define MII_M1011_IEVENT   0x13

Definition at line 41 of file marvell.c.

#define MII_M1011_IEVENT_CLEAR   0x0000

Definition at line 42 of file marvell.c.

#define MII_M1011_IMASK   0x12

Definition at line 44 of file marvell.c.

#define MII_M1011_IMASK_CLEAR   0x0000

Definition at line 46 of file marvell.c.

#define MII_M1011_IMASK_INIT   0x6400

Definition at line 45 of file marvell.c.

#define MII_M1011_PHY_SCR   0x10

Definition at line 48 of file marvell.c.

#define MII_M1011_PHY_SCR_AUTO_CROSS   0x0060

Definition at line 49 of file marvell.c.

#define MII_M1011_PHY_STATUS   0x11

Definition at line 87 of file marvell.c.

#define MII_M1011_PHY_STATUS_100   0x4000

Definition at line 89 of file marvell.c.

#define MII_M1011_PHY_STATUS_1000   0x8000

Definition at line 88 of file marvell.c.

#define MII_M1011_PHY_STATUS_FULLDUPLEX   0x2000

Definition at line 91 of file marvell.c.

#define MII_M1011_PHY_STATUS_LINK   0x0400

Definition at line 93 of file marvell.c.

#define MII_M1011_PHY_STATUS_RESOLVED   0x0800

Definition at line 92 of file marvell.c.

#define MII_M1011_PHY_STATUS_SPD_MASK   0xc000

Definition at line 90 of file marvell.c.

#define MII_M1111_COPPER   0

Definition at line 71 of file marvell.c.

#define MII_M1111_FIBER   1

Definition at line 72 of file marvell.c.

#define MII_M1111_HWCFG_FIBER_COPPER_AUTO   0x8000

Definition at line 68 of file marvell.c.

#define MII_M1111_HWCFG_FIBER_COPPER_RES   0x2000

Definition at line 69 of file marvell.c.

#define MII_M1111_HWCFG_MODE_COPPER_RGMII   0xb

Definition at line 64 of file marvell.c.

#define MII_M1111_HWCFG_MODE_COPPER_RTBI   0x9

Definition at line 67 of file marvell.c.

#define MII_M1111_HWCFG_MODE_FIBER_RGMII   0x3

Definition at line 65 of file marvell.c.

#define MII_M1111_HWCFG_MODE_MASK   0xf

Definition at line 63 of file marvell.c.

#define MII_M1111_HWCFG_MODE_SGMII_NO_CLK   0x4

Definition at line 66 of file marvell.c.

#define MII_M1111_PHY_EXT_CR   0x14

Definition at line 58 of file marvell.c.

#define MII_M1111_PHY_EXT_SR   0x1b

Definition at line 61 of file marvell.c.

#define MII_M1111_PHY_LED_COMBINE   0x411c

Definition at line 57 of file marvell.c.

#define MII_M1111_PHY_LED_CONTROL   0x18

Definition at line 55 of file marvell.c.

#define MII_M1111_PHY_LED_DIRECT   0x4100

Definition at line 56 of file marvell.c.

#define MII_M1111_RX_DELAY   0x80

Definition at line 59 of file marvell.c.

#define MII_M1111_TX_DELAY   0x2

Definition at line 60 of file marvell.c.

#define MII_M1145_PHY_EXT_CR   0x14

Definition at line 51 of file marvell.c.

#define MII_M1145_RGMII_RX_DELAY   0x0080

Definition at line 52 of file marvell.c.

#define MII_M1145_RGMII_TX_DELAY   0x0002

Definition at line 53 of file marvell.c.

#define MII_MARVELL_PHY_PAGE   22

Definition at line 39 of file marvell.c.

Function Documentation

MODULE_AUTHOR ( "Andy Fleming"  )
MODULE_DESCRIPTION ( "Marvell PHY driver )
MODULE_DEVICE_TABLE ( mdio  ,
marvell_tbl   
)
module_exit ( marvell_exit  )
module_init ( marvell_init  )
MODULE_LICENSE ( "GPL"  )