kernel, libsys: make it arm-target-independent

. by making the address and frequency of the
	  free running clock kinfo members, set at runtime
	  in the kernel, instead of compile time constants
	  in libsys

Change-Id: I4a8387302d4d3ffd47d2448525725683a74c9a4f
This commit is contained in:
Ben Gras
2013-06-17 00:33:47 +02:00
parent 5120b43334
commit 5bc48ef12e
3 changed files with 20 additions and 27 deletions

View File

@@ -790,11 +790,14 @@ int arch_phys_map_reply(const int index, const vir_bytes addr)
return OK;
}
else if (index == frclock_index) {
#ifdef DM37XX
minix_kerninfo.minix_frclock = addr;
#endif
#ifdef AM335X
minix_kerninfo.minix_frclock = addr;
#if defined(DM37XX)
minix_kerninfo.minix_frclock_tcrr = addr + OMAP3_TIMER_TCRR;
minix_kerninfo.minix_arm_frclock_hz = 1625000;
#elif defined(AM335X)
minix_kerninfo.minix_frclock_tcrr = addr + AM335X_TIMER_TCRR;
minix_kerninfo.minix_arm_frclock_hz = 1500000;
#else
#error ARM: plese define either AM335X or DM37XX.
#endif
return OK;