[U-Boot] Pull request: u-boot-net.git master

Anatolij Gustschin
2018-10-26T13:04:09Z

On Fri, 26 Oct 2018 07:52:50 -0400
Tom Rini trini at konsulko.com wrote:
...
> This passed travis at the time, but now it fails on vf610twr for me:
> https://travis-ci.org/trini/u-boot/jobs/446449322 so I've cc'd Alison if
> there's anything we can easily turn off in the defconfig. But I'm also
> cc'ing York since I thought I saw Alison say they didn't have the board
> anymore? Should we mark it orphan? Drop it from CI for now and fully
> soon? Or does someone else want to take it?

I've seen this too when build-testing i.MX8 patches, it is the impact
of recent drivers growth after extensions for i.MX8. Below is a raw patch
I tried to reduce the size for VF610 (not finished yet). Would something
like that be acceptable?

CMD_MEMTEST could be dropped from defconfig, the board would be bootable
without it.

Thanks,

Anatolij

diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 9999d9fe5e..1dae2dfa14 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -943,8 +943,11 @@ static const struct dm_i2c_ops mxc_i2c_ops = {
};

static const struct udevice_id mxc_i2c_ids[] = {
- { .compatible = "fsl,imx21-i2c", },
+#if defined(CONFIG_ARCH_VF610)
{ .compatible = "fsl,vf610-i2c", .data = I2C_QUIRK_FLAG, },
+#else
+ { .compatible = "fsl,imx21-i2c", },
+#endif
{}
};

diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 6106c1f9ec..c4be872d28 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -227,6 +227,7 @@ static int _lpuart_serial_init(struct udevice *dev)
return 0;
}

+#if defined(CONFIG_ARCH_MX7) || defined(CONFIG_ARCH_IMX8)
static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
int baudrate)
{
@@ -295,6 +296,10 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,

out_le32(&base->baud, tmp);
}
+#else
+static inline void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
+ int baudrate) { }
+#endif

static void _lpuart32_serial_setbrg(struct udevice *dev,
int baudrate)
@@ -502,14 +507,19 @@ static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
plat->reg = (void *)addr;
plat->flags = dev_get_driver_data(dev);

- if (!fdt_node_check_compatible(blob, node, "fsl,ls1021a-lpuart"))
- plat->devtype = DEV_LS1021A;
- else if (!fdt_node_check_compatible(blob, node, "fsl,imx7ulp-lpuart"))
+#if defined(CONFIG_ARCH_MX7)
+ if (!fdt_node_check_compatible(blob, node, "fsl,imx7ulp-lpuart"))
plat->devtype = DEV_MX7ULP;
- else if (!fdt_node_check_compatible(blob, node, "fsl,vf610-lpuart"))
+#elif defined(CONFIG_ARCH_VF610)
+ if (!fdt_node_check_compatible(blob, node, "fsl,vf610-lpuart"))
plat->devtype = DEV_VF610;
- else if (!fdt_node_check_compatible(blob, node, "fsl,imx8qm-lpuart"))
+#elif defined(CONFIG_ARCH_IMX8)
+ if (!fdt_node_check_compatible(blob, node, "fsl,imx8qm-lpuart"))
plat->devtype = DEV_IMX8;
+#else
+ if (!fdt_node_check_compatible(blob, node, "fsl,ls1021a-lpuart"))
+ plat->devtype = DEV_LS1021A;
+#endif

return 0;
}
@@ -522,13 +532,18 @@ static const struct dm_serial_ops lpuart_serial_ops = {
};

static const struct udevice_id lpuart_serial_ids[] = {
- { .compatible = "fsl,ls1021a-lpuart", .data =
- LPUART_FLAG_REGMAP_32BIT_REG | LPUART_FLAG_REGMAP_ENDIAN_BIG },
+#if defined(CONFIG_ARCH_MX7)
{ .compatible = "fsl,imx7ulp-lpuart",
.data = LPUART_FLAG_REGMAP_32BIT_REG },
+#elif defined(CONFIG_ARCH_VF610)
{ .compatible = "fsl,vf610-lpuart"},
+#elif defined(CONFIG_ARCH_IMX8)
{ .compatible = "fsl,imx8qm-lpuart",
.data = LPUART_FLAG_REGMAP_32BIT_REG },
+#else
+ { .compatible = "fsl,ls1021a-lpuart", .data =
+ LPUART_FLAG_REGMAP_32BIT_REG | LPUART_FLAG_REGMAP_ENDIAN_BIG },
+#endif
{ }
};