From patchwork Fri Oct 10 15:15:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 5066451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 497E0C11AC for ; Fri, 10 Oct 2014 15:18:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88A3A201FE for ; Fri, 10 Oct 2014 15:18:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5F72201BB for ; Fri, 10 Oct 2014 15:18:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcbvR-0006uB-Kp; Fri, 10 Oct 2014 15:16:13 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XcbvO-0006n0-2c for linux-arm-kernel@lists.infradead.org; Fri, 10 Oct 2014 15:16:11 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9AFFcM0015568; Fri, 10 Oct 2014 10:15:38 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9AFFcJr027665; Fri, 10 Oct 2014 10:15:38 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 10 Oct 2014 10:15:37 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9AFFb3N026015; Fri, 10 Oct 2014 10:15:37 -0500 From: Murali Karicheri To: , , , Subject: [PATCH] ARM: keystone: add bus notifier to set dma_pfn_offset for pci devices Date: Fri, 10 Oct 2014 11:15:37 -0400 Message-ID: <1412954137-4567-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141010_081610_219230_7C434113 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.0 (------) Cc: Murali Karicheri X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 PCI device driver such as that for e1000e tries to set dma mask using dma_set_mask_and_coherent(), it fails because the dma_pfn_offset is incorrect on a Keystone SoC. This patch fix this by adding a bus notifier to set this correctly for PCI devices. Signed-off-by: Murali Karicheri --- arch/arm/mach-keystone/keystone.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index 7f352de..13afe95 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,8 @@ static void __init keystone_init(void) keystone_pm_runtime_init(); if (platform_nb.notifier_call) bus_register_notifier(&platform_bus_type, &platform_nb); + if (platform_nb.notifier_call) + bus_register_notifier(&pci_bus_type, &platform_nb); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }