From patchwork Fri Oct 24 07:41:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 39412 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A76C924026 for ; Fri, 24 Oct 2014 07:41:25 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id ex7sf318204wid.0 for ; Fri, 24 Oct 2014 00:41:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ssQRl9wvSBJKMIGLEIZRSOywPLISLjNrqsnP036Pl1E=; b=SK9YV6erdtnGW2YO1LN/32JSWT4IyywNVE04NPn0pAZ5C5BGhnBKmpAHbUO+MMlayo TZeARRQQGgA3jStv0k2Jvr962sZTFumR5BBOaWqIAxJoVYYfw9Y2y2WsB58H0fbOICm2 5BNBf5dfaijX2thvS/BF07A2O1jZ/6oUlQHigCnqbxGZPYuZH2/ku8AZEb2ot39K4LTd B76GlbPsLFSvtRskfZAoAXslbusywCL2I+OJwilsvvPyCWxEefe61FaxKfedDMhey5D5 VJiIg5rx3aLq/uwLsRQJ8YX3BCRedWPdF+XuMoi4eydTici3B7NC6qk6ef8MmOhWxL93 QuSw== X-Gm-Message-State: ALoCoQn0n3QVBSCnv383VgkJ/33TLM1rgpjmlO4za/AUTNZsAnoAoPRknUvION3tgRQxllJ2Gc1x X-Received: by 10.180.90.115 with SMTP id bv19mr479420wib.1.1414136484885; Fri, 24 Oct 2014 00:41:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.38 with SMTP id n6ls375816laj.86.gmail; Fri, 24 Oct 2014 00:41:24 -0700 (PDT) X-Received: by 10.112.225.225 with SMTP id rn1mr942291lbc.98.1414136484628; Fri, 24 Oct 2014 00:41:24 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id w5si5721332lae.80.2014.10.24.00.41.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 00:41:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id p9so2132228lbv.33 for ; Fri, 24 Oct 2014 00:41:24 -0700 (PDT) X-Received: by 10.152.116.102 with SMTP id jv6mr2637446lab.40.1414136484396; Fri, 24 Oct 2014 00:41:24 -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.112.84.229 with SMTP id c5csp384365lbz; Fri, 24 Oct 2014 00:41:23 -0700 (PDT) X-Received: by 10.70.109.169 with SMTP id ht9mr672447pdb.152.1414136482772; Fri, 24 Oct 2014 00:41:22 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id aa5si3499875pbd.181.2014.10.24.00.41.22 for ; Fri, 24 Oct 2014 00:41:22 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751630AbaJXHlU (ORCPT + 4 others); Fri, 24 Oct 2014 03:41:20 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:64637 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbaJXHlT (ORCPT ); Fri, 24 Oct 2014 03:41:19 -0400 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 <0NDX00BF7UTNB0A0@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 24 Oct 2014 08:44:11 +0100 (BST) X-AuditID: cbfec7f4-b7f6c6d00000120b-d8-544a029c4c0d Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 17.8A.04619.C920A445; Fri, 24 Oct 2014 08:41:16 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NDX003FPUOJQW40@eusync2.samsung.com>; Fri, 24 Oct 2014 08:41:16 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Arnd Bergmann , Joerg Roedel Subject: [PATCH] iommu: exynos: make driver multiarch friendly Date: Fri, 24 Oct 2014 09:41:00 +0200 Message-id: <1414136460-31374-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1987006.J2W7PED0yz@wuerfel> References: <1987006.J2W7PED0yz@wuerfel> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCJMWRmVeSWpSXmKPExsVy+t/xK7pzmLxCDM5e1bf4O+kYu8WC/dYW nbM3sFtsenyN1WLG+X1MFmuP3GV3YPN4cnAek8fvX5MYPTYvqfeYfGM5o0ffllWMHp83yQWw RXHZpKTmZJalFunbJXBl3Fy3kLlgP0dF4/VnzA2MM9i7GDk5JARMJFavm8gIYYtJXLi3nq2L kYtDSGApo8SEzvesEE4fk8Ty9StYQKrYBAwlut52sYHYIgL5Ei/2/gWLMwsUSHydtgRskrCA ncT+64uZQGwWAVWJu7s3s4LYvAIeEvO2n2SB2CYn8f/lCrAaTgFNiSebD4DZQgIaEicmPGGa wMi7gJFhFaNoamlyQXFSeq6hXnFibnFpXrpecn7uJkZISH3Zwbj4mNUhRgEORiUe3opkjxAh 1sSy4srcQ4wSHMxKIrw1/z1DhHhTEiurUovy44tKc1KLDzEycXBKNTAu7tx75cPpd8Ez+dLu 3P+iw/COtW6f2Y+fUw9NL7Z1uS+Uutqp+J3wNPNSnxqnNx/0356ZVHLMNqx/3VSu+U0FxrOf sYm+Fjgbfu32bRFfW5MulSmLwjdPyctQdVl8y+Oj+RML+dodddIzouq3P0z7sdKad4o0T82P OXpfp1i6HW8pSr6rFyWvxFKckWioxVxUnAgAcAcc3AcCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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.217.174 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Initialize all structures and register to iommu subsystem only on Exynos compatible platforms. Signed-off-by: Marek Szyprowski Acked-by: Arnd Bergmann --- 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 7423318..a77350e 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1188,6 +1189,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) {