Query Regarding UART Controller Device Driver in Linux Kernel

Greg KH greg at kroah.com
Tue Dec 3 12:26:00 EST 2024


On Tue, Dec 03, 2024 at 10:38:30PM +0530, Muni Sekhar wrote:
> On Tue, Dec 3, 2024 at 7:26 PM Greg KH <greg at kroah.com> wrote:
> >
> > On Tue, Dec 03, 2024 at 04:47:31PM +0530, Muni Sekhar wrote:
> > > Dear Linux Kernel Community,
> > >
> > > I hope this email finds you well. I need to work on the high speed
> > > UART controller driver in the Linux kernel, and I have a few questions
> > > that I would appreciate your guidance on:
> > >
> > > I understand that the Linux kernel tree contains multiple source code
> > > files related to UART controller device drivers. Could you please
> > > point me to the relevant source code paths for these drivers?
> >
> > Where have you looked that you did not find them?  (hint,
> > drivers/tty/serial is where they are located...)
> >
> > > What is the maximum supported UART baud rate in the current kernel
> > > driver's supports? For example, if the hardware supports high-speed
> > > baud rates (e.g., 12 Mbps), are there any specific design strategies
> > > or modifications needed in the driver to support such high speeds?
> >
> > Many different uarts support different high-speed rates, it depends on
> > the hardware.  And yes, there are different ways of going that fast, but
> > again, it depends on the hardware.
> >
> > What exact hardware type are you working with?  Does it not already work
> > properly with Linux?
> The hardware I am working with is Xilinx based UART controller with
> DMA capability.
> Can you provide examples of hardware platforms or available UART
> controller drivers that support speeds up to 12 Mbps or higher? What
> specific modifications or configurations are required in the driver to
> enable such high baud rates?

I would suggest reading some UART datasheets for this type of
information.  Start with the one that you have now, that's the best way
to test things.

> > > Are there any user-space utilities available for testing UART
> > > interfaces in Linux? If so, could you kindly share details on these
> > > utilities or provide any resources that would be useful for testing?
> >
> > There are loads of them, but it depends on what you want to test.  What
> > exactly are you wishing to test/validate?
> I am looking for test utilities to stress-test high-speed data
> transfers between two systems over UART, checking for correct
> reception of a large data payload. It includes,  transferring data at
> a high baud rate, and verifying its integrity at the receiving end.
> Could you clarify which utilities are commonly used for testing UART
> interfaces at different levels (e.g., performance, stability, data
> integrity, error checking)? Are there any specific utilities or
> resources you would recommend for testing high-speed UARTs?

You can search as well as I can, but here's something that came up
pretty easily:
	https://github.com/cbrake/linux-serial-test

There are many many many other serial port programs, ideally you would
test the hardware with what you expect to use that hardware for, so why
not just use that software instead of something else?

good luck!

greg k-h



More information about the Kernelnewbies mailing list