From patchwork Sat May 28 19:05:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 97814 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A2E43B6F54 for ; Sun, 29 May 2011 05:05:46 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQOpA-0004cQ-HC; Sat, 28 May 2011 19:05:24 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QQOp8-0004ji-RX; Sat, 28 May 2011 19:05:22 +0000 Received: from mail-gx0-f177.google.com ([209.85.161.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QQOp5-0004jP-4y for linux-arm-kernel@lists.infradead.org; Sat, 28 May 2011 19:05:20 +0000 Received: by gxk2 with SMTP id 2so1290713gxk.36 for ; Sat, 28 May 2011 12:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=C4WMqjhl2IQedi1ZpzFkbYIwR9j0OvDjAhgp8Ah50w8=; b=n0DDzU+urjDuS6gOiZfe/tb8vVpsFi2YEdTaAQqBiYtM3vwG/xfhs1bRdw13B8eGmA uv5qDspdi8y/K3wIbt+AlAFPh4eAV8XZR83PVQFEn8/GO5aRYX/8I4hGsKUzwPbfPxKP 5vu4598e5t/mGoFJY8iIt/onCc1M09JRh83CA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=vXzZG5uiTqrSVTG6Z4bdwxFFBhfodbeKIV8C6tBgCvAWJbDUB573za9bmNBXUgFCHk JpF6M3aO4tGyO7ADczXVCJMB+l58g3NMqiXstzyxPMnOF7wmLLJsjUOKWCNiDpSVybsD YkKVzIhal99bSyCDmHwwHEPAxWNfqDvXwfCEk= Received: by 10.236.78.170 with SMTP id g30mr4096692yhe.473.1306609516022; Sat, 28 May 2011 12:05:16 -0700 (PDT) Received: from localhost.localdomain ([201.82.76.9]) by mx.google.com with ESMTPS id w70sm1363451yhl.31.2011.05.28.12.05.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 May 2011 12:05:15 -0700 (PDT) From: Fabio Estevam To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: mx51/sdma: Check the chip revision in run-time Date: Sat, 28 May 2011 16:05:08 -0300 Message-Id: <1306609508-7455-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.6.0.4 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110528_150519_341902_8A3CA3D1 X-CRM114-Status: GOOD ( 14.99 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.177 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Fabio Estevam , Fabio Estevam , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Check the MX51 chip revision in run-time so that the correct SDMA firmware can be loaded. While at it also remove the silicon revision from the sdma_script_start_addrs structure name for MX51. All the MX51 revisions share the same SDMA start addresses. Signed-off-by: Fabio Estevam --- arch/arm/plat-mxc/devices/platform-imx-dma.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c index 3538b85..b130f60 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-dma.c +++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c @@ -139,7 +139,7 @@ static struct sdma_script_start_addrs addr_imx35_to2 = { #endif #ifdef CONFIG_SOC_IMX51 -static struct sdma_script_start_addrs addr_imx51_to1 = { +static struct sdma_script_start_addrs addr_imx51 = { .ap_2_ap_addr = 642, .uart_2_mcu_addr = 817, .mcu_2_app_addr = 747, @@ -196,7 +196,9 @@ static int __init imxXX_add_imx_dma(void) #if defined(CONFIG_SOC_IMX51) if (cpu_is_mx51()) { - imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1; + int to_version = mx51_revision() >> 4; + imx51_imx_sdma_data.pdata.to_version = to_version; + imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51; ret = imx_add_imx_sdma(&imx51_imx_sdma_data); } else #endif