Draft
Conversation
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
jannau
reviewed
Feb 10, 2026
|
|
||
| if (state->pcie_regs->type == APCIE_T8122) { | ||
| // The T8122 init is very similar to the T602X, except with a different offset. | ||
| // (There is one write to +0x4000 which we handle by subtracting 0x4000, see below.) |
Member
There was a problem hiding this comment.
when comparing the apcie node in t6020 and t8122 adt it looks like reg[2], reg[3], reg[4] folded into reg[2]. So it might be easier to set phy_common_idx to 2 for t8122 and add here 0x4000 to phy_common_base
| if (state->pcie_regs->type == APCIE_T602X) { | ||
| set32(state->phy_base[phy] + APCIE_PHY_CTRL, 0x300); | ||
| } else if (state->pcie_regs->type == APCIE_T8122) { | ||
| set32(state->phy_base[phy] - 0x4000, 0x1); |
Member
There was a problem hiding this comment.
This looks like it is
mask32(state->phy_common_base + APCIE_PHYCMN_CLK, APCIE_PHYCMN_CLK_MODE, FIELD_PREP(APCIE_PHYCMN_CLK_MODE, 1));
Made APCIE_T602X specific just 16 lines earlier
| } | ||
| if (state->pcie_regs->type == APCIE_T602X) { | ||
| pmgr_adt_power_disable_index(path, 1); | ||
| } |
Member
There was a problem hiding this comment.
this can be expressed shorted as
if (state->pcie_regs->type == APCIE_T8122) {
clear32(state->axi_base + 0x600, 0x10000);
} else {
if (controller == APCIE)
clear32(state->rc_base + 0x3c, 0x1);
pmgr_adt_power_disable_index(path, 1);
}
| write32(state->port_base[port] + 0x3000 + 4 * i, 0); | ||
| } | ||
| } | ||
| if (state->pcie_regs->type == APCIE_T602X || state->pcie_regs->type == APCIE_T8122) { |
Member
There was a problem hiding this comment.
this is always true as it is already in a if with the same condition
| } | ||
| } | ||
| if (state->pcie_regs->type == APCIE_T602X || state->pcie_regs->type == APCIE_T8122) { | ||
| int msimap_count = 512; |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.