From e5f3bf0a81bf0545ada5682fbc693a203a87a7bd Mon Sep 17 00:00:00 2001 From: Johannes Wirth Date: Wed, 2 Jul 2025 10:39:12 +0200 Subject: [PATCH] Revert remove of fmcdiv in sysctrl --- include/ehrenberg/devices/gen/sysctrl.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/include/ehrenberg/devices/gen/sysctrl.h b/include/ehrenberg/devices/gen/sysctrl.h index 95f6e0a..a0f972b 100644 --- a/include/ehrenberg/devices/gen/sysctrl.h +++ b/include/ehrenberg/devices/gen/sysctrl.h @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 * -* Generated at 2025-07-01 11:20:43 UTC +* Generated at 2025-06-23 15:39:49 UTC * by peakrdl_mnrs version 1.2.9 */ @@ -16,6 +16,7 @@ typedef struct { volatile uint32_t SYSCTRL; volatile uint32_t PLLCTRL; volatile uint32_t AXI_BACKUP; + volatile uint32_t FMCDIV; }sysctrl_t; #define SYSCTRL_SYSCTRL_CC0_RESET_OFFS 0 @@ -50,6 +51,14 @@ typedef struct { #define SYSCTRL_AXI_BACKUP_MASK 0x1f #define SYSCTRL_AXI_BACKUP(V) ((V & SYSCTRL_AXI_BACKUP_MASK) << SYSCTRL_AXI_BACKUP_OFFS) +#define SYSCTRL_FMCDIV_FMCDIVVALID_OFFS 0 +#define SYSCTRL_FMCDIV_FMCDIVVALID_MASK 0x1 +#define SYSCTRL_FMCDIV_FMCDIVVALID(V) ((V & SYSCTRL_FMCDIV_FMCDIVVALID_MASK) << SYSCTRL_FMCDIV_FMCDIVVALID_OFFS) + +#define SYSCTRL_FMCDIV_FMCDIVFACTOR_OFFS 1 +#define SYSCTRL_FMCDIV_FMCDIVFACTOR_MASK 0xf +#define SYSCTRL_FMCDIV_FMCDIVFACTOR(V) ((V & SYSCTRL_FMCDIV_FMCDIVFACTOR_MASK) << SYSCTRL_FMCDIV_FMCDIVFACTOR_OFFS) + //SYSCTRL_SYSCTRL inline uint32_t get_sysctrl_sysctrl(volatile sysctrl_t* reg){ return reg->SYSCTRL; @@ -119,4 +128,15 @@ inline void set_sysctrl_axi_backup_page(volatile sysctrl_t* reg, uint8_t value){ reg->AXI_BACKUP = (reg->AXI_BACKUP & ~(0x1fU << 0)) | (value << 0); } +//SYSCTRL_FMCDIV +inline void set_sysctrl_fmcdiv(volatile sysctrl_t* reg, uint32_t value){ + reg->FMCDIV = value; +} +inline void set_sysctrl_fmcdiv_fmcDivValid(volatile sysctrl_t* reg, uint8_t value){ + reg->FMCDIV = (reg->FMCDIV & ~(0x1U << 0)) | (value << 0); +} +inline void set_sysctrl_fmcdiv_fmcDivFactor(volatile sysctrl_t* reg, uint8_t value){ + reg->FMCDIV = (reg->FMCDIV & ~(0xfU << 1)) | (value << 1); +} + #endif /* _BSP_SYSCTRL_H */ \ No newline at end of file