More general clk factor

Signed-off-by: Carlo Caione <carlo@caione.org>