#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/timer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/irqreturn.h>
#include <linux/interrupt.h>
#include <linux/if_ether.h>
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/of_device.h>
#include <linux/platform_data/cpsw.h>
#include "cpsw_ale.h"
#include "davinci_cpdma.h"
Go to the source code of this file.
|
#define | CPSW_DEBUG |
|
#define | cpsw_info(priv, type, format,...) |
|
#define | cpsw_err(priv, type, format,...) |
|
#define | cpsw_dbg(priv, type, format,...) |
|
#define | cpsw_notice(priv, type, format,...) |
|
#define | CPSW_MAJOR_VERSION(reg) (reg >> 8 & 0x7) |
|
#define | CPSW_MINOR_VERSION(reg) (reg & 0xff) |
|
#define | CPSW_RTL_VERSION(reg) ((reg >> 11) & 0x1f) |
|
#define | CPDMA_RXTHRESH 0x0c0 |
|
#define | CPDMA_RXFREE 0x0e0 |
|
#define | CPDMA_TXHDP 0x00 |
|
#define | CPDMA_RXHDP 0x20 |
|
#define | CPDMA_TXCP 0x40 |
|
#define | CPDMA_RXCP 0x60 |
|
#define | cpsw_dma_regs(base, offset) (void __iomem *)((base) + (offset)) |
|
#define | cpsw_dma_rxthresh(base, offset) (void __iomem *)((base) + (offset) + CPDMA_RXTHRESH) |
|
#define | cpsw_dma_rxfree(base, offset) (void __iomem *)((base) + (offset) + CPDMA_RXFREE) |
|
#define | cpsw_dma_txhdp(base, offset) (void __iomem *)((base) + (offset) + CPDMA_TXHDP) |
|
#define | cpsw_dma_rxhdp(base, offset) (void __iomem *)((base) + (offset) + CPDMA_RXHDP) |
|
#define | cpsw_dma_txcp(base, offset) (void __iomem *)((base) + (offset) + CPDMA_TXCP) |
|
#define | cpsw_dma_rxcp(base, offset) (void __iomem *)((base) + (offset) + CPDMA_RXCP) |
|
#define | CPSW_POLL_WEIGHT 64 |
|
#define | CPSW_MIN_PACKET_SIZE 60 |
|
#define | CPSW_MAX_PACKET_SIZE (1500 + 14 + 4 + 4) |
|
#define | RX_PRIORITY_MAPPING 0x76543210 |
|
#define | TX_PRIORITY_MAPPING 0x33221100 |
|
#define | CPDMA_TX_PRIORITY_MAP 0x76543210 |
|
#define | cpsw_enable_irq(priv) |
|
#define | cpsw_disable_irq(priv) |
|
#define | napi_to_priv(napi) container_of(napi, struct cpsw_priv, napi) |
|
#define | for_each_slave(priv, func, arg...) |
|
#define | mac_hi(mac) |
|
#define | mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8)) |
|
|
| module_param (debug_level, int, 0) |
|
| MODULE_PARM_DESC (debug_level,"cpsw debug level (NETIF_MSG bits)") |
|
| module_param (ale_ageout, int, 0) |
|
| MODULE_PARM_DESC (ale_ageout,"cpsw ale ageout interval (seconds)") |
|
| module_param (rx_packet_max, int, 0) |
|
| MODULE_PARM_DESC (rx_packet_max,"maximum receive packet size (bytes)") |
|
void | cpsw_tx_handler (void *token, int len, int status) |
|
void | cpsw_rx_handler (void *token, int len, int status) |
|
| late_initcall (cpsw_init) |
|
| module_exit (cpsw_exit) |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_AUTHOR ("Cyril Chemparathy <[email protected]>") |
|
| MODULE_AUTHOR ("Mugunthan V N <[email protected]>") |
|
| MODULE_DESCRIPTION ("TI CPSW Ethernet driver") |
|
#define CPDMA_RXFREE 0x0e0 |
#define CPDMA_RXTHRESH 0x0c0 |
#define CPDMA_TX_PRIORITY_MAP 0x76543210 |
Value:
Definition at line 61 of file cpsw.c.
Value:
Definition at line 40 of file cpsw.c.
#define cpsw_disable_irq |
( |
|
priv | ) |
|
Value:
for (i = 0; i <
priv->num_irqs; i++) \
} while (0);
Definition at line 113 of file cpsw.c.
#define cpsw_enable_irq |
( |
|
priv | ) |
|
Value:
for (i = 0; i <
priv->num_irqs; i++) \
} while (0);
Definition at line 107 of file cpsw.c.
Value:
Definition at line 55 of file cpsw.c.
Value:
Definition at line 49 of file cpsw.c.
#define CPSW_MAJOR_VERSION |
( |
|
reg | ) |
(reg >> 8 & 0x7) |
#define CPSW_MAX_PACKET_SIZE (1500 + 14 + 4 + 4) |
#define CPSW_MIN_PACKET_SIZE 60 |
#define CPSW_MINOR_VERSION |
( |
|
reg | ) |
(reg & 0xff) |
Value:
Definition at line 67 of file cpsw.c.
#define CPSW_POLL_WEIGHT 64 |
#define CPSW_RTL_VERSION |
( |
|
reg | ) |
((reg >> 11) & 0x1f) |
#define for_each_slave |
( |
|
priv, |
|
|
|
func, |
|
|
|
arg... |
|
) |
| |
Value:do { \
for (idx = 0; idx < (
priv)->
data.slaves; idx++) \
} while (0)
Definition at line 224 of file cpsw.c.
Value:(((
mac)[0] << 0) | ((
mac)[1] << 8) | \
((
mac)[2] << 16) | ((
mac)[3] << 24))
Definition at line 355 of file cpsw.c.
#define mac_lo |
( |
|
mac | ) |
(((mac)[4] << 0) | ((mac)[5] << 8)) |
#define RX_PRIORITY_MAPPING 0x76543210 |
#define TX_PRIORITY_MAPPING 0x33221100 |
late_initcall |
( |
cpsw_init |
| ) |
|
MODULE_DESCRIPTION |
( |
"TI CPSW Ethernet driver" |
| ) |
|
module_exit |
( |
cpsw_exit |
| ) |
|
module_param |
( |
debug_level |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
module_param |
( |
ale_ageout |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
module_param |
( |
rx_packet_max |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
debug_level |
, |
|
|
"cpsw debug level (NETIF_MSG bits)" |
|
|
) |
| |