From patchwork Thu Feb 6 19:12:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3597991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1DA75BF418 for ; Thu, 6 Feb 2014 19:15:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 578D320120 for ; Thu, 6 Feb 2014 19:15:56 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A0F52011E for ; Thu, 6 Feb 2014 19:15:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBUP5-0006Kj-02; Thu, 06 Feb 2014 19:14:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBUOo-0000js-H5; Thu, 06 Feb 2014 19:14:10 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBUO9-0000cL-9c for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 19:13:31 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0L00K5W9DUO2B0@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 19:13:06 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-30-52f3dec116d6 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 6B.74.18565.1CED3F25; Thu, 06 Feb 2014 19:13:05 +0000 (GMT) Received: from AMDC1227.digital.local ([106.116.147.199]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N0L002UD9DPUJ50@eusync4.samsung.com>; Thu, 06 Feb 2014 19:13:05 +0000 (GMT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 02/12] ARM: SAMSUNG: Add soc_is_s3c2410() helper Date: Thu, 06 Feb 2014 20:12:47 +0100 Message-id: <1391713977-22300-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.5.2 In-reply-to: <1391713977-22300-1-git-send-email-t.figa@samsung.com> References: <1391713977-22300-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4Nd2D9z4HGaxbpmzxd9Ixdouzyw6y WfQuuMpmcbbpDbvFpsfXWC1mnN/HZLH2yF12i1PXP7NZrJ/xmsWB0+P3r0mMHrMbLrJ4bF5S 73HlRBOrR9+WVYwenzfJBbBFcdmkpOZklqUW6dslcGX8aNzCUnCet6L31TmmBsYz3F2MHBwS AiYSj5badjFyApliEhfurWfrYuTiEBJYyihx4ncTC4TTxyTR3raRBaSKTUBN4nPDIzYQW0RA VeJz2wJ2EJtZYDOTxJojTiC2sICzxMv9X8FqWIBqpr08wwRi8wo4Saz5u58FYrGCxOrrQiBh TqDy9gk7wEqEgEruXr7HPoGRdwEjwypG0dTS5ILipPRcI73ixNzi0rx0veT83E2MkHD7uoNx 6TGrQ4wCHIxKPLyKKz4HCbEmlhVX5h5ilOBgVhLhtb0DFOJNSaysSi3Kjy8qzUktPsTIxMEp 1cAYkrh49W6nVzuqX2od3tB/32eiZ1C4ru/xvE9+eROKQv9f3CJ6PrFwop/yg6ji1oLnB/7M qeh5UhvEIBR7tsRXOUJ8xx8xA9tlv9o1WCfO7BF+Knf906GKubfrFpW/qrzPPYV/zv5l5WnL 9Wd/D0u9dHVR6523r91nfPnumXtV5Lrx/a+XvO0PKLEUZyQaajEXFScCAGrv5JsVAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140206_141329_444564_83E0272C X-CRM114-Status: UNSURE ( 7.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) Cc: Kukjin Kim , Arnd Bergmann , Tomasz Figa , Doug Anderson , Kyungmin Park , Olof Johansson , linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to the S3C2410 SoC being quite different from other S3C24xx SoCs in some aspects, such as availability of DIVSLOT register in its UART blocks, there is a need sometimes to check whether we are running on this SoC, not just the S3C24xx series. This patch adds soc_is_s3c2410() helper function for this purpose. Signed-off-by: Tomasz Figa Acked-by: Kyungmin Park --- arch/arm/plat-samsung/include/plat/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 335beb3..6bf86f6 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -20,6 +20,9 @@ extern unsigned long samsung_cpu_id; +#define S3C2410_CPU_ID 0x32410000 +#define S3C2410_CPU_MASK 0xFFFFFFFF + #define S3C24XX_CPU_ID 0x32400000 #define S3C24XX_CPU_MASK 0xFFF00000 @@ -56,6 +59,7 @@ static inline int is_samsung_##name(void) \ return ((samsung_cpu_id & mask) == (id & mask)); \ } +IS_SAMSUNG_CPU(s3c2410, S3C2410_CPU_ID, S3C2410_CPU_MASK) IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK) IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK) IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) @@ -76,8 +80,10 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) defined(CONFIG_CPU_S3C2442) || defined(CONFIG_CPU_S3C244X) || \ defined(CONFIG_CPU_S3C2443) # define soc_is_s3c24xx() is_samsung_s3c24xx() +# define soc_is_s3c2410() is_samsung_s3c2410() #else # define soc_is_s3c24xx() 0 +# define soc_is_s3c2410() 0 #endif #if defined(CONFIG_CPU_S3C2412)