Skip to content

Commit

Permalink
dts: common: added index and speed parameters to mv6 struct
Browse files Browse the repository at this point in the history
Signed-off-by: Joacim Zetterling <[email protected]>
  • Loading branch information
joazet committed Dec 7, 2023
1 parent 96d6d38 commit 7c30711
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dts/include/common/mv6.h
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>; \
}

0 comments on commit 7c30711

Please sign in to comment.