Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A3B39C433EF for ; Fri, 31 Dec 2021 02:30:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C69EB80FCC; Fri, 31 Dec 2021 03:30:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cEcgSTLP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A55D7811DE; Fri, 31 Dec 2021 03:30:41 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8DAFE80F82 for ; Fri, 31 Dec 2021 03:30:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x835.google.com with SMTP id bp39so22989821qtb.6 for ; Thu, 30 Dec 2021 18:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=uSRNEYXk9e1o6H3HJEgQhhRedM2RplxebVadcZhZzPI=; b=cEcgSTLP3aP3RBUnzC0q0g5+v2/YT8yI74Rvxv7WN/MRzk4IWLVNHDKcPPGQeC6FPO L+nvy7HNJ0ZIPxM+K0c7qyvmEwztrGtHGPmVFbJkj7byuXi5arIDvu3DF0xPYyViSDQx gGJNhuaEq6s7UyJiB0pqlgtuRbPWP4Z4gL716QelEjDNfp2XDR+kujKpGr+51CdruEjm VAmM1IT1vreooGCQgWDTHRzVKvFG2nCjptZ548n4/tbTKruOdBNVm+N6NzB0WSxOCHIK ++b4ueXnEClfYngdr3ntWqRHINWmyMhgSt2RxVIrggkjFj91+Duuu/wtm55zF7EVSEBe basQ== 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=uSRNEYXk9e1o6H3HJEgQhhRedM2RplxebVadcZhZzPI=; b=IWYa4arW6MpDl6t8IAbdGNnz9YOcmZHHACX+L36GzFmgUL+dlYkauSfmPu0ellPyDC CaYUVy0ULrkXCx4Qx9tzdBKj6NE0fBX3IttE/duRpD4z9yvcVM9LADs7DrX7xEepJKDG jiVUByt2bdLTxoZMmJULiD+ahPbq3mTp4WdLS0j92wJdF4Xp62ql2hOUx4s6bdnCi4fR j58q0uDrcXkKjE1wiVUG9dRRgNu4TOq80xAESJR2YiFvy42Y1r2jADb0cKg31gacyAaR QRDYP29NpghDbZjxDbPA8SiFbPPirVbvwbFbMnq0W135xCRfIImbAKRvQDC3AeJfcGDb 64mw== X-Gm-Message-State: AOAM530peiZu860Auenm3W3shq5oSGHDzR+ctiFKsw9H8BlGrV/FI6YL 0jc5g3LBKmL979BEW/xjrOM= X-Google-Smtp-Source: ABdhPJzAiIW6r3DBGQ6qjovDQxIFh1G37fKEpWJC0Rj7c7YVq1ORazNbeAPk6fDF5ETN7Zp1xUkS7w== X-Received: by 2002:ac8:5bd6:: with SMTP id b22mr28973355qtb.92.1640917837242; Thu, 30 Dec 2021 18:30:37 -0800 (PST) Received: from [192.168.1.201] (pool-108-18-207-184.washdc.fios.verizon.net. [108.18.207.184]) by smtp.googlemail.com with ESMTPSA id l15sm20626836qkp.16.2021.12.30.18.30.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Dec 2021 18:30:36 -0800 (PST) Subject: Re: [PATCH v2 03/14] clk: mtmips: add clock driver for MediaTek MT7621 SoC To: Weijie Gao , u-boot@lists.denx.de Cc: GSS_MTK_Uboot_upstream , Lukasz Majewski References: <0a795ee34bbeb7d8e58cf8f60c35d5048f9bda95.camel@mediatek.com> From: Sean Anderson Message-ID: <8ba36ca0-0087-1914-bf1d-9c0c6abacb62@gmail.com> Date: Thu, 30 Dec 2021 21:30:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 12/27/21 3:06 AM, Weijie Gao wrote: > On Wed, 2021-12-15 at 11:11 -0500, Sean Anderson wrote: >> It is fine to implement only the necessary functionality, but it >> should >> be done in a way which is easy to extend in the future, and which >> won't >> cause us compatibility problems. >> >> Generally, I would like to preserve both source and binary >> compatibility >> with Linux where possible. I am not sure whether they are hard >> requirements, so I made a post regarding that question [1]. For now, >> addressing my above comments will be fine. > > I agreed. > But now I decide to write a simple driver which provides only the bus > clock. It seems that I don't have much time for rewrite the full clock > driver at present. Well, all you have to do is something like switch (clk->id) { case MT7621_CLK_TIMER: mask = CLKCFG1_TIMER; break; /* etc */ } or use an array if you like that style better. --Sean