Hi Alex, Am 21.12.19 um 02:04 schrieb Alex Nemirovsky: > Hello Daniel, et. all. > > we have need to override arch/mips/cpu/time.c::get_tbclk() > to return a non static value. Our board frequency is adjustable > via jumpers which may be read. > > We would like to change the upstream declaration to __weak > so that we can perform a function call to return the actually > freq. Thoughts? >
I already though about refactoring that code to a generic MIPS timer driver which could call the clk API to fetch the frequency either from device tree or a clk-provider driver. Optionally a SoC could replace this generic driver with a specialiced one. Until then it makes sense to make the two timer function weak. Alternatively we could conditionally compile arch/mips/cpu/time.c so that you can provide your own machine specific time.c -- - Daniel