From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/10] arm: exynos: Add get_lcd_clk and set_lcd_clk callbacks for Exynos5420
Date: Thu, 26 Jun 2014 10:06:02 +0900 [thread overview]
Message-ID: <53AB71FA.9060004@samsung.com> (raw)
In-Reply-To: <CAEC9eQNFbDw14uHbd+mfVuswhy7sfhjpOp5E=L39TEPSUxUhow@mail.gmail.com>
On 24/06/14 20:41, Ajay kumar wrote:
> On Tue, Jun 24, 2014 at 7:36 AM, Minkyu Kang <mk7.kang@samsung.com> wrote:
>> On 24/06/14 20:28, Ajay kumar wrote:
>>> Hi Minkyu,
>>>
>>> On Tue, Jun 24, 2014 at 3:36 AM, Minkyu Kang <mk7.kang@samsung.com> wrote:
>>>> On 17/06/14 18:06, Ajay Kumar wrote:
>>>>> Add get_lcd_clk and set_lcd_clk callbacks for Exynos5420 needed by
>>>>> exynos video driver.
>>>>> Also, configure ACLK_400_DISP1 as the parent for MUX_ACLK_400_DISP1_SUB_SEL.
>>>>>
>>>>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
>>>>> ---
>>>>> arch/arm/cpu/armv7/exynos/clock.c | 74 +++++++++++++++++++++++++++++--
>>>>> arch/arm/cpu/armv7/exynos/exynos5_setup.h | 2 +-
>>>>> arch/arm/include/asm/arch-exynos/clk.h | 1 +
>>>>> 3 files changed, 73 insertions(+), 4 deletions(-)
>>>>>
>>>>> void exynos4_set_mipi_clk(void)
>>>>> {
>>>>> struct exynos4_clock *clk =
>>>>> @@ -1602,14 +1667,17 @@ unsigned long get_lcd_clk(void)
>>>>> {
>>>>> if (cpu_is_exynos4())
>>>>> return exynos4_get_lcd_clk();
>>>>> - else
>>>>> - return exynos5_get_lcd_clk();
>>>>> + else if (proid_is_exynos5420())
>>>>> + return exynos5420_get_lcd_clk();
>>>>> + return exynos5_get_lcd_clk();
>>>>
>>>> No. Please don't mix cpu_is... and proid_is....
>>>> You can refer to other functions.
>>> Actually, only "cpu_is_exynos4" and "cpu_is_exynos5" are defined in cpu.h.
>>> And, I need different clock setting for 5250 and 5420.
>>> The only way to achieve this is by calling appropriate functions based
>>> on check to proid_is_exynos5420().
>>> Let me know if these is some other way!
>>
>> unsigned long get_lcd_clk(void)
>> {
>> if (cpu_is_exynos4()) {
>> return exynos4_get_lcd_clk();
>> } else {
>> if (proid_is_exynos5420())
>> return exynos5420_get_lcd_clk();
>> else
>> return exynos5_get_lcd_clk();
>> }
>> }
> Actually, both the ways, functionality is the same.
> Its just that, in your case readability is fine, and in my case
> the code takes fewer number of lines. ^^
>
At the same level if statement, it should be same level context.
cpu_is... and proid_is are not same level context.
Please consider it.
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2014-06-26 1:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 9:06 [U-Boot] [PATCH 00/10] peach_pit: Add support for FIMD, DP and parade chip Ajay Kumar
2014-06-17 9:06 ` [U-Boot] [PATCH 01/10] exynos_fb: Remove usage of static defines Ajay Kumar
2014-06-20 3:26 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 02/10] arm: exynos: Add RPLL for Exynos5420 Ajay Kumar
2014-06-20 3:27 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 03/10] arm: exynos: Add get_lcd_clk and set_lcd_clk callbacks " Ajay Kumar
2014-06-20 3:27 ` Simon Glass
2014-06-20 3:31 ` Simon Glass
2014-06-24 7:36 ` Minkyu Kang
2014-06-24 11:28 ` Ajay kumar
2014-06-24 11:36 ` Minkyu Kang
2014-06-24 11:41 ` Ajay kumar
2014-06-26 1:06 ` Minkyu Kang [this message]
2014-06-26 2:22 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 04/10] video: exynos_fimd: Add framework to disable FIMD sysmmu Ajay Kumar
2014-06-20 3:29 ` Simon Glass
2014-06-20 6:42 ` Ajay kumar
2014-06-23 12:15 ` Simon Glass
2014-06-24 6:59 ` Ajay kumar
2014-06-20 3:32 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 05/10] video: Add driver for Parade PS8625 dP to LVDS bridge Ajay Kumar
2014-06-20 3:29 ` Simon Glass
2014-06-20 3:30 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 06/10] ARM: exynos: Add missing declaration for gpio_direction_input Ajay Kumar
2014-06-20 3:35 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 07/10] exynos5420: add callbacks needed for exynos_fb driver Ajay Kumar
2014-06-20 3:36 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 08/10] ARM: exynos: peach_pit: Add DT nodes for fimd and parade bridge chip Ajay Kumar
2014-06-20 3:37 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 09/10] CONFIGS: peach-pit: Enable display for peach_pit board Ajay Kumar
2014-06-20 3:38 ` Simon Glass
2014-06-20 6:12 ` Ajay kumar
2014-06-23 12:18 ` Simon Glass
2014-06-17 9:06 ` [U-Boot] [PATCH 10/10] Pit WIP Ajay Kumar
2014-06-20 3:40 ` Simon Glass
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=53AB71FA.9060004@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/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