devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Update to Exynos clocks
@ 2014-04-04 14:53 Tomasz Stanislawski
  2014-04-04 14:53 ` [PATCH 1/4] clk: propagate parent change up one level Tomasz Stanislawski
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Tomasz Stanislawski @ 2014-04-04 14:53 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc, linux-arm-kernel, devicetree,
	dri-devel
  Cc: t.figa, mturquette, kgene.kim, inki.dae, sw0312.kim,
	kyungmin.park, airlied, rob.herring, sylvester.nawrocki, a.hajda,
	kishon, Tomasz Stanislawski

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-06-18 10:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 14:53 [PATCH 0/4] Update to Exynos clocks Tomasz Stanislawski
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

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).