From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cnPpz-0005oL-3o for barebox@lists.infradead.org; Mon, 13 Mar 2017 13:16:41 +0000 From: Michael Olbrich Date: Mon, 13 Mar 2017 14:16:06 +0100 Message-Id: <20170313131606.8089-1-m.olbrich@pengutronix.de> In-Reply-To: References: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] fixup! efi: clocksoure: add EFI event timer To: barebox@lists.infradead.org Cc: Michael Olbrich --- I played with the numbers a bit. This hardware has a 18 Hz tick :-/. That's not really useful so just skipping the clocksource is probably the best solution. Michael drivers/clocksource/efi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/efi.c b/drivers/clocksource/efi.c index 89906c452eb7..fb5b7ca63de9 100644 --- a/drivers/clocksource/efi.c +++ b/drivers/clocksource/efi.c @@ -71,6 +71,10 @@ static int efi_cs_init(struct clocksource *cs) uint64_t nb_100ns; freq = ticks_freq_x86(); + if (freq == 0) { + BS->close_event(efi_cs_evt); + return -ENODEV; + } nb_100ns = 10 * 1000 * 1000 / freq; pr_warn("EFI Event timer too slow freq = %llu Hz\n", freq); efiret = BS->set_timer(efi_cs_evt, EFI_TIMER_PERIODIC, nb_100ns); -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox