mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Kconfig condition on BCM2835_TIMER (and others)
@ 2025-02-03 12:39 Etienne Buira
  2025-02-03 12:44 ` Etienne Buira
  0 siblings, 1 reply; 4+ messages in thread
From: Etienne Buira @ 2025-02-03 12:39 UTC (permalink / raw)
  To: daniel.lezcano, tglx, linux-kernel

Hi all,

I want to build a kernel for Raspberry pi 4B, which, according to the
dtb, has a bc2835-system-timer. This device is handled by
drivers/clocksource/bcm2835_timer.c, which is built depending on
CONFIG_BCM2835_TIMER.

However, the config option is guarded by "if COMPILE_TEST" condition.

Shouldn't that condition be ARM64 || COMPILE_TEST (ie be selectable on
arm64 builds)?

Regards.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Kconfig condition on BCM2835_TIMER (and others)
  2025-02-03 12:39 Kconfig condition on BCM2835_TIMER (and others) Etienne Buira
@ 2025-02-03 12:44 ` Etienne Buira
  2025-02-04 23:31   ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Etienne Buira @ 2025-02-03 12:44 UTC (permalink / raw)
  To: daniel.lezcano, tglx, linux-kernel

Resend with corrected email address.

On Mon, Feb 03, 2025 at 01:39:33PM +0100, Etienne Buira wrote:
> Hi all,
> 
> I want to build a kernel for Raspberry pi 4B, which, according to the
> dtb, has a bc2835-system-timer. This device is handled by
> drivers/clocksource/bcm2835_timer.c, which is built depending on
> CONFIG_BCM2835_TIMER.
> 
> However, the config option is guarded by "if COMPILE_TEST" condition.
> 
> Shouldn't that condition be ARM64 || COMPILE_TEST (ie be selectable on
> arm64 builds)?
> 
> Regards.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Kconfig condition on BCM2835_TIMER (and others)
  2025-02-03 12:44 ` Etienne Buira
@ 2025-02-04 23:31   ` Conor Dooley
  2025-02-05  0:42     ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2025-02-04 23:31 UTC (permalink / raw)
  To: daniel.lezcano, tglx, linux-kernel, etienne.buira; +Cc: florian.fainelli

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

On Mon, Feb 03, 2025 at 01:44:05PM +0100, Etienne Buira wrote:
> Resend with corrected email address.
> 
> On Mon, Feb 03, 2025 at 01:39:33PM +0100, Etienne Buira wrote:
> > Hi all,
> > 
> > I want to build a kernel for Raspberry pi 4B, which, according to the
> > dtb, has a bc2835-system-timer. This device is handled by
> > drivers/clocksource/bcm2835_timer.c, which is built depending on
> > CONFIG_BCM2835_TIMER.
> > 
> > However, the config option is guarded by "if COMPILE_TEST" condition.
> > 
> > Shouldn't that condition be ARM64 || COMPILE_TEST (ie be selectable on
> > arm64 builds)?

Perhaps, but I'd wonder why arm64 and arm32 are being treated differently.
Florian, why's there no select on arm64 when the BCM2835 family option
is enabled?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Kconfig condition on BCM2835_TIMER (and others)
  2025-02-04 23:31   ` Conor Dooley
@ 2025-02-05  0:42     ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2025-02-05  0:42 UTC (permalink / raw)
  To: Conor Dooley, daniel.lezcano, tglx, linux-kernel, etienne.buira

On 2/4/25 15:31, Conor Dooley wrote:
> On Mon, Feb 03, 2025 at 01:44:05PM +0100, Etienne Buira wrote:
>> Resend with corrected email address.
>>
>> On Mon, Feb 03, 2025 at 01:39:33PM +0100, Etienne Buira wrote:
>>> Hi all,
>>>
>>> I want to build a kernel for Raspberry pi 4B, which, according to the
>>> dtb, has a bc2835-system-timer. This device is handled by
>>> drivers/clocksource/bcm2835_timer.c, which is built depending on
>>> CONFIG_BCM2835_TIMER.
>>>
>>> However, the config option is guarded by "if COMPILE_TEST" condition.
>>>
>>> Shouldn't that condition be ARM64 || COMPILE_TEST (ie be selectable on
>>> arm64 builds)?
> 
> Perhaps, but I'd wonder why arm64 and arm32 are being treated differently.
> Florian, why's there no select on arm64 when the BCM2835 family option
> is enabled?

The Raspberry Pi 4B (Cortex-A72 CPU) primarily makes use of the ARM CPU 
local timer under drivers/clocksource/arm_arch_timer.c, therefore using 
bcm2835_timer.c is not necessary at all as a functional boot requirement.

There is no harm in enabling bcm2835_timer, and the arch_arm_timer.c 
rating being greater (400) than the bcm2835_timer (300), you will get 
the former to be selected anyway.

Feel free to submit a patch to enable the driver for ARM64.
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-05  0:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 12:39 Kconfig condition on BCM2835_TIMER (and others) Etienne Buira
2025-02-03 12:44 ` Etienne Buira
2025-02-04 23:31   ` Conor Dooley
2025-02-05  0:42     ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®