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: 2841850 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F39669F271 for ; Fri, 9 Aug 2013 10:22:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D04B202C7 for ; Fri, 9 Aug 2013 10:22:40 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 437B1202BC for ; Fri, 9 Aug 2013 10:22:39 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jq8-0002yK-Eg; Fri, 09 Aug 2013 10:22:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jq5-0000m2-S4; Fri, 09 Aug 2013 10:22:34 +0000 Received: from mail-pa0-f43.google.com ([209.85.220.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jpy-0000ks-Pn for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 10:22:29 +0000 Received: by mail-pa0-f43.google.com with SMTP id hz10so4752598pad.30 for ; Fri, 09 Aug 2013 03:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mrSk+fnJw7xNDfYpe8iKq44zkXFD8QTu/sEzGvPaOdE=; b=oLInecZhjaaI6beBP7kHDeRq98+nftyTodBOnkWi07wJFsndDR4/1D74ejYham+ns+ cGn7BGmfzfG0Cyej9THTBqBqNDgkaW4ed3HZbEOVfUgNVc5Bbsv3mc/nKaCMOssIU9kk iDvvk22viUnhACxT7qtzwUQZx7xF1Ng1r/npmU8wWU3d4s4prb4CHWXZgH4/iSVFlB+U Kb16btDDy2fVNBWVcDrYVc6kLHvEySLloZ1Mw1eyPhA4ZKRL8z9IsDsyUL0wxU6a7jr9 +jn+o67Ap1pgO5FXRx/+Udt20ur2KVVMR4xQ3fSTEmsUreO90brg6/s9qkSaOdBG0V6J FK9A== X-Gm-Message-State: ALoCoQk8xRjiI7SHOGcpJybzG37nV/M+C8bNz0pTTEHkmhS+DagZ/uJD0VAqOSTBBZZ2ALFpziXS 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_062226_956597_D2C5D11B X-CRM114-Status: GOOD ( 12.34 ) X-Spam-Score: -2.6 (--) Cc: kgene.kim@samsung.com, linux@arm.linux.org.uk, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }