-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dts: common: added index and speed parameters to mv6 struct
Signed-off-by: Joacim Zetterling <[email protected]>
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
|
||
#define _mv6_port_common(_reg, _label, _mode) \ | ||
#define _mv6_port_common(_index, _reg, _label, _mode) \ | ||
reg = <_reg>; \ | ||
label = _label; \ | ||
local-mac-address = [00 00 00 00 00 00]; \ | ||
phy-mode = _mode | ||
|
||
#define mv6_port(_reg, _label, _phy, _mode) \ | ||
#define mv6_port(_index, _reg, _label, _phy, _mode) \ | ||
port@_reg { \ | ||
phy-handle = <_phy>; \ | ||
_mv6_port_common(_reg, _label, _mode); \ | ||
_mv6_port_common(_index, _reg, _label, _mode); \ | ||
} | ||
|
||
#define mv6_port_sfp(_reg, _label, _sfp, _mode) \ | ||
#define mv6_label_port(_switch, _index, _reg, _label, _phy, _mode) \ | ||
_switch##_port##_reg: mv6_port(_index, _reg, _label, _phy, _mode) | ||
|
||
#define mv6_port_sfp(_index, _reg, _label, _sfp, _mode) \ | ||
port@_reg { \ | ||
managed = "in-band-status"; \ | ||
sfp = <_sfp>; \ | ||
_mv6_port_common(_reg, _label, _mode); \ | ||
_mv6_port_common(_index, _reg, _label, _mode); \ | ||
} | ||
|
||
#define mv6_phy(_reg) \ | ||
#define mv6_phy(_reg, _speed) \ | ||
ethernet-phy@_reg { \ | ||
reg = <_reg>; \ | ||
interrupts = <_reg IRQ_TYPE_LEVEL_LOW>; \ | ||
max-speed = <_speed>; \ | ||
} |