From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 D9AD2C5517A for ; Thu, 12 Nov 2020 07:21:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 760FC2083E for ; Thu, 12 Nov 2020 07:21:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=atishpatra.org header.i=@atishpatra.org header.b="o695KMSl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725902AbgKLHV3 (ORCPT ); Thu, 12 Nov 2020 02:21:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgKLHV3 (ORCPT ); Thu, 12 Nov 2020 02:21:29 -0500 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9536C0613D6 for ; Wed, 11 Nov 2020 23:21:28 -0800 (PST) Received: by mail-il1-x142.google.com with SMTP id a20so4319975ilk.13 for ; Wed, 11 Nov 2020 23:21:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ab2X7D8rQV+rUh3MG2vmCj3eeC4kvsZIlLSd9hzapi4=; b=o695KMSlvlKK8s2nZB3RnNNjASazEvqZxx7SlWDLIfkA7DjvTGHQKtr7OeUjA+JK/W 6AsWT7BcKyt6qJFEm42kuZq/NhNqqk+O/5M33EKitgOxYwwKwIv4xVOTPW0KtSDKxWoi N/WtmAKQP0MX+WWeb1AnqArll7M6n1MD4y/2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ab2X7D8rQV+rUh3MG2vmCj3eeC4kvsZIlLSd9hzapi4=; b=WiilN/ULoadMTFhnC6oCCPx0kogr5q3n/zXuRNy6yVvc/PZLYKF1l6blDNo6hIk2IH Q88enG54CSJiG1/SsikJlVXi4i4IeSHtA2fb/UBsxBF9FTT2yvxX9lkZtQ+YnbIz1S3R yvNh1Yk++EmSg5um1E3cpWqFaEanUdHYsK0wii5kJ4FG2okW1go8SldHL6ta4WG8UiHB 4NzEyH+HgdNQ6cSd7g4d6KgFbWgyrrL62tC8tTF913B56PHK5r9DQKr15++f2Espbyvp KhpwTbllAPqBxBpTz7SS84HqWlSuBqqDOz9ynEE2OppVewFHoOc971GSPW289U3YHB4n BveQ== X-Gm-Message-State: AOAM533dCim50Fkm1vwaOs38+SAxxcA7kgzXgqjwJ65qTB0z9gfJpoal pzBmZd8gOQ/K02YSGqVEWGPavpNsFn37a2dUuHdW X-Google-Smtp-Source: ABdhPJwG3l0icsmB1IU32yQpvlFd8k79z2GNzpvnNWW307BnW87hWqYbQJNHXepVhLwR9j1SCouAAn38lAiRUpIrLCw= X-Received: by 2002:a92:512:: with SMTP id q18mr20861835ile.147.1605165688041; Wed, 11 Nov 2020 23:21:28 -0800 (PST) MIME-Version: 1.0 References: <20201107081420.60325-1-damien.lemoal@wdc.com> <20201107081420.60325-9-damien.lemoal@wdc.com> In-Reply-To: <20201107081420.60325-9-damien.lemoal@wdc.com> From: Atish Patra Date: Wed, 11 Nov 2020 23:21:17 -0800 Message-ID: Subject: Re: [PATCH 08/32] riscv: Fix kernel time_init() To: Damien Le Moal Cc: Palmer Dabbelt , linux-riscv , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Serge Semin , Mark Brown , linux-spi@vger.kernel.org, Stephen Boyd , linux-clk@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org, Philipp Zabel , Sean Anderson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Sat, Nov 7, 2020 at 12:15 AM Damien Le Moal wrote: > > If of_clk_init() is not called in time_init(), clock providers defined > in the system device tree are not initialized, resulting in failures for > other devices to initialize due to missing clocks. > Similarly to other architectures and to the default kernel time_init() > implementation, call of_clk_init() before executing timer_probe() in > time_init(). > > Signed-off-by: Damien Le Moal > --- > arch/riscv/kernel/time.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c > index 4d3a1048ad8b..8a5cf99c0776 100644 > --- a/arch/riscv/kernel/time.c > +++ b/arch/riscv/kernel/time.c > @@ -4,6 +4,7 @@ > * Copyright (C) 2017 SiFive > */ > > +#include > #include > #include > #include > @@ -24,6 +25,8 @@ void __init time_init(void) > riscv_timebase = prop; > > lpj_fine = riscv_timebase / HZ; > + > + of_clk_init(NULL); > timer_probe(); > } > > -- > 2.28.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv Reviewed-by: Atish Patra -- Regards, Atish