tty: serial: samsung_tty: support more than 4 uart ports
authorChanho Park <chanho61.park@samsung.com>
Wed, 29 Jun 2022 00:55:38 +0000 (09:55 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jun 2022 15:08:46 +0000 (17:08 +0200)
commit9636047ffafcf5988946c05f0ebd7e0b2114aa74
tree4ded5f68b2b857ab29b25eadca3c28fa2a0f32bf
parentf287f971e2569827fe9fb3a8d55a37703a13cf29
tty: serial: samsung_tty: support more than 4 uart ports

Regarding Exynos Auto v9 SoC, it supports uarts up to 12. However, the
maximum number of the ports has been derived from
CONFIG_SERIAL_SAMSUNG_UARTS and tightly coupled with the config for
previous Samsung SoCs such as s3c24xx and s3c64xx. To overcome this
limitation, this changes the usage of the definition to UART_NR which is
widely used from other serial drivers. This also defines the value to 12
only for ARM64 SoCs to not affect the change to previous arm32 SoCs.

Instead of enumerating all the ports as predefined arrays, this
introduces s3c24xx_serial_init_port_default that is initializing the
structure as the default value.

Reviewed-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20220629005538.60132-1-chanho61.park@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung_tty.c