From patchwork Thu Apr 4 16:51:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2394211 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4F55DDF25A for ; Thu, 4 Apr 2013 16:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763345Ab3DDQvi (ORCPT ); Thu, 4 Apr 2013 12:51:38 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:55690 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763176Ab3DDQvh (ORCPT ); Thu, 4 Apr 2013 12:51:37 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKQ0091PPHTFFG0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 05 Apr 2013 01:51:36 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-40-515daf982ff9 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D5.4C.13494.89FAD515; Fri, 05 Apr 2013 01:51:36 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKQ00LPLPHMJW70@mmp2.samsung.com>; Fri, 05 Apr 2013 01:51:36 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, thomas.abraham@linaro.org, Tomasz Figa Subject: [PATCH 2/3] ARM: EXYNOS: Add support for Exynos4210 EVT0 SoC Date: Thu, 04 Apr 2013 18:51:14 +0200 Message-id: <1365094275-4811-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1365094275-4811-1-git-send-email-t.figa@samsung.com> References: <1365094275-4811-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOLMWRmVeSWpSXmKPExsVy+t9jQd0Z62MDDe6fl7E4MPshq0Xvgqts Fmeb3rBbbHp8jdVixvl9TBZrj9xlt1g/4zWLxbEZSxgdODzuXNvD5rF5Sb3H+RkLGT36tqxi 9Pi8SS6ANYrLJiU1J7MstUjfLoErY8t0l4KXwhVnzn5mb2B8INDFyMkhIWAi8eD1ZjYIW0zi wr31QDYXh5DAdEaJnkk/mCGcLiaJhw8WM4JUsQmoSXxueATWISKgITGl6zE7SBGzwHVGiRVr d7OCJIQFXCUmdz9hAbFZBFQl/p1fDBbnFXCUOLV/EwvEOnmJp/f7wAZxCjhJrJz5AcjmANrm KPFtTsgERt4FjAyrGEVTC5ILipPSc430ihNzi0vz0vWS83M3MYKD65n0DsZVDRaHGAU4GJV4 eDP6YgOFWBPLiitzDzFKcDArifAebQEK8aYkVlalFuXHF5XmpBYfYpTmYFES5z3Yah0oJJCe WJKanZpakFoEk2Xi4JRqYJyQN2nhrulLLz4yuMfw5+02a6Z+y/9heudV/q/dxczwxafVWa14 c7mI54vJ/Eqeoau+pN2t5gi65L1AQ8pYu1N4w+ykOT5a2ilTJjl+en/FvNhnwWaZz6bbOnme HlxQuuC0qOjsjbO6KnRSxEIsgpx9Sl+qMj+Lv/ZpH1v/mxuy/S4leTYKwkosxRmJhlrMRcWJ AIgHKu8qAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch extends mach-exynos4-dt generic board file with support for Exynos4210 EVT0 SoC, which differs in availability of system timers and needs different time initialization. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos/Kconfig | 9 +++++++++ arch/arm/mach-exynos/mach-exynos4-dt.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e538705..56920b3 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -39,6 +39,15 @@ config CPU_EXYNOS4210 help Enable EXYNOS4210 CPU support +config SOC_EXYNOS4210_EVT0 + bool "SAMSUNG EXYNOS4210 EVT0" + default y + select SOC_EXYNOS4210 + select CLKSRC_MMIO + select SAMSUNG_HRT + help + Enable EXYNOS4210 EVT0 SoC support + config SOC_EXYNOS4212 bool "SAMSUNG EXYNOS4212" default y diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index b9ed834..ec6dd17 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -16,10 +16,12 @@ #include #include #include +#include #include #include #include +#include #include "common.h" @@ -65,3 +67,34 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") .restart = exynos4_restart, .reserve = exynos4_reserve, MACHINE_END + +#ifdef CONFIG_SOC_EXYNOS4210_EVT0 +static void __init exynos4210_evt0_init_time(void) +{ + of_clk_init(NULL); + samsung_time_init(); +} + +static void __init exynos4210_evt0_dt_map_io(void) +{ + exynos4_dt_map_io(); +} + +static char const *exynos4210_evt0_dt_compat[] __initdata = { + "samsung,exynos4210-evt0", + NULL +}; + +DT_MACHINE_START(EXYNOS4210_EVT0_DT, "Samsung Exynos4210 EVT0 (Device Tree)") + .smp = smp_ops(exynos_smp_ops), + .init_irq = exynos4_init_irq, + .map_io = exynos4210_evt0_dt_map_io, + .init_early = exynos_firmware_init, + .init_machine = exynos4_dt_machine_init, + .init_late = exynos_init_late, + .init_time = exynos4210_evt0_init_time, + .dt_compat = exynos4210_evt0_dt_compat, + .restart = exynos4_restart, + .reserve = exynos4_reserve, +MACHINE_END +#endif