ARM: omap2plus_defconfig: Switch over to using 8250 driver
Subsystems (2)
RFC PATCH 1/1 ARM: omap2plus_defconfig: Switch over to using 8250 driver
8250 driver should be relatively feature complete. It can co-exist with omap-serial driver, so just enable 8250 OMAP layer driver and route all ttyOx references to ttySx through the standard 8250 driver to ensure no breakage of userspace occurs.
---
Current upstream next-20150410 status: (all boards pass without this patch) Test is a basic boot test (using omap2plus_defconfig ofcourse)..
Ofcourse:
[ 0.001035] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
does not help userspace when they are not able to dynamically handle switch.
Just curious if folks feel we are ready for this switch yet...
ttyS-change
1: am335x-evm: BOOT: PASS: http://paste.ubuntu.org.cn/2551733
2: am335x-sk: BOOT: FAIL: http://paste.ubuntu.org.cn/2551734
3: am3517-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551735
4: am37x-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551736
5: am437x-sk: BOOT: FAIL: http://paste.ubuntu.org.cn/2551737
6: am43xx-epos: BOOT: FAIL: http://paste.ubuntu.org.cn/2551738
7: am43xx-gpevm: BOOT: PASS: http://paste.ubuntu.org.cn/2551739
8: BeagleBoard-XM: BOOT: FAIL: http://paste.ubuntu.org.cn/2551740
9: beagleboard-vanilla: BOOT: FAIL: http://paste.ubuntu.org.cn/2551741
10: beaglebone-black: BOOT: PASS: http://paste.ubuntu.org.cn/2551742
11: beaglebone: BOOT: FAIL: http://paste.ubuntu.org.cn/2551743 12: craneboard: BOOT: FAIL: http://paste.ubuntu.org.cn/2551744 13: dra72x-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551745 14: dra7xx-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551746
15: OMAP3430-Labrador(LDP): BOOT: FAIL: http://paste.ubuntu.org.cn/2551747
16: n900: BOOT: FAIL: http://paste.ubuntu.org.cn/2551748
17: omap5-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551749
18: pandaboard-es: BOOT: FAIL: http://paste.ubuntu.org.cn/2551750
19: pandaboard-vanilla: BOOT: FAIL: http://paste.ubuntu.org.cn/2551751
20: sdp2430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551752 21: sdp3430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551753 22: sdp4430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551754
TOTAL = 22 boards, Booted Boards = 3, No Boot boards = 19
arc/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
@@ -220,6 +220,8 @@ CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_OMAP=y +CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OMAP=y CONFIG_SERIAL_OMAP_CONSOLE=y
Signature · 1 line
1.7.9.5
[ +Sebastian, +Tony ]
Quoted 2 lines · Nishanth Menon
8250 driver should be relatively feature complete. It can co-exist with omap-serial driver
Not really; if the omap_8250 is selected then it is probed first and will be the only driver claiming omap UART ports.
omap-serial would just be dead-weight.
Quoted 3 lines
, so just enable 8250 OMAP layer driver and
route all ttyOx references to ttySx through the standard 8250 driver to ensure no breakage of userspace occurs.
Not quite; the only automatic handling is for console only, not for userspace. Expect lots of userspace breakage.
Regards,
Peter Hurley
Quoted 53 lines
Signed-off-by Nishanth Menon <[email protected]>---
Current upstream next-20150410 status: (all boards pass without this patch) Test is a basic boot test (usingomap2plus_defconfigofcourse)..Ofcourse:
[ 0.001035] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'does not help userspace when they are not able to dynamically handle switch.
Just curious if folks feel we are ready for this switch yet...
ttyS-change
1: am335x-evm: BOOT: PASS: http://paste.ubuntu.org.cn/2551733
2: am335x-sk: BOOT: FAIL: http://paste.ubuntu.org.cn/2551734
3: am3517-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551735
4: am37x-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551736
5: am437x-sk: BOOT: FAIL: http://paste.ubuntu.org.cn/2551737
6: am43xx-epos: BOOT: FAIL: http://paste.ubuntu.org.cn/2551738
7: am43xx-gpevm: BOOT: PASS: http://paste.ubuntu.org.cn/2551739
8: BeagleBoard-XM: BOOT: FAIL: http://paste.ubuntu.org.cn/2551740
9: beagleboard-vanilla: BOOT: FAIL: http://paste.ubuntu.org.cn/2551741
10: beaglebone-black: BOOT: PASS: http://paste.ubuntu.org.cn/255174211: beaglebone: BOOT: FAIL: http://paste.ubuntu.org.cn/2551743 12: craneboard: BOOT: FAIL: http://paste.ubuntu.org.cn/2551744 13: dra72x-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551745 14: dra7xx-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/255174615: OMAP3430-Labrador(LDP): BOOT: FAIL: http://paste.ubuntu.org.cn/2551747
16: n900: BOOT: FAIL: http://paste.ubuntu.org.cn/2551748
17: omap5-evm: BOOT: FAIL: http://paste.ubuntu.org.cn/2551749
18: pandaboard-es: BOOT: FAIL: http://paste.ubuntu.org.cn/2551750
19: pandaboard-vanilla: BOOT: FAIL: http://paste.ubuntu.org.cn/255175120: sdp2430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551752 21: sdp3430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551753 22: sdp4430: BOOT: FAIL: http://paste.ubuntu.org.cn/2551754TOTAL = 22 boards, Booted Boards = 3, No Boot boards = 19
arc/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm/configs/omap2plus_defconfig +2
-0@@ -220,6 +220,8 @@ CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_OMAP=y +CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OMAP=y CONFIG_SERIAL_OMAP_CONSOLE=y
Quoted 10 lines · Peter Hurley
[ +Sebastian, +Tony ]
Quoted 2 lines · Nishanth Menon
8250 driver should be relatively feature complete. It can co-exist with omap-serial driver
Not really; if the
omap_8250is selected then it is probed first and will be the only driver claiming omap UART ports.omap-serial would just be dead-weight.
true.. my bad..
Quoted 8 lines
Quoted 4 lines
, so just enable 8250 OMAP layer driver and
route all ttyOx references to ttySx through the standard 8250 driver to ensure no breakage of userspace occurs.Not quite; the only automatic handling is for console only, not for userspace. Expect lots of userspace breakage.
Yep - overall, looking through individual logs, in my testing, it seems to work at least for console for all platforms - even though the filesystems are mostly going bonkers -> older fs did not have the udev redirection to take care of this - mostly to do with the getty hooked on to static consoles.
There are infact two issues:
a) bootloader change for cmdline -> O2 to S2 -> in many cases we are lesser inclined to change the bootloader, hence the fixup configuration
b) fs changes - these are sometimes more realistic to do, but is a clear breakage risk.
Overall, keeping two equally functional drivers in the system sounds a bunch of maintenance burden for all of us and not to mention confusion for the future.
Btw, I am not exactly proposing this for 4.1 kernel.. instead, we should probably discuss how to best introduce this in and throw out the older omap_serial driver - just reuse 8250 and co-exist with the rest of the good world folks ;)..
Signature · 2 lines
Regards, Nishanth Menon
Quoted 31 lines · Nishanth Menon
Quoted 10 lines · Peter Hurley
[ +Sebastian, +Tony ]
Quoted 2 lines · Nishanth Menon
8250 driver should be relatively feature complete. It can co-exist with omap-serial driver
Not really; if the
omap_8250is selected then it is probed first and will be the only driver claiming omap UART ports.omap-serial would just be dead-weight.
true.. my bad..
Quoted 8 lines
Quoted 4 lines
, so just enable 8250 OMAP layer driver and
route all ttyOx references to ttySx through the standard 8250 driver to ensure no breakage of userspace occurs.Not quite; the only automatic handling is for console only, not for userspace. Expect lots of userspace breakage.
Yep - overall, looking through individual logs, in my testing, it seems to work at least for console for all platforms - even though the filesystems are mostly going bonkers -> older fs did not have the udev redirection to take care of this - mostly to do with the getty hooked on to static consoles.
Quoted 3 lines
There are infact two issues:
a) bootloader change for cmdline -> O2 to S2 -> in many cases we are lesser inclined to change the bootloader, hence the fixup configuration
Just an FYI - support for handling of _any_ console command line string by _any_ driver was accepted for 4.01; the console can declare a match() function which will be called at registration time for every console command line, and can opt to perform console setup using any criteria.
This provides a migration path for _any_ driver (and also allow any earlycon-to-console handoff for non-8250 drivers by using a defined match() function to match the appropriate earlycon= command line; the particulars are in the univ8250_console_match() kernel-doc header in -next).
Quoted 6 lines
b) fs changes - these are sometimes more realistic to do, but is a clear breakage risk.
Overall, keeping two equally functional drivers in the system sounds a bunch of maintenance burden for all of us and not to mention confusion for the future.
I think for the moment we should just freeze omap-serial and let most of userspace catch up first; a lot of the official and unofficial vender support is still stuck in 3.14. By the time, 3.19+ is de rigueur we'll hopefully have figured out the ttyS sharing and how to migrate without breaking userspace.
Quoted 1 line
Btw, I am not exactly proposing this for 4.1 kernel..
:) I knew that.
Quoted 4 lines
instead, we should
probably discuss how to best introduce this in and throw out the olderomap_serialdriver - just reuse 8250 and co-exist with the rest of the good world folks ;)..
I agree -- thanks for bringing the topic up.
Regards,
Peter Hurley
Quoted 42 lines · Peter Hurley
Quoted 31 lines · Nishanth Menon
Quoted 10 lines · Peter Hurley
[ +Sebastian, +Tony ]
Quoted 2 lines · Nishanth Menon
8250 driver should be relatively feature complete. It can co-exist with omap-serial driver
Not really; if the
omap_8250is selected then it is probed first and will be the only driver claiming omap UART ports.omap-serial would just be dead-weight.
true.. my bad..
Quoted 8 lines
Quoted 4 lines
, so just enable 8250 OMAP layer driver and
route all ttyOx references to ttySx through the standard 8250 driver to ensure no breakage of userspace occurs.Not quite; the only automatic handling is for console only, not for userspace. Expect lots of userspace breakage.
Yep - overall, looking through individual logs, in my testing, it seems to work at least for console for all platforms - even though the filesystems are mostly going bonkers -> older fs did not have the udev redirection to take care of this - mostly to do with the getty hooked on to static consoles.
Quoted 3 lines
There are infact two issues:
a) bootloader change for cmdline -> O2 to S2 -> in many cases we are lesser inclined to change the bootloader, hence the fixup configurationJust an FYI - support for handling of _any_ console command line string by _any_ driver was accepted for 4.01; the console can declare a
match()function which will be called at registration time for every console command line, and can opt to perform console setup using any criteria.
Quoted 5 lines
This provides a migration path for _any_ driver (and also allow any earlycon-to-console handoff for non-8250 drivers by using a defined
match()function to match the appropriate earlycon= command line; the particulars are in theuniv8250_console_match()kernel-doc header in -next).
OK.
Quoted 9 lines
Quoted 8 lines
b) fs changes - these are sometimes more realistic to do, but is a clear breakage risk.
Overall, keeping two equally functional drivers in the system sounds a bunch of maintenance burden for all of us and not to mention confusion for the future.
Quoted 6 lines
I think for the moment we should just freeze omap-serial and let most of userspace catch up first; a lot of the official and unofficial vender support is still stuck in 3.14. By the time, 3.19+ is de rigueur we'll hopefully have figured out the ttyS sharing and how to migrate without breaking userspace.
How about the folks stuck on older distros like Maemo N900?
Signature · 2 lines
Regards, Nishanth Menon
Quoted 8 lines · Nishanth Menon
Quoted 6 lines
I think for the moment we should just freeze omap-serial and let most of userspace catch up first; a lot of the official and unofficial vender support is still stuck in 3.14. By the time, 3.19+ is de rigueur we'll hopefully have figured out the ttyS sharing and how to migrate without breaking userspace.
How about the folks stuck on older distros like Maemo N900?
By the time I was thinking about this, I ended up with this:
a) replace ttyOx with ttySx for the kernel console we it does not end up dark and add a warning. This works right now however the warning might been longer but then if one does not read it it might not matter at all.
b) add symlink udev rule so ttySx nodes becomes ttyOx one, too
a) was mainly for people not aware of the defconfig change who end up with the new driver without any knowledge.
b) was mainly for people for people using some kind of "pre-created" image where you are not sure which kernel they have. They still could use the old driver or they might have switched to the new one. This udev rule should make sure there at least a getty on serial after the complete boot.
Sebastian