From patchwork Fri Nov 15 11:30:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Raghavendra, Vignesh" X-Patchwork-Id: 1195557 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="EQghp7fw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47Dx5R0SFQz9sP6 for ; Fri, 15 Nov 2019 22:31:54 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B2751C21EC2; Fri, 15 Nov 2019 11:31:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 47921C21DD4; Fri, 15 Nov 2019 11:31:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C2A20C21C3F; Fri, 15 Nov 2019 11:31:10 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lists.denx.de (Postfix) with ESMTPS id 62301C21C4A for ; Fri, 15 Nov 2019 11:31:10 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAFBV8F4122721; Fri, 15 Nov 2019 05:31:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573817468; bh=F3i+ywZIuUR8Wvj5gpIv2ERgFJKWKrQmINE3GAt/ENg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EQghp7fwcHy3zp55y5B4Rw7igk3P3BmnLFTeSROohYAnOd0ERozPIu0TG5tZ+sYpA CI9jLqKBZ5EqMPzXgbbRbxGD2wiYT4PlfLT8FU2aELmfa9o1rm5S5GGnnWzDrM/MxG YH5ADYP5iHsGsoCpQv3TQOZEQnyD5CbOTktJq5Y8= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAFBV8nY009302 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 Nov 2019 05:31:08 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 15 Nov 2019 05:31:08 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 15 Nov 2019 05:31:08 -0600 Received: from a0132425.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAFBV3Rc005598; Fri, 15 Nov 2019 05:31:06 -0600 From: Vignesh Raghavendra To: Lokesh Vutla , Tom Rini Date: Fri, 15 Nov 2019 17:00:42 +0530 Message-ID: <20191115113042.21334-2-vigneshr@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191115113042.21334-1-vigneshr@ti.com> References: <20191115113042.21334-1-vigneshr@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/2] dma: Add stub of dma_memcpy and dma_get_device X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add stub for dma_memcpy() and dma_get_device when CONFIG_DMA is disabled. This avoids ifdefs in driver code using DMA APIs Signed-off-by: Vignesh Raghavendra Reviewed-by: Simon Glass --- include/dma.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/dma.h b/include/dma.h index d1c3d0df7d91..32885571f7d4 100644 --- a/include/dma.h +++ b/include/dma.h @@ -292,6 +292,7 @@ int dma_receive(struct dma *dma, void **dst, void *metadata); int dma_send(struct dma *dma, void *src, size_t len, void *metadata); #endif /* CONFIG_DMA_CHANNELS */ +#if CONFIG_IS_ENABLED(DMA) /* * dma_get_device - get a DMA device which supports transfer * type of transfer_type @@ -315,5 +316,15 @@ int dma_get_device(u32 transfer_type, struct udevice **devp); transferred and on failure return error code. */ int dma_memcpy(void *dst, void *src, size_t len); +#else +static inline int dma_get_device(u32 transfer_type, struct udevice **devp) +{ + return -ENOSYS; +} +static inline int dma_memcpy(void *dst, void *src, size_t len) +{ + return -ENOSYS; +} +#endif /* CONFIG_DMA */ #endif /* _DMA_H_ */