dm: implement a Timer uclass

Implement a Timer uclass to work with lib/time.c.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 2155265..d0383f3 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -69,6 +69,9 @@
 	struct udevice	*dm_root_f;	/* Pre-relocation root instance */
 	struct list_head uclass_root;	/* Head of core tree */
 #endif
+#ifdef CONFIG_TIMER
+	struct udevice	*timer;	/* Timer instance for Driver Model */
+#endif
 
 	const void *fdt_blob;	/* Our device tree, NULL if none */
 	void *new_fdt;		/* Relocated FDT */