From: jassisinghbrar@gmail.com (Jassi Brar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: S5PC110: add common FIMC setup code
Date: Mon, 6 Sep 2010 13:52:24 +0900 [thread overview]
Message-ID: <AANLkTinhbmKX5gs4TPZwVUX0WSEQ5RLN+_gHAqXsTj1b@mail.gmail.com> (raw)
In-Reply-To: <1283745044-15514-4-git-send-email-m.szyprowski@samsung.com>
On Mon, Sep 6, 2010 at 12:50 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
....
> + ? ? ? parent = clk_get(NULL, "mout_epll");
> + ? ? ? if (IS_ERR(parent))
> + ? ? ? ? ? ? ? return PTR_ERR(parent);
> +
> + ? ? ? for (i = 0; err == 0 && i < ARRAY_SIZE(fimc_devs); i++) {
> + ? ? ? ? ? ? ? if (fimc_devs[i]) {
> + ? ? ? ? ? ? ? ? ? ? ? clk_fimc = clk_get(fimc_devs[i], "sclk_fimc");
> + ? ? ? ? ? ? ? ? ? ? ? if (IS_ERR(clk_fimc)) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? err = PTR_ERR(clk_fimc);
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? clk_set_parent(clk_fimc, parent);
> + ? ? ? ? ? ? ? ? ? ? ? clk_put(clk_fimc);
> + ? ? ? ? ? ? ? }
> + ? ? ? }
The sclk_fimc could source clock from a number of options out of a mux.
mout_epll is just one of them. Different machines may want to source the
clock differently.
So, IMO the parent selection should not be done in platform code, but rather
in machine init code.
Not the best, but a better solution can be found in
arch/arm/mach-s5pc100/dev-spi.c
Give it a thought.
next prev parent reply other threads:[~2010-09-06 4:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 3:50 [PATCH] Platform fixes for s5p-fimc Marek Szyprowski
2010-09-06 3:50 ` [PATCH 1/4] ARM: S5PC110: add fimc clocks Marek Szyprowski
2010-09-09 0:23 ` Kukjin Kim
2010-09-06 3:50 ` [PATCH 2/4] ARM: Samsung: s5p-fimc: fix dma coherent mask Marek Szyprowski
2010-09-09 0:41 ` Kukjin Kim
2010-09-09 1:44 ` Marek Szyprowski
2010-09-09 2:17 ` [PATCH v2] " Marek Szyprowski
2010-09-09 11:20 ` Kukjin Kim
2010-09-14 9:27 ` Marek Szyprowski
2010-09-15 23:49 ` Kukjin Kim
2010-09-06 3:50 ` [PATCH 3/4] ARM: S5PC110: add common FIMC setup code Marek Szyprowski
2010-09-06 4:16 ` Marek Vasut
2010-09-06 4:34 ` Marek Szyprowski
2010-09-06 4:40 ` Marek Vasut
2010-09-06 4:52 ` Jassi Brar [this message]
2010-09-06 8:46 ` Marek Szyprowski
2010-09-06 9:17 ` Jassi Brar
2010-09-06 10:21 ` Marek Szyprowski
2010-09-06 11:28 ` Jassi Brar
2010-09-06 9:10 ` Marek Szyprowski
2010-09-06 3:50 ` [PATCH 4/4] ARM: S5PC110: use common FIMC clock " Marek Szyprowski
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=AANLkTinhbmKX5gs4TPZwVUX0WSEQ5RLN+_gHAqXsTj1b@mail.gmail.com \
--to=jassisinghbrar@gmail.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 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).