Commit ba93f2d
8250: Make SERIAL_8250_RUNTIME_UARTS work correctly
Consider a situation where I have an ARM based system (such as the
Zynq) and therefore no legacy ports. I have three memory-mapped ports
(such as cRIO-9068). I use device tree to describe the ports. What
would be the config options I set so that I get only the three ports in
my system? I do not want legacy ports being created automatically and I
want it to be flexible enough that it creates the devices based only on
the device tree. I expected setting SERIAL_8250_RUNTIME_UARTS = 0 to
work because the description said, "Set this to the maximum number of
serial ports you want the kernel to register at boot time."
Unfortunately, even though SERIAL_8250_NR_UARTS was set to the default
value of 4, I did not get any device nodes (because
SERIAL_8250_RUNTIME_UARTS was 0). This is what this change is
addressing.
SERIAL_8250_NR_UARTS controls the maximum number of ports you can
support. SERIAL_8250_RUNTIME_UARTS specifies the number of ports you
want to create automatically for legacy ports at boot time. All other
ports will be created when serial8250_register_port is called (and if
it does not exceed the total number of supported ports as specified by
SERIAL_8250_NR_UARTS).
Signed-off-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
Acked-by: Jaeden Amero <jaeden.amero@ni.com>1 parent 3089f71 commit ba93f2d
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
| 662 | + | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
| 870 | + | |
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
| 951 | + | |
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
| 960 | + | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| |||
0 commit comments