Skip to contentSkip to conversation

imx8: several fixes

PATCH New Peng Fan 4 participants 15 messages Dec 15, 2018 – Jan 9, 2019

Subsystems (6)
lore
Share & tools
lore

Peng Fan

author reviewer
#0 lore raw

cover imx8: several fixes

Several fixes when moving to support SPL.

Peng Fan (5):
clk: imx8: fix build warning
misc: imx: scu: avoid write null pointer
misc: imx8: scu: use platdata instead of priv data
imx8: cpu: correct info
tools: imx8image: set dcd_skip to true

 arch/arm/mach-imx/imx8/cpu.c |  2 +-
 drivers/clk/imx/clk-imx8.c   |  2 ++
 drivers/misc/imx8/scu.c      | 26 +++++++++++++-------------
 drivers/misc/imx8/scu_api.c  |  4 ++--
 tools/imx8image.c            |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)
Signature · 1 line
2.14.1
author reviewer
#1 lore raw

PATCH 1/5 clk: imx8: fix build warning

When build clk driver in spl, met the warning:
"
drivers/clk/imx/clk-imx8.c:21:25: warning: ‘imx8_clk_names’ defined but not used [-Wunused-variable]

 static struct imx8_clks imx8_clk_names[] = {
                         ^~~~~~~~~~~~~~

"

Fix with wrapping the array with CONFIG_CMD_CLK.

---
 drivers/clk/imx/clk-imx8.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/imx/clk-imx8.c +2 -0
index fcb8090d35..d03fcc2fdd 100644
@@ -18,6 +18,7 @@ struct imx8_clks {
 	const char *name;
 };
 
+#if CONFIG_IS_ENABLED(CMD_CLK)
 static struct imx8_clks imx8_clk_names[] = {
 	{ IMX8QXP_A35_DIV, "A35_DIV" },
 	{ IMX8QXP_I2C0_CLK, "I2C0" },
@@ -39,6 +40,7 @@ static struct imx8_clks imx8_clk_names[] = {
 	{ IMX8QXP_ENET1_REF_DIV, "ENET1_REF" },
 	{ IMX8QXP_ENET1_PTP_CLK, "ENET1_PTP" },
 };
+#endif
 
 static ulong imx8_clk_get_rate(struct clk *clk)
 {
Signature · 1 line
2.14.1
author reviewer
#2 lore raw

PATCH 2/5 misc: imx: scu: avoid write null pointer

In reply to Peng Fan

When boot_dev is true, fill boot device. However the original logic is when boot_dev is false, fill boot device, this will trigger data abort.

Also fix sc_misc_get_control when using pointer val.

---
 drivers/misc/imx8/scu_api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/imx8/scu_api.c +2 -2
index 65080d7544..d9c4d5d784 100644
@@ -169,7 +169,7 @@ int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl,
 		printf("%s: ctrl:%d resource:%d: res:%d\n",
 		       __func__, ctrl, resource, RPC_R8(&msg));
 
-	if (!val)
+	if (val)
 		*val = RPC_U32(&msg, 0U);
 
 	return ret;
@@ -194,7 +194,7 @@ void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev)
 	if (ret)
 		printf("%s: res:%d\n", __func__, RPC_R8(&msg));
 
-	if (!boot_dev)
+	if (boot_dev)
 		*boot_dev = RPC_U16(&msg, 0U);
 }
 
Signature · 1 line
2.14.1
author reviewer
#3 lore raw

PATCH 3/5 misc: imx8: scu: use platdata instead of priv data

In reply to Peng Fan

priv data has not been allocated when doing bind, so it is wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

---
 drivers/misc/imx8/scu.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/misc/imx8/scu.c +13 -13
index b824ac79e6..15101b3e5f 100644
@@ -158,7 +158,7 @@ static int sc_ipc_write(struct mu_type *base, void *data)
 static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg,
 			 int tx_size, void *rx_msg, int rx_size)
 {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	sc_err_t result;
 	int ret;
 
@@ -166,11 +166,11 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg,
 	if (rx_msg && tx_msg != rx_msg)
 		printf("tx_msg %p, rx_msg %p\n", tx_msg, rx_msg);
 
-	ret = sc_ipc_write(priv->base, tx_msg);
+	ret = sc_ipc_write(plat->base, tx_msg);
 	if (ret)
 		return ret;
 	if (!no_resp) {
-		ret = sc_ipc_read(priv->base, rx_msg);
+		ret = sc_ipc_read(plat->base, rx_msg);
 		if (ret)
 			return ret;
 	}
@@ -182,24 +182,24 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg,
 
 static int imx8_scu_probe(struct udevice *dev)
 {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	fdt_addr_t addr;
 
-	debug("%s(dev=%p) (priv=%p)\n", __func__, dev, priv);
+	debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
 
 	addr = devfdt_get_addr(dev);
 	if (addr == FDT_ADDR_T_NONE)
 		return -EINVAL;
 
-	priv->base = (struct mu_type *)addr;
+	plat->base = (struct mu_type *)addr;
 
 	/* U-Boot not enable interrupts, so need to enable RX interrupts */
-	mu_hal_init(priv->base);
+	mu_hal_init(plat->base);
 
 	gd->arch.scu_dev = dev;
 
-	device_probe(priv->clk);
-	device_probe(priv->pinclk);
+	device_probe(plat->clk);
+	device_probe(plat->pinclk);
 
 	return 0;
 }
@@ -211,7 +211,7 @@ static int imx8_scu_remove(struct udevice *dev)
 
 static int imx8_scu_bind(struct udevice *dev)
 {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	int ret;
 	struct udevice *child;
 	int node;
@@ -227,7 +227,7 @@ static int imx8_scu_bind(struct udevice *dev)
 	if (ret)
 		return ret;
 
-	priv->clk = child;
+	plat->clk = child;
 
 	node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
 					     "fsl,imx8qxp-iomuxc");
@@ -238,7 +238,7 @@ static int imx8_scu_bind(struct udevice *dev)
 	if (ret)
 		return ret;
 
-	priv->pinclk = child;
+	plat->pinclk = child;
 
 	return 0;
 }
@@ -261,6 +261,6 @@ U_BOOT_DRIVER(imx8_scu) = {
 	.bind		= imx8_scu_bind,
 	.remove		= imx8_scu_remove,
 	.ops		= &imx8_scu_ops,
-	.priv_auto_alloc_size = sizeof(struct imx8_scu),
+	.platdata_auto_alloc_size = sizeof(struct imx8_scu),
 	.flags		= DM_FLAG_PRE_RELOC,
 };
Signature · 1 line
2.14.1
author reviewer
#4 lore raw

PATCH 3/5 misc: imx8: scu: use platdata instead of priv data

+Simon

Quoted 113 lines

-----Original Message-----
From: Peng Fan
Sent: 2018年12月15日 20:20
To: sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>
Subject: [PATCH 3/5] misc: imx8: scu: use platdata instead of priv data

priv data has not been allocated when doing bind, so it is wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

---
 drivers/misc/imx8/scu.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/misc/imx8/scu.c index renamed from drivers/misc/imx8/scu.c +0 -0

b824ac79e6..15101b3e5f 100644

drivers/misc/imx8/scu.c +3 -3
@@ -158,7 +158,7 @@ static int sc_ipc_write(struct mu_type *base, void
 *data)  static int imx8_scu_call(struct udevice *dev, int no_resp, void
 *tx_msg,
 			 int tx_size, void *rx_msg, int rx_size)  {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	sc_err_t result;
 	int ret;
 
@@ -166,11 +166,11 @@ static int imx8_scu_call(struct udevice *dev, int
 no_resp, void *tx_msg,
 	if (rx_msg && tx_msg != rx_msg)
 		printf("tx_msg %p, rx_msg %p\n", tx_msg, rx_msg);
 
-	ret = sc_ipc_write(priv->base, tx_msg);
+	ret = sc_ipc_write(plat->base, tx_msg);
 	if (ret)
 		return ret;
 	if (!no_resp) {
-		ret = sc_ipc_read(priv->base, rx_msg);
+		ret = sc_ipc_read(plat->base, rx_msg);
 		if (ret)
 			return ret;
drivers/misc/imx8/scu.c +10 -11
 	}
@@ -182,24 +182,24 @@ static int imx8_scu_call(struct udevice *dev, int
 no_resp, void *tx_msg,
 
 static int imx8_scu_probe(struct udevice *dev)  {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	fdt_addr_t addr;
 
-	debug("%s(dev=%p) (priv=%p)\n", __func__, dev, priv);
+	debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
 
 	addr = devfdt_get_addr(dev);
 	if (addr == FDT_ADDR_T_NONE)
 		return -EINVAL;
 
-	priv->base = (struct mu_type *)addr;
+	plat->base = (struct mu_type *)addr;
 
 	/* U-Boot not enable interrupts, so need to enable RX interrupts */
-	mu_hal_init(priv->base);
+	mu_hal_init(plat->base);
 
 	gd->arch.scu_dev = dev;
 
-	device_probe(priv->clk);
-	device_probe(priv->pinclk);
+	device_probe(plat->clk);
+	device_probe(plat->pinclk);
 
 	return 0;
 }
@@ -211,7 +211,7 @@ static int imx8_scu_remove(struct udevice *dev)
 
 static int imx8_scu_bind(struct udevice *dev)  {
-	struct imx8_scu *priv = dev_get_priv(dev);
+	struct imx8_scu *plat = dev_get_platdata(dev);
 	int ret;
 	struct udevice *child;
 	int node;
@@ -227,7 +227,7 @@ static int imx8_scu_bind(struct udevice *dev)
 	if (ret)
 		return ret;
 
-	priv->clk = child;
+	plat->clk = child;
 
 	node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
 					     "fsl,imx8qxp-iomuxc");
@@ -238,7 +238,7 @@ static int imx8_scu_bind(struct udevice *dev)
 	if (ret)
 		return ret;
 
-	priv->pinclk = child;
+	plat->pinclk = child;
 
 	return 0;
 }
@@ -261,6 +261,6 @@ U_BOOT_DRIVER(imx8_scu) = {
 	.bind		= imx8_scu_bind,
 	.remove		= imx8_scu_remove,
 	.ops		= &imx8_scu_ops,
-	.priv_auto_alloc_size = sizeof(struct imx8_scu),
+	.platdata_auto_alloc_size = sizeof(struct imx8_scu),
 	.flags		= DM_FLAG_PRE_RELOC,
 };
--

2.14.1

#5 lore raw

PATCH 3/5 misc: imx8: scu: use platdata instead of priv data

Quoted 20 lines · Peng Fan

+Simon

Quoted 17 lines

-----Original Message-----
From: Peng Fan
Sent: 2018年12月15日 20:20
To: sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>
Subject: [PATCH 3/5] misc: imx8: scu: use platdata instead of priv data

priv data has not been allocated when doing bind, so it is wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

---
 drivers/misc/imx8/scu.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
author reviewer
#6 lore raw

PATCH 4/5 imx8: cpu: correct info

In reply to Peng Fan

The CPU banner printed is as following:
CPU: CPU: Freescale i.MX8QXP RevB A35 at 147228 MHz

1. Drop the CPU:
2. Change vendor from Freescale to NXP

---
 arch/arm/mach-imx/imx8/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/imx8/cpu.c +1 -1
index f093f34ca5..7599afe720 100644
@@ -573,7 +573,7 @@ int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
 	if (size < 100)
 		return -ENOSPC;
 
-	snprintf(buf, size, "CPU:   Freescale i.MX8%s Rev%s %s at %u MHz\n",
+	snprintf(buf, size, "NXP i.MX8%s Rev%s %s@%u MHz\n",
 		 plat->type, plat->rev, plat->name, plat->freq_mhz);
 
 	return 0;
Signature · 1 line
2.14.1
author reviewer
#7 lore raw

PATCH 5/5 tools: imx8image: set dcd_skip to true

In reply to Peng Fan

To B0[+] chips, dcd_skip needs to be true. For A0 chip, it needs to be false, however A0 chip is no longer being supported anymore. Considering we are moving code from imx-mkimage to uboot mkimage, to make sure we not introduce some surprise, we still keep dcd_skip code there.

---
 tools/imx8image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/imx8image.c +1 -1
index 6e8ac464e7..0d856b9d94 100644
@@ -968,7 +968,7 @@ int imx8image_copy_image(int outfd, struct image_tool_params *mparams)
 	fprintf(stdout, "CONTAINER SW VERSION:\t0x%04x\n", sw_version);
 
 	build_container(soc, sector_size, emmc_fastboot,
-			img_sp, false, fuse_version, sw_version, outfd);
+			img_sp, true, fuse_version, sw_version, outfd);
 
 	return 0;
 }
Signature · 1 line
2.14.1
author reviewer
#8 lore raw

cover imx8: several fixes

In reply to Peng Fan

Ping.

Thanks,
Peng.

Quoted 26 lines

-----Original Message-----
From: Peng Fan [mailto:peng.fan at nxp.com]
Sent: 2018年12月15日 20:20
To: sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>
Subject: [PATCH 0/5] imx8: several fixes

Several fixes when moving to support SPL.

Peng Fan (5):
clk: imx8: fix build warning
misc: imx: scu: avoid write null pointer
misc: imx8: scu: use platdata instead of priv data
imx8: cpu: correct info
tools: imx8image: set dcd_skip to true

 arch/arm/mach-imx/imx8/cpu.c |  2 +-
 drivers/clk/imx/clk-imx8.c   |  2 ++
 drivers/misc/imx8/scu.c      | 26 +++++++++++++-------------
 drivers/misc/imx8/scu_api.c  |  4 ++--
 tools/imx8image.c            |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)

--
2.14.1

#9 lore raw

cover imx8: several fixes

Hi Peng,

Quoted 5 lines · Peng Fan

Ping.

Thanks,
Peng.

Sorry, I was on holidays and afterwards I have to resume some work in office ;-)

I am now looking for which patches should be merged in release and I will pick them up.

Regards,
Stefano

Quoted 27 lines
Quoted 26 lines

-----Original Message-----
From: Peng Fan [mailto:peng.fan at nxp.com]
Sent: 2018年12月15日 20:20
To: sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>
Subject: [PATCH 0/5] imx8: several fixes

Several fixes when moving to support SPL.

Peng Fan (5):
clk: imx8: fix build warning
misc: imx: scu: avoid write null pointer
misc: imx8: scu: use platdata instead of priv data
imx8: cpu: correct info
tools: imx8image: set dcd_skip to true

 arch/arm/mach-imx/imx8/cpu.c |  2 +-
 drivers/clk/imx/clk-imx8.c   |  2 ++
 drivers/misc/imx8/scu.c      | 26 +++++++++++++-------------
 drivers/misc/imx8/scu_api.c  |  4 ++--
 tools/imx8image.c            |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)

--
2.14.1

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author reviewer
#10 lore raw

cover imx8: several fixes

Hi Stefano,

Quoted 17 lines

-----Original Message-----
From: Stefano Babic [mailto:sbabic at denx.de]
Sent: 2019年1月9日 21:56
To: Peng Fan <[email protected]>; sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>
Subject: Re: [PATCH 0/5] imx8: several fixes

Hi Peng,

Quoted 5 lines · Peng Fan

Ping.

Thanks,
Peng.

Quoted 5 lines

Sorry, I was on holidays and afterwards I have to resume some work in office ;-)

I am now looking for which patches should be merged in release and I will pick them up.

Thanks very much.

Thanks,
Peng.

Quoted 41 lines

Regards,
Stefano

Quoted 24 lines
Quoted 24 lines

-----Original Message-----
From: Peng Fan [mailto:peng.fan at nxp.com]
Sent: 2018年12月15日 20:20
To: sbabic at denx.de
Cc: Fabio Estevam <[email protected]>; u-boot at lists.denx.de; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>
Subject: [PATCH 0/5] imx8: several fixes

Several fixes when moving to support SPL.

Peng Fan (5):
clk: imx8: fix build warning
misc: imx: scu: avoid write null pointer
misc: imx8: scu: use platdata instead of priv data
imx8: cpu: correct info
tools: imx8image: set dcd_skip to true

 arch/arm/mach-imx/imx8/cpu.c |  2 +-
 drivers/clk/imx/clk-imx8.c   |  2 ++
 drivers/misc/imx8/scu.c      | 26 +++++++++++++-------------
 drivers/misc/imx8/scu_api.c  |  4 ++--
 tools/imx8image.c            |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)
Quoted 3 lines
Quoted 2 lines

--
2.14.1

--
==============================================================
=======
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
==============================================================
=======

#11 lore raw

cover imx8: several fixes

In reply to Stefano Babic

[CC'd the list this time..]

Quoted 5 lines · Stefano Babic

Sorry, I was on holidays and afterwards I have to resume some work in office ;-)

I am now looking for which patches should be merged in release and I will pick them up.

Hi Stefano,

If I may make my own (selfish) suggestion, these are the patches I am applying against my local tree to get things working with my i.MX8MQ-EVK:

https://patchwork.ozlabs.org/patch/1019908/
https://patchwork.ozlabs.org/patch/1016762/
https://patchwork.ozlabs.org/patch/1018985/

Would be nice if these could be squeezed into v2019.01. :)

Thanks,
Chris

#12 lore raw

cover imx8: several fixes

Quoted 9 lines · Chris Spencer

[CC'd the list this time..]

Quoted 5 lines · Stefano Babic

Sorry, I was on holidays and afterwards I have to resume some work in office ;-)

I am now looking for which patches should be merged in release and I will pick them up.

Quoted 7 lines

Hi Stefano,

If I may make my own (selfish) suggestion, these are the patches I am applying against my local tree to get things working with my i.MX8MQ-EVK:

https://patchwork.ozlabs.org/patch/1019908/

I have seen this patch to solve "bashism", I confess I had to think about what is it. "=" instead of "==" is quite unnatural for me, but yes, first thing I do on a new installed system is to run alternative and set bash as shell.

Anyway, if this is required, it must be solved globally on the project. What about for example scripts/setlocalversion ?

if [ "hg log -r . --template '{latesttagdistance}'" == "1" ]; then

I guess there are some other examples in the project. Personally, I tend to reject this one, until one goal is to support the major number of shells or there will be a list of supported shell (as far as I know, we have not even a list of supported distros).

Quoted 1 line

https://patchwork.ozlabs.org/patch/1016762/

I do not disgregate this, it just under observation - I cannot reproduce even with more threads.

Quoted 1 line

https://patchwork.ozlabs.org/patch/1018985/

This is superseeded, I take V2:

https://patchwork.ozlabs.org/patch/1019326/

Quoted 3 lines

Would be nice if these could be squeezed into v2019.01. :)

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#13 lore raw

cover imx8: several fixes

Stefano,

Quoted 10 lines · Stefano Babic
Quoted 1 line

https://patchwork.ozlabs.org/patch/1019908/

I have seen this patch to solve "bashism", I confess I had to think about what is it. "=" instead of "==" is quite unnatural for me, but yes, first thing I do on a new installed system is to run alternative and set bash as shell.

Anyway, if this is required, it must be solved globally on the project. What about for example scripts/setlocalversion ?

Quoted 6 lines

if [ "hg log -r . --template '{latesttagdistance}'" == "1" ]; then

I guess there are some other examples in the project. Personally, I tend to reject this one, until one goal is to support the major number of shells or there will be a list of supported shell (as far as I know, we have not even a list of supported distros).

Personally I would tend to take the more standard syntax, but I get your point. There is another patch from Peng which just makes it run in bash instead of changing the syntax:

https://patchwork.ozlabs.org/patch/1011510/

Quoted 4 lines
Quoted 1 line

https://patchwork.ozlabs.org/patch/1016762/

I do not disgregate this, it just under observation - I cannot reproduce even with more threads.

Interesting. For what it's worth, Peng did give a 'Reviewed-by' which wasn't picked up by Patchwork because my message was still in the moderation queue at that point. Not sure whether he actually managed to reproduce it though.

https://lists.denx.de/pipermail/u-boot/2018-December/352637.html
https://lists.denx.de/pipermail/u-boot/2018-December/352638.html

Thanks,
Chris

#14 lore raw

cover imx8: several fixes

Quoted 28 lines · Chris Spencer

Stefano,

Quoted 10 lines · Stefano Babic
Quoted 1 line

https://patchwork.ozlabs.org/patch/1019908/

I have seen this patch to solve "bashism", I confess I had to think about what is it. "=" instead of "==" is quite unnatural for me, but yes, first thing I do on a new installed system is to run alternative and set bash as shell.

Anyway, if this is required, it must be solved globally on the project. What about for example scripts/setlocalversion ?

Quoted 6 lines

if [ "hg log -r . --template '{latesttagdistance}'" == "1" ]; then

I guess there are some other examples in the project. Personally, I tend to reject this one, until one goal is to support the major number of shells or there will be a list of supported shell (as far as I know, we have not even a list of supported distros).

Personally I would tend to take the more standard syntax, but I get your point. There is another patch from Peng which just makes it run in bash instead of changing the syntax:

https://patchwork.ozlabs.org/patch/1011510/

Quoted 2 lines
Quoted 1 line

https://patchwork.ozlabs.org/patch/1016762/

Quoted 7 lines
Quoted 2 lines

I do not disgregate this, it just under observation - I cannot reproduce even with more threads.

Interesting. For what it's worth, Peng did give a 'Reviewed-by' which wasn't picked up by Patchwork because my message was still in the moderation queue at that point. Not sure whether he actually managed to reproduce it though.

At least, I do not see why this patch should create a new problem. Ok, I pick it up (as this is a fix), and I add myself Peng's 'Reviewed-by'.

Quoted 4 lines

https://lists.denx.de/pipermail/u-boot/2018-December/352637.html
https://lists.denx.de/pipermail/u-boot/2018-December/352638.html

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================