mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Cc: t.figa@samsung.com, mturquette@linaro.org, kgene.kim@samsung.com,
	inki.dae@samsung.com, sw0312.kim@samsung.com,
	kyungmin.park@samsung.com, airlied@linux.ie,
	rob.herring@calxeda.com, sylvester.nawrocki@gmail.com,
	a.hajda@samsung.com, kishon@ti.com,
	Tomasz Stanislawski <t.stanislaws@samsung.com>
Subject: [PATCH 0/4] Update to Exynos clocks
Date: Fri, 04 Apr 2014 16:53:17 +0200	[thread overview]
Message-ID: <1396623201-26000-1-git-send-email-t.stanislaws@samsung.com> (raw)

This patchset adds some updates to clocks for Exynos4 platform and to the clock
core.  The patches are rebased on linux/next.

An interesting part might be 'propagation of clk_set_parent()'.  This feature
simplifies configuration of complex topologyof clocks by drivers.  Such a
situation happens for Exynos HDMI driver.

The HDMI device is clocked by sclk_hdmi clock. In older versions of SoC and its
driver, the clock had two parent clocks: sclk_hdmiphy and sclk_pixel.
The sclk_hdmi was a gated clock.

In the recent version of Exynos clock provider this topology was slightly
changed. A new clock named mout_hdmi was introduced.  This new clock represents
the output of multiplexer that selects between sclk_hdmiphy and sclk_pixel.

After the change the sclk_hdmi is still gated but has a single parent -
mout_hdmi.

This change caused interesting situation in Exynos HDMI driver because this
driver used only sclk_hdmi.  Now clk_set_parent(sclk_hdmi, ...) fails because
sclk_hdmi has a single parent now.  Using mout_hdmi instead of sclk_hdmi will
not work because clk_enable(mout_hdmi) is not propagated to sclk_hdmi.

To solve this problem, the setup of mout_hdmi was added to Exynos HDMI in the
patch: "drm/exynos: add mout_hdmi clock in hdmi driver to change parent"

IMO, this change breaks abstraction of clock API reveling too detailed
information about clock topology to the driver.

Moreover, the driver no longer works with old DT bindings because they provide
no mout_hdmi clock.

The clock set_parent propagation can be used to fix this.  The clk_set_parent()
is propagated to a parent as long as the current clock has a single parent and
has the flag CLK_SET_PARENT_PARENT set.

Now Exynos HDMI can use only sclk_hdmi clock. The clk_enable() gates this clock
directly and clk_set_parent() is propagated to mout_hdmi.

This new behaviour does not break DT bindings because mout_hdmi would be simply
ignored.

After this change the 'add mout_hdmi clock' is no longer needed.

Regards,
Tomasz Stanislawski

Tomasz Stanislawski (4):
  clk: propagate parent change up one level
  clk: exynos4: export sclk_hdmiphy clock
  clk: exynos4: enable clk_set_parent() propagation for sclk_hdmi and
    sclk_mixer clocks
  Revert "drm/exynos: add mout_hdmi clock in hdmi driver to change
    parent"

 drivers/clk/clk.c                    |    6 ++++++
 drivers/clk/samsung/clk-exynos4.c    |    8 +++++---
 drivers/gpu/drm/exynos/exynos_hdmi.c |   14 ++++----------
 include/dt-bindings/clock/exynos4.h  |    1 +
 include/linux/clk-provider.h         |    1 +
 5 files changed, 17 insertions(+), 13 deletions(-)

-- 
1.7.9.5


             reply	other threads:[~2014-04-04 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 14:53 Tomasz Stanislawski [this message]
2014-04-04 14:53 ` [PATCH 1/4] clk: propagate parent change up one level Tomasz Stanislawski
2014-04-08 15:45   ` Tomasz Figa
2014-04-30 22:19     ` Tomasz Figa
2014-06-18 10:11       ` Tomasz Stanislawski
2014-04-04 14:53 ` [PATCH 2/4] clk: exynos4: export sclk_hdmiphy clock Tomasz Stanislawski
2014-04-08 15:48   ` Tomasz Figa
2014-04-30 22:49   ` Tomasz Figa
2014-04-04 14:53 ` [PATCH 3/4] clk: exynos4: enable clk_set_parent() propagation for sclk_hdmi and sclk_mixer clocks Tomasz Stanislawski
2014-04-08 15:49   ` Tomasz Figa
2014-04-04 14:53 ` [PATCH 4/4] Revert "drm/exynos: add mout_hdmi clock in hdmi driver to change parent" Tomasz Stanislawski
2014-04-08 15:52   ` Tomasz Figa

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=1396623201-26000-1-git-send-email-t.stanislaws@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=sw0312.kim@samsung.com \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=t.figa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®