From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Mike Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Kukjin Kim <kgene@kernel.org>,
linux-samsung-soc@vger.kernel.org,
Javier Martinez Canillas <javier@dowhile0.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] clk: exynos4: Fix wrong clock for Exynos4x12 ADC
Date: Sat, 25 Jul 2015 09:42:18 +0200 [thread overview]
Message-ID: <55B33DDA.9020605@samsung.com> (raw)
In-Reply-To: <1434074005-18846-1-git-send-email-k.kozlowski@samsung.com>
On 12/06/15 03:53, Krzysztof Kozlowski wrote:
> The TSADC gate clock was used in Exynos4x12 DTSI for exynos-adc driver.
> However TSADC is present only on Exynos4210 so on Trats2 board (with
> Exynos4412 SoC) the exynos-adc driver could not be probed:
> ERROR: could not get clock /adc@126C0000:adc(0)
> exynos-adc 126c0000.adc: failed getting clock, err = -2
> exynos-adc: probe of 126c0000.adc failed with error -2
>
> Instead on Exynos4x12 SoCs the main clock used by Analog to Digital
> Converter is located in different register and it is named in datasheet
> as PCLK_ADC. Regardless of the name the purpose of this PCLK_ADC clock
> is the same as purpose of TSADC from Exynos4210.
>
> The patch adds gate clock for Exynos4x12 using the proper register so
> backward compatibility is preserved. This fixes the probe of exynos-adc
> driver on Exynos4x12 boards and allows accessing sensors connected to it
> on Trats2 board (ntc,ncp15wb473 AP and battery thermistors).
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: <stable@vger.kernel.org>
> Fixes: c63c57433003 ("ARM: dts: Add ADC's dt data to read raw data for exynos4x12")
> Link: https://lkml.org/lkml/2015/6/11/85
Mike, could you apply this patch directly? I can't seem to find any
more independent patches for clk/samsung pull request.
Alternatively here is a branch you could cherry-pick it from with
all Acked/Reviewed tags:
git://linuxtv.org/snawrocki/samsung.git for-v4.2/clk/fixes-1
--
Regards,
Sylwester
> Changes since v1:
> 1. After discussion on LKML this solution was chosen because it smaller,
> simpler, self-contained (one patch to fix issue) and maintains backward
> compatibility. Thanks to Javier Martinez Canillas and Tomasz Figa for
> valuable comments.
> 2. Dropped patch 2/2 because now it is not needed. The clock id "TSADC"
> will be used on all Exynos4 boards.
> 3. Added CC-stable.
> ---
> drivers/clk/samsung/clk-exynos4.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
> index 714d6ba782c8..f7890bf652e6 100644
> --- a/drivers/clk/samsung/clk-exynos4.c
> +++ b/drivers/clk/samsung/clk-exynos4.c
> @@ -85,6 +85,7 @@
> #define DIV_PERIL4 0xc560
> #define DIV_PERIL5 0xc564
> #define E4X12_DIV_CAM1 0xc568
> +#define E4X12_GATE_BUS_FSYS1 0xc744
> #define GATE_SCLK_CAM 0xc820
> #define GATE_IP_CAM 0xc920
> #define GATE_IP_TV 0xc924
> @@ -1095,6 +1096,7 @@ static struct samsung_gate_clock exynos4x12_gate_clks[] __initdata = {
> 0),
> GATE(CLK_PPMUIMAGE, "ppmuimage", "aclk200", E4X12_GATE_IP_IMAGE, 9, 0,
> 0),
> + GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0),
> GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0),
> GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0),
> GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
>
--
Sylwester Nawrocki
Samsung R&D Institute Poland
WARNING: multiple messages have this Message-ID (diff)
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] clk: exynos4: Fix wrong clock for Exynos4x12 ADC
Date: Sat, 25 Jul 2015 09:42:18 +0200 [thread overview]
Message-ID: <55B33DDA.9020605@samsung.com> (raw)
In-Reply-To: <1434074005-18846-1-git-send-email-k.kozlowski@samsung.com>
On 12/06/15 03:53, Krzysztof Kozlowski wrote:
> The TSADC gate clock was used in Exynos4x12 DTSI for exynos-adc driver.
> However TSADC is present only on Exynos4210 so on Trats2 board (with
> Exynos4412 SoC) the exynos-adc driver could not be probed:
> ERROR: could not get clock /adc at 126C0000:adc(0)
> exynos-adc 126c0000.adc: failed getting clock, err = -2
> exynos-adc: probe of 126c0000.adc failed with error -2
>
> Instead on Exynos4x12 SoCs the main clock used by Analog to Digital
> Converter is located in different register and it is named in datasheet
> as PCLK_ADC. Regardless of the name the purpose of this PCLK_ADC clock
> is the same as purpose of TSADC from Exynos4210.
>
> The patch adds gate clock for Exynos4x12 using the proper register so
> backward compatibility is preserved. This fixes the probe of exynos-adc
> driver on Exynos4x12 boards and allows accessing sensors connected to it
> on Trats2 board (ntc,ncp15wb473 AP and battery thermistors).
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: <stable@vger.kernel.org>
> Fixes: c63c57433003 ("ARM: dts: Add ADC's dt data to read raw data for exynos4x12")
> Link: https://lkml.org/lkml/2015/6/11/85
Mike, could you apply this patch directly? I can't seem to find any
more independent patches for clk/samsung pull request.
Alternatively here is a branch you could cherry-pick it from with
all Acked/Reviewed tags:
git://linuxtv.org/snawrocki/samsung.git for-v4.2/clk/fixes-1
--
Regards,
Sylwester
> Changes since v1:
> 1. After discussion on LKML this solution was chosen because it smaller,
> simpler, self-contained (one patch to fix issue) and maintains backward
> compatibility. Thanks to Javier Martinez Canillas and Tomasz Figa for
> valuable comments.
> 2. Dropped patch 2/2 because now it is not needed. The clock id "TSADC"
> will be used on all Exynos4 boards.
> 3. Added CC-stable.
> ---
> drivers/clk/samsung/clk-exynos4.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
> index 714d6ba782c8..f7890bf652e6 100644
> --- a/drivers/clk/samsung/clk-exynos4.c
> +++ b/drivers/clk/samsung/clk-exynos4.c
> @@ -85,6 +85,7 @@
> #define DIV_PERIL4 0xc560
> #define DIV_PERIL5 0xc564
> #define E4X12_DIV_CAM1 0xc568
> +#define E4X12_GATE_BUS_FSYS1 0xc744
> #define GATE_SCLK_CAM 0xc820
> #define GATE_IP_CAM 0xc920
> #define GATE_IP_TV 0xc924
> @@ -1095,6 +1096,7 @@ static struct samsung_gate_clock exynos4x12_gate_clks[] __initdata = {
> 0),
> GATE(CLK_PPMUIMAGE, "ppmuimage", "aclk200", E4X12_GATE_IP_IMAGE, 9, 0,
> 0),
> + GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0),
> GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0),
> GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0),
> GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
>
--
Sylwester Nawrocki
Samsung R&D Institute Poland
next prev parent reply other threads:[~2015-07-25 7:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 1:53 [PATCH v2] clk: exynos4: Fix wrong clock for Exynos4x12 ADC Krzysztof Kozlowski
2015-06-12 1:53 ` Krzysztof Kozlowski
2015-06-12 5:46 ` Javier Martinez Canillas
2015-06-12 5:46 ` Javier Martinez Canillas
2015-07-06 4:03 ` Krzysztof Kozlowski
2015-07-06 4:03 ` Krzysztof Kozlowski
2015-07-06 5:12 ` Tomasz Figa
2015-07-06 5:12 ` Tomasz Figa
2015-07-09 0:23 ` Krzysztof Kozlowski
2015-07-09 0:23 ` Krzysztof Kozlowski
2015-07-09 17:52 ` Sylwester Nawrocki
2015-07-09 17:52 ` Sylwester Nawrocki
2015-07-21 22:42 ` Stephen Boyd
2015-07-21 22:42 ` Stephen Boyd
2015-07-21 23:41 ` Krzysztof Kozlowski
2015-07-21 23:41 ` Krzysztof Kozlowski
2015-07-26 5:40 ` Sylwester Nawrocki
2015-07-26 5:40 ` Sylwester Nawrocki
2015-07-28 21:41 ` Stephen Boyd
2015-07-28 21:41 ` Stephen Boyd
2015-07-25 7:42 ` Sylwester Nawrocki [this message]
2015-07-25 7:42 ` Sylwester Nawrocki
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=55B33DDA.9020605@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=javier@dowhile0.org \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=stable@vger.kernel.org \
--cc=tomasz.figa@gmail.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.