From patchwork Mon Feb 1 19:36:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 44226 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id CD00BB8016 for ; Tue, 2 Feb 2010 07:37:45 +1100 (EST) Received: by ozlabs.org (Postfix) id 2E1A5B7D51; Tue, 2 Feb 2010 07:37:39 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 3625 seconds by postgrey-1.32 at bilbo; Tue, 02 Feb 2010 07:37:38 EST Received: from vms173003pub.verizon.net (vms173003pub.verizon.net [206.46.173.3]) by ozlabs.org (Postfix) with ESMTP id F0974B7D4F for ; Tue, 2 Feb 2010 07:37:38 +1100 (EST) Received: from wf-rch.minyard.local ([unknown] [173.57.145.237]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0KX600L2ZH5C5N2B@vms173003.mailsrvcs.net> for linuxppc-dev@ozlabs.org; Mon, 01 Feb 2010 13:36:49 -0600 (CST) Received: from i2 (i2.minyard.local [192.168.27.126]) by wf-rch.minyard.local (Postfix) with ESMTP id 21FB81F826; Mon, 01 Feb 2010 13:36:48 -0600 (CST) Date: Mon, 01 Feb 2010 13:36:47 -0600 From: Corey Minyard To: Benjamin Herrenschmidt Subject: [PATCH] powerpc: Add coherent_dma_mask setting to platform devices Message-id: <20100201193647.GA10863@minyard.local> References: <20100130000407.GA16156@minyard.local> <1265000313.8287.25.camel@pasglop> MIME-version: 1.0 Content-disposition: inline In-reply-to: <1265000313.8287.25.camel@pasglop> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: minyard@acm.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org From: Corey Minyard DMA ops requires that coherent_dma_mask be set properly for a device, but this was not being done for platform devices on powerpc. The MPSC drivers, in particular, need this for both serial and ethernet or they won't be able to allocate memory. Signed-off-by: Corey Minyard --- How about this patch? It seems to work ok and I suppose this makes sense. I'll send the uart setting in another patch. Index: linux-2.6/arch/powerpc/kernel/setup-common.c =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/setup-common.c +++ linux-2.6/arch/powerpc/kernel/setup-common.c @@ -681,6 +681,7 @@ static int ppc_dflt_bus_notify(struct no return 0; set_dma_ops(dev, &dma_direct_ops); + pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); return NOTIFY_DONE; }