Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp243870pxv; Wed, 30 Jun 2021 04:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7dhIno9IsZEcRi68Qchf7mdIirhTAeUq6qagWpgVA0aFC9rkTrVxKTGYKUQ+oGox5V3N3 X-Received: by 2002:a17:906:53c9:: with SMTP id p9mr35431489ejo.419.1625053541352; Wed, 30 Jun 2021 04:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625053541; cv=none; d=google.com; s=arc-20160816; b=dhFwt0MHpvqarsUlho9hhHzD2S3kSSwbVS9fdRAud4rE2mbjSUczaQ61k7uCDrtvWK dNnaHbXYlj7mdlU90Q8r6V8bUlv/O/0Pj5VMuvORHQgU5tbxtUL7X587Rb+KxZSTPQLp EyvbhsSO58QS1mA4mWL8oNsZPQrZ1j4jadDLm4Zk5yI/WGhBXNDoCaNT963V44cfMkR9 vD3KUaQWmLFZnSQ0KXPp+OusJS1xbeIzNh0Pt4kUezAJKCO9Kv4A86YIjLTaNACOY4Fw BjmbbIBjGAAGrj1sxmBNxEzvCzzZF0Xh23skx/bEyms3RaWmg1BLUXGLaaaqMj0+xJkM V1xQ== 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=iODbWiouD0QpY2BGF1bz2zvH9cqIAWCPddrbkXWdpQM=; b=UdOXDDTENuy8/rcvMs4i9s8oDNiCaW0NQuWK078XsN6fCuKtNcEb0C9q7tirKe7KpE pNpZFO3o7F3zAcUVa+Eb8JoWTF9bBCyAz2Wt4NgSGUJWtY+KbcM9ecEjskZDDLUYrpil e/XU+MnxNRqktQL9s0PJaaYOaKxjoIUBf+T6xMzFGWY1I4W+DqwZT9BK6l4EjF3jwT8d 0cUes5YSnYRKkrBVJ5+bTaCOBZ/ZbHlnFDuVSaN8OaTmX9m+50K8dkxZ0kX/1yvLmk1f bIAEedyFrg9EwhG/rdPVQZztu56nmVpzCpGznzgY8Q6q3caPARq/+arJ4ZszcbWXNvky l7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJMKkEGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji13si3066617ejc.211.2021.06.30.04.45.16; Wed, 30 Jun 2021 04:45:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJMKkEGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234353AbhF3Lpw (ORCPT + 99 others); Wed, 30 Jun 2021 07:45:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234148AbhF3Lpv (ORCPT ); Wed, 30 Jun 2021 07:45:51 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5493C061756; Wed, 30 Jun 2021 04:43:21 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id q18-20020a1ce9120000b02901f259f3a250so1345965wmc.2; Wed, 30 Jun 2021 04:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iODbWiouD0QpY2BGF1bz2zvH9cqIAWCPddrbkXWdpQM=; b=KJMKkEGNHAUHuk5D6X3LEbETeBJhBvD8t6AyN5xPMN8srDc19A0OEVyK5h+xIWRhjn sf96TLzwxbXF2IY2vE2ECZ+vYVA9vfrlK9+UMV2mRXlEkQ2CwUNlTgX+4pV+Dk0lPlSl gXcWGkkcQiAPfKb/9RbJN8cRbxFZQttUuDM9F0rfT5fOv9svEOYc5/t8EjqEI7wBQslv 4BIyQ/qDfMdZU+sDbMcXWdqpPhD03cuH0md405YHkXj0WVR71Dp3I9b8m16zYqVzMWvr GqXAbjG7DXFE5RGXs6aLsphoD4lVqSdPD2smTytZ0yNJvrmlzFkvxdURMbmfFYM7ZEab 6mEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=iODbWiouD0QpY2BGF1bz2zvH9cqIAWCPddrbkXWdpQM=; b=MswxG6C67AdySymhocajWCA1b8LxgwuEyYZEwnTD1UrxhZdQqgWbYLqYiXd6Ec+fci gD7UHsiz3KIH99FZGh/xxtYgRBYwE6TJg49h5144nfk30Q1Y9gi1k7Ban0IzVekKY1jB LsTR47YNuhGdaEqayL9RJfOWrcjVlkgBh/+8s/DbGIbj9F6sUoNmBNq+RMJDxmYFk0D5 5HA/QcqA33H6tmDwD3BqUyIoxkFubMJGXgCjb+p9NWhS/yZ5PylnWLs1jiDwOUyd4FmY HbHJN1nhFVlglTl+wRkw2i3wslSPfAwHmDLbH5Sxuv9gR/rreNbZr0U0bTG/3YOswxLa pHcQ== X-Gm-Message-State: AOAM532eGmdy3Tk07rJAZZbgvqFCXz88g7srb7WFl5Ru4SzQtN1wzrvK hhGzREqB7L8hJ8JstmArNdE= X-Received: by 2002:a05:600c:3b8b:: with SMTP id n11mr3977228wms.159.1625053400497; Wed, 30 Jun 2021 04:43:20 -0700 (PDT) Received: from ziggy.stardust (static-55-132-6-89.ipcom.comunitel.net. [89.6.132.55]) by smtp.gmail.com with ESMTPSA id k5sm21380301wmk.11.2021.06.30.04.43.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Jun 2021 04:43:19 -0700 (PDT) Subject: Re: [PATCH 03/22] clk: mediatek: Fix corner case of tuner_en_reg To: Chen-Yu Tsai Cc: Chun-Jie Chen , Stephen Boyd , Nicolas Boichat , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, srv_heupstream@mediatek.com, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20210616224743.5109-1-chun-jie.chen@mediatek.com> <20210616224743.5109-4-chun-jie.chen@mediatek.com> From: Matthias Brugger Message-ID: Date: Wed, 30 Jun 2021 13:43:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/06/2021 13:09, Chen-Yu Tsai wrote: > On Wed, Jun 30, 2021 at 6:53 PM Matthias Brugger wrote: >> >> >> >> On 30/06/2021 09:31, Chen-Yu Tsai wrote: >>> On Thu, Jun 17, 2021 at 7:01 AM Chun-Jie Chen >>> wrote: >>>> >>>> On MT8195, tuner_en_reg is moved to register offest 0x0. >>>> If we only judge by tuner_en_reg, it may lead to wrong address. >>>> Add tuner_en_bit to the check condition. And it has been confirmed, >>>> on all the MediaTek SoCs, bit0 of offset 0x0 is always occupied by >>>> clock square control. >>>> >>>> Signed-off-by: Chun-Jie Chen >>> >>> Reviewed-by: Chen-Yu Tsai >>> >>> Though you might want to consider converting these types of checks into feature >>> flags. >>> >> >> Yes I think adding a feature flag is the way to go. Luckily there are only a few >> SoCs that will need updates at the same time. > > I also see that the different clock modules are tied together using only clock > names written in the drivers, instead of clock references in the device tree. > Not sure I understand what you mean. Do you refer to something like [1]? That's because the clock is probed by the DRM driver, as they share the same compatible and IP block. Regards, Matthias [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/mediatek/clk-mt8173-mm.c?h=v5.13#n139 > Unfortunately reworking this would likely require a lot more work. I previously > did a bit of internal reworking for the sunxi drivers. While not the same, I > think the plumbing required is comparable. > > ChenYu >