From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Anderson Date: Tue, 8 Sep 2020 19:59:53 -0400 Subject: [PATCH] timer: Return count from timer_ops.get_count In-Reply-To: References: <20200907181933.92832-1-seanga2@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 9/8/20 7:56 PM, Simon Glass wrote: > Hi Sean, > > > On Mon, 7 Sep 2020 at 12:19, Sean Anderson wrote: >> >> No timer drivers return an error from get_count. Instead of possibly >> returning an error, just return the count directly. >> >> Signed-off-by: Sean Anderson >> --- >> Passing CI (but not otherwise tested): >> https://dev.azure.com/seanga2/u-boot/_build/results?buildId=25&view=results >> >> This patch depends on >> https://patchwork.ozlabs.org/project/uboot/list/?series=198797 >> >> arch/riscv/lib/andes_plmt.c | 6 ++---- >> arch/riscv/lib/sifive_clint.c | 6 ++---- >> drivers/timer/ag101p_timer.c | 5 ++--- >> drivers/timer/altera_timer.c | 6 ++---- >> drivers/timer/arc_timer.c | 6 ++---- >> drivers/timer/ast_timer.c | 6 ++---- >> drivers/timer/atcpit100_timer.c | 5 ++--- >> drivers/timer/atmel_pit_timer.c | 6 ++---- >> drivers/timer/cadence-ttc.c | 6 ++---- >> drivers/timer/dw-apb-timer.c | 6 ++---- >> drivers/timer/mpc83xx_timer.c | 6 ++---- >> drivers/timer/mtk_timer.c | 6 ++---- >> drivers/timer/nomadik-mtu-timer.c | 6 ++---- >> drivers/timer/omap-timer.c | 6 ++---- >> drivers/timer/ostm_timer.c | 6 ++---- >> drivers/timer/riscv_timer.c | 21 +++++++++------------ >> drivers/timer/rockchip_timer.c | 5 ++--- >> drivers/timer/sandbox_timer.c | 6 ++---- >> drivers/timer/sti-timer.c | 6 ++---- >> drivers/timer/stm32_timer.c | 6 ++---- >> drivers/timer/timer-uclass.c | 3 ++- >> drivers/timer/tsc_timer.c | 6 ++---- >> include/timer.h | 5 ++--- >> 23 files changed, 53 insertions(+), 93 deletions(-) >> > > Reviewed-by: Simon Glass > > This seems OK to me. The function should not be called until the > driver is probed. It might be worth mentioning that probing must make > the timer valid (always from then on)? > Sure. I will update the docs in the next revision. --Sean