[PATCH 4/7] tty: serial: support device tree in pxa
From: Eric Miao <hidden>
Date: 2011-07-20 01:26:08
Also in:
linux-devicetree
On Wed, Jul 20, 2011 at 4:05 AM, Russell King - ARM Linux [off-list ref] wrote:
On Tue, Jul 19, 2011 at 01:53:53PM -0600, Grant Likely wrote:quoted
On Tue, Jul 19, 2011 at 1:48 PM, Arnd Bergmann [off-list ref] wrote:quoted
On Tuesday 19 July 2011 13:40:10 Grant Likely wrote:quoted
On Tue, Jul 19, 2011 at 10:24:47AM +0800, Haojian Zhuang wrote:quoted
Support both normal platform driver and device tree driver in serial pxa. Signed-off-by: Haojian Zhuang <redacted> --- ?drivers/tty/serial/Kconfig ? ? | ? ?4 +- ?drivers/tty/serial/of_serial.c | ? 12 +++++ ?drivers/tty/serial/pxa.c ? ? ? | ? 93 ++++++++++++++++++++++++++++++++++++++- ?include/linux/serial_pxa.h ? ? | ? 17 +++++++ ?4 files changed, 122 insertions(+), 4 deletions(-) ?create mode 100644 include/linux/serial_pxa.hserial_pxa is already a platform_driver. ?Instead of modifying of_serial, an of_match_table should be added to this driver and it should decode the DT data inside the existing probe hook. No need to create all of this extra infrastructure.Right. We should probably rename of_serial to 8250_of and remove the qpace parts from the driver.In fact, I think we've got about 3 devtree drivers for 8250 serial ports. ?I think it is about time for some consolidation work. ?:-) I wonder if we can roll of_serial directly into the 8250.c driver.The original serial.c got split into 8250.c, plus several probe modules (8250_pnp.c, 8250_pci.c, etc) to get around the problem of lots of bus specific crap appearing in the main driver. ?8250_of.c would follow on that theme.
Apart from the DMA support (which hasn't make it into mainline yet) and a few other minor tweaks, the PXA serial can actually reuse the 8250.c (actually it was where pxa serial driver forked IIRC). Russell, what's inevitable to have a forked pxa serial driver?