Page MenuHomeFreeBSD

Add the SDHCI Address Decoder registers and routines for ARMADA 38X.
ClosedPublic

Authored by loos on May 4 2017, 7:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 10:52 PM
Unknown Object (File)
Thu, Nov 14, 6:58 AM
Unknown Object (File)
Oct 4 2024, 5:16 AM
Unknown Object (File)
Oct 3 2024, 12:11 PM
Unknown Object (File)
Sep 30 2024, 4:25 AM
Unknown Object (File)
Sep 29 2024, 9:33 PM
Unknown Object (File)
Sep 28 2024, 9:29 AM
Unknown Object (File)
Sep 23 2024, 6:10 AM
Subscribers

Details

Summary

Add the SDHCI Address Decoder registers and routines for ARMADA 38X.

Sponsored by: Rubicon Communications, LLC (Netgate)

Test Plan

Tested on ClearFog Pro.

Diff Detail

Event Timeline

loos retitled this revision from Add the SDHCI Address Decoder registers and routines for ARMADA 38X. Sponsored by: Rubicon Communications, LLC (Netgate) to Add the SDHCI Address Decoder registers and routines for ARMADA 38X.Sponsored by: Rubicon Communications, LLC (Netgate).May 4 2017, 7:30 PM
loos added reviewers: mw_semihalf.com, zbb.
loos retitled this revision from Add the SDHCI Address Decoder registers and routines for ARMADA 38X.Sponsored by: Rubicon Communications, LLC (Netgate) to Add the SDHCI Address Decoder registers and routines for ARMADA 38X..May 4 2017, 7:44 PM
loos edited the summary of this revision. (Show Details)
sys/arm/mv/mv_common.c
2090

Hi,

I know e.g. usb3 is done exactly same, but I think the only place we should use the ifdef is here:

static int
decode_win_sdhci_valid(void)
{
#ifdef SOC_MV_ARMADA38X

return (decode_win_can_cover_ddr(MV_WIN_SDHCI_MAX));

#endif

/* Satisfy platforms not equipped with this controller */
return (1);

}

The registers definition are not under ifdef, so e.g. kirkwood should compile easily. _setup and _dump functions execution is depending on the compatible string, so it can be safe as well. In further perspective, I think also _valid check should depend on the compatible, so that we don't have to add dummy stuff. What do you think?

loos marked an inline comment as done.

Remove the #ifdef for decode_win_sdhci_valid() as requested by Marcin at Semihalf.

sys/arm/mv/mv_common.c
2090

Fixed in the latest update. Thanks!

sys/arm/mv/mv_common.c
669

Thanks for the update. However, if you move WIN_REG_BASE_IDX_ macros out of #if defined(SOC_MV_ARMADA38X)...

2128

... you will be able to remove ifdef around decode_win_sdhci_setup/dump and the dummy functions below. We won't break Kirkwood or ArmadaXP compilation, and because the routines won't execute on those platforms, because they require compatible string match.

loos marked an inline comment as done.May 9 2017, 6:02 PM

Move the MACROs definition outside the #ifdefs and remove the now unnecessary #ifdefs.

Spotted by: mw@semihalf.com

This revision is now accepted and ready to land.May 9 2017, 8:46 PM
This revision was automatically updated to reflect the committed changes.