any further code change:
> > static char revision[4] __section(".data");
>
> This was not welcomed,
> https://lore.kernel.org/all/20241017034507.GJ4959@bill-the-cat/
>
Thanks, good to know.
Lothar Waßmann
--
_
) >> 4);
> + plat->rev[1] = '.';
> + plat->rev[2] = '0' + (rev & 0xf);
> + plat->rev[3] = '\0';
> }
> }
>
> @@ -318,7 +323,7 @@ static int imx_cpu_probe(struct udevice *dev)
> set_c
/drivers/misc/k3_avs.c
> index 932b355a5c1..e93aa267d51 100644
> --- a/drivers/misc/k3_avs.c
> +++ b/drivers/misc/k3_avs.c
> @@ -121,6 +121,8 @@ static int k3_avs_program_voltage(struct k3_avs_privdata
> *priv,
> if (!vd->supply)
> return -ENODEV;
>
> + printf("Program voltage: opp_id:%d | opp_volt:%d\n", opp_id, volt);
> +
buggy indentation.
Lothar Waßmann
ially useful for Opendrain outputs or in case the output
driver is disabled via the pad_ctl register.
Lothar Waßmann
printf("RCA: 0x%08x\n", mmc->rca);
> + if (argv[4])
> + env_set_hex(argv[4], mmc->rca);
> + return CMD_RET_SUCCESS;
> + }
> + if (!strcmp(argv[2], "extcsd") &&
> + mmc->version >= MMC_VERSION_4_41) {
> + ret = mmc_send_ext_csd(mmc, ext_csd);
> + if (ret)
> + return ret;
return CMD_RET_FAILURE;
Lothar Waßmann
e);
> }
>
> +static int i2c_eeprom_len(unsigned int offset, unsigned int len, unsigned
> int pagesize)
> +{
> + int page_offset = ((offset) & (pagesize - 1));
int page_offset = offset & (pagesize - 1);
2 many ()
Lothar Waßmann
--
___
printf("\nError: %s address not set.\n",
> + printf("\nError: %s a valid MAC address was not found.\n",
>
printf("\nError: %s No valid MAC address found.\n",
Lothar Waßmann
g rand_ms;
> #endif
> - u32 bootp_id;
> struct in_addr zero_ip;
> struct in_addr bcast_ip;
> char *ep; /* Environment pointer */
> @@ -745,6 +765,12 @@ void bootp_request(void)
> else
> time_taken_max = TIMEOUT_MS;
>
> + ep = env_get("bootpretransmitperiodmax");
> + if (ep)
> + retransmit_period_max_ms = dectoul(ep, NULL);
> + else
> + retransmit_period_max_ms = RETRANSMIT_PERIOD_MAX_MS;
> +
see above
Lothar Waßmann
2 deletions(-)
>
[...]
> diff --git a/include/splash.h b/include/splash.h
> index 33e45e6941..083c978582 100644
> --- a/include/splash.h
> +++ b/include/splash.h
> @@ -78,4 +78,4 @@ static inline int splash_display(void)
>
> #define BMP_ALIGN_CENTER 0x7FFF
>
*newaddr;
> int len;
> int err;
> @@ -263,9 +255,20 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int
> argc, char *const argv[])
> return 1;
> }
It's not part of your changes, but this should rather be:
return CMD_RET_FAILURE;
Lothar Waßmann
printf(" errno: %d\n", ret);
> + continue;
> + }
> + if (!fdt_valid(&dtbo)) {
> + /* fdt_valid() clears the pointer upon failure */
> + dtbo = map_sysmem(addr, 0);
> + continue;
> + }
> +
> + if (fdt_overlay_apply_verbose(working_fdt, dtbo) == 0)
> + printf("applied\n");
> + }
> + unmap_sysmem(dtbo);
> +
> + fs_closedir(dirs);
> +
> + return 0;
return CMD_RET_SUCCESS;
Lothar Waßmann
> +#else
> fill@0x6c {
> offset = <0x6c>;
> size = <0x01>;
> fill-byte = [ff];
> +#endif
> };
>
I would rather include the closing brace in the #if #else block...
Otherwise pe
> +}
> +
> static struct serial_device mxc_serial_drv = {
> .name = "mxc_serial",
> .start = mxc_serial_init,
> - .stop = NULL,
> + .stop = mxc_serial_stop,
> .setbrg = mxc_serial_setbrg,
> .putc = mxc_serial_putc,
>
a0483c5 ("serial: mxc: have putc use the TXFIFO"),
|serial console corruption can be seen when priting inside board_init().
|
|Revert it to avoid the regression.
|
|Reported-by: Tim Harvey
|Signed-off-by: Fabio Estevam
|Acked-by: Tim Harvey
Lothar Waßmann
ain.
> 80200040: 616d4975 345f6567 2e39312e 63722d30uImage_4.19.0-rc
> 80200050: 64682d31 0076696d fcffbdf71-hdmiv.
>
> seems to set 58 (was ff before)
>
> any idea why higher address counts backwards?
>
little endian integer representation!
Try 'md.b
h-spl.bin of=/dev/disk2 bs=1024 seek=8
>
I have no idea how your SD card is partitioned but I guess that with
this command you are overwriting your FAT formatted partition.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
tdata *pdata;
> + struct imx8_power_domain_priv *ppriv;
> + sc_err_t ret;
> +
> + struct power_domain parent_domain;
> + struct udevice *parent = dev_get_parent(dev);
> +
> + /* Need to power on parent node first */
>
fsl,pins = <
> + SC_P_USDHC1_CLK_CONN_USDHC1_CLK
> 0x0641
> + SC_P_USDHC1_CMD_CONN_USDHC1_CMD
> 0x0021
> + SC_P_USDHC1_DATA0_CONN_USDHC1_DATA0
> 0x0021
>
; The function used before was always return 0 without any evaluation of the
> > error. We try to make it work properly
> >
> > Signed-off-by: Michael Trimarchi
>
> Any more comment?
>
Apart from the typos in your first sentence of your co
Michael Nazzareno Trimarchi wrote:
> Hi
>
> On Wed, Jul 4, 2018 at 4:19 PM, Lothar Waßmann
> wrote:
> > Hi,
> >
> > On Wed, 4 Jul 2018 15:53:36 +0200 Michael Trimarchi wrote:
> >> We need to address the redundat image case and undestand if the
> &g
ge_check_hcrc(...) {
> + debug("Header checksum failed\n");
> + return -EINVAL;
> + }
> + err = image_check_dcrc((const image_header_t *)spl_image->load_addr);
> + if (!err) {
>
dto.
> + debug("Image checksum failed\n&qu
@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
> > printf("## Info: input data size = %zu = 0x%zX\n", size,
> size);
> > }
>
> > + if (argc > 2)
> > + wl = 1;
> > +
> > if (chk) {
> > uint32_t crc;
> > env_t *ep = (env_t *)ptr;
> > @@ -1112,9 +1121,10 @@ static int do_env_import(cmd_tbl_t *cmdtp, int
> flag,
> > ptr = (char *)ep->data;
> > }
>
> > - if (himport_r(&env_htab, ptr, size, sep, del ? 0 : H_NOCLEAR,
> > - crlf_is_lf, 0, NULL) == 0) {
> > + if (!himport_r(&env_htab, ptr, size, sep, del ? 0 : H_NOCLEAR,
>
> The addition of a '!' seems like an odd change, but looking at what
> himport_r() returns, I think you're correct and it's been broken forever.
>
No. It was if (h_import_r() == 0) before!
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
t; + if (!array) {
> + free(tmp);
> + return CMD_RET_FAILURE;
> + }
> +
>
wl_count should probably be zeroed here...
But I would keep the predetermined vlaue of wl_count and check against
it in the following loop to be sure not to overflow the allocated
array, even in the improbable case, that strtok() should happen to
return more tokens, than you tested before with the strchr() loop.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Mon, 2 Apr 2018 02:43:12 -0600 Simon Glass wrote:
> From: Lothar Waßmann
>
> When the U-Boot base directory happens to have the same name as the branch
> that buildman is directed to use via the '-b' option and no output
> directory is specified with
: arch/arm/dts/imx6dl-icore-u-boot.dtsi
> F: arch/arm/dts/imx6qdl-icore-rqs.dtsi
> +F: arch/arm/dts/imx6qdl-icore-rqs-u-boot.dtsi
> F: arch/arm/dts/imx6q-icore-rqs.dts
> +F: arch/arm/dts/imx6q-icore-rqs-u-boot.dtis
>
s/dtis/dtsi/
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
++---
> > board/technexion/pico-imx6ul/Kconfig | 2 +-
> > board/toradex/apalis_imx6/Kconfig | 2 +-
> > board/toradex/colibri_imx6/Kconfig | 2 +-
> > drivers/watchdog/Makefile
v->dev_id = dev->seq;
> +
> +#ifdef CONFIG_FEC_MXC_MDIO_BASE
> + bus = fec_get_miibus((ulong)CONFIG_FEC_MXC_MDIO_BASE, dev->seq);
> +#else
> bus = fec_get_miibus((ulong)priv->eth, dev->seq);
> +#endif
> if (!bus) {
> ret = -ENOMEM;
> goto err_mii;
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
t; -#endif
> +struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id)
> {
> -#ifdef CONFIG_DM_ETH
> - struct fec_priv *priv = dev_get_priv(dev);
> - struct ethernet_regs *eth = priv->eth;
> -#else
> struct ethernet_regs *et
_CMD(
> hab_status, CONFIG_SYS_MAXARGS, 1, do_hab_status,
> "display HAB status",
>
What does this function offer, that a
'setexpr hab_ivt_addr ${loadaddr} + 0x400' could not do as well?
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
, %R0, c14" : "=r" (now));
> + asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (now));
>
> gd->arch.tbl = (unsigned long)(now & 0x);
> gd->arch.tbu = (unsigned long)(now >> 32);
>
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
at the fdt is out of reach for the kernel.
Try setting the fdt_high variable to limit the range where U-Boot will
copy the fdt.
fdt_high= will prevent copying the fdt at all, other values
specify the upper limit for the memory address where the fdt will end
after copying.
Lothar Waßmann
whatever,
> ie. the FPGA device.
>
> Signed-off-by: Tien Fong Chee
> Reviewed-by: Lothar Waßmann
> ---
> common/Kconfig | 10 ++
> common/Makefile| 1 +
> common/fs_loader.c | 365
> +++
whatever,
> ie. the FPGA device.
>
> Signed-off-by: Tien Fong Chee
> Reviewed-by: Lothar Waßmann
> ---
> common/Kconfig | 9 ++
> common/Makefile| 1 +
> common/fs_loader.c | 320
> +++
> + break;
> +
> + banks = i;
> +
> len = fdt_pack_reg(blob, tmp, start, size, banks);
>
> err = fdt_setprop(blob, nodeoffset, "reg", tmp, len);
>
Does an empty bank always imply the end of the list, or
Is it a valid scenario to
> > + err = usb_stor_scan(1) < 0 ? -ENODEV : 0;
> > > > if (err)
> > > > return err;
> > > > ?
> > > >
> > > This is last line code of the function, so it's always return the
> > > result regardless error or n
Hi,
On Wed, 3 Jan 2018 08:46:09 + Chee, Tien Fong wrote:
> On Rab, 2017-12-27 at 13:04 +0800, tien.fong.c...@intel.com wrote:
> Hi Lothar Waßmann,
> > From: Tien Fong Chee
> >
> > This patchset contains generic firmware loader which is very close to
> > Linux
Hi,
On Fri, 22 Dec 2017 08:04:32 + Chee, Tien Fong wrote:
> On Jum, 2017-12-22 at 08:44 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Fri, 22 Dec 2017 01:43:38 + Chee, Tien Fong wrote:
> > >
> > > On Kha, 2017-12-21 at 16:08 +0100, Lo
Hi,
On Fri, 22 Dec 2017 01:43:38 + Chee, Tien Fong wrote:
> On Kha, 2017-12-21 at 16:08 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Thu, 21 Dec 2017 12:48:53 + Chee, Tien Fong wrote:
> > >
> > > On Kha, 2017-12-21 at 12:53 +0100, Lo
Hi,
On Thu, 21 Dec 2017 12:48:53 + Chee, Tien Fong wrote:
> On Kha, 2017-12-21 at 12:53 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Thu, 21 Dec 2017 09:36:41 + Chee, Tien Fong wrote:
> > >
> > > On Kha, 2017-12-21 at 09:48 +0100, Lo
Hi,
On Thu, 21 Dec 2017 09:36:41 + Chee, Tien Fong wrote:
> On Kha, 2017-12-21 at 09:48 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Thu, 21 Dec 2017 15:25:29 +0800 tien.fong.c...@intel.com wrote:
> > >
> > > From: Tien Fong Chee
> > >
&g
f total read
> + * -ve when error
> + */
> +static int fw_get_filesystem_firmware(struct device_location *location,
> + struct firmware *firmware_p)
> +{
> + struct firmware_priv *fw_priv = NULL;
> + loff_t act
t case.
> + flush_cache(load_a, ALIGN(*load_end - load_a, ARCH_DMA_MINALIGN));
>
> debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, *load_end);
> bootstage_mark(BOOTSTAGE_ID_KERNEL_LOADED);
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Tue, 19 Dec 2017 10:31:13 + Chee, Tien Fong wrote:
> On Isn, 2017-12-18 at 08:39 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Mon, 18 Dec 2017 13:10:56 +0800 tien.fong.c...@intel.com wrote:
> > >
> > > From: Tien Fong Chee
> > >
&g
oint already.
>
That's not the point. Zero-initialized variables (static or not) are
located in the .bss section, which is overlayed by the .rel.dyn
section. Thus writing to such a variable before relocation will trash
the relocation data.
Lothar Waßmann
__
uot;Error: %d Failed to read %s from flash %lld != %d.\n",
> + ret, fw_priv->name, actread, firmware_p->size);
> + return -EPERM;
Quoting myself from an earlier mail
(20171212091442.2f682...@karo-electronics.de):
|That's definitely not the right return code in this situation.
|If 'ret' is != 0 you should return 'ret', otherwise EIO is more
|appropriate here.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Fri, 15 Dec 2017 13:56:15 +0100 linux-kernel-...@beckhoff.com wrote:
> From: Patrick Bruenn
>
> Global variables are not available during board_init_f().
>
s/Global/static/
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.d
is no use in defining this globally.
> +
> +struct firmware {
> + size_t size;/* Size of a file */
> + const u8 *data; /* Buffer for file */
> + void *priv; /* Firmware loader private fields */
> +};
> +
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
0..36b1b3b 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -45,6 +45,13 @@ config USE_TINY_PRINTF
>
> The supported format specifiers are %c, %s, %u/%d and %x.
>
> +config ENABLE_BUG_CHECKS
> + bool "Enable BUG/BUG_ON() checks and WARN_ON() logs"
> + help
This should be 'default y' IMO to keep the current behaviour for all
existing platforms.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
of buffer
> + * @offset: offset of a file for start reading
> + *
> + * This firmware is loaded directly into the buffer pointed to by @buf and
> + * the @firmware_p data member is pointed at @buf.
> + *
> + * @return: size of total read
> + * -ve when error
> + */
>
return -ENOMEM;
> + }
> +
> + firmware->name = name;
> + firmware->data = dbuf;
> + firmware->size = size;
> + firmware->offset = offset;
> +
> + return ret;
> +}
> +
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Fri, 8 Dec 2017 05:25:58 + Chee, Tien Fong wrote:
> On Kha, 2017-12-07 at 10:00 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Thu, 7 Dec 2017 08:10:06 + Chee, Tien Fong wrote:
> > >
> > > On Kha, 2017-12-07 at 08:49 +0100, Lo
Hi,
On Thu, 7 Dec 2017 08:10:06 + Chee, Tien Fong wrote:
> On Kha, 2017-12-07 at 08:49 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Thu, 7 Dec 2017 05:29:24 + Chee, Tien Fong wrote:
> > >
> > > On Rab, 2017-12-06 at 12:00 +0100, Lo
Hi,
On Thu, 7 Dec 2017 05:29:24 + Chee, Tien Fong wrote:
> On Rab, 2017-12-06 at 12:00 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Wed, 6 Dec 2017 10:06:21 + Chee, Tien Fong wrote:
> > >
> > > On Sel, 2017-12-05 at 09:53 +0100, Lo
Hi,
On Wed, 6 Dec 2017 10:06:21 + Chee, Tien Fong wrote:
> On Sel, 2017-12-05 at 09:53 +0100, Lothar Waßmann wrote:
> > Hi,
> >
> > On Tue, 5 Dec 2017 15:57:57 +0800 tien.fong.c...@intel.com wrote:
> > >
> > > From: Tien Fong Chee
> > >
&g
irmware_p,
> + const char *name,
> + struct device_location *location,
> + void *buf, size_t size, u32 offset)
> +{
> + int ret = 0;
>
Useless initialization.
> + ret = _requ
t; 0 && errno == EINTR)
> + continue;
> +
> + fprintf(stderr, "Cannot write %u bytes to ubi volume\n",
> + (unsigned int)count);
>
'%zu' is an appropriate format string for size_t values. No need for
longer have further "reg" entries and CONFIG_NR_DRAM_BANKS still
> allows for more DRAM banks, the code moves on to the next memory node
> and checks it's "reg"s. This makes it possible to handle both systems
>
s/it's/its/
Lothar Waßmann
__
- for example
> + * from pre-relocation enabled UART
> + */
> + while (!(readl(&base->sr2) & USR2_TXDC))
> + ;
> +
>
Loops that poll for HW activated bits should always have a timeout.
Hardware will definitely break some day and deliver unexpected results.
Software should
milar?
>
> Possibly, but I'm not sure it is a good idea.. I don't think escape
> sequences are meant to be encoded with hex or octal number strings.
> From a quick look, I don't see any escape code terminated with 'x', so
> maybe it would end up working ok.. but something like ESC[0x1234m
> should be an escape sequence terminated with x followed by normal
> chars 1234m and strtoul would get that wrong..
>
stroul(s, NULL, 10) will only parse decimal numbers and stop at
non-decimal digits.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
static int ipu_pixel_clk_set_rate(struct clk *clk,
> >>> unsigned long rate)
> >>>*/
> >>> __raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id));
> >>
> >> Did we lose a multiply by 16 in this change?
> >
> > We already have "parent_rate = (unsigned long long)clk->parent->rate * 16;"
> > in this function.
> >
>
> Hmmm. So this patch also fixed a bug, since we previously had
> **two** multiply-by-16's:
>
No! The 'second' multiply by 16 used the clk->parent->rate, not the
'parent_rate' which was multiplied by 16...
| parent_rate = (unsigned long long)clk->parent->rate * 16;
[...]
| clk->rate = (u64)(clk->parent->rate * 16) / div;
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
SB_EMUL) &&
(device_get_uclass_id(child) != UCLASS_BLK)) {
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
hink we observe two independent errors here:
> >>
> >> - The hard disk Device 0 is not read.
> >> - The ide command stops at the first device that is not available.
> >>
> >> I guess only the first is caused by your patch.
> >
> > Both logs look fine to me. The "Can't read Driver Desriptor Block"
> > comes from part_mac.c. Did you verify the actual IDE read/write fails
> > with current HEAD?
>
> We should definitely change that message to debug(). It is very
... and fix the missing 'c' in 'Desriptor'
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
cnt);
> + printf("\n%s write: device %d block # "LBAFD", count
> %ld ... ",
> +if_name, *cur_devnump, blk, cnt);
>
> n = blk_write_devnum(if_type, *cur_devnump, blk, cnt,
>
ch();
> + g_dnl_register("usb_dnl_sdp");
> +
> + ret = sdp_init();
> + if (ret) {
> + error("SDP init failed: %d", ret);
> + return -ENODEV;
> + }
> +
> + ret = sdp_handle();
>
This function (and sdp_init(
else
> + sdp->state = SDP_STATE_IDLE;
> + break;
> + default:
> + error("Wrong State: %d", sdp->state);
> + sdp->state = SDP_STATE_IDLE;
> + break;
> + }
> + debug("%s complete --> %d, %
else
> +
> +static int mxc_spi_probe(struct udevice *bus)
> +{
> + struct mxc_spi_slave *plat = bus->platdata;
> + struct mxc_spi_slave *mxcs = dev_get_platdata(bus);
> + int node = dev_of_offset(bus);
> + const void *blob = gd->fdt_blob;
> + int ret;
> +
> + i
Hi,
On Thu, 13 Jul 2017 13:09:58 -0600 Simon Glass wrote:
> On 5 July 2017 at 01:34, Lothar Waßmann wrote:
> > When the U-Boot base directory happens to have the same name as the
> > branch that buildman is directed to use via the '-b' option and no
> > output
ototype of fec_get_miibus() for the DM_ETH case.
Signed-off-by: Lothar Waßmann
---
Changes vs. v1:
added missing prototype change in netdev.h
drivers/net/fec_mxc.c | 9 +
include/netdev.h | 5 +
2 files changed, 14 insertions(+)
diff --git a/drivers/net/fec_mxc.c b/drivers/net
Hi,
On Thu, 13 Jul 2017 16:45:00 +0200 Stefano Babic wrote:
> On 13/07/2017 07:57, Lothar Waßmann wrote:
> > commit 306dd7dabd64 ("net: fec_mxc: fix PHY initialization bug with
> > CONFIG_DM_ETH")
> > has broken the build of the fec_mxc driver with CONFIG_DM_ETH
ototype of fec_get_miibus() for the DM_ETH case.
Signed-off-by: Lothar Waßmann
---
drivers/net/fec_mxc.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4ad4ddc..e42d54b 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
Hi Stefano,
On Wed, 12 Jul 2017 10:45:21 +0200 Stefano Babic wrote:
> Hi Lothar,
>
> your recent patch :
>
> commit 306dd7dabd6472b8b66ab5106d5a6a516ef15d79
> Author: Lothar Waßmann
> Date: Tue Jun 27 15:23:16 2017 +0200
>
> net: fec_mxc: fix PHY initializa
**
> + * generic_phy_valid() - check if PHY port is valid
> + *
> + * @phy: the PHY port to check
> + * @return TRUE if valid, or FALSE
> + */
> +bool generic_phy_valid(struct phy *phy);
>
IMO this qualifies as a candidate for a static inline function.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
ize131072 b
| subpagesize 2048 b
| options 0x4200
| bbt options 0x 6
Change the format string to produce leading zeroes filling the gap.
Signed-off-by: Lothar Waßmann
---
cmd/nand.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/nand.c b/cmd
Hi,
On Thu, 6 Jul 2017 12:22:52 + Marcel Ziswiler wrote:
> Dear Lothar
>
> On Thu, 2017-07-06 at 09:50 +0200, Lothar Waßmann wrote:
> > Hi,
> >
> > On Wed, 5 Jul 2017 22:49:28 -0600 Simon Glass wrote:
> > > Hi Lothar,
> > >
> > >
leading to the node where you need it.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Wed, 5 Jul 2017 22:49:28 -0600 Simon Glass wrote:
> Hi Lothar,
>
> On 23 June 2017 at 00:30, Lothar Waßmann wrote:
> > Hi,
> >
> > On Wed, 21 Jun 2017 09:59:05 +0200 Lothar Waßmann wrote:
> >> Hi,
> >>
> >> On Tue, 20 Jun 2
age:
OSError: [Errno 20] Not a directory: '..//boards.cfg
Add a check to the builderthread.Mkdir function to verify that the
path it tries to create does not match the current working
directory.
Signed-off-by: Lothar Waßmann
---
tools/buildman/builderthread.py | 4
1 file changed, 4 in
> > + return -ENOMEM;
> > > > + }
> > > > + memcpy(conf_uname_copy, conf_uname, len);
> > >
> > > Is that like strdup() here ?
> >
> > No. The space allocated is not the full string, just the span until the
> > next #.
>
> You could use strndup() to copy only the first n characters.
>
or strsep() to tokenize (a copy of) the original string.
IMO using strdup() and strsep() makes the intent of this function
clearer, than the current code.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
ck ?
>
buffers on stack are a disatrous stack overflow waiting to happen.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
return --valid_parts;
>
I personally find it somewhat strange to initialize a counter to 1 and
then return its value reduced by one, rather than initializing it to 0
and returning the exact counter value.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
; the partitions string ends up being '1' without NULL-termination,
>
That's nonsense. _Every_ string in the environment is NULL terminated.
In the former case of your example the characters after the first
semicolon are interpreted as commands and lead to an error message
Unknown
0 <_u_boot_list_2_cmd_2_gpt>) at common/command.c:500
> #5 cmd_process (flag=, argc=0x5, argv=0x7fffef09a8f0,
> repeatable=repeatable@entry=0x726c04 ,
> ticks=ticks@entry=0x0) at common/command.c:539
>
> Suggested-by: Lothar Waßmann
> Signed-off-by: Alison Chaiken
> --
if (dev->speed == USB_SPEED_LOW)
> > + dev->descriptor.bMaxPacketSize0 = 8;
> > + else
> > + dev->descriptor.bMaxPacketSize0 = 64;
> > }
> >
> > dev->epmaxpacketin[0] = dev->descriptor.bMaxPacketSize0;
> > --
>
> For some reason that I don't understand, this patch breaks EHCI.
> dev->maxpacketsize is equal to zero with this patch, which leads to a
> 'divide error' exception in ehci_submit_async(). Not sure if anyone
> has some hints?
>
In the do_read case the dev->descriptor.bMaxPacketSize0 is not set up.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
this.
Signed-off-by: Lothar Waßmann
---
drivers/net/fec_mxc.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 910879b..f61268c 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
Hi,
On Tue, 27 Jun 2017 09:05:14 +0200 Lothar Waßmann wrote:
> Hi,
>
> On Sun, 25 Jun 2017 14:54:56 -0700 Alison Chaiken wrote:
> > On Sun, Jun 18, 2017 at 4:03 AM, Wolfgang Denk wrote:
> >
> > > Dear Alison,
> > >
> > > In message > > gma
() itself be modified, or is
> it enough to test in gpt.c? The right solution is not to present the
> commands with poorly formed strings, but it's easy to do so.
>
You can use strnlen() if you know the maximum allowed length of the
string.
NB: A quick glance at set_gpt_info() revealed
since v7:
>
> -- Removed several casts in create_gpt_partitions_list() and
>do_rename_gpt_parts() as suggested by Lothar Waßmann. The cast of
>gpt_part_info.name to char* is needed to silence a compiler
>warning.
>
> -- Substituted simple_strtol() for atoi() in do_
sk_part;
> +
> + if (disk_partitions.next == NULL)
> + INIT_LIST_HEAD(&disk_partitions);
> +
> + for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) {
> + ret = part_get_info(dev_desc, p, &info);
> + if (ret)
> + continue;
> +
> + new_disk_part = allocate_disk_part(&info, valid_parts);
> + if (IS_ERR(new_disk_part))
> + goto out;
> +
> + list_add_tail(&new_disk_part->list, &disk_partitions);
> + valid_parts++;
> + }
> + if (!valid_parts) {
>
You initialize valid_parts to '1' and only ever increment it, so it can
never be '0' here.
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Wed, 21 Jun 2017 09:59:05 +0200 Lothar Waßmann wrote:
> Hi,
>
> On Tue, 20 Jun 2017 12:26:29 -0600 Simon Glass wrote:
> > Hi Lothar,
> >
> > On 20 June 2017 at 04:25, Lothar Waßmann wrote:
> > > LCD_MAX_WIDTH, LCD_MAX_HEIGHT and LCD_MAX_LSBPP are
line, ...) and
free it right away.
The caller of reset_assert_all() should make sure that all reset
resources are requested before calling this function and keep them
requested until after relinquish using them.
The same holds for the clk_disable_all() in your other p
Hi,
On Tue, 20 Jun 2017 12:26:29 -0600 Simon Glass wrote:
> Hi Lothar,
>
> On 20 June 2017 at 04:25, Lothar Waßmann wrote:
> > LCD_MAX_WIDTH, LCD_MAX_HEIGHT and LCD_MAX_LSBPP are not alternative
> > values for one specific variable, but unrelated entities with distinct
>
Hi,
On Tue, 20 Jun 2017 12:56:48 + Patrice CHOTARD wrote:
> Hi Lothar
>
> On 06/20/2017 02:06 PM, Lothar Waßmann wrote:
> > Hi,
> >
> > On Tue, 20 Jun 2017 11:59:09 +0200 patrice.chot...@st.com wrote:
> >> From: Patrice Chotard
> >>
> >&g
ct clk *clk)
> return ops->disable(clk);
> }
>
> +int clk_disable_all(struct clk *clk, int count)
> +{
> + int i, ret;
> +
> + debug("%s(clk=%p count=%d)\n", __func__, clk, count);
> +
> + for (i = 0; i < count; i++) {
> +
0;
would be more easy to follow.
> +clk_err:
> + ret = clk_disable_all(priv->clocks, priv->clock_count);
> + if (ret)
> + return ret;
> +
> + return err;
> }
>
> static int ohci_usb_remove(struct udevice *dev)
> {
> - return ohci_deregister(dev);
> + struct generic_ohci *priv = dev_get_priv(dev);
> + int ret;
> +
> + ret = ohci_deregister(dev);
> + if (ret)
> + return ret;
> +
> + return clk_disable_all(priv->clocks, priv->clock_count);
> }
>
> static const struct udevice_id ohci_usb_ids[] = {
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
ome error code that has occured during cleanup.
> + return err;
> +}
> +
> +static int ehci_usb_remove(struct udevice *dev)
> +{
> + struct generic_ehci *priv = dev_get_priv(dev);
> + int ret;
> +
> + ret = ehci_deregister(dev);
> + if (ret)
> + return ret;
> +
> + ret = reset_assert_all(priv->resets, priv->reset_count);
> + if (ret)
> + return ret;
> +
> + return clk_disable_all(priv->clocks, priv->clock_count);
> }
>
> static const struct udevice_id ehci_usb_ids[] = {
> @@ -67,7 +145,7 @@ U_BOOT_DRIVER(ehci_generic) = {
> .id = UCLASS_USB,
> .of_match = ehci_usb_ids,
> .probe = ehci_usb_probe,
> - .remove = ehci_deregister,
> + .remove = ehci_usb_remove,
> .ops= &ehci_usb_ops,
> .priv_auto_alloc_size = sizeof(struct generic_ehci),
> .flags = DM_FLAG_ALLOC_PRIV_DMA,
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
> > - ret = clk_get_by_index(dev, i, &clk);
> > - if (ret < 0)
> > - break;
> > - if (clk_enable(&clk))
> > - error("failed to enable clock %d\n", i);
> > - clk_free(&clk);
>
a square max. frame size (e.g. 4096x4096).
Signed-off-by: Lothar Waßmann
---
drivers/video/atmel_hlcdfb.c | 8 +++-
drivers/video/atmel_lcdfb.c | 10 --
drivers/video/sandbox_sdl.c | 8 +++-
drivers/video/tegra.c| 12 +---
drivers/video/teg
r to use first in U-Boot?
> unsigned int, uint32_t, u32;
>
uint32_t is guaranteed to be of size 32bit according to the C spec.
'[unsigned] int' is only guaranteed to be at least 32bit but can be
larger on some machine.
A good overview of the C data types and their properties can be f
CONFIG_DM_ETH
> u32 interface;
> +
> +# ifdef CONFIG_DM_GPIO
> + struct gpio_desc reset_gpio;
> +# endif
> #endif
> };
>
> diff --git a/include/netdev.h b/include/netdev.h
> index 8eb8b46..e5668f4 100644
> --- a/include/netdev.h
> +++ b/include/netdev.h
> @@ -133,7 +133,12 @@ static inline int pci_eth_init(bd_t *bis)
> return num;
> }
>
> +#ifdef CONFIG_DM_ETH
> +struct mii_dev *fec_get_miibus(struct udevice *dev, int dev_id);
> +#else
> struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id);
> +#endif
> +
> #ifdef CONFIG_PHYLIB
> struct phy_device;
> int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
Lothar Waßmann
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot
Hi,
On Mon, 12 Jun 2017 17:50:45 -0600 Simon Glass wrote:
> On 8 June 2017 at 02:16, Lothar Waßmann wrote:
> > Create exception stack in IRAM if available to facilitate debugging of
> > pre-relocation code by catching exceptions rather than stopping dead.
> >
> > Si
1 - 100 of 128 matches
Mail list logo