From patchwork Mon Oct 15 11:58:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 12226 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6BE191D5116 for ; Mon, 15 Oct 2012 11:58:38 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1E514A198F6 for ; Mon, 15 Oct 2012 11:58:38 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7436497iej.11 for ; Mon, 15 Oct 2012 04:58:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=AE5yqk79tdbfLa77AKXxnejwXWWS9T85JfnI4GEty78=; b=Kdethw7NHGNDstynLIlqJExg05fGzzoeczYoEeHmOaOXtLQX6X6Kvah8JsRmV4SnFE MXWDRCkiDTdJ/eIDxN94Ll3zs/Kezi2e71JxATfcAZ4rYjxbYtEVAr1cqeFTxZd/eA36 RtNqE5YB8Bx8dYIrK1iVqSM2g7Dlme7GA+5B3VLnRrdK4i5PBrPTAqnEqgXG61opmr+k sS40g2p/i/3UKdVSC5B4xcCsDk2oIOXcOQyhjZEqLi0RbeOh/n9sdL5Qtuv5Y7oRROl+ f+WtmCuwtLJDvXLArLtn7lcCz5WXG9FyymMYp3DFZLalWA6h4meKJo4ShxnTx5bD5cFx Lhzg== Received: by 10.43.7.132 with SMTP id oo4mr8671121icb.6.1350302317910; Mon, 15 Oct 2012 04:58:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp564079igt; Mon, 15 Oct 2012 04:58:37 -0700 (PDT) Received: by 10.68.204.162 with SMTP id kz2mr36747377pbc.76.1350302317205; Mon, 15 Oct 2012 04:58:37 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id bc7si4821299pab.181.2012.10.15.04.58.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 04:58:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) client-ip=209.85.220.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) smtp.mail=chander.kashyap@linaro.org Received: by mail-pa0-f50.google.com with SMTP id hz11so5308556pad.37 for ; Mon, 15 Oct 2012 04:58:37 -0700 (PDT) Received: by 10.68.116.228 with SMTP id jz4mr35433573pbb.166.1350302316955; Mon, 15 Oct 2012 04:58:36 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ve6sm4300910pbc.58.2012.10.15.04.58.33 (version=SSLv3 cipher=OTHER); Mon, 15 Oct 2012 04:58:36 -0700 (PDT) From: Chander Kashyap To: u-boot@lists.denx.de Cc: mk7.kang@samsung.com, linaro-dev@lists.linaro.org, patches@linaro.org, Chander Kashyap Subject: [PATCH v2] ARCH: EXYNOS: add support to match product id Date: Mon, 15 Oct 2012 17:28:23 +0530 Message-Id: <1350302303-5026-1-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlZyLaVW4d5JN1GyDxsacxuIa505TKXSIDUJ5LhKPy9uZUehP8TLuVXiRiV275mHSMYWJqq From: Minkyu Kang Based upon single SoC there can be multiple varients. This patch add support to match the complete product ID. Signed-off-by: Chander Kashyap --- Changes from v1: - Author name changed arch/arm/include/asm/arch-exynos/cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 2cd4ae1..2bde10c 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,6 +139,15 @@ static inline int cpu_is_##type(void) \ IS_SAMSUNG_TYPE(exynos4, 0x4) IS_SAMSUNG_TYPE(exynos5, 0x5) +#define IS_EXYNOS_TYPE(type, id) \ +static inline int proid_is_##type(void) \ +{ \ + return s5p_cpu_id == id; \ +} + +IS_EXYNOS_TYPE(exynos4210, 0x4210) +IS_EXYNOS_TYPE(exynos5250, 0x5250) + #define SAMSUNG_BASE(device, base) \ static inline unsigned int samsung_get_base_##device(void) \ { \