stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Palmer Dabbelt <palmerdabbelt@google.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-riscv@lists.infradead.org
Subject: [PATCH AUTOSEL 4.19 05/15] riscv: Fix kernel time_init()
Date: Tue, 19 Jan 2021 20:27:30 -0500	[thread overview]
Message-ID: <20210120012740.770354-5-sashal@kernel.org> (raw)
In-Reply-To: <20210120012740.770354-1-sashal@kernel.org>

From: Damien Le Moal <damien.lemoal@wdc.com>

[ Upstream commit 11f4c2e940e2f317c9d8fb5a79702f2a4a02ff98 ]

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 <damien.lemoal@wdc.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 1911c8f6b8a69..15f4ab40e2221 100644
--- a/arch/riscv/kernel/time.c
+++ b/arch/riscv/kernel/time.c
@@ -12,6 +12,7 @@
  *   GNU General Public License for more details.
  */
 
+#include <linux/of_clk.h>
 #include <linux/clocksource.h>
 #include <linux/delay.h>
 #include <asm/sbi.h>
@@ -29,5 +30,7 @@ void __init time_init(void)
 	riscv_timebase = prop;
 
 	lpj_fine = riscv_timebase / HZ;
+
+	of_clk_init(NULL);
 	timer_probe();
 }
-- 
2.27.0


  parent reply	other threads:[~2021-01-20  2:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  1:27 [PATCH AUTOSEL 4.19 01/15] ASoC: Intel: haswell: Add missing pm_ops Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 02/15] dm integrity: select CRYPTO_SKCIPHER Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 03/15] scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 04/15] scsi: qedi: Correct max length of CHAP secret Sasha Levin
2021-01-20  1:27 ` Sasha Levin [this message]
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 06/15] HID: Ignore battery for Elan touchscreen on ASUS UX550 Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 07/15] clk: tegra30: Add hda clock default rates to clock driver Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 08/15] r8152: Add Lenovo Powered USB-C Travel Hub Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 09/15] xen: Fix event channel callback via INTX/GSI Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 10/15] net: stmmac: Fixed mtu channged by cache aligned Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 11/15] drm/nouveau/bios: fix issue shadowing expansion ROMs Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 12/15] drm/nouveau/privring: ack interrupts the same way as RM Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 13/15] drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 14/15] drm/nouveau/mmu: fix vram heap sizing Sasha Levin
2021-01-20  1:27 ` [PATCH AUTOSEL 4.19 15/15] drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0 Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210120012740.770354-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=damien.lemoal@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmerdabbelt@google.com \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).