ARM: socfpga: Permit overriding the default timer frequency
PATCH 1/2 ARM: socfpga: Permit overriding the default timer frequency
The default timer rate may be different than 25 MHz, permit overriding the default rate in board configuration file. Ultimatelly, this should be properly handled by a clock driver, however that is not available on Gen5 yet.
--- include/configs/socfpga_common.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/socfpga_common.h +2 -0
@@ -98,8 +98,10 @@#define CONFIG_SYS_TIMERBASE SOCFPGA_OSC1TIMER0_ADDRESS#define CONFIG_SYS_TIMER_COUNTS_DOWN #define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMERBASE + 0x4) +#ifndef CONFIG_SYS_TIMER_RATE #define CONFIG_SYS_TIMER_RATE 25000000#endif +#endif /* * L4 Watchdog
Signature · 1 line
2.25.0
PATCH 2/2 ARM: socfpga: Add missing Denali NAND config options
The Denali SPL shim won't build without these options set, set them accordingly to fix the build error and let the SPL shim to work correctly.
--- include/configs/socfpga_common.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/socfpga_common.h +2 -0
@@ -122,6 +122,8 @@* NAND Support */ #ifdef CONFIG_NAND_DENALI +#define CONFIG_SYS_NAND_USE_FLASH_BBT +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0#define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_SYS_NAND_ONFI_DETECTION #define CONFIG_SYS_NAND_REGS_BASE SOCFPGA_NANDREGS_ADDRESS
Signature · 1 line
2.25.0
PATCH 1/2 ARM: socfpga: Permit overriding the default timer frequency
In reply to Marek VasutAm 15.02.2020 um 15:02 schrieb Marek Vasut:
Quoted 4 lines
The default timer rate may be different than 25 MHz, permit overriding the default rate in board configuration file. Ultimatelly, this should be properly handled by a clock driver, however that is not available on Gen5 yet.
Sigh, yes, I still haven't found the time to fight those size problems I have... :-(
include/configs/socfpga_common.h
Quoted 13 lines
Signed-off-by Marek Vasut <[email protected]>Cc Ley Foon Tan <[email protected]>Cc Simon Goldschmidt <[email protected]>--- include/configs/socfpga_common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_common.h +0
-0@@ -98,8 +98,10 @@
Just above this line, there's this comment: "This timer uses eosc1, whose clock frequency is fixed at any condition".
While I'm ok with the change below, it does look a bit funny to make this overriable if it's "fixed at any condition". Could you elaborate on this? Do we need to change the comment?
Regards,
Simon
Quoted 11 lines
include/configs/socfpga_common.h +2
-0#define CONFIG_SYS_TIMERBASE SOCFPGA_OSC1TIMER0_ADDRESS#define CONFIG_SYS_TIMER_COUNTS_DOWN #define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMERBASE + 0x4) +#ifndef CONFIG_SYS_TIMER_RATE #define CONFIG_SYS_TIMER_RATE 25000000#endif +#endif /* * L4 Watchdog
PATCH 1/2 ARM: socfpga: Permit overriding the default timer frequency
Quoted 26 lines · Simon Goldschmidt
Am 15.02.2020 um 15:02 schrieb Marek Vasut:
Quoted 4 lines
The default timer rate may be different than 25 MHz, permit overriding the default rate in board configuration file. Ultimatelly, this should be properly handled by a clock driver, however that is not available on Gen5 yet.
Sigh, yes, I still haven't found the time to fight those size problems I have... :-(
include/configs/socfpga_common.h
Quoted 13 lines
Signed-off-by Marek Vasut <[email protected]>Cc Ley Foon Tan <[email protected]>Cc Simon Goldschmidt <[email protected]>--- include/configs/socfpga_common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_common.h +0
-0@@ -98,8 +98,10 @@Just above this line, there's this comment: "This timer uses eosc1, whose clock frequency is fixed at any condition".
Quoted 3 lines
While I'm ok with the change below, it does look a bit funny to make this overriable if it's "fixed at any condition". Could you elaborate on this? Do we need to change the comment?
The comment is probably wrong, since you can connect the SoCFPGA external oscillator input to any applicable xtal ?
PATCH 1/2 ARM: socfpga: Permit overriding the default timer frequency
Quoted 28 lines · Marek Vasut
Quoted 26 lines · Simon Goldschmidt
Am 15.02.2020 um 15:02 schrieb Marek Vasut:
Quoted 4 lines
The default timer rate may be different than 25 MHz, permit overriding the default rate in board configuration file. Ultimatelly, this should be properly handled by a clock driver, however that is not available on Gen5 yet.
Sigh, yes, I still haven't found the time to fight those size problems I have... :-(
include/configs/socfpga_common.h
Quoted 13 lines
Signed-off-by Marek Vasut <[email protected]>Cc Ley Foon Tan <[email protected]>Cc Simon Goldschmidt <[email protected]>--- include/configs/socfpga_common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/socfpga_common.h +0
-0@@ -98,8 +98,10 @@Just above this line, there's this comment: "This timer uses eosc1, whose clock frequency is fixed at any condition".
Quoted 6 lines
Quoted 3 lines
While I'm ok with the change below, it does look a bit funny to make this overriable if it's "fixed at any condition". Could you elaborate on this? Do we need to change the comment?
The comment is probably wrong, since you can connect the SoCFPGA external oscillator input to any applicable xtal ?
Right. Could you delete that comment then with this patch to prevent confusion?
Regards,
Simon