Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp671991pxp; Wed, 16 Mar 2022 14:05:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylpZueuBwn1GVbLB6YMsA7fu+FOwrMctGZYyJeUfd6/mYaQVS/8Q5gFB+Ks2ZuQbAFsthW X-Received: by 2002:a63:101:0:b0:36c:6d40:5688 with SMTP id 1-20020a630101000000b0036c6d405688mr1092303pgb.554.1647464710888; Wed, 16 Mar 2022 14:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647464710; cv=none; d=google.com; s=arc-20160816; b=HGOER6C7f7gR9+GkLV5bEwkGla1ncDQK2B90RhEPPi9Fzqcez9SSrhEftsA1CZABig tJWhPCeCCwLPtA6iqm3TBos1gzeJckWa2NBh5KznkHXCQBHsN/zPHWM5JEnsX1quv/MK 1cIWNTE8R/JpQvutJAwRZTejkWGzB8dEvNhbXDkBixyNDt89yObbXlmUhBQyNiYXqrfu U5jTqnwRWTh5AXz/KqfJHSwxAvHoD8q7LZjRom1P0gPzrxGWtu/ettmjcFIL/jd0KyiK 9mQYiGDQskqCfEFtOR4ytbbaQoIvVxKaa7jo90p3VcqRhCKLwpBsoBNCrSpyvVPpfZfH f7Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=rpmKOoeraRuQGQUThehNRRx57Aisb5avAtGzINvQREA=; b=cEGsyXh7sRVDNQs4Yjd/+Z6OQKRZzXlfHDqctPiNENCOCEsQI8d1TGm3sUBuCrkVCw bAC5ofXnMfrN5p6mCIkZe47vmVMLHzTafzdUk9hyOaEj+sjW5YBZiGUs9qHwxjoO/rVX wgPQzvNG4baEYNP8fMMvLMgDG0JD0YkIIZ5odXdYU5WGngPXUBzn/HAp6Ff5pbxJYfLG 0vsp6DahL/0BqrXAiVZ0Q1j7/bMc9oEeFZab9KLvKuUBUO4mVzy4pEpLXhKeKm6dBX5m UxNta6q+7pFdjeJAi3jmkBU29z39ulhadHTgzgweKRxTJNTxwwpiuiCCVu5tcQloZfc6 TAlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20210112.gappssmtp.com header.s=20210112 header.b="btYHhIM/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a17090332ca00b001520c1be82csi2877065plr.531.2022.03.16.14.04.56; Wed, 16 Mar 2022 14:05:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20210112.gappssmtp.com header.s=20210112 header.b="btYHhIM/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243953AbiCOOjE (ORCPT + 99 others); Tue, 15 Mar 2022 10:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244198AbiCOOjA (ORCPT ); Tue, 15 Mar 2022 10:39:00 -0400 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A2FF2E7 for ; Tue, 15 Mar 2022 07:37:47 -0700 (PDT) Received: by mail-oo1-xc32.google.com with SMTP id y27-20020a4a9c1b000000b0032129651bb0so24588596ooj.2 for ; Tue, 15 Mar 2022 07:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rpmKOoeraRuQGQUThehNRRx57Aisb5avAtGzINvQREA=; b=btYHhIM/2AcNT2mHGxMQPLP23iKlNVDyc/vZohM3qpDd7+3O/i/a2gd+sL94O0MNmE as02/VxgKVf31ZMRpUKgErJLODlFTaVhOcYu2+ESfiqlzPXtbyWkfTDpNmxPt3xVMhOn iL2pIzOqtP63EW/rpznJdR20E2Czy/P7+hFV+9+d7A9r1IsR6el4+qICVp6d9tudWqyy PU5vc4wCDO0tSwkcVXStOPm02tVPmKINAIcxy/vE4Kljap5BICXGKBemh4RtgicAlEgS ZUA/oAcTydN2vOzeCEFHuwNx1PP/KdrPv2syTmdHRAvKTtjKivWUkdgXTfsJM+NddxMG 1msQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rpmKOoeraRuQGQUThehNRRx57Aisb5avAtGzINvQREA=; b=UrrbEMJN3MPbjEq/c2aOhhPkBgZMOJUf8bwDIzMgbH70Sdmt3vyjZkUsO+7aK0K5go W/3iFwW8oLTuMP44lJfMIjYYPJPIbFWrcstwUqVpYmz9UvNCeBKCXW5QUAmwZemq533R ZNQrM2fin2/Am0f+4bbyGXM5WcauPC9jt9GPpkjut9Y6Qt5DgSlcn7t/NUWo7Sjh4O/Q 3nW4dArdcjNoxo14pvNOYDHvVD75tDdq0GFkWg/fPasqQNzOG/fA+frZpLtvyWl+9ip6 /IRMp4V+D5b6SmustWoFXUCHCSQICacZy2FtGhf4ibMjMp9SOIxkQU2AML8W0CdIngj3 5BTQ== X-Gm-Message-State: AOAM533HxL2LIsBxozyZlehg5SPOUybiAQFPHhV4vlZiCYX2ZBtxzlm4 xCychKCJQoCb4CJBCuQo0i3H0g== X-Received: by 2002:a05:6870:4251:b0:d9:b7ee:f0ab with SMTP id v17-20020a056870425100b000d9b7eef0abmr1726880oac.56.1647355066566; Tue, 15 Mar 2022 07:37:46 -0700 (PDT) Received: from [192.168.86.188] ([136.62.4.88]) by smtp.gmail.com with ESMTPSA id f10-20020a4a8f4a000000b00320e5ecfecdsm8863070ool.46.2022.03.15.07.37.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Mar 2022 07:37:46 -0700 (PDT) Subject: Re: [PATCH v13 1/6] soc: mediatek: mutex: add common interface to accommodate multiple modules operationg MUTEX To: AngeloGioacchino Del Regno , Moudy Ho , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Hans Verkuil , Jernej Skrabec Cc: Chun-Kuang Hu , Geert Uytterhoeven , Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Courbot , tfiga@chromium.org, drinkcat@chromium.org, pihsun@chromium.org, hsinyi@google.com, Maoguang Meng , daoyuan huang , Ping-Hsun Wu , menghui.lin@mediatek.com, sj.huang@mediatek.com, allen-kh.cheng@mediatek.com, randy.wu@mediatek.com, jason-jh.lin@mediatek.com, roy-cw.yeh@mediatek.com, river.cheng@mediatek.com, srv_heupstream@mediatek.com, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220315061031.21642-1-moudy.ho@mediatek.com> <20220315061031.21642-2-moudy.ho@mediatek.com> From: Rob Landley Message-ID: <4fa1dd33-adeb-a8ae-0ded-51a813347252@landley.net> Date: Tue, 15 Mar 2022 09:41:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/15/22 4:10 AM, AngeloGioacchino Del Regno wrote: > Il 15/03/22 07:10, Moudy Ho ha scritto: >> In order to allow multiple modules to operate MUTEX hardware through >> a common interfrace, a flexible index "mtk_mutex_table_index" needs to >> be added to replace original component ID so that like DDP and MDP >> can add their own MUTEX table settings independently. >> >> In addition, 4 generic interface "mtk_mutex_set_mod", "mtk_mutex_set_sof", >> "mtk_mutex_clear_mod" and "mtk_mutex_clear_sof" have been added, which is >> expected to replace the "mtk_mutex_add_comp" and "mtk_mutex_remove_comp" >> pair originally dedicated to DDP in the future. >> >> Signed-off-by: Moudy Ho >> --- >> drivers/soc/mediatek/mtk-mutex.c | 122 +++++++++++++++++++++++++ >> include/linux/soc/mediatek/mtk-mutex.h | 33 +++++++ >> 2 files changed, 155 insertions(+) >> >> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c >> index aaf8fc1abb43..778b01ce9e8f 100644 >> --- a/drivers/soc/mediatek/mtk-mutex.c >> +++ b/drivers/soc/mediatek/mtk-mutex.c >> @@ -156,6 +156,7 @@ struct mtk_mutex_data { >> const unsigned int *mutex_sof; >> const unsigned int mutex_mod_reg; >> const unsigned int mutex_sof_reg; >> + const unsigned long long *mutex_table_mod; > > Can we change this to u64 instead? Linux is still LP64, correct? Rob