From patchwork Fri Aug 9 10:05:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 18911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F30092391D for ; Fri, 9 Aug 2013 10:22:05 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id j10sf2715049qcx.6 for ; Fri, 09 Aug 2013 03:22:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mrSk+fnJw7xNDfYpe8iKq44zkXFD8QTu/sEzGvPaOdE=; b=aT4JZ6eVvhFbXAhi2wni8ZpXu8vMW7+/hqGmrEiqSQcKppqJtIfrDfGgE9dnxSZ+bA 9SwM8xjWQyklfffMIICcqPH4U5KI5ajU3+BuE1laGQm7nRC9Ep+xUPfMPBkj2KP5iYBx NXUM7e5lMnGx4pCeWZ5TvyS0CvARtjje4d3VQ5vtw6twCggxD3V+LJSjGDrkTKSyItzI gNCIZWoiE8bD5lzLq3tz+Jpy+zkoQubSVaeWn33hQAytwIFpvqT50DuBltQvaE3xGtWI 5l4nmRNSpcs0BgQPIZ0UQBNWLxCoJSGjSohJRBd4rYqFToBIoVoTS+Hk/6DwcBi4+PEJ tT1g== X-Received: by 10.224.7.7 with SMTP id b7mr11138861qab.5.1376043725156; Fri, 09 Aug 2013 03:22:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.35 with SMTP id hp3ls1357580qeb.76.gmail; Fri, 09 Aug 2013 03:22:05 -0700 (PDT) X-Received: by 10.58.233.8 with SMTP id ts8mr7044vec.44.1376043724959; Fri, 09 Aug 2013 03:22:04 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id u5si4437210vet.76.2013.08.09.03.22.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 03:22:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so898666vcb.10 for ; Fri, 09 Aug 2013 03:22:04 -0700 (PDT) X-Gm-Message-State: ALoCoQk9yFZ6njxgy+X2Be640ox1CVRxpVqDMMMU2uVwHgoIsQK+qu44XLM6OfQBixhDRUNPoB21 X-Received: by 10.221.47.193 with SMTP id ut1mr31350vcb.8.1376043724811; Fri, 09 Aug 2013 03:22:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp65290vcz; Fri, 9 Aug 2013 03:22:04 -0700 (PDT) X-Received: by 10.66.192.234 with SMTP id hj10mr74599pac.183.1376043723833; Fri, 09 Aug 2013 03:22:03 -0700 (PDT) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id mu18si12899740pab.89.2013.08.09.03.22.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 03:22:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.41; Received: by mail-pa0-f41.google.com with SMTP id bj1so4803956pad.14 for ; Fri, 09 Aug 2013 03:22:03 -0700 (PDT) X-Received: by 10.66.186.12 with SMTP id fg12mr10699378pac.178.1376043723148; Fri, 09 Aug 2013 03:22:03 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id sp4sm19305368pbc.45.2013.08.09.03.22.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 03:22:02 -0700 (PDT) From: Tushar Behera To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: linux@arm.linux.org.uk, kgene.kim@samsung.com, patches@linaro.org Subject: [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250 Date: Fri, 9 Aug 2013 15:35:14 +0530 Message-Id: <1376042714-26513-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When LPAE is enabled, we need to set 64bit DMA mask bits. Signed-off-by: Tushar Behera --- Based on v3.11-rc4. arch/arm/mach-exynos/mach-exynos5-dt.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index f874b77..2217631 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -23,6 +24,26 @@ #include "common.h" +static u64 dma_mask64 = DMA_BIT_MASK(64); + +static int exynos5250_platform_notifier(struct notifier_block *nb, + unsigned long event, void *__dev) +{ + struct device *dev = __dev; + + if (event != BUS_NOTIFY_ADD_DEVICE) + return NOTIFY_DONE; + + dev->dma_mask = &dma_mask64; + dev->coherent_dma_mask = DMA_BIT_MASK(64); + + return NOTIFY_OK; +} + +static struct notifier_block exynos5250_platform_nb = { + .notifier_call = exynos5250_platform_notifier, +}; + static void __init exynos5_dt_machine_init(void) { struct device_node *i2c_np; @@ -47,6 +68,11 @@ static void __init exynos5_dt_machine_init(void) } } + if (config_enabled(CONFIG_ARM_LPAE) && + of_machine_is_compatible("samsung,exynos5250")) + bus_register_notifier(&platform_bus_type, + &exynos5250_platform_nb); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }