From patchwork Tue Dec 24 14:14:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3404421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E35309F169 for ; Tue, 24 Dec 2013 16:19:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23BDC2055D for ; Tue, 24 Dec 2013 16:19:29 +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 4C9C920557 for ; Tue, 24 Dec 2013 16:19:27 +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 1VvSoF-0003nK-2K; Tue, 24 Dec 2013 14:18:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VvSnr-0005Ui-Fi; Tue, 24 Dec 2013 14:17:47 +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 1VvSlg-00058e-Dc for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2013 14:15:35 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) 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 <0MYB00F6QE976L60@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2013 14:15:07 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-be-52b996ea0e70 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 83.19.23059.AE699B25; Tue, 24 Dec 2013 14:15:06 +0000 (GMT) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MYB00MNYE90WR00@eusync2.samsung.com>; Tue, 24 Dec 2013 14:15:06 +0000 (GMT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH RFC 01/11] ARM: SAMSUNG: Add soc_is_s3c2410() helper Date: Tue, 24 Dec 2013 15:14:24 +0100 Message-id: <1387894474-14428-1-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.4.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJJMWRmVeSWpSXmKPExsVy+t/xK7qvpu0MMuj9q2Dxd9IxdoveBVfZ LDY9vsZqMeP8PiaLU9c/s1msn/GaxYHN4/evSYwem5fUe1w50cTq0bdlFaPH501yAaxRXDYp qTmZZalF+nYJXBlTWxeyF8zirWjuW83WwDiHu4uRk0NCwERi25ZJ7BC2mMSFe+vZuhi5OIQE ljJKfHt/gQXC6WOSONOwjxGkik1ATeJzwyM2EFtEQFXic9sCdpAiZoFNjBKfdx9mBUkIC7hI XNx7DKyBBaho0bWFYHFeASeJCb1HWCHWKUh0rvnPOIGRewEjwypG0dTS5ILipPRcQ73ixNzi 0rx0veT83E2MkOD4soNx8TGrQ4wCHIxKPLwFpTuChFgTy4orcw8xSnAwK4nwXlHcGSTEm5JY WZValB9fVJqTWnyIkYmDU6qBUSNx6cG0Y7lhpVc5Ek/3+2a2LZwc/Vhq4Z4XnuJJB6Sn/lnR bKM+re9U31vrXPfzEx7tXWTyjTOnKiZrT89Xn8KQj68k2lwOb2fk/MS7TmU77+6HFT1vY93n zHt2vfEs37ppH9apTj0n1bpMMcym4LWdw1+DV6WPZ7ziXfs1W2SzSWxwyZJVz5RYijMSDbWY i4oTARAxfV7sAQAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131224_091532_666286_E1082587 X-CRM114-Status: UNSURE ( 7.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) Cc: Olof Johansson , Tomasz Figa , Kukjin Kim , Arnd Bergmann , linux-arm-kernel@lists.infradead.org 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 --- 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)