Commit 34df92c9 authored by Adam Wujek's avatar Adam Wujek

Kconfig: rename VLAN, HAS_VLAN, HAS_MULTIPLE_VLAN to PPSI_VLAN,…

Kconfig: rename VLAN, HAS_VLAN, HAS_MULTIPLE_VLAN to PPSI_VLAN, ARCH_SUPPORT_VLAN, ARCH_SUPPORT_MULTIPLE_VLAN
Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent 46546abe
...@@ -5,8 +5,8 @@ choice ...@@ -5,8 +5,8 @@ choice
config ARCH_UNIX config ARCH_UNIX
bool "Unix (Linux and likely other systems)" bool "Unix (Linux and likely other systems)"
select HAS_VLAN select ARCH_SUPPORT_VLAN
select HAS_MULTIPLE_VLAN select ARCH_SUPPORT_MULTIPLE_VLAN
help help
ARCH=unix supports standard Unix system calls, although ARCH=unix supports standard Unix system calls, although
the code most likely includes some Linux dependencies. the code most likely includes some Linux dependencies.
...@@ -33,7 +33,7 @@ config ARCH_BARE_X86_64 ...@@ -33,7 +33,7 @@ config ARCH_BARE_X86_64
config ARCH_WRPC config ARCH_WRPC
bool "White Rabbit PTP Core (WR Node)" bool "White Rabbit PTP Core (WR Node)"
select HAS_VLAN select ARCH_SUPPORT_VLAN
help help
Build PPSi for use in the WRPC environment (SPEC card or similar Build PPSi for use in the WRPC environment (SPEC card or similar
one). This is a freestanding build, without operating system. one). This is a freestanding build, without operating system.
...@@ -41,8 +41,8 @@ config ARCH_WRPC ...@@ -41,8 +41,8 @@ config ARCH_WRPC
config ARCH_WRS config ARCH_WRS
bool "White Rabbit Switch" bool "White Rabbit Switch"
select HAS_VLAN select ARCH_SUPPORT_VLAN
select HAS_MULTIPLE_VLAN select ARCH_SUPPORT_MULTIPLE_VLAN
help help
Build PPSi for use in the WR switch. The computer is a standard Build PPSi for use in the WR switch. The computer is a standard
ARM-Linux host with hardware timestamping and internal PLLs ARM-Linux host with hardware timestamping and internal PLLs
...@@ -189,18 +189,33 @@ config HAS_PROFILE_CUSTOM ...@@ -189,18 +189,33 @@ config HAS_PROFILE_CUSTOM
default 1 if PROFILE_CUSTOM default 1 if PROFILE_CUSTOM
default 0 default 0
menu VLAN #default to y if WRPC and VLAN support is enabled in WRPC's Kconfig
config PPSI_VLAN
bool
default y if WRPC_PPSI && VLAN
# Vlan support: not all architectures have it, so this is set by them
config HAS_VLAN config ARCH_SUPPORT_MULTIPLE_VLAN
bool bool
config HAS_MULTIPLE_VLAN # I want a number, to be used without ifdef
config VLAN_ARRAY_SIZE
int
default 0 if !PPSI_VLAN
default 1 if !ARCH_SUPPORT_MULTIPLE_VLAN
default MAX_VLANS_PER_PORT
# Vlan support: not all architectures have it, so this is set by them
config ARCH_SUPPORT_VLAN
bool bool
config VLAN menu "VLAN"
depends on !WRPC_PPSI
config PPSI_VLAN
bool "Enable VLAN support for raw Ethernet" bool "Enable VLAN support for raw Ethernet"
depends on HAS_VLAN || HAS_MULTIPLE_VLAN depends on (ARCH_SUPPORT_VLAN || ARCH_SUPPORT_MULTIPLE_VLAN)
default y default y
help help
PPSI is able to directly emit and receive tagged frames, PPSI is able to directly emit and receive tagged frames,
...@@ -218,7 +233,7 @@ config VLAN ...@@ -218,7 +233,7 @@ config VLAN
config MAX_VLANS_PER_PORT config MAX_VLANS_PER_PORT
int "Maximum number of VLANs per port" int "Maximum number of VLANs per port"
depends on HAS_MULTIPLE_VLAN depends on ARCH_SUPPORT_MULTIPLE_VLAN
default 32 default 32
help help
This configuration option is mainly used to support This configuration option is mainly used to support
...@@ -226,12 +241,6 @@ config MAX_VLANS_PER_PORT ...@@ -226,12 +241,6 @@ config MAX_VLANS_PER_PORT
microcontroller-class architectures. Hosted builds microcontroller-class architectures. Hosted builds
feature a bigger default, because they have no size constraints. feature a bigger default, because they have no size constraints.
# I want a number, to be used without ifdef
config VLAN_ARRAY_SIZE
int
default 0 if !VLAN
default 1 if !HAS_MULTIPLE_VLAN
default MAX_VLANS_PER_PORT
endmenu endmenu
...@@ -525,4 +534,3 @@ config HAS_PPSI_ASSERT ...@@ -525,4 +534,3 @@ config HAS_PPSI_ASSERT
range 0 1 range 0 1
default 1 if PPSI_ASSERT default 1 if PPSI_ASSERT
default 0 default 0
\ No newline at end of file
...@@ -19,9 +19,9 @@ CONFIG_EXTENSION="" ...@@ -19,9 +19,9 @@ CONFIG_EXTENSION=""
CONFIG_CROSS_COMPILE="" CONFIG_CROSS_COMPILE=""
CONFIG_ARCH_CFLAGS="" CONFIG_ARCH_CFLAGS=""
CONFIG_ARCH_LDFLAGS="" CONFIG_ARCH_LDFLAGS=""
CONFIG_HAS_VLAN=y CONFIG_SUPPORT_VLAN=y
CONFIG_HAS_MULTIPLE_VLAN=y CONFIG_SUPORRT_MULTIPLE_VLAN=y
CONFIG_VLAN=y CONFIG_PPSI_VLAN=y
CONFIG_MAX_VLANS_PER_PORT=32 CONFIG_MAX_VLANS_PER_PORT=32
CONFIG_VLAN_ARRAY_SIZE=32 CONFIG_VLAN_ARRAY_SIZE=32
CONFIG_DISABLE_OPTIMIZATION=y CONFIG_DISABLE_OPTIMIZATION=y
......
...@@ -19,8 +19,8 @@ CONFIG_EXTENSION="" ...@@ -19,8 +19,8 @@ CONFIG_EXTENSION=""
CONFIG_CROSS_COMPILE="" CONFIG_CROSS_COMPILE=""
CONFIG_ARCH_CFLAGS="" CONFIG_ARCH_CFLAGS=""
CONFIG_ARCH_LDFLAGS="" CONFIG_ARCH_LDFLAGS=""
CONFIG_HAS_VLAN=y CONFIG_SUPPORT_VLAN=y
CONFIG_HAS_MULTIPLE_VLAN=y CONFIG_SUPPORT_MULTIPLE_VLAN=y
CONFIG_VLAN=y CONFIG_PPSI_VLAN=y
CONFIG_MAX_VLANS_PER_PORT=32 CONFIG_MAX_VLANS_PER_PORT=32
CONFIG_VLAN_ARRAY_SIZE=32 CONFIG_VLAN_ARRAY_SIZE=32
...@@ -43,9 +43,9 @@ CONFIG_HAS_PROFILE_CUSTOM=0 ...@@ -43,9 +43,9 @@ CONFIG_HAS_PROFILE_CUSTOM=0
# #
# VLAN # VLAN
# #
CONFIG_HAS_VLAN=y CONFIG_SUPPORT_VLAN=y
CONFIG_HAS_MULTIPLE_VLAN=y CONFIG_SUPPORT_MULTIPLE_VLAN=y
CONFIG_VLAN=y CONFIG_PPSI_VLAN=y
CONFIG_MAX_VLANS_PER_PORT=32 CONFIG_MAX_VLANS_PER_PORT=32
CONFIG_VLAN_ARRAY_SIZE=32 CONFIG_VLAN_ARRAY_SIZE=32
# CONFIG_PPSI_ASSERT is not set # CONFIG_PPSI_ASSERT is not set
......
...@@ -819,7 +819,7 @@ code, in the following way. ...@@ -819,7 +819,7 @@ code, in the following way.
@itemize @bullet @itemize @bullet
@item Each architecture states, in @t{Kconfig}, whether it supports @item Each architecture states, in @t{Kconfig}, whether it supports
vlans (@t{HAS_VLAN}) and multiple vlans (@t{HAS_MULTIPLE_VLAN}). vlans (@t{SUPPORT_VLAN}) and multiple vlans (@t{SUPPORT_MULTIPLE_VLAN}).
@item The configuration parser (@t{lib/conf.c}) accepts a @t{vlan} @item The configuration parser (@t{lib/conf.c}) accepts a @t{vlan}
keyword, specifying one or more vlans. If several, they are keyword, specifying one or more vlans. If several, they are
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment