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: 11952897 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 D8E13C4361A for ; Sat, 5 Dec 2020 04:17:55 +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 8549522E00 for ; Sat, 5 Dec 2020 04:17:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8549522E00 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-arm-kernel-bounces+linux-arm-kernel=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=sxD2HhTBSYRjlNYFtCRC2ZUd2lPza7HyyQAdbpoq2BI=; b=UObjUVa4LsZzLzPjNR8No18Fx njJzeL84Foi93kyJBYwK2aHgK9LgwKN2ATpVSY0/2lOTSUT0dSx+RGNqYGZKDPkKSUNZPBb27SlJc aTk5cZSG8b//z9P7QOL9029ooUls+1ztFv055LARmVnj+P1zW6E/lB4lQblxYySbdPtutgR1AgFAF O+m1NbmtCR54/nB/symGDA7C+Z40B9QJu6Oj/xnpInalJKDGKVD+wuGKCHfAfeHVDZ5FllxHpchSU hMywwkpSqwsvsglJDDmvFmLsUOfl9uRnVubuHVJj4G/amdbJsOIa5yJEYuzVrnrmXwsRosydVFYnA rsyXRBQXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1klOzm-0001oM-HU; Sat, 05 Dec 2020 04:16:30 +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-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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);