mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
reduce fclk on target, reoragnize feature flags into groups
Not all chips can hit rated speed, so for bringup we're defaulting to the slower setting.
This commit is contained in:
parent
b9cdf166ca
commit
d75624cfe4
2 changed files with 20 additions and 5 deletions
|
|
@ -79,17 +79,21 @@ cramium-fpga = [
|
||||||
"cramium-hal",
|
"cramium-hal",
|
||||||
]
|
]
|
||||||
atsama5d27 = ["utralib/atsama5d27", "armv7", "dep:atsama5d27"]
|
atsama5d27 = ["utralib/atsama5d27", "armv7", "dep:atsama5d27"]
|
||||||
|
|
||||||
|
# precursor flags
|
||||||
platform-tests = []
|
platform-tests = []
|
||||||
debug-print = []
|
|
||||||
earlyprintk = []
|
|
||||||
renode-bypass = []
|
renode-bypass = []
|
||||||
secboot = []
|
secboot = []
|
||||||
simulation-only = []
|
#default = ["debug-print"]
|
||||||
|
|
||||||
|
# swap flag
|
||||||
|
swap = ["aes-gcm-siv"]
|
||||||
|
|
||||||
|
# cramium target flags
|
||||||
board-bringup = []
|
board-bringup = []
|
||||||
sram-margin = []
|
sram-margin = []
|
||||||
boot-delay = []
|
boot-delay = []
|
||||||
#default = ["debug-print"]
|
simulation-only = []
|
||||||
swap = ["aes-gcm-siv"]
|
|
||||||
quantum-timer-test = ["pio", "pio-proc"]
|
quantum-timer-test = ["pio", "pio-proc"]
|
||||||
spim-test = []
|
spim-test = []
|
||||||
spi-alt-channel = []
|
spi-alt-channel = []
|
||||||
|
|
@ -97,5 +101,10 @@ irq-test = []
|
||||||
usb-test = []
|
usb-test = []
|
||||||
trng-test = []
|
trng-test = []
|
||||||
dump-trng = []
|
dump-trng = []
|
||||||
|
fast-fclk = []
|
||||||
|
|
||||||
|
# general flags
|
||||||
|
debug-print = []
|
||||||
|
earlyprintk = []
|
||||||
resume = [] # suspend/resume pathway code
|
resume = [] # suspend/resume pathway code
|
||||||
default = ["board-bringup", "dump-trng"]
|
default = ["board-bringup", "dump-trng"]
|
||||||
|
|
|
||||||
|
|
@ -1009,7 +1009,13 @@ unsafe fn init_clock_asic(freq_hz: u32) -> u32 {
|
||||||
|
|
||||||
// Hits a 16:8:4:2:1 ratio on fclk:aclk:hclk:iclk:pclk
|
// Hits a 16:8:4:2:1 ratio on fclk:aclk:hclk:iclk:pclk
|
||||||
// Resulting in 800:400:200:100:50 MHz assuming 800MHz fclk
|
// Resulting in 800:400:200:100:50 MHz assuming 800MHz fclk
|
||||||
|
#[cfg(feature = "fast-fclk")]
|
||||||
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_0.offset()).write_volatile(0x7fff); // fclk
|
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_0.offset()).write_volatile(0x7fff); // fclk
|
||||||
|
|
||||||
|
// Hits a 8:8:4:2:1 ratio on fclk:aclk:hclk:iclk:pclk
|
||||||
|
// Resulting in 400:400:200:100:50 MHz assuming 800MHz fclk
|
||||||
|
#[cfg(not(feature = "fast-fclk"))]
|
||||||
|
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_0.offset()).write_volatile(0x7f7f); // fclk
|
||||||
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_1.offset()).write_volatile(0x3f7f); // aclk
|
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_1.offset()).write_volatile(0x3f7f); // aclk
|
||||||
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_2.offset()).write_volatile(0x1f3f); // hclk
|
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_2.offset()).write_volatile(0x1f3f); // hclk
|
||||||
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_3.offset()).write_volatile(0x0f1f); // iclk
|
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_3.offset()).write_volatile(0x0f1f); // iclk
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue