linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.adi@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Serial <linux-serial@vger.kernel.org>
Subject: Re: [PATCH][uart] fit blackfin uart over sport driver into common uart inftrastructure (v2)
Date: Fri, 18 Sep 2009 12:54:29 +0800	[thread overview]
Message-ID: <4e5ebad50909172154m3c6450f2u7512f20ee3f1951e@mail.gmail.com> (raw)
In-Reply-To: <8bd0f97a0909161156x3cf83b51tb01f6c890abf8594@mail.gmail.com>

On Thu, Sep 17, 2009 at 2:56 AM, Mike Frysinger <vapier.adi@gmail.com> wrote:
> On Wed, Sep 16, 2009 at 06:02, sonic zhang wrote:
>> 3. Move most platform data into arch specific board files.
>
> might as well do it right now since you've done most of it already.
> i.e. all of the peripheral logic should be in the boards, not the
> driver.  so the bfin_uart_pin_req_sportx lists should get moved to the
> platform resources as well as the SPORT base addresses.

No. You can't. Because the console is registered and running much
earlier than the platform data is initialized. You have to know the
peripheral lists and base address before registering the console.


>
> then we get proper device bindings between ttySS# and SPORT# by using
> the .id field.  ttySS0 should always be SPORT0, ttySS1 should always
> be SPORT1, etc...

You can't either. Because the index of tty devices is increased
automatically when you successfully register a uart port.  If sport0
is used for devices other than uart, uart over sport1 is always bond
to ttySS0.


>
>> Signed-off-by: Michael Frysinger <michael.frysinger@analog.com>
>
> you shouldnt add s-o-b tags for people who didnt opt for them ... i
> was sleeping when you wrote, committed, and e-mailed out these
> changes.  i also handt posted these changes yet because i knew there
> were still issues to be worked out.

OK. I mean you also did some cleanup to this patch.

>
>> --- a/drivers/serial/bfin_sport_uart.c
>> +++ b/drivers/serial/bfin_sport_uart.c
>> +#define DRV_NAME "bfin-sport-uart"
>> +#define DEVICE_NAME    "ttySS"
>
> should really use the dev_* functions for output rather than the pr_*
> ones, but if you dont do that, you should add before the #include's:
> #define pr_fmt(fmt) DRV_NAME ": " fmt
>
>>        tclkdiv = sclk/(2 * baud_rate) - 1;
>> -       tfsdiv = 12;
>> -       rclkdiv = sclk/(2 * baud_rate * 3) - 1;
>> +       rclkdiv = sclk/(2 * baud_rate * 2) - 1;
>
> missing space around the "/"
>

OK.

>> -static int sport_uart_suspend(struct platform_device *dev, pm_message_t state)
>> +#ifdef CONFIG_PM
>> +static int sport_uart_suspend(struct platform_device *pdev, pm_message_t state)
>>  {
>> -       struct sport_uart_port *sport = platform_get_drvdata(dev);
>> +       struct sport_uart_port *sport = platform_get_drvdata(pdev);
>>
>> -       pr_debug("%s enter\n", __func__);
>> +       dev_dbg(&pdev->dev, "%s enter\n", __func__);
>>        if (sport)
>>                uart_suspend_port(&sport_uart_reg, &sport->port);
>>
>>        return 0;
>>  }
>>
>> -static int sport_uart_resume(struct platform_device *dev)
>> +static int sport_uart_resume(struct platform_device *pdev)
>>  {
>> -       struct sport_uart_port *sport = platform_get_drvdata(dev);
>> +       struct sport_uart_port *sport = platform_get_drvdata(pdev);
>>
>> -       pr_debug("%s enter\n", __func__);
>> +       dev_dbg(&pdev->dev, "%s enter\n", __func__);
>>        if (sport)
>>                uart_resume_port(&sport_uart_reg, &sport->port);
>>
>>        return 0;
>>  }
>
> these need updating to the new dev_pm_opts structure.  see the changes
> i just did to the adp558-keys driver for a simple example.

OK.

>
>> --- a/drivers/serial/bfin_sport_uart.h
>> +++ b/drivers/serial/bfin_sport_uart.h
>
> while you're in here, you might as well add the proper #ifndef header protection
> -mike
>

OK.

Sonic Zhang
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-09-18  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 10:02 [PATCH][uart] fit blackfin uart over sport driver into common uart inftrastructure (v2) sonic zhang
2009-09-16 18:56 ` Mike Frysinger
2009-09-18  4:54   ` Sonic Zhang [this message]
2009-09-18  5:11     ` Sonic Zhang
2009-09-18  6:24     ` Mike Frysinger

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=4e5ebad50909172154m3c6450f2u7512f20ee3f1951e@mail.gmail.com \
    --to=sonic.adi@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=vapier.adi@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).