All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: shmobile: Add early debugging support using SCIF(A)
Date: Thu, 23 Oct 2014 09:53:02 +0000	[thread overview]
Message-ID: <16849819.4PUYgNsGu5@avalon> (raw)
In-Reply-To: <CAMuHMdV4S+bV8C-aiHuYShjSNaGx6wD1C3uJRjRGqZ7U9SAFXw@mail.gmail.com>

Hi Geert,

On Thursday 23 October 2014 09:02:46 Geert Uytterhoeven wrote:
> On Wed, Oct 22, 2014 at 10:59 PM, Laurent Pinchart wrote:
> > On Wednesday 22 October 2014 19:34:17 Geert Uytterhoeven wrote:
> >> On Wed, Oct 22, 2014 at 6:08 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> >> >> I'm wondering whether this can be fixed in the i2c driver? Does it
> >> >> really
> >> >> have to enable and disable the clock?
> >> > 
> >> > From a power-saving PoV, this makes sense. I assume serial output works
> >> > again as soon as the regular scif driver takes over? Isn't that a
> >> 
> >> Yes it continues fine afterwards.
> >> With TMU0 in DT, it's enabled again even earlier, as they share the
> >> parent.
> > 
> > Would it make sense to have a list of clocks to reference from setup code
> > when DEBUG_LL is defined ? It's a bit hackish, but DEBUG_LL is hackish
> > anyway.
>
> With setup code you mean platform or MSTP setup code?

I was thinking about platform setup code, but I'm open to other options as 
well.

> That would be an option. The clock to enable depends on the SoC and SCIF(A)
> address, so it's gonna need a large table.

I know. It's not an ideal solution, I agree.

> >> BTW, the code in sh_mobile_i2c_init() does this:
> >>         /* Get clock rate after clock is enabled */
> >>         clk_prepare_enable(pd->clk);
> >>         i2c_clk_khz = clk_get_rate(pd->clk) / 1000;
> >>         clk_disable_unprepare(pd->clk);
> >> 
> >> I assume the enable/disable is no longer needed with CCF?
> > 
> > I assume so as well.
> 
> Is it still needed with non-CCF? This driver is shared with arch/sh/.

I haven't checked. If it is, I wonder whether we could move the prepare_enable 
and disable_unprepare calls to inside the non-CCF clk_get_rate() 
implementation.

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: shmobile: Add early debugging support using SCIF(A)
Date: Thu, 23 Oct 2014 12:53:02 +0300	[thread overview]
Message-ID: <16849819.4PUYgNsGu5@avalon> (raw)
In-Reply-To: <CAMuHMdV4S+bV8C-aiHuYShjSNaGx6wD1C3uJRjRGqZ7U9SAFXw@mail.gmail.com>

Hi Geert,

On Thursday 23 October 2014 09:02:46 Geert Uytterhoeven wrote:
> On Wed, Oct 22, 2014 at 10:59 PM, Laurent Pinchart wrote:
> > On Wednesday 22 October 2014 19:34:17 Geert Uytterhoeven wrote:
> >> On Wed, Oct 22, 2014 at 6:08 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> >> >> I'm wondering whether this can be fixed in the i2c driver? Does it
> >> >> really
> >> >> have to enable and disable the clock?
> >> > 
> >> > From a power-saving PoV, this makes sense. I assume serial output works
> >> > again as soon as the regular scif driver takes over? Isn't that a
> >> 
> >> Yes it continues fine afterwards.
> >> With TMU0 in DT, it's enabled again even earlier, as they share the
> >> parent.
> > 
> > Would it make sense to have a list of clocks to reference from setup code
> > when DEBUG_LL is defined ? It's a bit hackish, but DEBUG_LL is hackish
> > anyway.
>
> With setup code you mean platform or MSTP setup code?

I was thinking about platform setup code, but I'm open to other options as 
well.

> That would be an option. The clock to enable depends on the SoC and SCIF(A)
> address, so it's gonna need a large table.

I know. It's not an ideal solution, I agree.

> >> BTW, the code in sh_mobile_i2c_init() does this:
> >>         /* Get clock rate after clock is enabled */
> >>         clk_prepare_enable(pd->clk);
> >>         i2c_clk_khz = clk_get_rate(pd->clk) / 1000;
> >>         clk_disable_unprepare(pd->clk);
> >> 
> >> I assume the enable/disable is no longer needed with CCF?
> > 
> > I assume so as well.
> 
> Is it still needed with non-CCF? This driver is shared with arch/sh/.

I haven't checked. If it is, I wonder whether we could move the prepare_enable 
and disable_unprepare calls to inside the non-CCF clk_get_rate() 
implementation.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2014-10-23  9:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 15:54 [PATCH v2] ARM: shmobile: Add early debugging support using SCIF(A) Geert Uytterhoeven
2014-10-22 15:54 ` Geert Uytterhoeven
2014-10-22 16:08 ` Wolfram Sang
2014-10-22 16:08   ` Wolfram Sang
2014-10-22 17:34   ` Geert Uytterhoeven
2014-10-22 17:34     ` Geert Uytterhoeven
2014-10-22 20:59     ` Laurent Pinchart
2014-10-22 20:59       ` Laurent Pinchart
2014-10-23  7:02       ` Geert Uytterhoeven
2014-10-23  7:02         ` Geert Uytterhoeven
2014-10-23  9:53         ` Laurent Pinchart [this message]
2014-10-23  9:53           ` Laurent Pinchart
2014-10-22 20:46 ` Laurent Pinchart
2014-10-22 20:46   ` Laurent Pinchart

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=16849819.4PUYgNsGu5@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.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.