From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH 1/3] tty: of_serial: allow rt288x-uart to load from OF
Date: Mon, 15 Apr 2013 21:05:31 -0700 [thread overview]
Message-ID: <20130416040531.GA4907@kroah.com> (raw)
In-Reply-To: <516CCBBA.8000103@openwrt.org>
On Tue, Apr 16, 2013 at 05:55:38AM +0200, John Crispin wrote:
> On 15/04/13 20:14, Greg Kroah-Hartman wrote:
> >On Sat, Apr 13, 2013 at 11:33:36AM +0200, John Crispin wrote:
> >>In order to make serial_8250 loadable via OF on Ralink WiSoC we need to default
> >>the iotype to UPIO_RT.
> >>
> >>Signed-off-by: John Crispin<blogic@openwrt.org>
> >>---
> >> drivers/tty/serial/of_serial.c | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
> >>index b025d54..42f8550 100644
> >>--- a/drivers/tty/serial/of_serial.c
> >>+++ b/drivers/tty/serial/of_serial.c
> >>@@ -98,7 +98,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
> >> port->regshift = prop;
> >>
> >> port->irq = irq_of_parse_and_map(np, 0);
> >>- port->iotype = UPIO_MEM;
> >>+ if (of_device_is_compatible(np, "ralink,rt2880-uart"))
> >>+ port->iotype = UPIO_AU;
> >>+ else
> >>+ port->iotype = UPIO_MEM;
> >Why are you putting device-specific things into a generic driver?
> >Shouldn't this be able to be described in device tree without relying on
> >an vendor-specific test in this driver?
> >
> >greg k-h
> >
> >
> Hi Greg,
>
> would 'reg-io-type = "au";' sound better to you ?
I don't know, run it by the device tree people, they know this stuff, I
don't :(
greg k-h
next prev parent reply other threads:[~2013-04-16 4:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 9:33 [PATCH 0/3] tty: serial: make of_serial work on Ralink SoC John Crispin
2013-04-13 9:33 ` [PATCH 1/3] tty: of_serial: allow rt288x-uart to load from OF John Crispin
2013-04-15 18:14 ` Greg Kroah-Hartman
2013-04-16 3:55 ` John Crispin
2013-04-16 4:05 ` Greg Kroah-Hartman [this message]
2013-04-16 4:04 ` John Crispin
2013-04-13 9:33 ` [PATCH 2/3] tty: serial: add iosize field to struct uart_port John Crispin
2013-04-15 18:10 ` Greg Kroah-Hartman
2013-04-13 9:33 ` [PATCH 3/3] tty: of_serial: initialize port.iosize from resource John Crispin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130416040531.GA4907@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=blogic@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).