From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Thomas Koeller <thomas.koeller@baslerweb.com>
Cc: "Yoichi Yuasa" <yoichi_yuasa@tripeaks.co.jp>,
rmk+serial@arm.linux.org.uk, linux-serial@vger.kernel.org,
ralf@linux-mips.org, linux-mips@linux-mips.org,
"Thomas Köller" <thomas@koeller.dyndns.org>
Subject: Re: [PATCH] RM9000 serial driver
Date: Wed, 30 Aug 2006 18:18:02 +0400 [thread overview]
Message-ID: <44F59E1A.6080505@ru.mvista.com> (raw)
In-Reply-To: <44F5911D.8020807@ru.mvista.com>
Hello, I wrote:
>>>> + [PORT_RM9000] = {
>>>> + .name = "RM9000",
>>>> + .fifo_size = 16,
>>>> + .tx_loadsz = 16,
>>>> + .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
>>>> + .flags = UART_CAP_FIFO,
>>>> + },
>>>> };
>>>> +
>>>> +#define map_8250_in_reg(up, offset) \
>>>> + (((up)->port.type == PORT_RM9000) ? regmap_in[offset] : (offset))
>>>> +#define map_8250_out_reg(up, offset) \
>>>> + (((up)->port.type == PORT_RM9000) ? regmap_out[offset] : (offset))
>>>> +
>>>> +
>>> Why you're not using specific iotype for RM9000 UARTs?
>> Because I did not realize that this was necessary. The device
>> registers are
> This is strange as you had an opposite example before your eyes.
Now, it doesn't seem so strange. I thing I'm gonna agree with your point.
>> ioremapped, and so the standard UPIO_MEM32 seemed the right thing to
>> use. I
> It is not.
Actually, it should fit well, indeed.
>> will return to this topic further down.
> So, read on... :-)
>> I would like to return to the port type vs. iotype stuff once again.
>> From what you
>> wrote I seem to understand that the iotype is not just a method of
>> accessing device
>> registers, but also the primary means of discrimination between
>> different h/w
> No, it's intended as just a method of accessing device registers.
Only relevant to 8250 driver. The method is indeed quite describabable by
UPIO_MEM32.
>> implementations, and hence every code to support a nonstandard device
>> must define an
>> iotype of its own, even though one of the existing iotypes would work
>> just fine? In my
> UPIO_MEM32 doesn't actually cover your case as it corresponds to the
> UART with the
> fully 8250-compatible register set, just having 32-bit registers instead
> of the usual
> 8-bit ones. RM9000 is clearly not fully compatible to 8250 in regard to
> the register
> addresses since it has RX/TX regs, FCR and the divisor latch mapped to
> the separate
> addresses, just like Alchemy UART. And I stressed that it's the main
> issue with this
> UART's compatibility to 8250 in my first followup.
What I didn't take into account is that iotype thing is not at all
specific to 8250 driver. In the light of this, the reasons for appearance of
UPIO_AU and UPIO_TSI indeed seem questionable.
>> case, UPIO_AU might be the best choice,
> Alchemy UARTs have *different* address mapping, so UPIO_AU clearly
> *cannot* be used for RM9000 UART.
>> Would I still need to invent UPIO_RM9K,
> Yes.
>> just to have a distinct iotype, and be able to do 'if (up->port.iotype
>> == UPIO_RM9K)'
> A good "just to".
>> where I now use 'if (up->port.type == PORT_RM9000)'? That seems a bit
>> weird.
> Why?
Indeed, I now see that this is weird.
>> Thomas
WBR, Sergei
next prev parent reply other threads:[~2006-08-30 14:17 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 21:18 [PATCH] RM9000 serial driver Thomas Koeller
2006-08-11 19:39 ` Sergei Shtylyov
2006-08-15 21:15 ` Thomas Koeller
2006-08-15 21:35 ` Sergei Shtylyov
2006-08-21 22:57 ` Thomas Koeller
2006-08-22 0:59 ` Yoichi Yuasa
2006-08-22 20:27 ` Thomas Koeller
2006-08-29 15:14 ` Sergei Shtylyov
2006-08-29 23:05 ` Thomas Koeller
2006-08-30 11:59 ` Sergei Shtylyov
2006-08-25 22:38 ` Thomas Koeller
2006-08-26 3:56 ` Jonathan Day
2006-08-29 13:32 ` Sergei Shtylyov
2006-08-29 19:04 ` Russell King
2006-08-29 19:37 ` Sergei Shtylyov
2006-08-29 19:59 ` Russell King
2006-08-30 21:16 ` Thomas Koeller
2006-08-29 23:00 ` Thomas Koeller
2006-08-30 12:12 ` Russell King
2006-08-30 16:50 ` Sergei Shtylyov
2007-02-10 16:11 ` Thomas Koeller
2007-02-10 18:20 ` Sergei Shtylyov
2007-02-12 0:28 ` Thomas Koeller
2007-02-12 0:57 ` Thomas Koeller
2006-08-30 21:28 ` Thomas Koeller
2006-08-31 7:24 ` Sergei Shtylyov
2006-08-30 13:22 ` Sergei Shtylyov
2006-08-30 14:18 ` Sergei Shtylyov [this message]
2006-08-30 16:23 ` Sergei Shtylyov
2006-09-09 17:19 ` Sergei Shtylyov
2006-08-30 12:15 ` Russell King
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=44F59E1A.6080505@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=rmk+serial@arm.linux.org.uk \
--cc=thomas.koeller@baslerweb.com \
--cc=thomas@koeller.dyndns.org \
--cc=yoichi_yuasa@tripeaks.co.jp \
/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