Re: [Nios2-dev] [PATCHv3 1/2] serial: Add driver for the Altera JTAG UART

From: Thomas Chou
Date: Mon Mar 15 2010 - 21:31:06 EST


On 03/13/2010 04:48 AM, Andrew Morton wrote:
+config SERIAL_ALTERA_JTAGUART
+ bool "Altera JTAG UART support"
+ select SERIAL_CORE
+ help
+ This driver supports the Altera JTAG UART port.
+
So this driver will be available on all CPU architectures.

I'm guessing that the hardware _isn't_ available on all CPU
architectures? Maybe that's wrong.

It is true that this driver is used mostly with nios2, soft-core coldfire and arm. But peripherals on FPGA can be made available to almost any CPU architecture. So I think it might make sense to let it available to all. Or should we put a "default n" ?

+#include<linux/platform_device.h>
+#include<linux/io.h>
+#include<linux/altera_jtaguart.h>

Does it make sense to put altera_jtaguart.h into include/linux? Could
we put it in drivers/serial/?


There is only a platform data structure declaration in the header, which should be passed through platform device data to the driver. If we put it in drivers/serial/, then we will need to include "../../../drivers/serial/altera_jtaguart.h" .

I have written this driver in parallel with the altera_uart driver. We could have passed the data ( base, irq, freq ) using platform resources. But I don't know if there is a way to pass ( freq )? Please let me know if you have any suggestions.

- Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/