From: Paul Mundt <lethal@linux-sh.org>
To: Bastian Hecht <hechtb@gmail.com>
Cc: linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 1/3] serial: sh-sci: Add OF support
Date: Wed, 27 Feb 2013 17:04:14 +0900 [thread overview]
Message-ID: <20130227080413.GA21690@linux-sh.org> (raw)
In-Reply-To: <CABYn4szH8QnPAj6dkv94wEVr6b=ezb2f7fxyiMnhF7AqOBOMpQ@mail.gmail.com>
On Tue, Feb 26, 2013 at 09:09:52AM -0600, Bastian Hecht wrote:
> 2013/2/25 Paul Mundt <lethal@linux-sh.org>:
> > You can then compare against SCIx_PROBE_REGTYPE and SCIx_NR_REGTYPES, and
> > assign p->regtype the be32_to_cpup() value directly. Which will also make
> > it trivial to add new regtypes in the future, we would only need to
> > update the binding documentation.
>
> Ok, I slightly disliked that portion anyway in the code as we have the
> full mapping from the SCBRR algo ID and only the partial mapping from
> the register set. Additionally I wonder if I should add something like
>
> enum {
> + SCBRR_ALGO_INVALID,
> SCBRR_ALGO_1,
> SCBRR_ALGO_2,
> SCBRR_ALGO_3,
> SCBRR_ALGO_4,
> SCBRR_ALGO_5,
> };
> ...
> -p->scbrr_algo_id = be32_to_cpup(prop) - 1;
> +p->scbrr_algo_id = be32_to_cpup(prop);
>
> to have a straight mapping.
Yes, that would be my preferred option as well. I was going to comment on
the - 1 thing previously, but figured it was just some DT oddity.
prev parent reply other threads:[~2013-02-27 8:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 19:06 [PATCH v2 1/3] serial: sh-sci: Add OF support Bastian Hecht
2013-02-25 19:06 ` [PATCH v2 2/3] ARM: mach-shmobile: r8a7740: Add DT names to clock list Bastian Hecht
2013-02-25 19:06 ` [PATCH v2 3/3] ARM: mach-shmobile: r8a7740: Setup the serial devices using DT Bastian Hecht
2013-02-25 20:35 ` [PATCH v2 1/3] serial: sh-sci: Add OF support Paul Mundt
2013-02-26 15:09 ` Bastian Hecht
2013-02-27 8:04 ` Paul Mundt [this message]
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=20130227080413.GA21690@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=hechtb@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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).