From patchwork Mon Nov 25 15:07:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 3232761 Return-Path: X-Original-To: patchwork-dmaengine@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 91552C045B for ; Mon, 25 Nov 2013 15:07:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFA60200ED for ; Mon, 25 Nov 2013 15:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D94BD200E6 for ; Mon, 25 Nov 2013 15:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335Ab3KYPHU (ORCPT ); Mon, 25 Nov 2013 10:07:20 -0500 Received: from smtp-out-048.synserver.de ([212.40.185.48]:1032 "EHLO smtp-out-025.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753235Ab3KYPHT (ORCPT ); Mon, 25 Nov 2013 10:07:19 -0500 Received: (qmail 8233 invoked by uid 0); 25 Nov 2013 15:07:15 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 8174 Received: from p4fe619fd.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.230.25.253] by 217.119.54.96 with SMTP; 25 Nov 2013 15:07:15 -0000 From: Lars-Peter Clausen To: Vinod Koul , Dan Williams Cc: dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH] dma: pl330: Alloc dma_parms for the dma device Date: Mon, 25 Nov 2013 16:07:46 +0100 Message-Id: <1385392066-3961-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 In order to be able to set a maximum segment size for the device we need to allocate a dma_parameters struct for the device first. Signed-off-by: Lars-Peter Clausen --- drivers/dma/pl330.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 877d7bb..828ef21 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -578,6 +578,9 @@ struct dma_pl330_dmac { /* DMA-Engine Device */ struct dma_device ddma; + /* Holds info about sg limitations */ + struct device_dma_parameters dma_parms; + /* Pool of descriptors available for the DMAC's channels */ struct list_head desc_pool; /* To protect desc_pool manipulation */ @@ -3019,6 +3022,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) "unable to register DMA to the generic DT DMA helpers\n"); } } + + adev->dev.dma_parms = &pdmac->dma_parms; + /* * This is the limit for transfers with a buswidth of 1, larger * buswidths will have larger limits.