This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gtimer: Corrects the definition of the CNTControlBase register
This patch corrects the definition of the CNTControlBase register frame in accordance with the latest architecture manual, a-profile_architecture_reference_manual. It also addes static asserts to make sure the offsets for this frame are correct. Signed-off-by: Tarek El-Sherbiny <tarek.el-sherbiny@arm.com> Change-Id: I1a1f137c69c6742e836875ef2855f20d8c816b67
- Loading branch information
1 parent
6e15c98
commit 39da0b2
Showing
3 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Arm SCP/MCP Software | ||
* Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#ifndef GTIMER_VALIDATE_REG_H | ||
#define GTIMER_VALIDATE_REG_H | ||
|
||
#include "gtimer_reg.h" | ||
|
||
static_assert(CNTCR_OFFSET == offsetof(struct cntcontrol_reg, CR)); | ||
static_assert(CNTSR_OFFSET == offsetof(struct cntcontrol_reg, SR)); | ||
static_assert(CNTCV_L_OFFSET == offsetof(struct cntcontrol_reg, CVL)); | ||
static_assert(CNTCV_H_OFFSET == offsetof(struct cntcontrol_reg, CVH)); | ||
static_assert(CNTSCR_OFFSET == offsetof(struct cntcontrol_reg, CSR)); | ||
static_assert(CNTID_OFFSET == offsetof(struct cntcontrol_reg, ID)); | ||
static_assert(CNTFID0_OFFSET == offsetof(struct cntcontrol_reg, FID0)); | ||
static_assert(IMP_DEF_OFFSET == offsetof(struct cntcontrol_reg, IMP_DEF)); | ||
static_assert(COUNTERID_OFFSET == offsetof(struct cntcontrol_reg, PID)); | ||
|
||
#endif /* GTIMER_VALIDATE_REG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters