diff mbox

[v2,2/3] ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

Message ID 1366036922-4103-3-git-send-email-t.figa@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Figa April 15, 2013, 2:42 p.m. UTC
This patch extends exynos_init_time() function to handle Exynos4210 rev0
SoC, which differs in availability of system timers and needs different
clocksource initialization.

This makes it possible to use exynos_init_time() function as init_time
callback for all Exynos-based boards, including Universal_C210, which
originally had to use samsung_timer_init().

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
---
 arch/arm/mach-exynos/common.c              | 6 +++++-
 arch/arm/mach-exynos/mach-universal_c210.c | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

Comments

Arnd Bergmann April 22, 2013, 9:10 p.m. UTC | #1
On Monday 15 April 2013, Tomasz Figa wrote:
> This patch extends exynos_init_time() function to handle Exynos4210 rev0
> SoC, which differs in availability of system timers and needs different
> clocksource initialization.
> 
> This makes it possible to use exynos_init_time() function as init_time
> callback for all Exynos-based boards, including Universal_C210, which
> originally had to use samsung_timer_init().
> 
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>

Note that it would be helpful to mention here that this is required for
the calling samsung_timer_init from the exynos4-dt.c file.

	Arnd
Kim Kukjin April 23, 2013, 1:56 p.m. UTC | #2
On 04/23/13 06:10, Arnd Bergmann wrote:
> On Monday 15 April 2013, Tomasz Figa wrote:
>> This patch extends exynos_init_time() function to handle Exynos4210 rev0
>> SoC, which differs in availability of system timers and needs different
>> clocksource initialization.
>>
>> This makes it possible to use exynos_init_time() function as init_time
>> callback for all Exynos-based boards, including Universal_C210, which
>> originally had to use samsung_timer_init().
>>
>> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
>
> Acked-by: Arnd Bergmann<arnd@arndb.de>
>
> Note that it would be helpful to mention here that this is required for
> the calling samsung_timer_init from the exynos4-dt.c file.
>
I did 'amend' as per your suggestion and added your ack on this series.

Thanks.

- Kukjin
Tomasz Figa April 23, 2013, 2:26 p.m. UTC | #3
Hi Kukjin,

On Tuesday 23 of April 2013 22:56:13 Kukjin Kim wrote:
> On 04/23/13 06:10, Arnd Bergmann wrote:
> > On Monday 15 April 2013, Tomasz Figa wrote:
> >> This patch extends exynos_init_time() function to handle Exynos4210 rev0
> >> SoC, which differs in availability of system timers and needs different
> >> clocksource initialization.
> >> 
> >> This makes it possible to use exynos_init_time() function as init_time
> >> callback for all Exynos-based boards, including Universal_C210, which
> >> originally had to use samsung_timer_init().
> >> 
> >> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> > 
> > Acked-by: Arnd Bergmann<arnd@arndb.de>
> > 
> > Note that it would be helpful to mention here that this is required for
> > the calling samsung_timer_init from the exynos4-dt.c file.
> 
> I did 'amend' as per your suggestion and added your ack on this series.
> 
> Thanks.
> 
> - Kukjin

Since the samsung-time rework patches were replaced with a non-invasive subset 
with different semantics (going to send them in a while), this patch should be 
replaced with new version I'm going to send (in a while as well).

Best regards,
Kim Kukjin April 23, 2013, 3:02 p.m. UTC | #4
On 04/23/13 23:26, Tomasz Figa wrote:
> Hi Kukjin,

[...]

>>> Acked-by: Arnd Bergmann<arnd@arndb.de>
>>>
>>> Note that it would be helpful to mention here that this is required for
>>> the calling samsung_timer_init from the exynos4-dt.c file.
>>
>> I did 'amend' as per your suggestion and added your ack on this series.
>>
>> Thanks.
>>
>> - Kukjin
>
> Since the samsung-time rework patches were replaced with a non-invasive subset
> with different semantics (going to send them in a while), this patch should be
> replaced with new version I'm going to send (in a while as well).
>
Oh, OK. You want to replace with new patches you will send. I dropped 
this series in my late dt branch.

BTW, the series should depend on your samsung-time patches, right?

One more note, this makes following build error.

arch/arm/mach-exynos/built-in.o: In function `exynos_init_time':
arch/arm/mach-exynos/common.c:424: undefined reference to 
`samsung_timer_init'
make: *** [vmlinux] Error 1

Thanks.

- Kukjin
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index b65229d..ec596fc 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -51,6 +51,7 @@ 
 #include <plat/fimc-core.h>
 #include <plat/iic-core.h>
 #include <plat/tv-core.h>
+#include <plat/samsung-time.h>
 #include <plat/spi-core.h>
 #include <plat/regs-serial.h>
 
@@ -457,7 +458,10 @@  void __init exynos_init_time(void)
 		exynos4_clk_init(NULL);
 		exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
 #endif
-		mct_init();
+		if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
+			samsung_timer_init();
+		else
+			mct_init();
 	}
 }
 
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 020e1f4..a728812 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -1177,7 +1177,7 @@  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
 	.map_io		= universal_map_io,
 	.init_machine	= universal_machine_init,
 	.init_late	= exynos_init_late,
-	.init_time	= samsung_timer_init,
+	.init_time	= exynos_init_time,
 	.reserve        = &universal_reserve,
 	.restart	= exynos4_restart,
 MACHINE_END