Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3584766pxb; Mon, 21 Feb 2022 01:03:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQ8j7LVBN+NvbQM57xPCnvxY7fHoJri41ld2hc2GNoPcu3jtjlKcSPb0NcsAoDOvTy/OEm X-Received: by 2002:a17:907:174b:b0:6ce:70ef:85a4 with SMTP id lf11-20020a170907174b00b006ce70ef85a4mr14973612ejc.486.1645434201019; Mon, 21 Feb 2022 01:03:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645434201; cv=none; d=google.com; s=arc-20160816; b=yHmdp0pfDk82zDrYvspWsaRgXBC2EEGIvw7t+moVnD757LmV0PikGRr4WQu2+X3tIl spERegtcgVOA3tJXlfoP9sVTmxrNylPKaJNr8I2tfQjZUFFe0v2FwHwcB2tPWaQ3WtTK gHFE0/RzhaU4bcV+ilwvfxMU4S40V8iVdjjtsyeyHpBV21v2Uy+Ii6/EJc/EYP+pW9a+ 5DYUSq9XDg4vWm3ciq1rwi84O0HQcYMEAbe8v4Fw0BJfdZUe2KLXRLQXd59X0RX+QqAb BGUKb7V3lSyvFyrvtE1XPQgeBWQngC55i4YDQ3YhPJdg673/w1oxNSzHOwNvqCOJD+H9 zPaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=iWUdZXCQ0e44cUPWaBD18anVUnlqHLZFeUL0Piszn0g=; b=snqvYy1eFhN4dL9HQJkt7gjJwBofdnXHOl5qRWTh067gHJUdgim+cObXHpM5Q2SLHu LhqDg3Hgy3QIj5NatA5f7NLda2NrmAai8YDvQsJIrUwverrArLWKa3Bmx0ayP6ut14XW Sw06LbAJpZaCouGAeaf/Bh6RIW8CpXdePEsywz76ujY6jDjWtij1LEqbJYUPmrgZBL+a vNglm7SflZsuQcFrPAXGTIf3a1E04mm+FUGSSpKt3YnOT2qczh+tM1r0zzo3DOOdmn2t ltBvCrA0jkXDw0qa6DuwVTpHGRdmUMc4PJ6wPOabIkHbE3T9WjDpkCMAlvRBo8imcqkY pBAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 cc29si8181073edb.587.2022.02.21.01.02.57; Mon, 21 Feb 2022 01:03:21 -0800 (PST) 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; 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 S245193AbiBUI0z (ORCPT + 99 others); Mon, 21 Feb 2022 03:26:55 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245133AbiBUI0y (ORCPT ); Mon, 21 Feb 2022 03:26:54 -0500 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7F50D4; Mon, 21 Feb 2022 00:26:29 -0800 (PST) Received: from [10.18.29.173] (10.18.29.173) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 21 Feb 2022 16:26:27 +0800 Message-ID: <7f056798-8784-2fa9-3ae0-d9ba62449f3c@amlogic.com> Date: Mon, 21 Feb 2022 16:26:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH V6 3/5] tty: serial: meson: Describes the calculation of the UART baud rate clock using a clock frame Content-Language: en-US To: Jerome Brunet , Jiri Slaby , , , , CC: Greg Kroah-Hartman , Neil Armstrong , Kevin Hilman , Martin Blumenstingl References: <20220118030911.12815-1-yu.tu@amlogic.com> <20220118030911.12815-4-yu.tu@amlogic.com> <7a8016ba-730b-f599-2032-31cf03990a55@kernel.org> <1jbl062i4o.fsf@starbuckisacylon.baylibre.com> From: Yu Tu In-Reply-To: <1jbl062i4o.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.18.29.173] X-ClientProxiedBy: mail-sh.amlogic.com (10.18.11.5) To mail-sh.amlogic.com (10.18.11.5) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2022/1/21 5:48, Jerome Brunet wrote: > [ EXTERNAL EMAIL ] > > > On Tue 18 Jan 2022 at 10:39, Jiri Slaby wrote: > >> On 18. 01. 22, 4:09, Yu Tu wrote: >>> Using the common Clock code to describe the UART baud rate clock >>> makes it easier for the UART driver to be compatible with the >>> baud rate requirements of the UART IP on different meson chips. >> ... >>> --- a/drivers/tty/serial/meson_uart.c >>> +++ b/drivers/tty/serial/meson_uart.c >> ... >>> @@ -629,57 +640,105 @@ static struct uart_driver meson_uart_driver = { >>> .cons = MESON_SERIAL_CONSOLE, >>> }; >>> -static inline struct clk *meson_uart_probe_clock(struct device *dev, >>> - const char *id) >>> -{ >>> - struct clk *clk = NULL; >>> - int ret; >>> - >>> - clk = devm_clk_get(dev, id); >>> - if (IS_ERR(clk)) >>> - return clk; >>> - >>> - ret = clk_prepare_enable(clk); >>> - if (ret) { >>> - dev_err(dev, "couldn't enable clk\n"); >>> - return ERR_PTR(ret); >>> - } >>> - >>> - devm_add_action_or_reset(dev, >>> - (void(*)(void *))clk_disable_unprepare, >>> - clk); >>> - >>> - return clk; >>> -} >>> +static struct clk_div_table xtal_div_table[] = { >> >> This can be const, right? >> >>> + {0, 3}, >>> + {1, 1}, >>> + {2, 2}, >>> + {3, 2}, >> >> Not sure if you didn't remove too much whitespace. I think it should be >> like: "{ 0, 3 },". But I actually don't care, it's a minor thing. > > Seconds > It worth fixing in the next version > I will correct in a version. >> >> I cannot comment on the rest (clk and OF part) as my knowledge is pretty >> limited there. Leaving up to others. >> >> thanks, >