From patchwork Mon Oct 15 13:06:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 12228 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 AC6FC23F9B for ; Mon, 15 Oct 2012 13:06:50 +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 339DEA1991D for ; Mon, 15 Oct 2012 13:06:50 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7533363iej.11 for ; Mon, 15 Oct 2012 06:06:49 -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=oS5cqozwN+/Ze1ojw9t92AtB9O68BEHsPZSAf+v2S8s=; b=ALqqFQf29SQsAXBUEccMcmBqvBmM4thq1xmC4wrGwnyk5t6dR9iOvBoCLuXjHFhWON dBDiRQuq2D52IuynUAAzhbezvwMijdE2GDXKiIvRiX04+riXk1VZ7aqCAW/HpktqXBG5 DVv/qEWvJs2JutspDjtS3tV/P2xSl/qeSholxDGhzlSipybJ08XjnDtEp8wCE3JNuXvn SAcxJLUMkcyLGOy8QvJtHIprFbT6AVCpeHEmjZgTF79QXmj4sI1mBX1Y9Ah5J6HmYwKx ql+WUxiw54L1AaZcQgJZb+vDjwpBiiph2d3qpYay+oinZFygtWFEsvMoKGcXVE++qkD6 yrew== Received: by 10.50.152.137 with SMTP id uy9mr8431979igb.62.1350306409418; Mon, 15 Oct 2012 06:06:49 -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 n20csp571794igt; Mon, 15 Oct 2012 06:06:45 -0700 (PDT) Received: by 10.42.119.133 with SMTP id b5mr3614673icr.56.1350306405434; Mon, 15 Oct 2012 06:06:45 -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 q6si21975356pay.168.2012.10.15.06.06.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 06:06:45 -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 hz11so5366895pad.37 for ; Mon, 15 Oct 2012 06:06:45 -0700 (PDT) Received: by 10.68.190.197 with SMTP id gs5mr37509707pbc.124.1350306405061; Mon, 15 Oct 2012 06:06:45 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pw2sm9046080pbb.59.2012.10.15.06.06.42 (version=SSLv3 cipher=OTHER); Mon, 15 Oct 2012 06:06:44 -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 v3] ARCH: EXYNOS: add support to match product id Date: Mon, 15 Oct 2012 18:36:32 +0530 Message-Id: <1350306392-5273-1-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkmDi1llqqIoTx/FzgtxqmpP3eDUIZcGO0RovfwzybHbV95Ow7NSdIjWEYAoc+XIAZt2eSw From: Minkyu Kang Based upon single SoC there can be multiple variants. This patch add support to match the complete product ID. Signed-off-by: Chander Kashyap --- Changes from v1: - Author name changed Changes from v2: - Fixed typo 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) \ { \