From: John Crispin <john@phrozen.org>
To: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/3] tty: of_serial: allow rt288x-uart to load from OF
Date: Tue, 16 Apr 2013 06:04:09 +0200 [thread overview]
Message-ID: <516CCDB9.5000505@phrozen.org> (raw)
In-Reply-To: <20130416040531.GA4907@kroah.com>
On 16/04/13 06:05, Greg Kroah-Hartman wrote:
> 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 :(
OK ... i dont know either, both proposals look crappy ;)
John
next prev parent reply other threads:[~2013-04-16 4:08 UTC|newest]
Thread overview: 11+ 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:54 ` John Crispin
2013-04-16 3:55 ` John Crispin
2013-04-16 4:05 ` Greg Kroah-Hartman
2013-04-16 4:04 ` John Crispin [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=516CCDB9.5000505@phrozen.org \
--to=john@phrozen.org \
--cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.