Commit 79640aea authored by Bjarki Arge Andreasen's avatar Bjarki Arge Andreasen Committed by Carles Cufi
Browse files

drivers: console: remove uart_mux and gsm_mux



Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.

Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.

Signed-off-by: default avatarBjarki Arge Andreasen <bjarki@arge-andreasen.me>
parent e79428cd
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -58,10 +58,6 @@ if(CONFIG_SENSING)
  zephyr_iterable_section(NAME sensing_sensor GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN CONFIG_LINKER_ITERABLE_SUBALIGN)
endif()

if(CONFIG_UART_MUX)
  zephyr_iterable_section(NAME uart_mux GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN CONFIG_LINKER_ITERABLE_SUBALIGN)
endif()

if(CONFIG_USB_DEVICE_STACK)
  zephyr_linker_section(NAME usb_descriptor GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
  zephyr_linker_section_configure(SECTION usb_descriptor
+0 −7
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

zephyr_syscall_header_ifdef(
  CONFIG_UART_MUX
  ${ZEPHYR_BASE}/include/zephyr/drivers/console/uart_mux.h
)

zephyr_library()

zephyr_library_sources_ifdef(CONFIG_GSM_MUX gsm_mux.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE_RECEIVER ipm_console_receiver.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE_SENDER ipm_console_sender.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE ipm_console.c)
@@ -18,7 +12,6 @@ zephyr_library_sources_ifdef(CONFIG_RTT_CONSOLE rtt_console.c)
zephyr_library_sources_ifdef(CONFIG_SEMIHOST_CONSOLE semihost_console.c)
zephyr_library_sources_ifdef(CONFIG_UART_CONSOLE uart_console.c)
zephyr_library_sources_ifdef(CONFIG_UART_MCUMGR uart_mcumgr.c)
zephyr_library_sources_ifdef(CONFIG_UART_MUX uart_mux.c)
zephyr_library_sources_ifdef(CONFIG_XTENSA_SIM_CONSOLE xtensa_sim_console.c)
zephyr_library_sources_ifdef(CONFIG_EFI_CONSOLE efi_console.c)
zephyr_library_sources_ifdef(CONFIG_WINSTREAM_CONSOLE winstream_console.c)
+0 −79
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ config CONSOLE_HANDLER

config CONSOLE_INIT_PRIORITY
	int "Console init priority"
	default 95 if UART_MUX
	default 60 if UART_CONSOLE || XTENSA_SIM_CONSOLE
	default KERNEL_INIT_PRIORITY_DEFAULT
	help
@@ -254,84 +253,6 @@ module = UART_CONSOLE
module-str = UART console
source "subsys/logging/Kconfig.template.log_config"

source "drivers/console/Kconfig.gsm_mux"

config UART_MUX
	bool "[DEPRECATED] UART muxing (GSM 07.10) support [EXPERIMENTAL]"
	depends on SERIAL_SUPPORT_INTERRUPT && GSM_MUX
	select UART_INTERRUPT_DRIVEN
	select EXPERIMENTAL
	select DEPRECATED
	help
	  Enable this option to create UART muxer that run over a physical
	  UART. The GSM 07.10 muxing protocol is used to separate the data
	  between these muxed UARTs.

if UART_MUX

config UART_MUX_DEVICE_NAME
	string "UART mux device name template"
	default "GSM"
	help
	  Device name template for the UART mux Devices. First device would
	  have name $(UART_MUX_DEVICE_NAME)_0, etc. User will access muxed
	  UART using this name.

config UART_MUX_RINGBUF_SIZE
	int "UART mux ring buffer size"
	default 256
	help
	  UART mux ring buffer size when passing data from RX ISR to worker
	  thread that will do the unmuxing.

config UART_MUX_TEMP_BUF_SIZE
	int "Size of the temp buffer when reading data from real UART"
	default 32
	help
	  Size of the temporary RX buffer in receiving ISR.

config UART_MUX_DEVICE_COUNT
	int "Number of UART mux devices (DLCIs)"
	default GSM_MUX_DLCI_MAX
	range 1 64
	help
	  Number of instances of UART muxes. Default value is set by
	  maximum number of DLCIs (Data Link Connection Identifiers)
	  configured in the system.

config UART_MUX_REAL_DEVICE_COUNT
	int "Number of real UART devices"
	default 1
	help
	  Tells how many real UART devices there are. Typically there is
	  only one UART and the muxed UARTs are run on top of that. If you have
	  two modems for example, then you would need to increase this to two.

config UART_MUX_RX_STACK_SIZE
	int "Size of the stack allocated for receiving data from UART"
	default 512
	help
	  Sets the stack size which will be used by the PPP RX workqueue.

config UART_MUX_RX_PRIORITY
	int "RX workqueue thread priority"
	default 7
	help
	  Sets the priority of the RX workqueue thread.

module = UART_MUX
module-str = UART mux
source "subsys/logging/Kconfig.template.log_config"

endif # UART_MUX

config UART_MUX_VERBOSE_DEBUG
	bool "Print hexdump of sent and received packets"
	depends on UART_MUX_LOG_LEVEL_DBG
	help
	  As there might be lot of debug output printed, only enable
	  this if really needed.

config EFI_CONSOLE
	bool "Use EFI console for console output"
	select CONSOLE_HAS_DRIVER

drivers/console/Kconfig.gsm_mux

deleted100644 → 0
+0 −118
Original line number Diff line number Diff line
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

config GSM_MUX
	bool "[DEPRECATED] GSM 07.10 muxing protocol"
	select CRC
	select DEPRECATED
	help
	  Enable GSM 07.10 muxing protocol defined in
	  https://www.etsi.org/deliver/etsi_ts/101300_101399/101369/07.01.00_60/ts_101369v070100p.pdf
	  The muxing protocol allows GSM modem to share the same UART for both
	  the PPP data and AT commands.

config GSM_MUX_MAX
	int "Max number of GSM mux instances"
	default 1
	depends on GSM_MUX
	help
	  Usually we only need one GSM mux instance. You need to increase
	  this if you have more than one GSM modems.

config GSM_MUX_DLCI_MAX
	int "Max number of GSM data link connection (DLC) instances"
	default 3
	range 1 64
	depends on GSM_MUX
	help
	  For our purposes we will manage with 3 DLCI (control, ppp, and AT
	  commands) so making it the default value. If GSM modem also provides
	  GNSS (location) services and you want to create a DLCI for it, then
	  you need to increase this to 4.

config GSM_MUX_DLCI_AT
	int "DLCI id of the AT commands channel"
	default 2 if MODEM_GSM_SIMCOM
	default 1
	range 1 63
	depends on GSM_MUX
	help
	  Channel number for the AT commands to the modem.

config GSM_MUX_DLCI_PPP
	int "DLCI id of the PPP connection channel"
	default 1 if MODEM_GSM_SIMCOM
	default 2
	range 1 63
	depends on GSM_MUX
	help
	  Channel number for the PPP connection to the modem.
	  SIMCOM modem has 16kb buffer for DLCI 1 so the manual recommends
	  it for PPP traffic. For other DLCIs in that modem, the buffer size
	  is only 1kb.

config GSM_MUX_PENDING_CMD_MAX
	int "Max number of pending GSM mux commands"
	default 2
	range 1 8
	depends on GSM_MUX
	help
	  How many pending GSM mux commands can exists.

config GSM_MUX_MRU_DEFAULT_LEN
	int "Default size of received user data (MRU)"
	default 127 if MODEM_GSM_SIMCOM
	default 127 if MODEM_GSM_QUECTEL
	default 31
	range 1 1509
	depends on GSM_MUX
	help
	  Default MRU (Maximum Receive Unit) data size. The default
	  value for Basic mode is 31 bytes. The 1509 limit comes from
	  ublox-sara modem and it means we can transfer full Ethernet sized
	  frame and muxing headers.

config GSM_MUX_MRU_MAX_LEN
	int "Max size of received user data (MRU)"
	default 255 if MODEM_GSM_SIMCOM
	default 128
	range 1 1509
	depends on GSM_MUX
	help
	  Max MRU (Maximum Receive Unit) data size. The default max
	  value for Basic mode is 128 bytes.

config GSM_MUX_INITIATOR
	bool "Are we the initiator of the connection"
	default y
	depends on GSM_MUX
	help
	  Default value when deciding whether we are the initiator of the
	  connection attempt. Normally this should be enabled.

config GSM_MUX_T1_TIMEOUT
	int "T1 timeout in ms"
	default 0
	range 0 5000
	depends on GSM_MUX
	help
	  T1 timeout is initial command timeout when establishing
	  the connection. The value is in milliseconds. Zero value
	  means that default (100 ms) specified in the code is used.

if GSM_MUX

module = GSM_MUX
module-dep = LOG
module-str = Log level for GSM 07.10 Mux driver
module-help = Sets log level for GSM 07.10 Mux Device Driver.
source "subsys/net/Kconfig.template.log_config.net"

config GSM_MUX_VERBOSE_DEBUG
	bool "Print hexdump of sent and received packets"
	depends on GSM_MUX_LOG_LEVEL_DBG
	help
	  As there might be lot of debug output printed, only enable
	  this if really needed.

endif

drivers/console/gsm_mux.c

deleted100644 → 0
+0 −1535

File deleted.

Preview size limit exceeded, changes collapsed.

Loading