-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ARC: boards: nsim: hs5x/hs6x: setup apertures to be runnable on HAPS #45605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MaureenHelm
merged 1 commit into
zephyrproject-rtos:main
from
evgeniy-paltsev:rff-haps-nsim-arcv3-apert-setup-v0
May 13, 2022
+52
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| zephyr_sources_ifdef(CONFIG_ARC_MPU_ENABLE arc_mpu_regions.c) | ||
| zephyr_sources_ifdef(CONFIG_ISA_ARCV3 haps_arcv3_init.c) |
This file contains hidden or 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,51 @@ | ||
| /* | ||
| * Copyright (c) 2022 Synopsys | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include <soc.h> | ||
| #include <zephyr/init.h> | ||
|
|
||
| #define ARC_CLN_MST_NOC_0_0_ADDR 292 | ||
| #define ARC_CLN_MST_NOC_0_0_SIZE 293 | ||
|
|
||
| #define ARC_CLN_MST_NOC_0_1_ADDR 2560 | ||
| #define ARC_CLN_MST_NOC_0_1_SIZE 2561 | ||
|
|
||
| #define ARC_CLN_MST_NOC_0_2_ADDR 2562 | ||
| #define ARC_CLN_MST_NOC_0_2_SIZE 2563 | ||
|
|
||
| #define ARC_CLN_MST_NOC_0_3_ADDR 2564 | ||
| #define ARC_CLN_MST_NOC_0_3_SIZE 2565 | ||
|
|
||
| #define ARC_CLN_MST_NOC_0_4_ADDR 2566 | ||
| #define ARC_CLN_MST_NOC_0_4_SIZE 2567 | ||
|
|
||
| #define ARC_CLN_PER0_BASE 2688 | ||
| #define ARC_CLN_PER0_SIZE 2689 | ||
|
|
||
| #define AUX_CLN_ADDR 0x640 | ||
| #define AUX_CLN_DATA 0x641 | ||
|
|
||
|
|
||
| static int haps_arcv3_init(const struct device *dev) | ||
| { | ||
| ARG_UNUSED(dev); | ||
|
|
||
| z_arc_v2_aux_reg_write(AUX_CLN_ADDR, ARC_CLN_PER0_BASE); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_DATA, 0xF00); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_ADDR, ARC_CLN_PER0_SIZE); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_DATA, 1); | ||
|
|
||
| z_arc_v2_aux_reg_write(AUX_CLN_ADDR, ARC_CLN_MST_NOC_0_0_ADDR); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_DATA, (DT_REG_ADDR(DT_CHOSEN(zephyr_sram)) / (1024 * 1024))); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_ADDR, ARC_CLN_MST_NOC_0_0_SIZE); | ||
| z_arc_v2_aux_reg_write(AUX_CLN_DATA, (DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) / (1024 * 1024))); | ||
evgeniy-paltsev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| return 0; | ||
| } | ||
|
|
||
|
|
||
| SYS_INIT(haps_arcv3_init, PRE_KERNEL_1, 0); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.