* [PATCH 0/4] Overall small fixes
@ 2019-06-17 10:00 Marco Felsch
2019-06-17 10:00 ` [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries Marco Felsch
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Marco Felsch @ 2019-06-17 10:00 UTC (permalink / raw)
To: barebox
Hi,
this series evolved during debugging and updating a customer barebox
and covers different targets.
Regads,
Marco
Marco Felsch (4):
ARM: phytec-som-imx6: update automount net entries
defaultenv-2: net: fix comment
commands: mmc_extcsd: fix extcsd value meanings
i2c: gpio: add sda/scl-gpios property support
.../init/automount | 11 ++++++--
commands/mmc_extcsd.c | 8 +++---
defaultenv/defaultenv-2-base/init/automount | 2 +-
drivers/i2c/busses/i2c-gpio.c | 27 ++++++++++++-------
4 files changed, 31 insertions(+), 17 deletions(-)
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
@ 2019-06-17 10:00 ` Marco Felsch
2019-06-17 10:00 ` [PATCH 2/4] defaultenv-2: net: fix comment Marco Felsch
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Marco Felsch @ 2019-06-17 10:00 UTC (permalink / raw)
To: barebox; +Cc: Stefan Christ
It seems that the /mnt/tftp was copied from the defaultenv-2. The
defaultenv-2 got a update to make it more robust by enabling all
interfaces. During this sync I added a entry to support automount for
/mnt/nfs mountpoint.
Cc: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
.../defaultenv-physom-imx6-phycore/init/automount | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
index 91ded44119..13a5b626b7 100644
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/automount
@@ -1,9 +1,16 @@
#!/bin/sh
-# automount tftp server based on $eth0.serverip
+# automount tftp server
mkdir -p /mnt/tftp
-automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
+automount /mnt/tftp 'ifup -a && mount -t tftp $global.net.server /mnt/tftp'
+
+# automount nfs server's nfsroot
+
+mkdir -p /mnt/nfs
+automount /mnt/nfs 'ifup -a && mount -t nfs ${global.net.server}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs'
+
+# automount phycore specific local mounts
mkdir -p /mnt/mmc
automount -d /mnt/mmc 'mmc0.probe=1 && [ -e /dev/mmc0.0 ] && mount /dev/mmc0.0 /mnt/mmc'
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] defaultenv-2: net: fix comment
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
2019-06-17 10:00 ` [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries Marco Felsch
@ 2019-06-17 10:00 ` Marco Felsch
2019-06-17 10:00 ` [PATCH 3/4] commands: mmc_extcsd: fix extcsd value meanings Marco Felsch
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Marco Felsch @ 2019-06-17 10:00 UTC (permalink / raw)
To: barebox
Since commit acc3a3ef90 ("net: environment: update automounts") the tftp
automount mechanism uses all network interfaces.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
defaultenv/defaultenv-2-base/init/automount | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/defaultenv/defaultenv-2-base/init/automount b/defaultenv/defaultenv-2-base/init/automount
index 5e0cb4d938..0996cea04d 100644
--- a/defaultenv/defaultenv-2-base/init/automount
+++ b/defaultenv/defaultenv-2-base/init/automount
@@ -1,6 +1,6 @@
#!/bin/sh
-# automount tftp server based on $eth0.serverip
+# automount tftp server
mkdir -p /mnt/tftp
automount /mnt/tftp 'ifup -a && mount -t tftp $global.net.server /mnt/tftp'
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] commands: mmc_extcsd: fix extcsd value meanings
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
2019-06-17 10:00 ` [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries Marco Felsch
2019-06-17 10:00 ` [PATCH 2/4] defaultenv-2: net: fix comment Marco Felsch
@ 2019-06-17 10:00 ` Marco Felsch
2019-06-17 10:00 ` [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support Marco Felsch
2019-06-18 8:11 ` [PATCH 0/4] Overall small fixes Sascha Hauer
4 siblings, 0 replies; 9+ messages in thread
From: Marco Felsch @ 2019-06-17 10:00 UTC (permalink / raw)
To: barebox
As specified by the JEDEC Standard No. 84-A441 the RESET_BOOT_BUS_WIDTH
(Bit[2]) is specified the other way around. Also the BOOT_MODE is a two
bit register.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
commands/mmc_extcsd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
index 889a6c614a..c27bb722ea 100644
--- a/commands/mmc_extcsd.c
+++ b/commands/mmc_extcsd.c
@@ -861,10 +861,10 @@ static int print_field(u8 *reg, int index)
str);
val = get_field_val(EXT_CSD_BOOT_BUS_CONDITIONS, 2, 0x1);
if (val)
- str = "Reset bus width to x1, SDR and backward compatible timings after boot operation";
- else
str = "Retain BOOT_BUS_WIDTH and BOOT_MODE values after boot operation";
- printf("\t[2] RESET_BOOT_BUS_CONDITIONS: %s", str);
+ else
+ str = "Reset bus width to x1, SDR and backward compatible timings after boot operation";
+ printf("\t[2] RESET_BOOT_BUS_CONDITIONS: %s\n", str);
val = get_field_val(EXT_CSD_BOOT_BUS_CONDITIONS, 3, 0x3);
switch (val) {
case 0x0:
@@ -877,7 +877,7 @@ static int print_field(u8 *reg, int index)
str = "Use DDR in boot operation";
break;
}
- printf("\t[3] BOOT_MODE: %s\n", str);
+ printf("\t[4-3] BOOT_MODE: %s\n", str);
return 1;
case EXT_CSD_BOOT_CONFIG_PROT:
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
` (2 preceding siblings ...)
2019-06-17 10:00 ` [PATCH 3/4] commands: mmc_extcsd: fix extcsd value meanings Marco Felsch
@ 2019-06-17 10:00 ` Marco Felsch
2019-06-18 10:50 ` Antony Pavlov
2019-06-18 8:11 ` [PATCH 0/4] Overall small fixes Sascha Hauer
4 siblings, 1 reply; 9+ messages in thread
From: Marco Felsch @ 2019-06-17 10:00 UTC (permalink / raw)
To: barebox
The gpios property is marked as deprecated since kernel 4.15 so we
should support the "new" mechanism too. The new mechanism has a higher
priority than the deprecated one.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/i2c/busses/i2c-gpio.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 708193344a..9508adab06 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -94,18 +94,25 @@ static int of_i2c_gpio_probe(struct device_node *np,
if (!IS_ENABLED(CONFIG_OFDEVICE))
return -ENODEV;
- if (of_gpio_count(np) < 2)
- return -ENODEV;
+ pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
+ pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
+
+ if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
+ && (of_gpio_count(np) >= 2)) {
+ /* Note: The gpios property is marked as deprecated */
+ ret = of_get_gpio(np, 0);
+ if (ret < 0)
+ return ret;
+ pdata->sda_pin = ret;
- ret = of_get_gpio(np, 0);
- if (ret < 0)
- return ret;
- pdata->sda_pin = ret;
+ ret = of_get_gpio(np, 1);
+ if (ret < 0)
+ return ret;
+ pdata->scl_pin = ret;
+ }
- ret = of_get_gpio(np, 1);
- if (ret < 0)
- return ret;
- pdata->scl_pin = ret;
+ if (!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
+ return -ENODEV;
of_property_read_u32(np, "i2c-gpio,delay-us", &pdata->udelay);
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Overall small fixes
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
` (3 preceding siblings ...)
2019-06-17 10:00 ` [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support Marco Felsch
@ 2019-06-18 8:11 ` Sascha Hauer
4 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2019-06-18 8:11 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
On Mon, Jun 17, 2019 at 12:00:52PM +0200, Marco Felsch wrote:
> Hi,
>
> this series evolved during debugging and updating a customer barebox
> and covers different targets.
>
> Regads,
> Marco
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support
2019-06-17 10:00 ` [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support Marco Felsch
@ 2019-06-18 10:50 ` Antony Pavlov
2019-06-18 12:39 ` Marco Felsch
0 siblings, 1 reply; 9+ messages in thread
From: Antony Pavlov @ 2019-06-18 10:50 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
On Mon, 17 Jun 2019 12:00:56 +0200
Marco Felsch <m.felsch@pengutronix.de> wrote:
> The gpios property is marked as deprecated since kernel 4.15 so we
> should support the "new" mechanism too. The new mechanism has a higher
> priority than the deprecated one.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/i2c/busses/i2c-gpio.c | 27 +++++++++++++++++----------
> 1 file changed, 17 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> index 708193344a..9508adab06 100644
> --- a/drivers/i2c/busses/i2c-gpio.c
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -94,18 +94,25 @@ static int of_i2c_gpio_probe(struct device_node *np,
> if (!IS_ENABLED(CONFIG_OFDEVICE))
> return -ENODEV;
>
> - if (of_gpio_count(np) < 2)
> - return -ENODEV;
> + pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
> + pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
> +
> + if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
Double check of sda_pin here.
Can we change this line to
+ if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
> + && (of_gpio_count(np) >= 2)) {
> + /* Note: The gpios property is marked as deprecated */
> + ret = of_get_gpio(np, 0);
> + if (ret < 0)
> + return ret;
> + pdata->sda_pin = ret;
>
> - ret = of_get_gpio(np, 0);
> - if (ret < 0)
> - return ret;
> - pdata->sda_pin = ret;
> + ret = of_get_gpio(np, 1);
> + if (ret < 0)
> + return ret;
> + pdata->scl_pin = ret;
> + }
>
> - ret = of_get_gpio(np, 1);
> - if (ret < 0)
> - return ret;
> - pdata->scl_pin = ret;
> + if (!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
Same here.
+ if (!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
> + return -ENODEV;
>
> of_property_read_u32(np, "i2c-gpio,delay-us", &pdata->udelay);
>
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support
2019-06-18 10:50 ` Antony Pavlov
@ 2019-06-18 12:39 ` Marco Felsch
2019-06-18 13:15 ` Sascha Hauer
0 siblings, 1 reply; 9+ messages in thread
From: Marco Felsch @ 2019-06-18 12:39 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
Hi Antony,
On 19-06-18 13:50, Antony Pavlov wrote:
> On Mon, 17 Jun 2019 12:00:56 +0200
> Marco Felsch <m.felsch@pengutronix.de> wrote:
>
> > The gpios property is marked as deprecated since kernel 4.15 so we
> > should support the "new" mechanism too. The new mechanism has a higher
> > priority than the deprecated one.
> >
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > drivers/i2c/busses/i2c-gpio.c | 27 +++++++++++++++++----------
> > 1 file changed, 17 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> > index 708193344a..9508adab06 100644
> > --- a/drivers/i2c/busses/i2c-gpio.c
> > +++ b/drivers/i2c/busses/i2c-gpio.c
> > @@ -94,18 +94,25 @@ static int of_i2c_gpio_probe(struct device_node *np,
> > if (!IS_ENABLED(CONFIG_OFDEVICE))
> > return -ENODEV;
> >
> > - if (of_gpio_count(np) < 2)
> > - return -ENODEV;
> > + pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
> > + pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
> > +
> > + if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
>
> Double check of sda_pin here.
>
> Can we change this line to
>
> + if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
Thanks for covering that damn copy'n'paste failure.
@Sascha
Is it okay to prepare a follow up patch which you can squash?
Regards,
Marco
> > + && (of_gpio_count(np) >= 2)) {
> > + /* Note: The gpios property is marked as deprecated */
> > + ret = of_get_gpio(np, 0);
> > + if (ret < 0)
> > + return ret;
> > + pdata->sda_pin = ret;
> >
> > - ret = of_get_gpio(np, 0);
> > - if (ret < 0)
> > - return ret;
> > - pdata->sda_pin = ret;
> > + ret = of_get_gpio(np, 1);
> > + if (ret < 0)
> > + return ret;
> > + pdata->scl_pin = ret;
> > + }
> >
> > - ret = of_get_gpio(np, 1);
> > - if (ret < 0)
> > - return ret;
> > - pdata->scl_pin = ret;
> > + if (!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
>
>
> Same here.
>
> + if (!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
>
>
>
> > + return -ENODEV;
> >
> > of_property_read_u32(np, "i2c-gpio,delay-us", &pdata->udelay);
> >
>
> --
> Best regards,
> Antony Pavlov
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support
2019-06-18 12:39 ` Marco Felsch
@ 2019-06-18 13:15 ` Sascha Hauer
0 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2019-06-18 13:15 UTC (permalink / raw)
To: Marco Felsch; +Cc: barebox
On Tue, Jun 18, 2019 at 02:39:52PM +0200, Marco Felsch wrote:
> Hi Antony,
>
> On 19-06-18 13:50, Antony Pavlov wrote:
> > On Mon, 17 Jun 2019 12:00:56 +0200
> > Marco Felsch <m.felsch@pengutronix.de> wrote:
> >
> > > The gpios property is marked as deprecated since kernel 4.15 so we
> > > should support the "new" mechanism too. The new mechanism has a higher
> > > priority than the deprecated one.
> > >
> > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > ---
> > > drivers/i2c/busses/i2c-gpio.c | 27 +++++++++++++++++----------
> > > 1 file changed, 17 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> > > index 708193344a..9508adab06 100644
> > > --- a/drivers/i2c/busses/i2c-gpio.c
> > > +++ b/drivers/i2c/busses/i2c-gpio.c
> > > @@ -94,18 +94,25 @@ static int of_i2c_gpio_probe(struct device_node *np,
> > > if (!IS_ENABLED(CONFIG_OFDEVICE))
> > > return -ENODEV;
> > >
> > > - if (of_gpio_count(np) < 2)
> > > - return -ENODEV;
> > > + pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
> > > + pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
> > > +
> > > + if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
> >
> > Double check of sda_pin here.
> >
> > Can we change this line to
> >
> > + if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
>
> Thanks for covering that damn copy'n'paste failure.
> @Sascha
> Is it okay to prepare a follow up patch which you can squash?
Sure.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-18 13:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
2019-06-17 10:00 ` [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries Marco Felsch
2019-06-17 10:00 ` [PATCH 2/4] defaultenv-2: net: fix comment Marco Felsch
2019-06-17 10:00 ` [PATCH 3/4] commands: mmc_extcsd: fix extcsd value meanings Marco Felsch
2019-06-17 10:00 ` [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support Marco Felsch
2019-06-18 10:50 ` Antony Pavlov
2019-06-18 12:39 ` Marco Felsch
2019-06-18 13:15 ` Sascha Hauer
2019-06-18 8:11 ` [PATCH 0/4] Overall small fixes Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox