From patchwork Sat Dec 5 04:15:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongqiang Niu X-Patchwork-Id: 11952913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99513C4167B for ; Sat, 5 Dec 2020 04:16:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32F5922E00 for ; Sat, 5 Dec 2020 04:16:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32F5922E00 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aiG6AvEWnEyDcWL7uqh7YhiSMRf65EUdm0I7d+9F8Fg=; b=xITVXzgeKIk+Kl0ZhqBMi4+Me hxQWYn6pE+SyYCjhOJNu+4P90jBNkhWlUp5Y9t4D6Ufc7ucGulR5ynzOBk7pM2wMqsAoxb56qZbYP grL8Wdgfen+z8PXTuq/sZk7qvoaLtOU55og588Jj6sT6FkgdJGN2et9jlr3nZnM6ZDB/gnrwxZmOF uKrVWeSL4WeqfdqHO3T/qphJ5b1mqb0X1wyIczbeh/OtoZSB7SJalw613qhyOI+AfvE18+PfCbKBI QmdbAvJYHvT28uQB/BhINpVoyQtR6J5NxLQliWOlpPPeDRW15sAq8cYfoO9BSyjRgmlfr4cVcOFCD VUKAkK4Gg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1klOzn-0001ox-VB; Sat, 05 Dec 2020 04:16:32 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1klOze-0001ly-Re; Sat, 05 Dec 2020 04:16:23 +0000 X-UUID: 9f4d1f4b726645be8900f1b0be344253-20201204 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=2MBkZbqf5754Kpk/zE/vTldYnZ5X8xOjf4zI3HpKSRE=; b=hIK7tdRNblkg5C7i/3N2Z/c3KaE5YUoLjwu/UuQ6+EytGK5369e7n15HhQ2aXAYMnw1C2La0lr7L/EqSlKXLmycrARBjV/7Wr+3s09DC/qq25QQOAk1FeepxRW7veClDX5RmbTwWq4euLFUekZ012ZSxj8romSZYJbKBSzbtV9I=; X-UUID: 9f4d1f4b726645be8900f1b0be344253-20201204 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1478351048; Fri, 04 Dec 2020 20:16:19 -0800 Received: from mtkmbs05n1.mediatek.inc (172.21.101.15) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Dec 2020 20:16:17 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 5 Dec 2020 12:16:14 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 5 Dec 2020 12:16:16 +0800 From: Yongqiang Niu To: Rob Herring , Matthias Brugger , CK Hu Subject: [PATCH v1, 4/5] soc: mediatek: cmdq: add address shift in jump Date: Sat, 5 Dec 2020 12:15:27 +0800 Message-ID: <1607141728-17307-5-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1607141728-17307-1-git-send-email-yongqiang.niu@mediatek.com> References: <1607141728-17307-1-git-send-email-yongqiang.niu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_231623_076336_7A042C45 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bibby Hsieh , Jassi Brar , linux-kernel@vger.kernel.org, Dennis YC Hsieh , linux-mediatek@lists.infradead.org, Yongqiang Niu , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add address shift when compose jump instruction to compatible with 35bit format. Signed-off-by: Yongqiang Niu Reviewed-by: Nicolas Boichat --- drivers/mailbox/mtk-cmdq-mailbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index 1c01fe0..5ed39f8 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -174,7 +174,8 @@ static void cmdq_task_insert_into_thread(struct cmdq_task *task) dma_sync_single_for_cpu(dev, prev_task->pa_base, prev_task->pkt->cmd_buf_size, DMA_TO_DEVICE); prev_task_base[CMDQ_NUM_CMD(prev_task->pkt) - 1] = - (u64)CMDQ_JUMP_BY_PA << 32 | task->pa_base; + (u64)CMDQ_JUMP_BY_PA << 32 | + (task->pa_base >> task->cmdq->shift_pa); dma_sync_single_for_device(dev, prev_task->pa_base, prev_task->pkt->cmd_buf_size, DMA_TO_DEVICE);