From: Jelle van der Waa <jelle@vdwaa.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
Date: Mon, 5 Dec 2016 21:43:45 +0100 [thread overview]
Message-ID: <20161205204343.GA24795@gmail.com> (raw)
In-Reply-To: <20161129222555.GK2546@bill-the-cat>
On 11/29/16 at 05:25pm, Tom Rini wrote:
> On Tue, Nov 29, 2016 at 10:17:42PM +0100, Maxime Ripard wrote:
> > Hi Tom,
> >
> > On Tue, Nov 29, 2016 at 04:11:38PM -0500, Tom Rini wrote:
> > > On Tue, Nov 29, 2016 at 09:39:32PM +0100, Maxime Ripard wrote:
> > > > On Mon, Nov 28, 2016 at 02:20:10PM +0100, Hans de Goede wrote:
> > > > > HI,
> > > > >
> > > > > On 28-11-16 13:42, Maxime Ripard wrote:
> > > > > > Hi Hans,
> > > > > >
> > > > > > On Fri, Nov 25, 2016 at 09:12:30AM +0100, Hans de Goede wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > On 24-11-16 22:22, Maxime Ripard wrote:
> > > > > > > > On Wed, Nov 23, 2016 at 07:28:16PM +0100, Jelle van der Waa wrote:
> > > > > > > > > Introduce a new CONFIG_SATAPWR Kconfig option to replace the
> > > > > > > > > option in CONFIG_SYS_EXTRA_OPTIONS.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
> > > > > > > > > ---
> > > > > > > > > board/sunxi/Kconfig | 7 +++++++
> > > > > > > > > board/sunxi/board.c | 11 ++++++-----
> > > > > > > > > configs/A10-OLinuXino-Lime_defconfig | 3 ++-
> > > > > > > > > configs/A20-OLinuXino-Lime2_defconfig | 3 ++-
> > > > > > > > > configs/A20-OLinuXino-Lime_defconfig | 3 ++-
> > > > > > > > > configs/A20-OLinuXino_MICRO_defconfig | 3 ++-
> > > > > > > > > configs/A20-Olimex-SOM-EVB_defconfig | 3 ++-
> > > > > > > > > configs/Cubieboard2_defconfig | 3 ++-
> > > > > > > > > configs/Cubieboard_defconfig | 3 ++-
> > > > > > > > > configs/Cubietruck_defconfig | 3 ++-
> > > > > > > > > configs/Itead_Ibox_A20_defconfig | 3 ++-
> > > > > > > > > configs/Lamobo_R1_defconfig | 3 ++-
> > > > > > > > > configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
> > > > > > > > > configs/Linksprite_pcDuino3_defconfig | 3 ++-
> > > > > > > > > configs/Sinovoip_BPI_M3_defconfig | 2 +-
> > > > > > > > > configs/orangepi_plus_defconfig | 3 ++-
> > > > > > > > > 16 files changed, 40 insertions(+), 19 deletions(-)
> > > > > > > > >
> > > > > > > > > diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> > > > > > > > > index ae2fba1..fe2f7b4 100644
> > > > > > > > > --- a/board/sunxi/Kconfig
> > > > > > > > > +++ b/board/sunxi/Kconfig
> > > > > > > > > @@ -667,6 +667,13 @@ config GMAC_TX_DELAY
> > > > > > > > > ---help---
> > > > > > > > > Set the GMAC Transmit Clock Delay Chain value.
> > > > > > > > >
> > > > > > > > > +config SATAPWR
> > > > > > > > > + string "power pin for SATA"
> > > > > > > > > + default ""
> > > > > > > > > + ---help---
> > > > > > > > > + Set the power pin for SATA. This takes a string in the format
> > > > > > > > > + understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
> > > > > > > > > +
> > > > > > > >
> > > > > > > > This looks like a rather generic option. Can't this be in
> > > > > > > > drivers/block instead?
> > > > > > >
> > > > > > > The proper solution would be to get the info from devicetree,
> > > > > > > which requires regulator support, which we don't have yet
> > > > > > > for sunxi. In the mean time getting rid of the need for
> > > > > > > CONFIG_SYS_EXTRA_OPTIONS is a worthwhile goal in itself
> > > > > > > IMHO.
> > > > > >
> > > > > > Yes, but a GPIO to enable the SATA 5V rail seems like a rather common
> > > > > > thing, and definitely not Allwinner specific.
> > > > > >
> > > > > > Moving that option to drivers/block would make more sense I guess.
> > > > >
> > > > > Hmm, but in the end this should be removed, as everything should'
> > > > > be using devicetree, so I'm not convinced it is a good idea
> > > > > to introduce a generic option for this.
> > > > >
> > > > > Anyways either way is fine with me.
> > > >
> > > > I don't know, in the end, not all platforms will be converted to
> > > > device tree, so it still might be something worth adding.
> > >
> > > We also don't want to get hung up on fixing sub-optional solutions while
> > > also converting to Kconfig. We can move the option now and see about
> > > re-naming or getting the information elsewhere afterwards. Thanks!
> >
> > I'm not sure I got what you wanted. Do you want it to be merged in
> > drivers/block as a generic option, or in board/sunxi as a
> > platform-specific one?
>
> I'm fine with either place. Today it's used just on sunxi as a config
> option with that name, so board/sunxi/Kconfig and make a note to
> investigate how all of the other platforms that have this issue handle
> it. For example, my gut (based on some other imx6 stuff I've been
> doing) is that on imx6 they just fiddle the GPIO and not have it in
> Kconfig because rather than 1 board.c and N defconfig files they have
> (roughly) N board.c files and N defconfigs.
Maxime, what do you prefer?
I later also want to move the following options from
CONFIG_SYS_EXTRA_OPTIONS. (haven't done so since those patches will
conflict)
* SUNXI_GMAC
Should go to board/sunxi/Kconfig, I assume. The drivers is there too.
* RGMII
This is an interesting one, also used in drivers/net/macb.c and it seems
selected for sama5d3xek by a #define. Not sure what to do here
* MACPWR=SUNXI_GPH(23)
Same issue as above, this patch :)
--
Jelle van der Waa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161205/7883c627/attachment.sig>
next prev parent reply other threads:[~2016-12-05 20:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 18:28 [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option Jelle van der Waa
2016-11-24 21:22 ` Maxime Ripard
2016-11-25 8:12 ` Hans de Goede
2016-11-28 12:42 ` Maxime Ripard
2016-11-28 13:20 ` Hans de Goede
2016-11-29 20:39 ` Maxime Ripard
2016-11-29 21:11 ` Tom Rini
2016-11-29 21:17 ` Maxime Ripard
2016-11-29 22:25 ` Tom Rini
2016-12-05 20:43 ` Jelle van der Waa [this message]
2016-12-09 7:28 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161205204343.GA24795@gmail.com \
--to=jelle@vdwaa.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox