From patchwork Wed Mar 11 15:30:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5986561 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D973FBF90F for ; Wed, 11 Mar 2015 15:31:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03A47203AA for ; Wed, 11 Mar 2015 15:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4F1E20386 for ; Wed, 11 Mar 2015 15:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751124AbbCKPb0 (ORCPT ); Wed, 11 Mar 2015 11:31:26 -0400 Received: from mail-qg0-f49.google.com ([209.85.192.49]:36201 "EHLO mail-qg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbbCKPbZ (ORCPT ); Wed, 11 Mar 2015 11:31:25 -0400 Received: by qgdz107 with SMTP id z107so10861614qgd.3 for ; Wed, 11 Mar 2015 08:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GCOtgmdkO9jJd3NB4ka6YsFcY+2Vr96JG5XD1lbst7w=; b=E9JVeVndGDgIvIdAew+Em3H76HZVtoLRetw9aXgoUZiL8Bv7qsbE+JseshIQoHyfXq lo0TfFzF8FyI+8g7Us4d3UMouDPuRFuUN9ntl5ZpnGIAH0bc2WY/3bOO80WG5vl7n5XP 1oGUT5+l5MlFZLZ8FugvsjdvKyL0Wodmbqny2/QF/+dVyEoxh/7mwhIWBZGwXputrDaR fse0h1VRh/W7UcLpiZHH42v6gSe0f7+pwZ09dyS55kIJACDSDJggR2N7T4Fo978aqi7+ kEpKxjtEwnXu4FeUBZlQdtyqtPV9PGIUXtYK3EN7n2m1CLFSjZIq93/7j2hcHadyOhjg aHNg== X-Received: by 10.140.16.99 with SMTP id 90mr47631142qga.105.1426087885145; Wed, 11 Mar 2015 08:31:25 -0700 (PDT) Received: from localhost.localdomain ([177.194.98.53]) by mx.google.com with ESMTPSA id b74sm2750272qga.40.2015.03.11.08.31.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Mar 2015 08:31:24 -0700 (PDT) From: Fabio Estevam To: vinod.koul@intel.com Cc: shawn.guo@linaro.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, shengjiu.wang@freescale.com, Fabio Estevam Subject: [PATCH] dma: imx-sdma: Add support for version 3 firmware Date: Wed, 11 Mar 2015 12:30:58 -0300 Message-Id: <1426087858-21984-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Fabio Estevam Currently when version 3.1 of the mx6q SDMA firmware is used we get: [ 0.392169] imx-sdma 20ec000.sdma: unknown firmware version [ 0.399281] imx-sdma 20ec000.sdma: initialized Add support for it. Based on a patch from Shengjiu Wang from the internal FSL kernel. Signed-off-by: Fabio Estevam --- drivers/dma/imx-sdma.c | 4 ++++ include/linux/platform_data/dma-imx-sdma.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 18c0a13..eb10109 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1256,6 +1256,7 @@ static void sdma_issue_pending(struct dma_chan *chan) #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34 #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2 38 +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3 41 static void sdma_add_scripts(struct sdma_engine *sdma, const struct sdma_script_start_addrs *addr) @@ -1302,6 +1303,9 @@ static void sdma_load_firmware(const struct firmware *fw, void *context) case 2: sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2; break; + case 3: + sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3; + break; default: dev_err(sdma->dev, "unknown firmware version\n"); goto err_firmware; diff --git a/include/linux/platform_data/dma-imx-sdma.h b/include/linux/platform_data/dma-imx-sdma.h index eabac4e..2d08816 100644 --- a/include/linux/platform_data/dma-imx-sdma.h +++ b/include/linux/platform_data/dma-imx-sdma.h @@ -48,6 +48,9 @@ struct sdma_script_start_addrs { s32 ssish_2_mcu_addr; s32 hdmi_dma_addr; /* End of v2 array */ + s32 zcanfd_2_mcu_addr; + s32 zqspi_2_mcu_addr; + /* End of v3 array */ }; /**