Skip to content

Commit 2b07364

Browse files
ynezzclaudiubeznea
authored andcommitted
of_net: Fix residues after of_get_nvmem_mac_address removal
I've discovered following discrepancy in the bindings/net/ethernet.txt documentation, where it states following: - nvmem-cells: phandle, reference to an nvmem node for the MAC address; - nvmem-cell-names: string, should be "mac-address" if nvmem is to be.. which is actually misleading and confusing. There are only two ethernet drivers in the tree, cadence/macb and davinci which supports this properties. This nvmem-cell* properties were introduced in commit 9217e56 ("of_net: Implement of_get_nvmem_mac_address helper"), but commit afa64a7 ("of: net: kill of_get_nvmem_mac_address()") forget to properly clean up this parts. So this patch fixes the documentation by moving the nvmem-cell* properties at the appropriate places. While at it, I've removed unused include as well. Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Fixes: afa64a7 ("of: net: kill of_get_nvmem_mac_address()") Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent eec55dd commit 2b07364

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Documentation/devicetree/bindings/net/davinci_emac.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Required properties:
2020
Optional properties:
2121
- phy-handle: See ethernet.txt file in the same directory.
2222
If absent, davinci_emac driver defaults to 100/FULL.
23+
- nvmem-cells: phandle, reference to an nvmem node for the MAC address
24+
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
2325
- ti,davinci-rmii-en: 1 byte, 1 means use RMII
2426
- ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM?
2527

Documentation/devicetree/bindings/net/ethernet.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
1010
the boot program; should be used in cases where the MAC address assigned to
1111
the device by the boot program is different from the "local-mac-address"
1212
property;
13-
- nvmem-cells: phandle, reference to an nvmem node for the MAC address;
14-
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used;
1513
- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
1614
- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
1715
the maximum frame size (there's contradiction in the Devicetree

Documentation/devicetree/bindings/net/macb.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Required properties:
2626
Optional elements: 'tsu_clk'
2727
- clocks: Phandles to input clocks.
2828

29+
Optional properties:
30+
- nvmem-cells: phandle, reference to an nvmem node for the MAC address
31+
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
32+
2933
Optional properties for PHY child node:
3034
- reset-gpios : Should specify the gpio for phy reset
3135
- magic-packet : If present, indicates that the hardware supports waking

drivers/of/of_net.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
#include <linux/etherdevice.h>
99
#include <linux/kernel.h>
10-
#include <linux/nvmem-consumer.h>
1110
#include <linux/of_net.h>
1211
#include <linux/of_platform.h>
1312
#include <linux/phy.h>

0 commit comments

Comments
 (0)