From nobody Sun Apr 19 02:14:47 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB9D3C433EF for ; Thu, 7 Jul 2022 18:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236295AbiGGS1R (ORCPT ); Thu, 7 Jul 2022 14:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236216AbiGGS1Q (ORCPT ); Thu, 7 Jul 2022 14:27:16 -0400 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41A245A445 for ; Thu, 7 Jul 2022 11:27:15 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id g1so16574588edb.12 for ; Thu, 07 Jul 2022 11:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:from:subject:content-transfer-encoding; bh=pfx1nhZRFJd2pn0JeiqJxpeFaccnacgeVbyuvYlXCkA=; b=1OIZ2kcau+30gloMmWPAHATGW7uuk5FxTbGA6XiAJwat8uBVHCCju3ebrfpIgQQJxW BZf52C+TjTAj3TT5IDoUvD3eS1cR9wxQ5EULAEy/yHYv6QCoYvl3H1vditiJb4zpR1yi uHzFTLpUMiKd7F/J4kB20QTZSBesg2k79yCVyLqew1NRAaR0WtMwJHFSquznyF6F1dAH vXyZiX9QptPIrYHxM9bAdShqCrnYcE/kgjXBuiZcqgeufHQN/v/whBl8n72ITA6AzlgI asWv6FrXNXYeu/t+dgHga4yUM07ItMhWUxJ85DcWD1p/bOmr8uTwtqH3Of+oS9FSp2a5 mRDA== X-Gm-Message-State: AJIora/kHxvaWWhTIEjUW10bNTb+Qbyfcfd7+AbX2QIxS04VjDMTILqg hD3bVvGK4+bk+WxdwZ4mSojEcLJ40ko6KWi1Kkg= X-Google-Smtp-Source: AGRyM1vPQlfazhY3o3EK5xIq8fwoSIy+aI1rtaTsMAdg9o4Toc2blkMRyQHaS6DVSsWxcvXXZv6DPg== X-Received: by 2002:a05:6402:1844:b0:43a:7c15:c626 with SMTP id v4-20020a056402184400b0043a7c15c626mr20068919edy.17.1657218433888; Thu, 07 Jul 2022 11:27:13 -0700 (PDT) Received: from [192.168.1.15] (178-222-165-43.dynamic.isp.telekom.rs. [178.222.165.43]) by smtp.gmail.com with ESMTPSA id j22-20020a1709066dd600b006fe8b456672sm12861790ejt.3.2022.07.07.11.27.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jul 2022 11:27:13 -0700 (PDT) Message-ID: Date: Thu, 7 Jul 2022 20:27:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.1 Content-Language: en-US To: x86@kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org From: =?UTF-8?Q?Ognjen_Jovandi=c4=87?= Subject: [PATCH] arch/i386: Fix the AMD Elan SC520 PIT clock source to 1.18920MHz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ognjen Jovandi=C4=87 x86/i386: Fix the AMD Elan SC520 PIT clock source to 1.18920MHz, which devi= ates from standard PC/AT clones. Signed-off-by: Ognjen Jovandi=C4=87 --- Changed PIT_TICK_RATE to 1189200ul which i found in =C3=89lan=E2=84=A2SC520 Microcontroller User=E2=80=99s Manual Chapter 5 CLOCK GENERATION AND CONTRO= L. 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 #include =20 + +#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 =20 +#endif + + #define ARCH_HAS_READ_CURRENT_TIMER =20 #endif /* _ASM_X86_TIMEX_H */