Skip to content
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

Qcom/FdtTargetMmcSdhciLib: Additional FDT parsing #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feherneoh
Copy link
Contributor

reg: get values based on reg-names instead of hardcoded indexes
interrupts: get values based on interrupt-names instead of hardcoded indexes
interrupts: find correct #interrupt-cells used by the sdhci node
pinctrl: support new "config" node
qcom,bus-speed-mode: clean loop up

@feherneoh
Copy link
Contributor Author

feherneoh commented Apr 29, 2018

I know pull requests aren't meant to be used this way, but I would like you to test if the changes work on Mi4c too

//not handled: "cmdq_mem"
Index++;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to 0-check sdhc_base and pwrctl_base here

DEBUG ((DEBUG_INFO, "sdhc_base: %x\n", config.sdhc_base));
DEBUG ((DEBUG_INFO, "pwrctl_base: %x\n", config.pwrctl_base));

// find interrupt parent
for (TmpNode = Node; !FdtClient->HasNodeProperty(FdtClient, TmpNode, "interrupt-parent"); Status = FdtClient->GetParentNode(FdtClient, TmpNode, &TmpNode)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that loop needed? I think that linux code only checks the current node and the root node.
Correct me if I'm wrong.

// get PHandle to interrupt-parent
Status = FdtClient->GetNodeProperty(FdtClient, TmpNode, "interrupt-parent", (CONST VOID **)&FdtU32, &PropertySize);
if (EFI_ERROR(Status) || PropertySize != sizeof(*FdtU32)) {
DEBUG((DEBUG_INFO, "FDT read error: \"interrupt-parent\"\n"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing "continue"

}
// not handled: hc_irq, status_irq
Index++;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to 0-check pwr_irq here.

@feherneoh feherneoh force-pushed the pullreq_FdtTargetMmcSdhciLib branch 2 times, most recently from ac38c89 to 911cba5 Compare April 29, 2018 15:38
reg: get values based on reg-names instead of hardcoded indexes
interrupts: get values based on interrupt-names instead of hardcoded indexes
interrupts: find correct #interrupt-cells used by the sdhci node
pinctrl: support new "config" node
qcom,bus-speed-mode: clean loop up
@feherneoh feherneoh force-pushed the pullreq_FdtTargetMmcSdhciLib branch from 911cba5 to 9551dd9 Compare April 30, 2018 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants