All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Abhilash Kesavan <kesavan.abhilash@gmail.com>
Cc: Doug Anderson <dianders@chromium.org>,
	jonghwa3.lee@samsung.com, Kukjin Kim <kgene.kim@samsung.com>,
	Mike Turquette <mturquette@linaro.org>,
	Yadwinder Singh Brar <yadi.brar@samsung.com>,
	Olof Johansson <olof@lixom.net>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/5] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
Date: Thu, 12 Dec 2013 10:53:52 +0100	[thread overview]
Message-ID: <57785646.ACHYxksEZV@flatron> (raw)
In-Reply-To: <CAM4voanSSqqAzRqrNrRc+HYh4vtq3zgNeGQYCVG6sE6nB_eWGA@mail.gmail.com>

On Thursday 12 of December 2013 10:06:36 Abhilash Kesavan wrote:
> Hi Tomasz and Doug,
> 
> Thanks for the review.
> On Thu, Dec 12, 2013 at 6:00 AM, Doug Anderson <dianders@chromium.org> wrote:
> > Tomasz,
> >
> > On Wed, Dec 11, 2013 at 4:13 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
[snip]
> >> Still, I discussed about such cases as this with Sylwester a bit today and
> >> maybe a bit different approach would be better. There is a number of clocks
> >> that need to be always on, such as PMU (but also a lot of currently undefined
> >> ones). IMHO it would be nice to make sure they are enabled at boot time
> >> and do one of following:
> >> 1) claim and enable them directly from the clock controller driver
> >> 2) define them with CLK_IGNORE_UNUSED flag and enable them directly from
> >>    the clock controller driver (without increasing the refcount, so users could
> >>    possibly disable them later),
> >> 3) add a generic flag, such as CLK_BOOT_ENABLE (or something), that would
> >>    make the CCF enable such clock at bootup (in addition to implying
> >>    CLK_IGNORE_UNUSED).
> >>
> >> For me, the most sensible option would be 2) as it doesn't bloat the CCF with
> >> yet another flag and doesn't encourage people to leave clocks always on
> >> just because of laziness stopping them from implementing proper clock
> >> support in drivers.
> >
> > Right, we're using #2 for this now, but one problem is that it's
> > possible that the firmware may turn off one of these misc-type clocks.
> >  On exynos5250-snow we ran into this.  The firmware actually gates the
> > clock needed for accessing the chip_id, though perhaps that's not one
> > of the clocks that needs to be on all the time.
> 
> Yes, If the firmware gates sysreg then we should see failures at
> boot-up or later.
> Is this patch OK for now ? How would you guys like me to proceed on this ?

Yes, as I wrote in my original reply, for now your patch is fine as we
don't have the infrastructure for handling such clocks in a stricter
way yet.

Best regards,
Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
Date: Thu, 12 Dec 2013 10:53:52 +0100	[thread overview]
Message-ID: <57785646.ACHYxksEZV@flatron> (raw)
In-Reply-To: <CAM4voanSSqqAzRqrNrRc+HYh4vtq3zgNeGQYCVG6sE6nB_eWGA@mail.gmail.com>

On Thursday 12 of December 2013 10:06:36 Abhilash Kesavan wrote:
> Hi Tomasz and Doug,
> 
> Thanks for the review.
> On Thu, Dec 12, 2013 at 6:00 AM, Doug Anderson <dianders@chromium.org> wrote:
> > Tomasz,
> >
> > On Wed, Dec 11, 2013 at 4:13 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
[snip]
> >> Still, I discussed about such cases as this with Sylwester a bit today and
> >> maybe a bit different approach would be better. There is a number of clocks
> >> that need to be always on, such as PMU (but also a lot of currently undefined
> >> ones). IMHO it would be nice to make sure they are enabled at boot time
> >> and do one of following:
> >> 1) claim and enable them directly from the clock controller driver
> >> 2) define them with CLK_IGNORE_UNUSED flag and enable them directly from
> >>    the clock controller driver (without increasing the refcount, so users could
> >>    possibly disable them later),
> >> 3) add a generic flag, such as CLK_BOOT_ENABLE (or something), that would
> >>    make the CCF enable such clock at bootup (in addition to implying
> >>    CLK_IGNORE_UNUSED).
> >>
> >> For me, the most sensible option would be 2) as it doesn't bloat the CCF with
> >> yet another flag and doesn't encourage people to leave clocks always on
> >> just because of laziness stopping them from implementing proper clock
> >> support in drivers.
> >
> > Right, we're using #2 for this now, but one problem is that it's
> > possible that the firmware may turn off one of these misc-type clocks.
> >  On exynos5250-snow we ran into this.  The firmware actually gates the
> > clock needed for accessing the chip_id, though perhaps that's not one
> > of the clocks that needs to be on all the time.
> 
> Yes, If the firmware gates sysreg then we should see failures at
> boot-up or later.
> Is this patch OK for now ? How would you guys like me to proceed on this ?

Yes, as I wrote in my original reply, for now your patch is fine as we
don't have the infrastructure for handling such clocks in a stricter
way yet.

Best regards,
Tomasz

  reply	other threads:[~2013-12-12  9:53 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 11:57 [PATCH 0/5] Power Related Fixes for Exynos5250 Abhilash Kesavan
2013-12-11 11:57 ` Abhilash Kesavan
2013-12-11 11:57 ` [PATCH 1/5] clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock Abhilash Kesavan
2013-12-11 11:57   ` Abhilash Kesavan
2013-12-11 23:55   ` Doug Anderson
2013-12-11 23:55     ` Doug Anderson
2013-12-12  0:13     ` Tomasz Figa
2013-12-12  0:13       ` Tomasz Figa
2013-12-12  0:30       ` Doug Anderson
2013-12-12  0:30         ` Doug Anderson
2013-12-12  4:36         ` Abhilash Kesavan
2013-12-12  4:36           ` Abhilash Kesavan
2013-12-12  9:53           ` Tomasz Figa [this message]
2013-12-12  9:53             ` Tomasz Figa
2013-12-30 17:49   ` Tomasz Figa
2013-12-30 17:49     ` Tomasz Figa
2013-12-11 11:57 ` [PATCH 2/5] ARM: EXYNOS5: Fix PMU register configuration for local power blocks Abhilash Kesavan
2013-12-11 11:57   ` Abhilash Kesavan
2013-12-11 12:29   ` Tomasz Figa
2013-12-11 12:29     ` Tomasz Figa
2013-12-12  2:43     ` Abhilash Kesavan
2013-12-12  2:43       ` Abhilash Kesavan
2013-12-11 11:57 ` [PATCH 3/5] clk: max77686: Replace is_enabled() with is_prepared call-back Abhilash Kesavan
2013-12-11 11:57   ` Abhilash Kesavan
2013-12-11 12:24   ` Tomasz Figa
2013-12-11 12:24     ` Tomasz Figa
2013-12-12  2:47     ` Abhilash Kesavan
2013-12-12  2:47       ` Abhilash Kesavan
2013-12-11 11:57 ` [PATCH 4/5] ARM: EXYNOS5250: Implement pm_power_off Abhilash Kesavan
2013-12-11 11:57   ` Abhilash Kesavan
2013-12-11 11:57 ` [PATCH 5/5] ARM: dts: Setup the interrupt parent for max77686 Abhilash Kesavan
2013-12-11 11:57   ` Abhilash Kesavan
2013-12-11 23:57   ` Doug Anderson
2013-12-11 23:57     ` Doug Anderson
2013-12-12  2:50     ` Abhilash Kesavan
2013-12-12  2:50       ` Abhilash Kesavan
2013-12-11 12:41 ` [PATCH 0/5] Power Related Fixes for Exynos5250 Tomasz Figa
2013-12-11 12:41   ` Tomasz Figa
2013-12-12  2:42   ` Abhilash Kesavan
2013-12-12  2:42     ` Abhilash Kesavan

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=57785646.ACHYxksEZV@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=dianders@chromium.org \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kesavan.abhilash@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=yadi.brar@samsung.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 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.