mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
move sys clock frequency to lib so other crates can depend on it
This commit is contained in:
parent
781c74ba79
commit
a31978edab
2 changed files with 4 additions and 3 deletions
|
|
@ -52,3 +52,6 @@ pub const GUARD_MEMORY_BYTES: usize = 8 * crate::PAGE_SIZE; // 1 extra page for
|
||||||
|
|
||||||
#[cfg(feature = "swap")]
|
#[cfg(feature = "swap")]
|
||||||
pub const SWAPPER_PID: u8 = 2;
|
pub const SWAPPER_PID: u8 = 2;
|
||||||
|
|
||||||
|
#[cfg(feature = "cramium-soc")]
|
||||||
|
pub const SYSTEM_CLOCK_FREQUENCY: u32 = 800_000_000;
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,6 @@ static ALLOCATOR: linked_list_allocator::LockedHeap = linked_list_allocator::Loc
|
||||||
break into the loader updater less able to get at any root keys?
|
break into the loader updater less able to get at any root keys?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pub const SYSTEM_CLOCK_FREQUENCY: u32 = 800_000_000;
|
|
||||||
|
|
||||||
// Define the .data region - bootstrap baremetal using these hard-coded parameters.
|
// Define the .data region - bootstrap baremetal using these hard-coded parameters.
|
||||||
pub const DATA_ORIGIN: usize = 0x61000000;
|
pub const DATA_ORIGIN: usize = 0x61000000;
|
||||||
pub const DATA_SIZE_BYTES: usize = 0x5000;
|
pub const DATA_SIZE_BYTES: usize = 0x5000;
|
||||||
|
|
@ -255,7 +253,7 @@ pub fn early_init() -> u32 {
|
||||||
// Now setup the clocks for real
|
// Now setup the clocks for real
|
||||||
// Safety: this can only be called in the early_init boot context
|
// Safety: this can only be called in the early_init boot context
|
||||||
#[cfg(not(feature = "simulation-only"))]
|
#[cfg(not(feature = "simulation-only"))]
|
||||||
let perclk = unsafe { init_clock_asic(SYSTEM_CLOCK_FREQUENCY) };
|
let perclk = unsafe { init_clock_asic(crate::SYSTEM_CLOCK_FREQUENCY) };
|
||||||
#[cfg(feature = "simulation-only")]
|
#[cfg(feature = "simulation-only")]
|
||||||
let perclk = 100_000_000;
|
let perclk = 100_000_000;
|
||||||
crate::println!("Perclk is {} Hz", perclk);
|
crate::println!("Perclk is {} Hz", perclk);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue