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)
Mon, Dec 23, 7:08 AM
Unknown Object (File)
Sun, Dec 22, 5:53 AM
Unknown Object (File)
Sat, Dec 21, 4:22 PM
Unknown Object (File)
Sat, Dec 14, 10:27 AM
Unknown Object (File)
Thu, Nov 28, 3:30 PM
Unknown Object (File)
Nov 24 2024, 10:52 PM
Unknown Object (File)
Nov 14 2024, 6:58 AM
Unknown Object (File)
Oct 4 2024, 5:16 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #28035)

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 ↗(On Diff #28035)

Fixed in the latest update. Thanks!

sys/arm/mv/mv_common.c
669 ↗(On Diff #28162)

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

2128 ↗(On Diff #28162)

... 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.