path: root/arch/architecture.dox
diff options
authorJuergen Beisert <>2009-05-27 16:40:06 +0200
committerSascha Hauer <>2009-06-10 12:47:20 +0200
commit7733de908ba918ca47f13157335a100d74ba7cf1 (patch)
tree6c1cd8eb60a2c63422705c4e95e9b63cb9433b4c /arch/architecture.dox
parentbf725a2945a31d81d1d686d36bc755c115a7ee8f (diff)
Fix some layout issues and typos.
Reorganizing some files to parts of the documentation where their content matches. Signed-off-by: Juergen Beisert <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'arch/architecture.dox')
1 files changed, 49 insertions, 1 deletions
diff --git a/arch/architecture.dox b/arch/architecture.dox
index 3f94b3c321..9013bae1b2 100644
--- a/arch/architecture.dox
+++ b/arch/architecture.dox
@@ -29,17 +29,65 @@ to find the right place in whatever environment and U-Boot sizes.
.section ".text_entry","ax"
+@section arch_files List of changes
+ - create a new subdirectory in /arch
-/** @page dev_cpu Intergrate a new CPU (MACH)
+/** @page dev_cpu Integrate a new CPU (MACH)
Features required for every CPU:
- clocksource
- CPU reset function
+@section time_keeping Time keeping
+In U-Boot-v2 we are using the clocksource mechanism from the Linux Kernel.
+This makes it fairly easy to add timer functionality for a new board or
+Apart from initialization there is only one function to be registerd:
+clocksource_read(). This function returns the current value of a free running
+counter. Other functions like udelay() and get_time_ns() are derived from this
+function. The only thing you have to implement is a clocksource driver and
+to register it at runtime.
+static uint64_t mycpu_clocksource_read(void)
+static struct clocksource cs = {
+ .read = mycpu_clocksource_read,
+ .mask = 0xffffffff,
+ .shift = 10,
+ init_clock(&cs);
+See arch/arm/mach-imx/clocksource.c for an example. clocksource drivers from
+the Linux Kernel can be used nearly 1:1, except for the register accesses.
+Note: For clocksources the __lshrdi3 symbol is needed. You can find the
+function for your architecture in the Linux Kernel or a libc of your choice.
+Note: U-Boot-v2 expects an upward counting counter!
+@section reset_function Reset function
- @subpage dev_arm_mach
- @subpage dev_bf_mach
- @subpage dev_ppc_mach