diff --git a/hw/latest/registers/src/axi_dma.rs b/hw/latest/registers/src/axi_dma.rs index e480946a79..4294488a05 100644 --- a/hw/latest/registers/src/axi_dma.rs +++ b/hw/latest/registers/src/axi_dma.rs @@ -1786,7 +1786,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -1828,7 +1828,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -1870,7 +1870,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/doe.rs b/hw/latest/registers/src/doe.rs index 887d9966f1..43125893f5 100644 --- a/hw/latest/registers/src/doe.rs +++ b/hw/latest/registers/src/doe.rs @@ -1111,7 +1111,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/ecc.rs b/hw/latest/registers/src/ecc.rs index 65805bf7ba..65bf56bd28 100644 --- a/hw/latest/registers/src/ecc.rs +++ b/hw/latest/registers/src/ecc.rs @@ -1067,7 +1067,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -1357,7 +1357,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/hmac.rs b/hw/latest/registers/src/hmac.rs index f54e403d70..289e8d3751 100644 --- a/hw/latest/registers/src/hmac.rs +++ b/hw/latest/registers/src/hmac.rs @@ -1501,7 +1501,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/i3ccsr.rs b/hw/latest/registers/src/i3ccsr.rs index d70156820c..a1371a64a3 100644 --- a/hw/latest/registers/src/i3ccsr.rs +++ b/hw/latest/registers/src/i3ccsr.rs @@ -1783,7 +1783,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ControllerConfigReadVal(u32); impl ControllerConfigReadVal { - /// #[inline(always)] pub fn operation_mode(&self) -> u32 { (self.0 >> 4) & 3 @@ -2045,7 +2044,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct DevCtxBaseHiReadVal(u32); impl DevCtxBaseHiReadVal { - /// #[inline(always)] pub fn base_hi(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -2071,7 +2069,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct DevCtxBaseHiWriteVal(u32); impl DevCtxBaseHiWriteVal { - /// #[inline(always)] pub fn base_hi(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -2092,7 +2089,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct DevCtxBaseLoReadVal(u32); impl DevCtxBaseLoReadVal { - /// #[inline(always)] pub fn base_lo(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -2118,7 +2114,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct DevCtxBaseLoWriteVal(u32); impl DevCtxBaseLoWriteVal { - /// #[inline(always)] pub fn base_lo(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -2715,7 +2710,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct IbiPortReadVal(u32); impl IbiPortReadVal { - /// #[inline(always)] pub fn ibi_data(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -4406,7 +4400,6 @@ pub mod regs { pub fn target_xact_support(&self) -> bool { ((self.0 >> 12) & 1) != 0 } - /// #[inline(always)] pub fn simple_crr_support(&self) -> bool { ((self.0 >> 5) & 1) != 0 @@ -4468,7 +4461,6 @@ pub mod regs { pub fn target_xact_support(self, val: bool) -> Self { Self((self.0 & !(1 << 12)) | (u32::from(val) << 12)) } - /// #[inline(always)] pub fn simple_crr_support(self, val: bool) -> Self { Self((self.0 & !(1 << 5)) | (u32::from(val) << 5)) @@ -4489,12 +4481,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrCccConfigGetcapsReadVal(u32); impl StbyCrCccConfigGetcapsReadVal { - /// #[inline(always)] pub fn f2_crcap2_dev_interact(&self) -> u32 { (self.0 >> 8) & 0xf } - /// #[inline(always)] pub fn f2_crcap1_bus_config(&self) -> u32 { (self.0 >> 0) & 7 @@ -4520,12 +4510,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrCccConfigGetcapsWriteVal(u32); impl StbyCrCccConfigGetcapsWriteVal { - /// #[inline(always)] pub fn f2_crcap2_dev_interact(self, val: u32) -> Self { Self((self.0 & !(0xf << 8)) | ((val & 0xf) << 8)) } - /// #[inline(always)] pub fn f2_crcap1_bus_config(self, val: u32) -> Self { Self((self.0 & !(7 << 0)) | ((val & 7) << 0)) @@ -4546,22 +4534,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrCccConfigRstactParamsReadVal(u32); impl StbyCrCccConfigRstactParamsReadVal { - /// #[inline(always)] pub fn reset_dynamic_addr(&self) -> bool { ((self.0 >> 31) & 1) != 0 } - /// #[inline(always)] pub fn reset_time_target(&self) -> u32 { (self.0 >> 16) & 0xff } - /// #[inline(always)] pub fn reset_time_peripheral(&self) -> u32 { (self.0 >> 8) & 0xff } - /// #[inline(always)] pub fn rst_action(&self) -> u32 { (self.0 >> 0) & 0xff @@ -4587,22 +4571,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrCccConfigRstactParamsWriteVal(u32); impl StbyCrCccConfigRstactParamsWriteVal { - /// #[inline(always)] pub fn reset_dynamic_addr(self, val: bool) -> Self { Self((self.0 & !(1 << 31)) | (u32::from(val) << 31)) } - /// #[inline(always)] pub fn reset_time_target(self, val: u32) -> Self { Self((self.0 & !(0xff << 16)) | ((val & 0xff) << 16)) } - /// #[inline(always)] pub fn reset_time_peripheral(self, val: u32) -> Self { Self((self.0 & !(0xff << 8)) | ((val & 0xff) << 8)) } - /// #[inline(always)] pub fn rst_action(self, val: u32) -> Self { Self((self.0 & !(0xff << 0)) | ((val & 0xff) << 0)) @@ -4707,22 +4687,18 @@ pub mod regs { pub fn handoff_deep_sleep(&self) -> bool { ((self.0 >> 4) & 1) != 0 } - /// #[inline(always)] pub fn prime_accept_getacccr(&self) -> bool { ((self.0 >> 3) & 1) != 0 } - /// #[inline(always)] pub fn acr_fsm_op_select(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn handoff_delay_nack(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn pending_rx_nack(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -4832,22 +4808,18 @@ pub mod regs { pub fn handoff_deep_sleep(self, val: bool) -> Self { Self((self.0 & !(1 << 4)) | (u32::from(val) << 4)) } - /// #[inline(always)] pub fn prime_accept_getacccr(self, val: bool) -> Self { Self((self.0 & !(1 << 3)) | (u32::from(val) << 3)) } - /// #[inline(always)] pub fn acr_fsm_op_select(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) } - /// #[inline(always)] pub fn handoff_delay_nack(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn pending_rx_nack(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -4957,22 +4929,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrDeviceCharReadVal(u32); impl StbyCrDeviceCharReadVal { - /// #[inline(always)] pub fn bcr_fixed(&self) -> u32 { (self.0 >> 29) & 7 } - /// #[inline(always)] pub fn bcr_var(&self) -> u32 { (self.0 >> 24) & 0x1f } - /// #[inline(always)] pub fn dcr(&self) -> u32 { (self.0 >> 16) & 0xff } - /// #[inline(always)] pub fn pid_hi(&self) -> u32 { (self.0 >> 1) & 0x7fff @@ -4998,22 +4966,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrDeviceCharWriteVal(u32); impl StbyCrDeviceCharWriteVal { - /// #[inline(always)] pub fn bcr_fixed(self, val: u32) -> Self { Self((self.0 & !(7 << 29)) | ((val & 7) << 29)) } - /// #[inline(always)] pub fn bcr_var(self, val: u32) -> Self { Self((self.0 & !(0x1f << 24)) | ((val & 0x1f) << 24)) } - /// #[inline(always)] pub fn dcr(self, val: u32) -> Self { Self((self.0 & !(0xff << 16)) | ((val & 0xff) << 16)) } - /// #[inline(always)] pub fn pid_hi(self, val: u32) -> Self { Self((self.0 & !(0x7fff << 1)) | ((val & 0x7fff) << 1)) @@ -5034,47 +4998,38 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrForceReadVal(u32); impl StbyCrIntrForceReadVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_force(&self) -> bool { ((self.0 >> 19) & 1) != 0 } - /// #[inline(always)] pub fn ccc_unhandled_nack_force(&self) -> bool { ((self.0 >> 18) & 1) != 0 } - /// #[inline(always)] pub fn ccc_param_modified_force(&self) -> bool { ((self.0 >> 17) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_op_rstact_force(&self) -> bool { ((self.0 >> 16) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_err_force(&self) -> bool { ((self.0 >> 14) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_ok_force(&self) -> bool { ((self.0 >> 13) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_nacked_force(&self) -> bool { ((self.0 >> 12) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_dyn_addr_force(&self) -> bool { ((self.0 >> 11) & 1) != 0 } - /// #[inline(always)] pub fn crr_response_force(&self) -> bool { ((self.0 >> 10) & 1) != 0 @@ -5100,47 +5055,38 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrForceWriteVal(u32); impl StbyCrIntrForceWriteVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_force(self, val: bool) -> Self { Self((self.0 & !(1 << 19)) | (u32::from(val) << 19)) } - /// #[inline(always)] pub fn ccc_unhandled_nack_force(self, val: bool) -> Self { Self((self.0 & !(1 << 18)) | (u32::from(val) << 18)) } - /// #[inline(always)] pub fn ccc_param_modified_force(self, val: bool) -> Self { Self((self.0 & !(1 << 17)) | (u32::from(val) << 17)) } - /// #[inline(always)] pub fn stby_cr_op_rstact_force(self, val: bool) -> Self { Self((self.0 & !(1 << 16)) | (u32::from(val) << 16)) } - /// #[inline(always)] pub fn stby_cr_accept_err_force(self, val: bool) -> Self { Self((self.0 & !(1 << 14)) | (u32::from(val) << 14)) } - /// #[inline(always)] pub fn stby_cr_accept_ok_force(self, val: bool) -> Self { Self((self.0 & !(1 << 13)) | (u32::from(val) << 13)) } - /// #[inline(always)] pub fn stby_cr_accept_nacked_force(self, val: bool) -> Self { Self((self.0 & !(1 << 12)) | (u32::from(val) << 12)) } - /// #[inline(always)] pub fn stby_cr_dyn_addr_force(self, val: bool) -> Self { Self((self.0 & !(1 << 11)) | (u32::from(val) << 11)) } - /// #[inline(always)] pub fn crr_response_force(self, val: bool) -> Self { Self((self.0 & !(1 << 10)) | (u32::from(val) << 10)) @@ -5161,67 +5107,54 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrSignalEnableReadVal(u32); impl StbyCrIntrSignalEnableReadVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_signal_en(&self) -> bool { ((self.0 >> 19) & 1) != 0 } - /// #[inline(always)] pub fn ccc_unhandled_nack_signal_en(&self) -> bool { ((self.0 >> 18) & 1) != 0 } - /// #[inline(always)] pub fn ccc_param_modified_signal_en(&self) -> bool { ((self.0 >> 17) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_op_rstact_signal_en(&self) -> bool { ((self.0 >> 16) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_err_signal_en(&self) -> bool { ((self.0 >> 14) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_ok_signal_en(&self) -> bool { ((self.0 >> 13) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_nacked_signal_en(&self) -> bool { ((self.0 >> 12) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_dyn_addr_signal_en(&self) -> bool { ((self.0 >> 11) & 1) != 0 } - /// #[inline(always)] pub fn crr_response_signal_en(&self) -> bool { ((self.0 >> 10) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_err_m3_signal_en(&self) -> bool { ((self.0 >> 3) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_err_fail_signal_en(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_ok_primed_signal_en(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_ok_remain_signal_en(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -5247,67 +5180,54 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrSignalEnableWriteVal(u32); impl StbyCrIntrSignalEnableWriteVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 19)) | (u32::from(val) << 19)) } - /// #[inline(always)] pub fn ccc_unhandled_nack_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 18)) | (u32::from(val) << 18)) } - /// #[inline(always)] pub fn ccc_param_modified_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 17)) | (u32::from(val) << 17)) } - /// #[inline(always)] pub fn stby_cr_op_rstact_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 16)) | (u32::from(val) << 16)) } - /// #[inline(always)] pub fn stby_cr_accept_err_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 14)) | (u32::from(val) << 14)) } - /// #[inline(always)] pub fn stby_cr_accept_ok_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 13)) | (u32::from(val) << 13)) } - /// #[inline(always)] pub fn stby_cr_accept_nacked_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 12)) | (u32::from(val) << 12)) } - /// #[inline(always)] pub fn stby_cr_dyn_addr_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 11)) | (u32::from(val) << 11)) } - /// #[inline(always)] pub fn crr_response_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 10)) | (u32::from(val) << 10)) } - /// #[inline(always)] pub fn acr_handoff_err_m3_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 3)) | (u32::from(val) << 3)) } - /// #[inline(always)] pub fn acr_handoff_err_fail_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) } - /// #[inline(always)] pub fn acr_handoff_ok_primed_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn acr_handoff_ok_remain_signal_en(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -5328,67 +5248,54 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrStatusReadVal(u32); impl StbyCrIntrStatusReadVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_stat(&self) -> bool { ((self.0 >> 19) & 1) != 0 } - /// #[inline(always)] pub fn ccc_unhandled_nack_stat(&self) -> bool { ((self.0 >> 18) & 1) != 0 } - /// #[inline(always)] pub fn ccc_param_modified_stat(&self) -> bool { ((self.0 >> 17) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_op_rstact_stat(&self) -> bool { ((self.0 >> 16) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_err_stat(&self) -> bool { ((self.0 >> 14) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_ok_stat(&self) -> bool { ((self.0 >> 13) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_accept_nacked_stat(&self) -> bool { ((self.0 >> 12) & 1) != 0 } - /// #[inline(always)] pub fn stby_cr_dyn_addr_stat(&self) -> bool { ((self.0 >> 11) & 1) != 0 } - /// #[inline(always)] pub fn crr_response_stat(&self) -> bool { ((self.0 >> 10) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_err_m3_stat(&self) -> bool { ((self.0 >> 3) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_err_fail_stat(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_ok_primed_stat(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn acr_handoff_ok_remain_stat(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -5414,67 +5321,54 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrIntrStatusWriteVal(u32); impl StbyCrIntrStatusWriteVal { - /// #[inline(always)] pub fn ccc_fatal_rstdaa_err_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 19)) | (u32::from(val) << 19)) } - /// #[inline(always)] pub fn ccc_unhandled_nack_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 18)) | (u32::from(val) << 18)) } - /// #[inline(always)] pub fn ccc_param_modified_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 17)) | (u32::from(val) << 17)) } - /// #[inline(always)] pub fn stby_cr_op_rstact_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 16)) | (u32::from(val) << 16)) } - /// #[inline(always)] pub fn stby_cr_accept_err_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 14)) | (u32::from(val) << 14)) } - /// #[inline(always)] pub fn stby_cr_accept_ok_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 13)) | (u32::from(val) << 13)) } - /// #[inline(always)] pub fn stby_cr_accept_nacked_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 12)) | (u32::from(val) << 12)) } - /// #[inline(always)] pub fn stby_cr_dyn_addr_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 11)) | (u32::from(val) << 11)) } - /// #[inline(always)] pub fn crr_response_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 10)) | (u32::from(val) << 10)) } - /// #[inline(always)] pub fn acr_handoff_err_m3_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 3)) | (u32::from(val) << 3)) } - /// #[inline(always)] pub fn acr_handoff_err_fail_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) } - /// #[inline(always)] pub fn acr_handoff_ok_primed_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn acr_handoff_ok_remain_stat(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -5495,17 +5389,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrStatusReadVal(u32); impl StbyCrStatusReadVal { - /// #[inline(always)] pub fn hj_req_status(&self) -> bool { ((self.0 >> 8) & 1) != 0 } - /// #[inline(always)] pub fn simple_crr_status(&self) -> u32 { (self.0 >> 5) & 7 } - /// #[inline(always)] pub fn ac_current_own(&self) -> bool { ((self.0 >> 2) & 1) != 0 @@ -5531,17 +5422,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct StbyCrStatusWriteVal(u32); impl StbyCrStatusWriteVal { - /// #[inline(always)] pub fn hj_req_status(self, val: bool) -> Self { Self((self.0 & !(1 << 8)) | (u32::from(val) << 8)) } - /// #[inline(always)] pub fn simple_crr_status(self, val: u32) -> Self { Self((self.0 & !(7 << 5)) | ((val & 7) << 5)) } - /// #[inline(always)] pub fn ac_current_own(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) @@ -5980,7 +5868,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct THighRegReadVal(u32); impl THighRegReadVal { - /// #[inline(always)] pub fn t_high(&self) -> u32 { (self.0 >> 0) & 0xfffff @@ -6006,7 +5893,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct THighRegWriteVal(u32); impl THighRegWriteVal { - /// #[inline(always)] pub fn t_high(self, val: u32) -> Self { Self((self.0 & !(0xfffff << 0)) | ((val & 0xfffff) << 0)) diff --git a/hw/latest/registers/src/lib.rs b/hw/latest/registers/src/lib.rs index 2f86558b38..50467c1477 100644 --- a/hw/latest/registers/src/lib.rs +++ b/hw/latest/registers/src/lib.rs @@ -518,7 +518,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -808,7 +808,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/mbox.rs b/hw/latest/registers/src/mbox.rs index ac76836ef7..379260d6ed 100644 --- a/hw/latest/registers/src/mbox.rs +++ b/hw/latest/registers/src/mbox.rs @@ -220,7 +220,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ExecuteReadVal(u32); impl ExecuteReadVal { - /// #[inline(always)] pub fn execute(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -246,7 +245,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ExecuteWriteVal(u32); impl ExecuteWriteVal { - /// #[inline(always)] pub fn execute(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -267,7 +265,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct LockReadVal(u32); impl LockReadVal { - /// #[inline(always)] pub fn lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -393,7 +390,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct TapModeReadVal(u32); impl TapModeReadVal { - /// #[inline(always)] pub fn enabled(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -419,7 +415,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct TapModeWriteVal(u32); impl TapModeWriteVal { - /// #[inline(always)] pub fn enabled(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -440,7 +435,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct UnlockReadVal(u32); impl UnlockReadVal { - /// #[inline(always)] pub fn unlock(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -466,7 +460,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct UnlockWriteVal(u32); impl UnlockWriteVal { - /// #[inline(always)] pub fn unlock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -534,7 +527,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 8 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -588,7 +581,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x10 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/mldsa.rs b/hw/latest/registers/src/mldsa.rs index cf14306c9d..1b09d97d79 100644 --- a/hw/latest/registers/src/mldsa.rs +++ b/hw/latest/registers/src/mldsa.rs @@ -950,7 +950,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 8 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } @@ -1240,7 +1240,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/sha512.rs b/hw/latest/registers/src/sha512.rs index 3e5dbeeb30..23b0c0e58f 100644 --- a/hw/latest/registers/src/sha512.rs +++ b/hw/latest/registers/src/sha512.rs @@ -1535,7 +1535,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 0x100 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/sha512_acc.rs b/hw/latest/registers/src/sha512_acc.rs index c63838684c..92971e5008 100644 --- a/hw/latest/registers/src/sha512_acc.rs +++ b/hw/latest/registers/src/sha512_acc.rs @@ -665,7 +665,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ExecuteReadVal(u32); impl ExecuteReadVal { - /// #[inline(always)] pub fn execute(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -691,7 +690,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ExecuteWriteVal(u32); impl ExecuteWriteVal { - /// #[inline(always)] pub fn execute(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -712,7 +710,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct LockReadVal(u32); impl LockReadVal { - /// #[inline(always)] pub fn lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -738,7 +735,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct LockWriteVal(u32); impl LockWriteVal { - /// #[inline(always)] pub fn lock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -759,7 +755,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ModeReadVal(u32); impl ModeReadVal { - /// #[inline(always)] pub fn mode(&self) -> super::enums::ShaCmdE { super::enums::ShaCmdE::try_from((self.0 >> 0) & 3).unwrap() @@ -794,7 +789,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct ModeWriteVal(u32); impl ModeWriteVal { - /// #[inline(always)] pub fn mode( self, @@ -1358,7 +1352,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/hw/latest/registers/src/soc_ifc.rs b/hw/latest/registers/src/soc_ifc.rs index 9bec9d1320..280c1d65fd 100644 --- a/hw/latest/registers/src/soc_ifc.rs +++ b/hw/latest/registers/src/soc_ifc.rs @@ -2371,7 +2371,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraBootfsmGoReadVal(u32); impl CptraBootfsmGoReadVal { - /// #[inline(always)] pub fn go(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -2397,7 +2396,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraBootfsmGoWriteVal(u32); impl CptraBootfsmGoWriteVal { - /// #[inline(always)] pub fn go(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -2465,7 +2463,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraFlowStatusReadVal(u32); impl CptraFlowStatusReadVal { - /// #[inline(always)] pub fn status(&self) -> u32 { (self.0 >> 0) & 0xffffff @@ -2522,7 +2519,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraFlowStatusWriteVal(u32); impl CptraFlowStatusWriteVal { - /// #[inline(always)] pub fn status(self, val: u32) -> Self { Self((self.0 & !(0xffffff << 0)) | ((val & 0xffffff) << 0)) @@ -2563,7 +2559,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraFuseWrDoneReadVal(u32); impl CptraFuseWrDoneReadVal { - /// #[inline(always)] pub fn done(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -2589,7 +2584,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraFuseWrDoneWriteVal(u32); impl CptraFuseWrDoneWriteVal { - /// #[inline(always)] pub fn done(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -2610,22 +2604,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraHwConfigReadVal(u32); impl CptraHwConfigReadVal { - /// #[inline(always)] pub fn i_trng_en(&self) -> bool { ((self.0 >> 0) & 1) != 0 } - /// #[inline(always)] pub fn rsvd_en(&self) -> u32 { (self.0 >> 1) & 7 } - /// #[inline(always)] pub fn lms_acc_en(&self) -> bool { ((self.0 >> 4) & 1) != 0 } - /// #[inline(always)] pub fn active_mode_en(&self) -> bool { ((self.0 >> 5) & 1) != 0 @@ -2646,27 +2636,22 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraHwErrorFatalReadVal(u32); impl CptraHwErrorFatalReadVal { - /// #[inline(always)] pub fn iccm_ecc_unc(&self) -> bool { ((self.0 >> 0) & 1) != 0 } - /// #[inline(always)] pub fn dccm_ecc_unc(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn nmi_pin(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn crypto_err(&self) -> bool { ((self.0 >> 3) & 1) != 0 } - /// #[inline(always)] pub fn rsvd(&self) -> u32 { (self.0 >> 4) & 0xfffffff @@ -2692,22 +2677,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraHwErrorFatalWriteVal(u32); impl CptraHwErrorFatalWriteVal { - /// #[inline(always)] pub fn iccm_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) } - /// #[inline(always)] pub fn dccm_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn nmi_pin(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) } - /// #[inline(always)] pub fn crypto_err(self, val: bool) -> Self { Self((self.0 & !(1 << 3)) | (u32::from(val) << 3)) @@ -2728,22 +2709,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraHwErrorNonFatalReadVal(u32); impl CptraHwErrorNonFatalReadVal { - /// #[inline(always)] pub fn mbox_prot_no_lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 } - /// #[inline(always)] pub fn mbox_prot_ooo(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn mbox_ecc_unc(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn rsvd(&self) -> u32 { (self.0 >> 3) & 0x1fffffff @@ -2769,17 +2746,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraHwErrorNonFatalWriteVal(u32); impl CptraHwErrorNonFatalWriteVal { - /// #[inline(always)] pub fn mbox_prot_no_lock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) } - /// #[inline(always)] pub fn mbox_prot_ooo(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn mbox_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) @@ -2808,7 +2782,6 @@ pub mod regs { pub fn cptra_generation(&self) -> u32 { (self.0 >> 0) & 0xffff } - /// #[inline(always)] pub fn soc_stepping_id(&self) -> u32 { (self.0 >> 16) & 0xffff @@ -3188,7 +3161,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraXxxxxxxkReadVal(u32); impl CptraXxxxxxxkReadVal { - /// #[inline(always)] pub fn lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -3214,7 +3186,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraXxxxxxxkWriteVal(u32); impl CptraXxxxxxxkWriteVal { - /// #[inline(always)] pub fn lock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -3235,7 +3206,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraXxxxAxiUserLockReadVal(u32); impl CptraXxxxAxiUserLockReadVal { - /// #[inline(always)] pub fn lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -3261,7 +3231,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraXxxxAxiUserLockWriteVal(u32); impl CptraXxxxAxiUserLockWriteVal { - /// #[inline(always)] pub fn lock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -3282,12 +3251,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraItrngEntropyConfig0ReadVal(u32); impl CptraItrngEntropyConfig0ReadVal { - /// #[inline(always)] pub fn low_threshold(&self) -> u32 { (self.0 >> 0) & 0xffff } - /// #[inline(always)] pub fn high_threshold(&self) -> u32 { (self.0 >> 16) & 0xffff @@ -3313,12 +3280,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraItrngEntropyConfig0WriteVal(u32); impl CptraItrngEntropyConfig0WriteVal { - /// #[inline(always)] pub fn low_threshold(self, val: u32) -> Self { Self((self.0 & !(0xffff << 0)) | ((val & 0xffff) << 0)) } - /// #[inline(always)] pub fn high_threshold(self, val: u32) -> Self { Self((self.0 & !(0xffff << 16)) | ((val & 0xffff) << 16)) @@ -3339,12 +3304,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraItrngEntropyConfig1ReadVal(u32); impl CptraItrngEntropyConfig1ReadVal { - /// #[inline(always)] pub fn repetition_count(&self) -> u32 { (self.0 >> 0) & 0xffff } - /// #[inline(always)] pub fn rsvd(&self) -> u32 { (self.0 >> 16) & 0xffff @@ -3370,12 +3333,10 @@ pub mod regs { #[derive(Clone, Copy)] pub struct CptraItrngEntropyConfig1WriteVal(u32); impl CptraItrngEntropyConfig1WriteVal { - /// #[inline(always)] pub fn repetition_count(self, val: u32) -> Self { Self((self.0 & !(0xffff << 0)) | ((val & 0xffff) << 0)) } - /// #[inline(always)] pub fn rsvd(self, val: u32) -> Self { Self((self.0 & !(0xffff << 16)) | ((val & 0xffff) << 16)) @@ -3600,7 +3561,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct SsDebugIntentReadVal(u32); impl SsDebugIntentReadVal { - /// #[inline(always)] pub fn debug_intent(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -3972,7 +3932,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseAntiRollbackDisableReadVal(u32); impl FuseAntiRollbackDisableReadVal { - /// #[inline(always)] pub fn dis(&self) -> bool { ((self.0 >> 0) & 1) != 0 @@ -3998,7 +3957,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseAntiRollbackDisableWriteVal(u32); impl FuseAntiRollbackDisableWriteVal { - /// #[inline(always)] pub fn dis(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) @@ -4019,7 +3977,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseMldsaRevocationReadVal(u32); impl FuseMldsaRevocationReadVal { - /// #[inline(always)] pub fn mldsa_revocation(&self) -> u32 { (self.0 >> 0) & 0xf @@ -4045,7 +4002,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseMldsaRevocationWriteVal(u32); impl FuseMldsaRevocationWriteVal { - /// #[inline(always)] pub fn mldsa_revocation(self, val: u32) -> Self { Self((self.0 & !(0xf << 0)) | ((val & 0xf) << 0)) @@ -4066,7 +4022,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseSocSteppingIdReadVal(u32); impl FuseSocSteppingIdReadVal { - /// #[inline(always)] pub fn soc_stepping_id(&self) -> u32 { (self.0 >> 0) & 0xffff @@ -4092,7 +4047,6 @@ pub mod regs { #[derive(Clone, Copy)] pub struct FuseSocSteppingIdWriteVal(u32); impl FuseSocSteppingIdWriteVal { - /// #[inline(always)] pub fn soc_stepping_id(self, val: u32) -> Self { Self((self.0 & !(0xffff << 0)) | ((val & 0xffff) << 0)) @@ -4207,22 +4161,18 @@ pub mod regs { #[derive(Clone, Copy)] pub struct InternalHwErrorFatalMaskReadVal(u32); impl InternalHwErrorFatalMaskReadVal { - /// #[inline(always)] pub fn mask_iccm_ecc_unc(&self) -> bool { ((self.0 >> 0) & 1) != 0 } - /// #[inline(always)] pub fn mask_dccm_ecc_unc(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn mask_nmi_pin(&self) -> bool { ((self.0 >> 2) & 1) != 0 } - /// #[inline(always)] pub fn mask_crypto_err(&self) -> bool { ((self.0 >> 3) & 1) != 0 @@ -4248,17 +4198,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct InternalHwErrorFatalMaskWriteVal(u32); impl InternalHwErrorFatalMaskWriteVal { - /// #[inline(always)] pub fn mask_iccm_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) } - /// #[inline(always)] pub fn mask_dccm_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn mask_nmi_pin(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) @@ -4279,17 +4226,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct InternalHwErrorNonFatalMaskReadVal(u32); impl InternalHwErrorNonFatalMaskReadVal { - /// #[inline(always)] pub fn mask_mbox_prot_no_lock(&self) -> bool { ((self.0 >> 0) & 1) != 0 } - /// #[inline(always)] pub fn mask_mbox_prot_ooo(&self) -> bool { ((self.0 >> 1) & 1) != 0 } - /// #[inline(always)] pub fn mask_mbox_ecc_unc(&self) -> bool { ((self.0 >> 2) & 1) != 0 @@ -4315,17 +4259,14 @@ pub mod regs { #[derive(Clone, Copy)] pub struct InternalHwErrorNonFatalMaskWriteVal(u32); impl InternalHwErrorNonFatalMaskWriteVal { - /// #[inline(always)] pub fn mask_mbox_prot_no_lock(self, val: bool) -> Self { Self((self.0 & !(1 << 0)) | (u32::from(val) << 0)) } - /// #[inline(always)] pub fn mask_mbox_prot_ooo(self, val: bool) -> Self { Self((self.0 & !(1 << 1)) | (u32::from(val) << 1)) } - /// #[inline(always)] pub fn mask_mbox_ecc_unc(self, val: bool) -> Self { Self((self.0 & !(1 << 2)) | (u32::from(val) << 2)) @@ -4711,7 +4652,7 @@ pub mod enums { #[inline(always)] fn try_from(val: u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err(()) } diff --git a/ureg/lib/codegen/src/lib.rs b/ureg/lib/codegen/src/lib.rs index ab4420d812..0f476b7907 100644 --- a/ureg/lib/codegen/src/lib.rs +++ b/ureg/lib/codegen/src/lib.rs @@ -212,7 +212,7 @@ fn generate_enum(e: &Enum) -> TokenStream { // This transmute is safe because the check above ensures // that the value has a corresponding enum variant, and the // enum is using repr(u32). - Ok(unsafe { core::mem::transmute(val) } ) + Ok(unsafe { core::mem::transmute::(val) } ) } else { Err(()) } @@ -319,7 +319,7 @@ mod generate_enums_test { #[inline (always)] fn try_from(val : u32) -> Result { if val < 4 { - Ok(unsafe { core::mem::transmute(val) }) + Ok(unsafe { core::mem::transmute::(val) }) } else { Err (()) } @@ -383,8 +383,12 @@ fn generate_register(reg: &RegisterType) -> TokenStream { }; let comment = &field.comment.replace("
", "\n"); if field.ty.can_read() { + if !comment.is_empty() { + read_val_tokens.extend(quote! { + #[doc = #comment] + }) + } read_val_tokens.extend(quote! { - #[doc = #comment] #[inline(always)] }); if let Some(ref enum_type) = field.enum_type { @@ -409,8 +413,12 @@ fn generate_register(reg: &RegisterType) -> TokenStream { } } if field.ty.can_write() { + if !comment.is_empty() { + write_val_tokens.extend(quote! { + #[doc = #comment] + }) + } write_val_tokens.extend(quote! { - #[doc = #comment] #[inline(always)] }); if let Some(ref enum_type) = field.enum_type {