Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lantiq_etop.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/uaccess.h>
#include <linux/in.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/phy.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <linux/platform_device.h>
#include <linux/ethtool.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <asm/checksum.h>
#include <lantiq_soc.h>
#include <xway_dma.h>
#include <lantiq_platform.h>

Go to the source code of this file.

Data Structures

struct  ltq_etop_chan
 
struct  ltq_etop_priv
 

Macros

#define LTQ_ETOP_MDIO   0x11804
 
#define MDIO_REQUEST   0x80000000
 
#define MDIO_READ   0x40000000
 
#define MDIO_ADDR_MASK   0x1f
 
#define MDIO_ADDR_OFFSET   0x15
 
#define MDIO_REG_MASK   0x1f
 
#define MDIO_REG_OFFSET   0x10
 
#define MDIO_VAL_MASK   0xffff
 
#define PPE32_CGEN   0x800
 
#define LQ_PPE32_ENET_MAC_CFG   0x1840
 
#define LTQ_ETOP_ENETS0   0x11850
 
#define LTQ_ETOP_MAC_DA0   0x1186C
 
#define LTQ_ETOP_MAC_DA1   0x11870
 
#define LTQ_ETOP_CFG   0x16020
 
#define LTQ_ETOP_IGPLEN   0x16080
 
#define MAX_DMA_CHAN   0x8
 
#define MAX_DMA_CRC_LEN   0x4
 
#define MAX_DMA_DATA_LEN   0x600
 
#define ETOP_FTCU   BIT(28)
 
#define ETOP_MII_MASK   0xf
 
#define ETOP_MII_NORMAL   0xd
 
#define ETOP_MII_REVERSE   0xe
 
#define ETOP_PLEN_UNDER   0x40
 
#define ETOP_CGEN   0x800
 
#define LTQ_ETOP_TX_CHANNEL   1
 
#define LTQ_ETOP_RX_CHANNEL   6
 
#define IS_TX(x)   (x == LTQ_ETOP_TX_CHANNEL)
 
#define IS_RX(x)   (x == LTQ_ETOP_RX_CHANNEL)
 
#define ltq_etop_r32(x)   ltq_r32(ltq_etop_membase + (x))
 
#define ltq_etop_w32(x, y)   ltq_w32(x, ltq_etop_membase + (y))
 
#define ltq_etop_w32_mask(x, y, z)   ltq_w32_mask(x, y, ltq_etop_membase + (z))
 
#define DRV_VERSION   "1.0"
 

Functions

int __init init_ltq_etop (void)
 
 module_init (init_ltq_etop)
 
 module_exit (exit_ltq_etop)
 
 MODULE_AUTHOR ("John Crispin <[email protected]>")
 
 MODULE_DESCRIPTION ("Lantiq SoC ETOP")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DRV_VERSION   "1.0"

Definition at line 86 of file lantiq_etop.c.

#define ETOP_CGEN   0x800

Definition at line 73 of file lantiq_etop.c.

#define ETOP_FTCU   BIT(28)

Definition at line 68 of file lantiq_etop.c.

#define ETOP_MII_MASK   0xf

Definition at line 69 of file lantiq_etop.c.

#define ETOP_MII_NORMAL   0xd

Definition at line 70 of file lantiq_etop.c.

#define ETOP_MII_REVERSE   0xe

Definition at line 71 of file lantiq_etop.c.

#define ETOP_PLEN_UNDER   0x40

Definition at line 72 of file lantiq_etop.c.

#define IS_RX (   x)    (x == LTQ_ETOP_RX_CHANNEL)

Definition at line 79 of file lantiq_etop.c.

#define IS_TX (   x)    (x == LTQ_ETOP_TX_CHANNEL)

Definition at line 78 of file lantiq_etop.c.

#define LQ_PPE32_ENET_MAC_CFG   0x1840

Definition at line 56 of file lantiq_etop.c.

#define LTQ_ETOP_CFG   0x16020

Definition at line 61 of file lantiq_etop.c.

#define LTQ_ETOP_ENETS0   0x11850

Definition at line 58 of file lantiq_etop.c.

#define LTQ_ETOP_IGPLEN   0x16080

Definition at line 62 of file lantiq_etop.c.

#define LTQ_ETOP_MAC_DA0   0x1186C

Definition at line 59 of file lantiq_etop.c.

#define LTQ_ETOP_MAC_DA1   0x11870

Definition at line 60 of file lantiq_etop.c.

#define LTQ_ETOP_MDIO   0x11804

Definition at line 46 of file lantiq_etop.c.

#define ltq_etop_r32 (   x)    ltq_r32(ltq_etop_membase + (x))

Definition at line 81 of file lantiq_etop.c.

#define LTQ_ETOP_RX_CHANNEL   6

Definition at line 77 of file lantiq_etop.c.

#define LTQ_ETOP_TX_CHANNEL   1

Definition at line 76 of file lantiq_etop.c.

#define ltq_etop_w32 (   x,
  y 
)    ltq_w32(x, ltq_etop_membase + (y))

Definition at line 82 of file lantiq_etop.c.

#define ltq_etop_w32_mask (   x,
  y,
 
)    ltq_w32_mask(x, y, ltq_etop_membase + (z))

Definition at line 83 of file lantiq_etop.c.

#define MAX_DMA_CHAN   0x8

Definition at line 64 of file lantiq_etop.c.

#define MAX_DMA_CRC_LEN   0x4

Definition at line 65 of file lantiq_etop.c.

#define MAX_DMA_DATA_LEN   0x600

Definition at line 66 of file lantiq_etop.c.

#define MDIO_ADDR_MASK   0x1f

Definition at line 49 of file lantiq_etop.c.

#define MDIO_ADDR_OFFSET   0x15

Definition at line 50 of file lantiq_etop.c.

#define MDIO_READ   0x40000000

Definition at line 48 of file lantiq_etop.c.

#define MDIO_REG_MASK   0x1f

Definition at line 51 of file lantiq_etop.c.

#define MDIO_REG_OFFSET   0x10

Definition at line 52 of file lantiq_etop.c.

#define MDIO_REQUEST   0x80000000

Definition at line 47 of file lantiq_etop.c.

#define MDIO_VAL_MASK   0xffff

Definition at line 53 of file lantiq_etop.c.

#define PPE32_CGEN   0x800

Definition at line 55 of file lantiq_etop.c.

Function Documentation

int __init init_ltq_etop ( void  )

Definition at line 800 of file lantiq_etop.c.

MODULE_AUTHOR ( "John Crispin <[email protected]>"  )
MODULE_DESCRIPTION ( "Lantiq SoC ETOP"  )
module_exit ( exit_ltq_etop  )
module_init ( init_ltq_etop  )
MODULE_LICENSE ( "GPL"  )