* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
@ 2016-11-23 18:28 Jelle van der Waa
2016-11-24 21:22 ` Maxime Ripard
0 siblings, 1 reply; 11+ messages in thread
From: Jelle van der Waa @ 2016-11-23 18:28 UTC (permalink / raw)
To: u-boot
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.
+
config SPL_STACK_R_ADDR
default 0x4fe00000 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN7I || MACH_SUN8I || MACH_SUN50I
default 0x2fe00000 if MACH_SUN9I
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 5365638..71b1ebf 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -80,7 +80,7 @@ DECLARE_GLOBAL_DATA_PTR;
/* add board specific code here */
int board_init(void)
{
- __maybe_unused int id_pfr1, ret;
+ __maybe_unused int id_pfr1, ret, pin;
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
@@ -117,10 +117,11 @@ int board_init(void)
if (ret)
return ret;
-#ifdef CONFIG_SATAPWR
- gpio_request(CONFIG_SATAPWR, "satapwr");
- gpio_direction_output(CONFIG_SATAPWR, 1);
-#endif
+pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+if (pin >= 0) {
+ gpio_request(pin, "satapwr");
+ gpio_direction_output(pin, 1);
+}
#ifdef CONFIG_MACPWR
gpio_request(CONFIG_MACPWR, "macpwr");
gpio_direction_output(CONFIG_MACPWR, 1);
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index bb7eaf8..99b5744 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -9,7 +9,8 @@ CONFIG_MMC0_CD_PIN="PH1"
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SATAPWR="PC3"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index d48e35d..824fc86 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -9,7 +9,8 @@ CONFIG_USB0_VBUS_DET="PH5"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SATAPWR="PC3"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index 7c5d84d..2791023 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -7,7 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SATAPWR="PC3"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 9eb5f1b..774099e 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -10,7 +10,8 @@ CONFIG_VIDEO_VGA=y
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SATAPWR="PB8"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig
index 53d800f..139173e 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -12,7 +12,8 @@ CONFIG_USB0_VBUS_DET="PH5"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SATAPWR="PC3"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 9212a17..17923b7 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -7,7 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubieboard2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SATAPWR="PB8"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 6e7e741..5595e85 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -7,7 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1"
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SATAPWR="PB8"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index 37b60b85..2825646 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -12,7 +12,8 @@ CONFIG_GMAC_TX_DELAY=1
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-cubietruck"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPH(12)"
+CONFIG_SATAPWR="PH12"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Itead_Ibox_A20_defconfig b/configs/Itead_Ibox_A20_defconfig
index d544d50..2bddab3 100644
--- a/configs/Itead_Ibox_A20_defconfig
+++ b/configs/Itead_Ibox_A20_defconfig
@@ -7,7 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-itead-ibox"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SATAPWR="PB8"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index 58bc5a2..aaa71bb 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -8,7 +8,8 @@ CONFIG_GMAC_TX_DELAY=4
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),SATAPWR=SUNXI_GPB(3)"
+CONFIG_SATAPWR="PB3"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23)"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Linksprite_pcDuino3_Nano_defconfig b/configs/Linksprite_pcDuino3_Nano_defconfig
index 8cbe9c3..130dfe7 100644
--- a/configs/Linksprite_pcDuino3_Nano_defconfig
+++ b/configs/Linksprite_pcDuino3_Nano_defconfig
@@ -9,7 +9,8 @@ CONFIG_GMAC_TX_DELAY=3
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3-nano"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPH(2)"
+CONFIG_SATAPWR="PH2"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index 5d155b4..d64f388 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -7,7 +7,8 @@ CONFIG_DRAM_ZQ=122
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_AHCI=y
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPH(2)"
+CONFIG_SATAPWR="PH2"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig
index d15ac20..1507950 100644
--- a/configs/Sinovoip_BPI_M3_defconfig
+++ b/configs/Sinovoip_BPI_M3_defconfig
@@ -13,7 +13,7 @@ CONFIG_USB1_VBUS_PIN="PD24"
CONFIG_AXP_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-sinovoip-bpi-m3"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPD(25)"
+CONFIG_SATAPWR="PD25"
CONFIG_CONSOLE_MUX=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
index bf88fef..e536095 100644
--- a/configs/orangepi_plus_defconfig
+++ b/configs/orangepi_plus_defconfig
@@ -9,7 +9,8 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
CONFIG_USB1_VBUS_PIN="PG13"
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPG(11),MACPWR=SUNXI_GPD(6)"
+CONFIG_SATAPWR="PG11"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPD(6)"
CONFIG_CONSOLE_MUX=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
--
2.10.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
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
0 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2016-11-24 21:22 UTC (permalink / raw)
To: u-boot
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?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161124/238ed8cd/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-24 21:22 ` Maxime Ripard
@ 2016-11-25 8:12 ` Hans de Goede
2016-11-28 12:42 ` Maxime Ripard
0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2016-11-25 8:12 UTC (permalink / raw)
To: u-boot
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.
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-25 8:12 ` Hans de Goede
@ 2016-11-28 12:42 ` Maxime Ripard
2016-11-28 13:20 ` Hans de Goede
0 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2016-11-28 12:42 UTC (permalink / raw)
To: u-boot
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.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161128/30f5756e/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-28 12:42 ` Maxime Ripard
@ 2016-11-28 13:20 ` Hans de Goede
2016-11-29 20:39 ` Maxime Ripard
0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2016-11-28 13:20 UTC (permalink / raw)
To: u-boot
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.
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-28 13:20 ` Hans de Goede
@ 2016-11-29 20:39 ` Maxime Ripard
2016-11-29 21:11 ` Tom Rini
0 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2016-11-29 20:39 UTC (permalink / raw)
To: u-boot
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.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/cdc51164/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-29 20:39 ` Maxime Ripard
@ 2016-11-29 21:11 ` Tom Rini
2016-11-29 21:17 ` Maxime Ripard
0 siblings, 1 reply; 11+ messages in thread
From: Tom Rini @ 2016-11-29 21:11 UTC (permalink / raw)
To: u-boot
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!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/4bf1a0c8/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-29 21:11 ` Tom Rini
@ 2016-11-29 21:17 ` Maxime Ripard
2016-11-29 22:25 ` Tom Rini
0 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2016-11-29 21:17 UTC (permalink / raw)
To: u-boot
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?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/8d6ac9ba/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-29 21:17 ` Maxime Ripard
@ 2016-11-29 22:25 ` Tom Rini
2016-12-05 20:43 ` Jelle van der Waa
0 siblings, 1 reply; 11+ messages in thread
From: Tom Rini @ 2016-11-29 22:25 UTC (permalink / raw)
To: u-boot
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.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/1f54b5ef/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-11-29 22:25 ` Tom Rini
@ 2016-12-05 20:43 ` Jelle van der Waa
2016-12-09 7:28 ` Maxime Ripard
0 siblings, 1 reply; 11+ messages in thread
From: Jelle van der Waa @ 2016-12-05 20:43 UTC (permalink / raw)
To: u-boot
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>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH] sunxi: move CONFIG_SATAPWR to Kconfig option
2016-12-05 20:43 ` Jelle van der Waa
@ 2016-12-09 7:28 ` Maxime Ripard
0 siblings, 0 replies; 11+ messages in thread
From: Maxime Ripard @ 2016-12-09 7:28 UTC (permalink / raw)
To: u-boot
On Mon, Dec 05, 2016 at 09:43:45PM +0100, Jelle van der Waa wrote:
> 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 :)
We can do it as Tom suggested for now. Put it in board/sunxi with a
comment that we should look into merging that with other
architectures>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161209/e524a7f0/attachment.sig>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-12-09 7:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-12-09 7:28 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox