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