[v4,0/2] serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE

Message ID 20230609133932.786117-1-u.kleine-koenig@pengutronix.de
Headers
Series serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE |

Message

Uwe Kleine-König June 9, 2023, 1:39 p.m. UTC
  Hello,

this is the fourth iteration of trying to make the FSL workaround code
active even without 8250 console support.

The first patch is a fix for commit 66eff0ef528b (powerpc/legacy_serial:
Warn about 8250 devices operated without active FSL workarounds) that
currently is in tty-next. This patch originates from my v3 that was only
partially applied. (That is a lame excuse though. While the applying the
full series would not have shown this problem, bisection would still
have a problem.)

The second patch makes SERIAL_8250_FSL tristate and thus allows this to
be enabled also with SERIAL_8250=m. This is also the relevant change
since v3, where 8250_fsl.o was linked into 8250-base.ko.

This series is build tested on amd64 and powerpc with all 27 possible
configurations for

	SERIAL_8250={y,m,n}
	SERIAL_8250_FSL={y,m,n}
	SERIAL_OF_PLATFORM={y,m,n}

using:

	choices=(y m n)
	for i in $(seq 0 26); do
		perl -p -e "s/SERIAL_8250=y/SERIAL_8250=${choices[$(((i / 9) % 3))]}/; s/SERIAL_8250_FSL=y/SERIAL_8250_FSL=${choices[$(((i / 3) % 3))]}/; s/SERIAL_OF_PLATFORM=y/SERIAL_OF_PLATFORM=${choices[$((i % 3))]}/;" .config-pre > .config &&
		make -j 12 ||
		break;
	done

with .config-pre having COMPILE_TEST=y so this time there shouldn't be a
build regression. (Not all 27 variants are possible, so some valid
configurations are tested twice or more, but that's still good enough.)

The patches have no strong dependency on each other, so they could go in
via different trees. But given that 66eff0ef528b is in tty-next, taking
both via tty sounds most sensible.

Best regards
Uwe

Uwe Kleine-König (2):
  powerpc/legacy_serial: Handle SERIAL_8250_FSL=n build failures
  serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE

 arch/powerpc/kernel/legacy_serial.c | 2 +-
 drivers/tty/serial/8250/8250_fsl.c  | 3 +++
 drivers/tty/serial/8250/8250_of.c   | 2 +-
 drivers/tty/serial/8250/Kconfig     | 6 +++---
 4 files changed, 8 insertions(+), 5 deletions(-)


base-commit: 66eff0ef528b6d6e9a45b68f6cd969dcbe7b800a