Merge tag 'mips-pull-2020-06-29' of https://gitlab.denx.de/u-boot/custodians/u-boot...
authorTom Rini <trini@konsulko.com>
Tue, 30 Jun 2020 15:43:18 +0000 (11:43 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 30 Jun 2020 15:43:18 +0000 (11:43 -0400)
- net: pcnet: cleanup and add DM support
- Makefile: add rule to build an endian-swapped U-Boot image
  used by MIPS Malta EL variants
- CI: add Qemu tests for MIPS Malta

1  2 
Makefile
drivers/mmc/mmc.c
drivers/net/pcnet.c
drivers/video/vidconsole-uclass.c

diff --combined Makefile
+++ b/Makefile
@@@ -887,7 -887,7 +887,7 @@@ ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-
  ifeq ($(CONFIG_SPL_FSL_PBL),y)
  ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin
  else
 -ifneq ($(CONFIG_SECURE_BOOT), y)
 +ifneq ($(CONFIG_NXP_ESBC), y)
  # For Secure Boot The Image needs to be signed and Header must also
  # be included. So The image has to be built explicitly
  ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
@@@ -1025,7 -1025,7 +1025,7 @@@ ifneq ($(CONFIG_DM),y
        @echo >&2 "===================================================="
  endif
  ifeq ($(CONFIG_MMC),y)
 -ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy)
 +ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy)
        @echo >&2 "===================== WARNING ======================"
        @echo >&2 "This board does not use CONFIG_DM_MMC. Please update"
        @echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release."
@@@ -1733,6 -1733,12 +1733,12 @@@ u-boot-mtk.bin: u-boot.bin FORC
        $(call if_changed,mkimage)
  endif
  
+ quiet_cmd_endian_swap = SWAP    $@
+       cmd_endian_swap = $(srctree)/tools/endian-swap.py $< $@
+ u-boot-swap.bin: u-boot.bin FORCE
+       $(call if_changed,endian_swap)
  ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)
  
  # Rule to link u-boot
diff --combined drivers/mmc/mmc.c
@@@ -669,12 -669,15 +669,15 @@@ static int mmc_send_op_cond_iter(struc
  static int mmc_send_op_cond(struct mmc *mmc)
  {
        int err, i;
+       int timeout = 1000;
+       uint start;
  
        /* Some cards seem to need this */
        mmc_go_idle(mmc);
  
+       start = get_timer(0);
        /* Asking to the card its capabilities */
-       for (i = 0; i < 2; i++) {
+       for (i = 0; ; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;
                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
+               if (get_timer(start) > timeout)
+                       return -ETIMEDOUT;
+               udelay(100);
        }
        mmc->op_cond_pending = 1;
        return 0;
@@@ -2824,7 -2831,7 +2831,7 @@@ retry
        if (err)
                return err;
  
 -      /* The internal partition reset to user partition(0) at every CMD0*/
 +      /* The internal partition reset to user partition(0) at every CMD0 */
        mmc_get_blk_desc(mmc)->hwpart = 0;
  
        /* Test for SD version 2 */
diff --combined drivers/net/pcnet.c
@@@ -8,8 -8,8 +8,9 @@@
  
  #include <common.h>
  #include <cpu_func.h>
+ #include <dm.h>
  #include <log.h>
 +#include <dm.h>
  #include <malloc.h>
  #include <memalign.h>
  #include <net.h>
@@@ -613,7 -613,6 +613,7 @@@ UCLASS_DRIVER(vidconsole) = 
        .per_device_auto_alloc_size     = sizeof(struct vidconsole_priv),
  };
  
 +#if CONFIG_IS_ENABLED(CMD_VIDCONSOLE)
  void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row)
  {
        struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
        col *= priv->x_charsize;
        row *= priv->y_charsize;
        priv->xcur_frac = VID_TO_POS(min_t(short, col, vid_priv->xsize - 1));
+       priv->xstart_frac = priv->xcur_frac;
        priv->ycur = min_t(short, row, vid_priv->ysize - 1);
  }
  
@@@ -674,4 -674,3 +675,4 @@@ U_BOOT_CMD
        "print string on video framebuffer",
        "    <string>"
  );
 +#endif /* CONFIG_IS_ENABLED(CMD_VIDCONSOLE) */