Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

stmmac: update driver's doc

Fixed the driver's documentation that was obsolete and didn't
report new platform fields (recently added).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Giuseppe CAVALLARO and committed by
David S. Miller
3d237714 ff3dd78c

+25 -19
+25 -19
Documentation/networking/stmmac.txt
··· 10 10 (i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000 11 11 FF1152AMT0221 D1215994A VIRTEX FPGA board. 12 12 13 - DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether MAC 10/100 14 - Universal version 4.0 have been used for developing this driver. 13 + DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether 14 + MAC 10/100 Universal version 4.0 have been used for developing this driver. 15 15 16 16 This driver supports both the platform bus and PCI. 17 17 ··· 54 54 When one or more packets are received, an interrupt happens. The interrupts 55 55 are not queued so the driver has to scan all the descriptors in the ring during 56 56 the receive process. 57 - This is based on NAPI so the interrupt handler signals only if there is work to be 58 - done, and it exits. 57 + This is based on NAPI so the interrupt handler signals only if there is work 58 + to be done, and it exits. 59 59 Then the poll method will be scheduled at some future point. 60 60 The incoming packets are stored, by the DMA, in a list of pre-allocated socket 61 61 buffers in order to avoid the memcpy (Zero-copy). 62 62 63 63 4.3) Timer-Driver Interrupt 64 - Instead of having the device that asynchronously notifies the frame receptions, the 65 - driver configures a timer to generate an interrupt at regular intervals. 66 - Based on the granularity of the timer, the frames that are received by the device 67 - will experience different levels of latency. Some NICs have dedicated timer 68 - device to perform this task. STMMAC can use either the RTC device or the TMU 69 - channel 2 on STLinux platforms. 64 + Instead of having the device that asynchronously notifies the frame receptions, 65 + the driver configures a timer to generate an interrupt at regular intervals. 66 + Based on the granularity of the timer, the frames that are received by the 67 + device will experience different levels of latency. Some NICs have dedicated 68 + timer device to perform this task. STMMAC can use either the RTC device or the 69 + TMU channel 2 on STLinux platforms. 70 70 The timers frequency can be passed to the driver as parameter; when change it, 71 71 take care of both hardware capability and network stability/performance impact. 72 - Several performance tests on STM platforms showed this optimisation allows to spare 73 - the CPU while having the maximum throughput. 72 + Several performance tests on STM platforms showed this optimisation allows to 73 + spare the CPU while having the maximum throughput. 74 74 75 75 4.4) WOL 76 - Wake up on Lan feature through Magic and Unicast frames are supported for the GMAC 77 - core. 76 + Wake up on Lan feature through Magic and Unicast frames are supported for the 77 + GMAC core. 78 78 79 79 4.5) DMA descriptors 80 80 Driver handles both normal and enhanced descriptors. The latter has been only ··· 106 106 These are included in the include/linux/stmmac.h header file 107 107 and detailed below as well: 108 108 109 - struct plat_stmmacenet_data { 109 + struct plat_stmmacenet_data { 110 + char *phy_bus_name; 110 111 int bus_id; 111 112 int phy_addr; 112 113 int interface; ··· 125 124 void (*bus_setup)(void __iomem *ioaddr); 126 125 int (*init)(struct platform_device *pdev); 127 126 void (*exit)(struct platform_device *pdev); 127 + void *custom_cfg; 128 + void *custom_data; 128 129 void *bsp_priv; 129 130 }; 130 131 131 132 Where: 133 + o phy_bus_name: phy bus name to attach to the stmmac. 132 134 o bus_id: bus identifier. 133 135 o phy_addr: the physical address can be passed from the platform. 134 136 If it is set to -1 the driver will automatically 135 137 detect it at run-time by probing all the 32 addresses. 136 138 o interface: PHY device's interface. 137 139 o mdio_bus_data: specific platform fields for the MDIO bus. 138 - o pbl: the Programmable Burst Length is maximum number of beats to 140 + o dma_cfg: internal DMA parameters 141 + o pbl: the Programmable Burst Length is maximum number of beats to 139 142 be transferred in one DMA transaction. 140 143 GMAC also enables the 4xPBL by default. 144 + o fixed_burst/mixed_burst/burst_len 141 145 o clk_csr: fixed CSR Clock range selection. 142 146 o has_gmac: uses the GMAC core. 143 147 o enh_desc: if sets the MAC will use the enhanced descriptor structure. ··· 166 160 this is sometime necessary on some platforms (e.g. ST boxes) 167 161 where the HW needs to have set some PIO lines or system cfg 168 162 registers. 169 - o custom_cfg: this is a custom configuration that can be passed while 170 - initialising the resources. 163 + o custom_cfg/custom_data: this is a custom configuration that can be passed 164 + while initialising the resources. 165 + o bsp_priv: another private poiter. 171 166 172 167 For MDIO bus The we have: 173 168 ··· 186 179 o phy_mask: phy mask passed when register the MDIO bus within the driver. 187 180 o irqs: list of IRQs, one per PHY. 188 181 o probed_phy_irq: if irqs is NULL, use this for probed PHY. 189 - 190 182 191 183 For DMA engine we have the following internal fields that should be 192 184 tuned according to the HW capabilities.