aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/stmmac.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/networking/stmmac.txt')
-rw-r--r--Documentation/networking/stmmac.txt29
1 files changed, 25 insertions, 4 deletions
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index d0aeeadd264b..ab1e8d7004c5 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -111,11 +111,12 @@ and detailed below as well:
111 int phy_addr; 111 int phy_addr;
112 int interface; 112 int interface;
113 struct stmmac_mdio_bus_data *mdio_bus_data; 113 struct stmmac_mdio_bus_data *mdio_bus_data;
114 int pbl; 114 struct stmmac_dma_cfg *dma_cfg;
115 int clk_csr; 115 int clk_csr;
116 int has_gmac; 116 int has_gmac;
117 int enh_desc; 117 int enh_desc;
118 int tx_coe; 118 int tx_coe;
119 int rx_coe;
119 int bugged_jumbo; 120 int bugged_jumbo;
120 int pmt; 121 int pmt;
121 int force_sf_dma_mode; 122 int force_sf_dma_mode;
@@ -136,10 +137,12 @@ Where:
136 o pbl: the Programmable Burst Length is maximum number of beats to 137 o pbl: the Programmable Burst Length is maximum number of beats to
137 be transferred in one DMA transaction. 138 be transferred in one DMA transaction.
138 GMAC also enables the 4xPBL by default. 139 GMAC also enables the 4xPBL by default.
139 o clk_csr: CSR Clock range selection. 140 o clk_csr: fixed CSR Clock range selection.
140 o has_gmac: uses the GMAC core. 141 o has_gmac: uses the GMAC core.
141 o enh_desc: if sets the MAC will use the enhanced descriptor structure. 142 o enh_desc: if sets the MAC will use the enhanced descriptor structure.
142 o tx_coe: core is able to perform the tx csum in HW. 143 o tx_coe: core is able to perform the tx csum in HW.
144 o rx_coe: the supports three check sum offloading engine types:
145 type_1, type_2 (full csum) and no RX coe.
143 o bugged_jumbo: some HWs are not able to perform the csum in HW for 146 o bugged_jumbo: some HWs are not able to perform the csum in HW for
144 over-sized frames due to limited buffer sizes. 147 over-sized frames due to limited buffer sizes.
145 Setting this flag the csum will be done in SW on 148 Setting this flag the csum will be done in SW on
@@ -160,7 +163,7 @@ Where:
160 o custom_cfg: this is a custom configuration that can be passed while 163 o custom_cfg: this is a custom configuration that can be passed while
161 initialising the resources. 164 initialising the resources.
162 165
163The we have: 166For MDIO bus The we have:
164 167
165 struct stmmac_mdio_bus_data { 168 struct stmmac_mdio_bus_data {
166 int bus_id; 169 int bus_id;
@@ -177,10 +180,28 @@ Where:
177 o irqs: list of IRQs, one per PHY. 180 o irqs: list of IRQs, one per PHY.
178 o probed_phy_irq: if irqs is NULL, use this for probed PHY. 181 o probed_phy_irq: if irqs is NULL, use this for probed PHY.
179 182
183
184For DMA engine we have the following internal fields that should be
185tuned according to the HW capabilities.
186
187struct stmmac_dma_cfg {
188 int pbl;
189 int fixed_burst;
190 int burst_len_supported;
191};
192
193Where:
194 o pbl: Programmable Burst Length
195 o fixed_burst: program the DMA to use the fixed burst mode
196 o burst_len: this is the value we put in the register
197 supported values are provided as macros in
198 linux/stmmac.h header file.
199
200---
201
180Below an example how the structures above are using on ST platforms. 202Below an example how the structures above are using on ST platforms.
181 203
182 static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = { 204 static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = {
183 .pbl = 32,
184 .has_gmac = 0, 205 .has_gmac = 0,
185 .enh_desc = 0, 206 .enh_desc = 0,
186 .fix_mac_speed = stxYYY_ethernet_fix_mac_speed, 207 .fix_mac_speed = stxYYY_ethernet_fix_mac_speed,