Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5248c657 authored by David Brownell's avatar David Brownell Committed by Russell King
Browse files

[ARM] 4646/1: AT91: configurable HZ, default to 128



This makes HZ configurable on AT91, following the model used on OMAP.

It defaults to a power of two on AT91rm9200 chips, avoiding rounding
errors which come from dividing a 32 KiHz clock to generate scheduler
irqs; and uses 100 on AT91sam926x chips, using MCK/16 (multi-MHZ).

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Acked-by: default avatarRemy Bhmer <linux@bohmer.net>
Acked-by: default avatarAndrew Victor <andrew@sanpeople.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 156864f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -657,6 +657,7 @@ config HZ
	default 128 if ARCH_L7200
	default 128 if ARCH_L7200
	default 200 if ARCH_EBSA110 || ARCH_S3C2410
	default 200 if ARCH_EBSA110 || ARCH_S3C2410
	default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
	default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
	default AT91_TIMER_HZ if ARCH_AT91
	default 100
	default 100


config AEABI
config AEABI
+16 −0
Original line number Original line Diff line number Diff line
@@ -219,6 +219,22 @@ config AT91_PROGRAMMABLE_CLOCKS
	  Select this if you need to program one or more of the PCK0..PCK3
	  Select this if you need to program one or more of the PCK0..PCK3
	  programmable clock outputs.
	  programmable clock outputs.


config AT91_TIMER_HZ
       int "Kernel HZ (jiffies per second)"
       range 32 1024
       depends on ARCH_AT91
       default "128" if ARCH_AT91RM9200
       default "100"
       help
	  On AT91rm9200 chips where you're using a system clock derived
	  from the 32768 Hz hardware clock, this tick rate should divide
	  it exactly: use a power-of-two value, such as 128 or 256, to
	  reduce timing errors caused by rounding.

	  On AT91sam926x chips, or otherwise when using a higher precision
	  system clock (of at least several MHz), rounding is less of a
	  problem so it can be safer to use a decimal values like 100.

endmenu
endmenu


endif
endif