lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] arch/i386: Fix the AMD Elan SC520 PIT clock source to 1.18920MHz
From: Ognjen Jovandić <ognjen.jovandic.5@pionir.org>

x86/i386: Fix the AMD Elan SC520 PIT clock source to 1.18920MHz, which deviates from
standard PC/AT clones.
Signed-off-by: Ognjen Jovandić <ognjen.jovandic.5@pionir.org>
---
Changed PIT_TICK_RATE to 1189200ul which i found in Élan™SC520
Microcontroller User’s Manual Chapter 5 CLOCK GENERATION AND CONTROL.
Found problem while trying to port OpeWrt 21.04 to Soekris net4501.
--- a/arch/x86/include/asm/timex.h
+++ b/arch/x86/include/asm/timex.h
@@ -5,9 +5,19 @@
#include <asm/processor.h>
#include <asm/tsc.h>

+
+#ifdef CONFIG_MELAN
+
+#define CLOCK_TICK_RATE 1189200ul
+
+#else
+
/* Assume we use the PIT time source for the clock tick */
#define CLOCK_TICK_RATE PIT_TICK_RATE

+#endif
+
+
#define ARCH_HAS_READ_CURRENT_TIMER

#endif /* _ASM_X86_TIMEX_H */
\
 
 \ /
  Last update: 2022-07-07 20:29    [W:0.158 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site