All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Bastian Hecht <hechtb@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-serial@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 4/5] serial: sh-sci: Add OF support
Date: Mon, 04 Nov 2013 00:58:21 +0000	[thread overview]
Message-ID: <1449714.Sp0o1f9lVb@avalon> (raw)
In-Reply-To: <CABYn4sxC02bX7XqN8yQ-gYgZEdaHAUohOjyL3pjGYXK9kd8WXg@mail.gmail.com>

Hi Bastian,

On Friday 01 November 2013 10:47:37 Bastian Hecht wrote:
> Hi Laurent!
> 
> > +struct sci_port_info {
> > +       unsigned int type;
> > +       unsigned int regtype;
> > +       unsigned int brr_algo;
> > +};
> > +
> > +static const struct of_device_id of_sci_match[] = {
> > +       {
> > +               .compatible = "renesas,scif-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIF,
> > +                       .regtype = SCIx_SH4_SCIF_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_2,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,scifa-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIFA,
> > +                       .regtype = SCIx_SCIFA_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_4,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,scifb-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIFB,
> > +                       .regtype = SCIx_SCIFB_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_4,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,hscif-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_HSCIF,
> > +                       .regtype = SCIx_HSCIF_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_6,
> > +               },
> > +       }, {
> > +               /* Terminator */
> > +       },
> > +};
> > +MODULE_DEVICE_TABLE(of, of_sci_match);
> 
> I like this version way better than my initial approach,

Thank you.

> given that we only support ARM based ports and we hope the regtype and
> brr_algo won't deviate a lot from the given generic settings for new chips

Hopefully :-) I'm trying to simplify the baud rate algorithms mess, I should 
be able to post patches soon, but I need to test them on hardware first. Would 
you have a sh7780, sh7785 or sh7786 board by any chance ?

> - else the of_sci_match[] array might become a bit bloated. This was the
> former reasoning to introduce all the clumsy OF fields.
> 
> I'm happy that the sci OF support will finally make it into the mainline,
> thanks Laurent!

You're welcome.

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Bastian Hecht <hechtb@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-serial@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 4/5] serial: sh-sci: Add OF support
Date: Mon, 04 Nov 2013 01:58:21 +0100	[thread overview]
Message-ID: <1449714.Sp0o1f9lVb@avalon> (raw)
In-Reply-To: <CABYn4sxC02bX7XqN8yQ-gYgZEdaHAUohOjyL3pjGYXK9kd8WXg@mail.gmail.com>

Hi Bastian,

On Friday 01 November 2013 10:47:37 Bastian Hecht wrote:
> Hi Laurent!
> 
> > +struct sci_port_info {
> > +       unsigned int type;
> > +       unsigned int regtype;
> > +       unsigned int brr_algo;
> > +};
> > +
> > +static const struct of_device_id of_sci_match[] = {
> > +       {
> > +               .compatible = "renesas,scif-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIF,
> > +                       .regtype = SCIx_SH4_SCIF_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_2,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,scifa-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIFA,
> > +                       .regtype = SCIx_SCIFA_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_4,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,scifb-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_SCIFB,
> > +                       .regtype = SCIx_SCIFB_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_4,
> > +               },
> > +       }, {
> > +               .compatible = "renesas,hscif-generic",
> > +               .data = (void *)&(const struct sci_port_info) {
> > +                       .type = PORT_HSCIF,
> > +                       .regtype = SCIx_HSCIF_REGTYPE,
> > +                       .brr_algo = SCBRR_ALGO_6,
> > +               },
> > +       }, {
> > +               /* Terminator */
> > +       },
> > +};
> > +MODULE_DEVICE_TABLE(of, of_sci_match);
> 
> I like this version way better than my initial approach,

Thank you.

> given that we only support ARM based ports and we hope the regtype and
> brr_algo won't deviate a lot from the given generic settings for new chips

Hopefully :-) I'm trying to simplify the baud rate algorithms mess, I should 
be able to post patches soon, but I need to test them on hardware first. Would 
you have a sh7780, sh7785 or sh7786 board by any chance ?

> - else the of_sci_match[] array might become a bit bloated. This was the
> former reasoning to introduce all the clumsy OF fields.
> 
> I'm happy that the sci OF support will finally make it into the mainline,
> thanks Laurent!

You're welcome.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-11-04  0:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 10:29 [PATCH 0/5] Add OF support to the sh-sci serial port driver Laurent Pinchart
2013-10-29 10:29 ` Laurent Pinchart
2013-10-29 10:29 ` [PATCH 1/5] serial: sh-sci: Sort headers alphabetically Laurent Pinchart
2013-10-29 10:29   ` Laurent Pinchart
2013-10-29 10:29 ` [PATCH 2/5] serial: sh-sci: Remove baud rate calculation algorithm 5 Laurent Pinchart
2013-10-29 10:29   ` Laurent Pinchart
2013-10-29 10:29 ` [PATCH 3/5] serial: sh-sci: Simplify baud rate calculation algorithms Laurent Pinchart
2013-10-29 10:29   ` Laurent Pinchart
2013-10-29 10:48   ` Laurent Pinchart
2013-10-29 10:48     ` Laurent Pinchart
2013-10-29 10:29 ` [PATCH 4/5] serial: sh-sci: Add OF support Laurent Pinchart
2013-10-29 10:29   ` Laurent Pinchart
2013-11-01  9:47   ` Bastian Hecht
2013-11-01  9:47     ` Bastian Hecht
2013-11-04  0:58     ` Laurent Pinchart [this message]
2013-11-04  0:58       ` Laurent Pinchart
2013-11-06 15:26       ` Bastian Hecht
2013-11-06 15:26         ` Bastian Hecht
2013-10-29 10:29 ` [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
2013-10-29 10:29   ` Laurent Pinchart
2013-10-31 14:42   ` Kumar Gala
2013-10-31 14:42     ` Kumar Gala
2013-10-31 14:55     ` Laurent Pinchart
2013-10-31 14:55       ` Laurent Pinchart
2013-10-31 15:00       ` Kumar Gala
2013-10-31 15:00         ` Kumar Gala
2013-11-03 17:09         ` Laurent Pinchart
2013-11-03 17:09           ` Laurent Pinchart
2013-10-31  5:21 ` [PATCH 0/5] Add OF support to the sh-sci serial port driver Simon Horman
2013-10-31  5:21   ` Simon Horman
2013-10-31 12:30   ` Laurent Pinchart
2013-10-31 12:30     ` Laurent Pinchart
2013-11-01  0:17     ` Simon Horman
2013-11-01  0:17       ` Simon Horman

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=1449714.Sp0o1f9lVb@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hechtb@gmail.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-sh@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 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.