From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andr=c3=a9_Przywara?= Date: Mon, 18 Jan 2021 12:28:17 +0000 Subject: [PATCH] sunxi: don't define MACPWR and SATAPWR to empty strings In-Reply-To: <20210118001823.243392-1-pbrobinson@gmail.com> References: <20210118001823.243392-1-pbrobinson@gmail.com> Message-ID: <5fcb3f90-2460-aa25-69f8-e735247ef9de@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 18/01/2021 00:18, Peter Robinson wrote: > There's checks in board/sunxi/board.c if either MACPWR or SATAPWR are > defined and they are defined by default to a empty string which means > on vast majority of AllWinner boards when they're not required the > code is still run and with SATAPWR we even get an unnecessary 500ms > delay booting. So let's not define a default for these options so the > code is only run for boards that need it. Ouch, that's a good one! Looks good to me, I will do some checks and testing to verify. Actually it looks even worse, since we don't check the return value of sunxi_name_to_gpio(), and gpio_direction_output() doesn't either. I wonder how this didn't crash before ... Plus I wonder if we can move those two pins to be handled by DT. Anyway, first things first... Thanks for the patch! Cheers, Andre > > Signed-off-by: Peter Robinson > --- > arch/arm/mach-sunxi/Kconfig | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > index 49ef217f08..a566e10315 100644 > --- a/arch/arm/mach-sunxi/Kconfig > +++ b/arch/arm/mach-sunxi/Kconfig > @@ -578,7 +578,6 @@ config OLD_SUNXI_KERNEL_COMPAT > > config MACPWR > string "MAC power pin" > - default "" > help > Set the pin used to power the MAC. This takes a string in the format > understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. > @@ -969,7 +968,6 @@ endchoice > > config SATAPWR > string "SATA power pin" > - default "" > help > Set the pins used to power the SATA. This takes a string in the > format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of >