From patchwork Tue Aug 5 10:47:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 34930 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA20920523 for ; Tue, 5 Aug 2014 10:50:35 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 79sf2305345ykr.10 for ; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=Q5wqORQxz+qf/Gq43t1Uz6fO5RKiAxUpJMnYZCxds0g=; b=dU94WmWEwMmvZqL/U7VQW6OT+OxmqYBiBvqDZNhbu2MjVD1VGY6cLK4PdPhvZSfQ/Q Z3U4SREpj0s+iG+OGT/uFh4B8jeWb2DAmmenoGOFm1oB7oMU/pzzTsbElLoreKgX/FZe jNQKzWaB9LPlWlFhxxMMQ0EEMEswka7EMSemJR1JT/r5cX7dT5d2S4yEkUaaT4k4vENd OoihEz8U740mtvoO9RZHiqAxG4flAUGinNAMRG95II7TpXQEw2SayLchgftXp1xcsJJB cbaqhMV/kS8HfAGUTqdO6rzBHkE6fMdln4Y3cw2dhhku9JrWpHQOuU53bm25N3BPNnJx 6H+w== X-Gm-Message-State: ALoCoQkFVmnRheEitZUOYAoq8H4grDSSZosJTyJBxV9SqSgqlMgmQQJBz8N0rZH//oYn481Pv7Mh X-Received: by 10.236.23.230 with SMTP id v66mr533615yhv.53.1407235835717; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.80 with SMTP id y74ls239730qgd.0.gmail; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) X-Received: by 10.52.163.229 with SMTP id yl5mr321604vdb.79.1407235835645; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id r3si786108vem.40.2014.08.05.03.50.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Aug 2014 03:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ij19so1096684vcb.39 for ; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) X-Received: by 10.220.167.9 with SMTP id o9mr2461558vcy.8.1407235835568; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp374656vcb; Tue, 5 Aug 2014 03:50:35 -0700 (PDT) X-Received: by 10.140.30.73 with SMTP id c67mr4121841qgc.16.1407235835104; Tue, 05 Aug 2014 03:50:35 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id f94si2172518qgd.22.2014.08.05.03.50.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Aug 2014 03:50:35 -0700 (PDT) Received-SPF: none (google.com: linaro-mm-sig-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XEcKA-0005TQ-5t; Tue, 05 Aug 2014 10:50:34 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XEcIl-0005FQ-Ks for linaro-mm-sig@lists.linaro.org; Tue, 05 Aug 2014 10:49:07 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9T00MLPY18QI90@mailout2.w1.samsung.com> for linaro-mm-sig@lists.linaro.org; Tue, 05 Aug 2014 11:48:44 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-ca-53e0b69e5610 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 66.1C.25543.E96B0E35; Tue, 05 Aug 2014 11:49:02 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N9T0057MY17SE80@eusync3.samsung.com>; Tue, 05 Aug 2014 11:49:02 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 05 Aug 2014 12:47:44 +0200 Message-id: <1407235677-26324-17-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> References: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t/xq7rztj0INli4zdri76Rj7BbNi9ez WUy6P4HFYsF+a4vO2RvYLXoXXGWzONv0ht2ic+ISdosvVx4yWWx6fI3V4vKuOWwWM87vY7JY e+Quu8Wp65/ZLP71HmS0OHP6EqvF/z072C0Ov2lntTjycDe7xapdfxgtbv/mcxD1eHJwHpPH 71+TGD12zrrL7jG7Yyarx6ZVnWwe++euYffYvKTe4/a/x8wek28sZ/S4cqKJ1aO3+R2bx5ar 7SwefVtWMXp83iQXwBfFZZOSmpNZllqkb5fAlbHl5Ff2gmkcFb2PHjE3MH5h62Lk4JAQMJFY vEWni5ETyBSTuHBvPRuILSSwlFFiz3ndLkYuILuPSaLrzm4mkASbgKFE19suNpCEiEAvo0R/ 0w8mEIdZYB2rxP7e6ywgVcICLhL3LyxjBNnAIqAqsflaCUiYV8BT4snl+2wQ2+Qk/r9cATaU Eyh++OYBVojNHhI/N6xhn8DIu4CRYRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSNR82cG4 +JjVIUYBDkYlHl6D03eDhVgTy4orcw8xSnAwK4nwSqx5ECzEm5JYWZValB9fVJqTWnyIkYmD U6qBcZGPtcfKVFtXwZuZ5rwz53uk6AvdmB83v+ZNaFyZ7fsDF19wN51LuLMi53uMYGrh5eTP Uz2P1B/aMGuWy4o/ot6PvmwOuqg7JVFCONzyqP22fNOXt3cG/wir+uEo4jBFycpWvuz4UTuG qytEo69G3PXLsF5/a77dS9dslb/Fxc8Sw1cJfQp6rcRSnJFoqMVcVJwIAODk3Pp4AgAA Cc: Rob Herring , Thierry Reding , Shaik Ameer Basha , Arnd Bergmann , Inki Dae , Greg Kroah-Hartman , Joerg Roedel , "Rafael J. Wysocki" , Tomasz Figa , linaro-mm-sig@lists.linaro.org, Kyungmin Park , Kukjin Kim , Laurent Pinchart , Sylwester Nawrocki , Olof Johansson , Cho KyongHo Subject: [Linaro-mm-sig] [PATCH 16/29] iommu: exynos: make driver multiarch friendly X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-mm-sig-bounces@lists.linaro.org Sender: linaro-mm-sig-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Initialize all structures and register to iommu subsystem only on Exynos compatible platforms. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index d037e87..64b3bc8 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1187,6 +1188,11 @@ static int __init exynos_iommu_init(void) { int ret; + if (!of_machine_is_compatible("samsung,exynos3") && + !of_machine_is_compatible("samsung,exynos4") && + !of_machine_is_compatible("samsung,exynos5")) + return -ENODEV; + lv2table_kmem_cache = kmem_cache_create("exynos-iommu-lv2table", LV2TABLE_SIZE, LV2TABLE_SIZE, 0, NULL); if (!lv2table_kmem_cache) {