Skip to content
Commit e9ad1b8d authored by Andre Przywara's avatar Andre Przywara
Browse files

sunxi: Properly check for SATAPWR and MACPWR



The #ifdef CONFIG_xxxPWR conditionals were not working as expected, as
string Kconfig symbols are always "defined" from the preprocessor's
perspective. This lead to unnecessary calls to the GPIO routines, but
also always added a half a second delay to wait for a SATA disk to power
up. Many thanks to Peter for pointing this out!

Fix this by properly comparing the Kconfig symbols against the empty
string. strcmp() would be nicer for this, but GCC does not optimise this
away, probably due to our standalone compiler switches.

Reported-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
Tested-by: Samuel Holland <samuel@sholland.org> # Orange Pi WinPlus
Tested-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
parent c81877a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment