Received: by 10.213.65.68 with SMTP id h4csp239004imn; Fri, 23 Mar 2018 03:39:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELv3rCzwkz05XYN2DTGVKePv9AdsEaKuD8kpnYp5lgzwebK+lUdFryMMnlw7Af8CZyHYGmke X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr11207418plb.269.1521801560880; Fri, 23 Mar 2018 03:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801560; cv=none; d=google.com; s=arc-20160816; b=FF58Azur9WWI7Srd5mmyyqeuPV8nTTkMshaiTjZJVMuixbcqICiebse6fPM1uIXbl2 /Kj77m9npvCX5jSoA04OBXNwpqZukNuMBW0HOwtvIdd4LpSoC9xc38M+Xe4zT3B8HdA9 0ijU3aSQ1eQps852wEJVSmT+0MaAN5+sG4OlWSJB3sujRW1b8umdwJDTtUjtExB7nKLa z/8Bpbh6+uVQkmri/bxfxgFXAdUbsVQTh1tvaLZtya/qC3swxFnUOzPXVO73ryPfDahG KyDqpyzuJbV44536bz9K7eXRh45fkVPJ8A60MZknCb5kQBOT8zhvOLwB5ujN7Hdg5G8I m65g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KF/TP/iSL3stfNQaaU2NGhHia4Bh4Vn6rVFPMrcXB/Q=; b=Buze4aEVqjizRfNwRZ7OXr6mCB1jQ33NSbiSJxQWmBl09bQ8W8fN8uf+VCPXUuTFmb NmHIG8okeaUlYNTYI0SjGgdmYKILxqV0UebdUQyNraB4wy2cWbXNqrtpszsts7w7Ekzt iBG9Hu3VcEbgbReZVxfbv7JWpN0rU98oaBodL0d8vmhdTrFFqQaaYAVPEppXaWrYw5j6 pDM+40cvWvIYGluwwpdbogemdBp0biOzTYeuWgx2iY6seCgcLjAARghVCZzNCAyF+QAn b5LHAHBH7FSoWI/vYEIxIsGE4bXQaHWdfhuYw9r7B2H5HxFpIVTBTDOlakhXWnwZ4pDf ZNUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14-v6si8751586plk.706.2018.03.23.03.39.06; Fri, 23 Mar 2018 03:39:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756281AbeCWKiH (ORCPT + 99 others); Fri, 23 Mar 2018 06:38:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47100 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933780AbeCWKRR (ORCPT ); Fri, 23 Mar 2018 06:17:17 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B1547DCB; Fri, 23 Mar 2018 10:17:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vignesh R , Peter Ujfalusi , Vinod Koul , Sasha Levin Subject: [PATCH 4.4 96/97] dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63 Date: Fri, 23 Mar 2018 10:55:23 +0100 Message-Id: <20180323094202.830273372@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vignesh R [ Upstream commit d087f15786021a9605b20f4c678312510be4cac1 ] Register layout of a typical TPCC_EVT_MUX_M_N register is such that the lowest numbered event is at the lowest byte address and highest numbered event at highest byte address. But TPCC_EVT_MUX_60_63 register layout is different, in that the lowest numbered event is at the highest address and highest numbered event is at the lowest address. Therefore, modify ti_am335x_xbar_write() to handle TPCC_EVT_MUX_60_63 register accordingly. Signed-off-by: Vignesh R Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/dma/ti-dma-crossbar.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/drivers/dma/ti-dma-crossbar.c +++ b/drivers/dma/ti-dma-crossbar.c @@ -51,7 +51,15 @@ struct ti_am335x_xbar_map { static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u8 val) { - writeb_relaxed(val, iomem + event); + /* + * TPCC_EVT_MUX_60_63 register layout is different than the + * rest, in the sense, that event 63 is mapped to lowest byte + * and event 60 is mapped to highest, handle it separately. + */ + if (event >= 60 && event <= 63) + writeb_relaxed(val, iomem + (63 - event % 4)); + else + writeb_relaxed(val, iomem + event); } static void ti_am335x_xbar_free(struct device *dev, void *route_data)