]> git.baikalelectronics.ru Git - uboot.git/commit
mips: add a mtmips-specific field to architecture-specific global data
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 21 Apr 2020 07:28:32 +0000 (09:28 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Mon, 27 Apr 2020 18:29:33 +0000 (20:29 +0200)
commit5deca8f1df8db1d431e0a3690698cb130a08a960
treef69a598b9445bfcf45737b38204aee67d8fa376e
parent0e2acbe64ad6d78d8884771c90fe329347dfd180
mips: add a mtmips-specific field to architecture-specific global data

SoCs of mtmips can use different CPU frequencies depending on the HW/SW
configurations. For example mt7628 uses 580MHz clock if the input xtal
frequency is 40MHz, and 575MHz clock if the xtal is 25MHz. Upon cold boot
the CPU uses the xtal frequency directly.

So hardcoding the timer frequency (half of the CPU frequency) in
CONFIG_SYS_MIPS_TIMER_FREQ is not a good idea for this case.

This patch adds a mtmips-specific field timer_freq to arch_global_data.
This field will be used later in mtmips-specific get_tbclk() to provide
accurate timer frequency in different boot stage.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/mips/include/asm/global_data.h