From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jernej =?utf-8?B?xaBrcmFiZWM=?= Date: Tue, 19 Jan 2021 19:36:52 +0100 Subject: [linux-sunxi] [PATCH] sunxi: Properly check for SATAPWR and MACPWR In-Reply-To: <20210119010520.13284-1-andre.przywara@arm.com> References: <20210119010520.13284-1-andre.przywara@arm.com> Message-ID: <2273364.cmf3nSqCEo@kista> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dne torek, 19. januar 2021 ob 02:05:20 CET je Andre Przywara napisal(a): > 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: Peter Robinson > Signed-off-by: Andre Przywara Nice find! Reviewed-by: Jernej Skrabec Best regards, Jernej