Jeff Webb wrote: > Jan Kiszka wrote: >> Jeff Webb wrote: >>> ... >>> My serial test program works fine in the above scenario. However, if I >>> try to disable the linux serial support at boot time by adding >>> "8250.nr_uarts=0" to the kernel boot options, my serial test program >>> does not work. There are no errors opening, configuring, or reading >>> from the rtdm device, but no data is received from the driver. I assume >>> that my test program is not initializing something properly, so it works >>> when linux initializes the serial port. I can't seem to find what I'm >>> doing wrong. Any help would be appreciated. >> >> Hmm, maybe a PnP issue. If there is no driver registered for the on-chip >> PnP UARTS, power might be switched off (or kept off) for them. As >> xeno_16550A doesn't perform any validation of the underlying hardware >> (dunno right now if there is a pattern to test at all), it may just >> operate on dead addresses. >> >> I faced the same issue with irqbench and parallel ports. They get >> switched off once the related Linux driver is removed. One solution >> there was to register irqbench with the PnP subsystem. I need to check >> if this is required here as well. > > Thanks for the suggestion. I looked at the PnP-related code in > irqbench.c, and compared this to what is in > linux/drivers/parport/parport_pc.c. I then modified 16550A.c in a > similar fashion, merging in the required code from > linux/drivers/serial/8250_pnp.c. I can now boot the kernel with > 8250.nr_uarts=0", insert the modified xeno_16550A module, and then run > my serial test program successfully. I have not tried compiling the > modified xeno_16550A code into the kernel, but I will try this next.
Nice to hear. > > Please review the attached patch and merge into subversion as you see fit. Basically, it looks good. I'm just wondering if we shouldn't make use of the resource information passed on probe, validate it against what the user provided, and only claim those ports the user actually selected. Another thing the check is MODULE_DEVICE_TABLE. Does your device still work when you remove this line? While it is useful for standard ports that shall be automatically configured, I noticed that it causes irqbench being loaded automatically during boot (because the pnp signature matches). That is likely not what you want when you configure xeno_16550A as module and have to switch off the standard port first before insmod'ing the rt-driver with full arguments. Thanks, Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
