Add patch to fix some uEFI console output, Minor other tweaks
This commit is contained in:
parent
11de9633e5
commit
50878af962
|
@ -0,0 +1,434 @@
|
||||||
|
From patchwork Wed Sep 13 22:12:20 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,1/3] dm: video: Fix cache flushes
|
||||||
|
X-Patchwork-Submitter: Rob Clark <robdclark@gmail.com>
|
||||||
|
X-Patchwork-Id: 813662
|
||||||
|
X-Patchwork-Delegate: sjg@chromium.org
|
||||||
|
Message-Id: <20170913221227.21091-2-robdclark@gmail.com>
|
||||||
|
To: U-Boot Mailing List <u-boot@lists.denx.de>
|
||||||
|
Date: Wed, 13 Sep 2017 18:12:20 -0400
|
||||||
|
From: Rob Clark <robdclark@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
Content can come to screen via putc() and we cannot always rely on
|
||||||
|
updates ending with a puts(). This is the case with efi_console output
|
||||||
|
to vidconsole. Fixes corruption with Shell.efi.
|
||||||
|
|
||||||
|
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/video/vidconsole-uclass.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
|
||||||
|
index b5afd72227..e081d5a0ee 100644
|
||||||
|
--- a/drivers/video/vidconsole-uclass.c
|
||||||
|
+++ b/drivers/video/vidconsole-uclass.c
|
||||||
|
@@ -163,6 +163,7 @@ static void vidconsole_putc(struct stdio_dev *sdev, const char ch)
|
||||||
|
struct udevice *dev = sdev->priv;
|
||||||
|
|
||||||
|
vidconsole_put_char(dev, ch);
|
||||||
|
+ video_sync(dev->parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vidconsole_puts(struct stdio_dev *sdev, const char *s)
|
||||||
|
@@ -260,6 +261,8 @@ static int do_video_puts(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||||
|
for (s = argv[1]; *s; s++)
|
||||||
|
vidconsole_put_char(dev, *s);
|
||||||
|
|
||||||
|
+ video_sync(dev->parent);
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
From patchwork Wed Sep 13 22:12:21 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,2/3] dm: video: Add basic ANSI escape sequence support
|
||||||
|
X-Patchwork-Submitter: Rob Clark <robdclark@gmail.com>
|
||||||
|
X-Patchwork-Id: 813649
|
||||||
|
X-Patchwork-Delegate: sjg@chromium.org
|
||||||
|
Message-Id: <20170913221227.21091-3-robdclark@gmail.com>
|
||||||
|
To: U-Boot Mailing List <u-boot@lists.denx.de>
|
||||||
|
Date: Wed, 13 Sep 2017 18:12:21 -0400
|
||||||
|
From: Rob Clark <robdclark@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
Really just the subset that is needed by efi_console. Perhaps more will
|
||||||
|
be added later, for example color support would be useful to implement
|
||||||
|
efi_cout_set_attribute().
|
||||||
|
|
||||||
|
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
||||||
|
Reviewed-by: Simon Glass <sjg@chromium.org>
|
||||||
|
---
|
||||||
|
drivers/video/Kconfig | 8 +++
|
||||||
|
drivers/video/vidconsole-uclass.c | 109 ++++++++++++++++++++++++++++++++++++++
|
||||||
|
drivers/video/video-uclass.c | 4 +-
|
||||||
|
include/video.h | 7 +++
|
||||||
|
include/video_console.h | 11 ++++
|
||||||
|
5 files changed, 136 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
|
||||||
|
index 082cc4a528..add156cb70 100644
|
||||||
|
--- a/drivers/video/Kconfig
|
||||||
|
+++ b/drivers/video/Kconfig
|
||||||
|
@@ -44,6 +44,14 @@ config VIDEO_BPP32
|
||||||
|
this option, such displays will not be supported and console output
|
||||||
|
will be empty.
|
||||||
|
|
||||||
|
+config VIDEO_ANSI
|
||||||
|
+ bool "Support ANSI escape sequences in video console"
|
||||||
|
+ depends on DM_VIDEO
|
||||||
|
+ default y if DM_VIDEO
|
||||||
|
+ help
|
||||||
|
+ Enable ANSI escape sequence decoding for a more fully functional
|
||||||
|
+ console.
|
||||||
|
+
|
||||||
|
config CONSOLE_NORMAL
|
||||||
|
bool "Support a simple text console"
|
||||||
|
depends on DM_VIDEO
|
||||||
|
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
|
||||||
|
index e081d5a0ee..0a88cc0a42 100644
|
||||||
|
--- a/drivers/video/vidconsole-uclass.c
|
||||||
|
+++ b/drivers/video/vidconsole-uclass.c
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
+#include <linux/ctype.h>
|
||||||
|
#include <dm.h>
|
||||||
|
#include <video.h>
|
||||||
|
#include <video_console.h>
|
||||||
|
@@ -107,12 +108,120 @@ static void vidconsole_newline(struct udevice *dev)
|
||||||
|
video_sync(dev->parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static char *parsenum(char *s, int *num)
|
||||||
|
+{
|
||||||
|
+ char *end;
|
||||||
|
+ *num = simple_strtol(s, &end, 10);
|
||||||
|
+ return end;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Process a character while accumulating an escape string. Chars are
|
||||||
|
+ * accumulated into escape_buf until the end of escape sequence is
|
||||||
|
+ * found, at which point the sequence is parsed and processed.
|
||||||
|
+ */
|
||||||
|
+static void vidconsole_escape_char(struct udevice *dev, char ch)
|
||||||
|
+{
|
||||||
|
+ struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
|
||||||
|
+
|
||||||
|
+ if (!IS_ENABLED(CONFIG_VIDEO_ANSI))
|
||||||
|
+ goto error;
|
||||||
|
+
|
||||||
|
+ /* Sanity checking for bogus ESC sequences: */
|
||||||
|
+ if (priv->escape_len >= sizeof(priv->escape_buf))
|
||||||
|
+ goto error;
|
||||||
|
+ if (priv->escape_len == 0 && ch != '[')
|
||||||
|
+ goto error;
|
||||||
|
+
|
||||||
|
+ priv->escape_buf[priv->escape_len++] = ch;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Escape sequences are terminated by a letter, so keep
|
||||||
|
+ * accumulating until we get one:
|
||||||
|
+ */
|
||||||
|
+ if (!isalpha(ch))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * clear escape mode first, otherwise things will get highly
|
||||||
|
+ * surprising if you hit any debug prints that come back to
|
||||||
|
+ * this console.
|
||||||
|
+ */
|
||||||
|
+ priv->escape = 0;
|
||||||
|
+
|
||||||
|
+ switch (ch) {
|
||||||
|
+ case 'H':
|
||||||
|
+ case 'f': {
|
||||||
|
+ int row, col;
|
||||||
|
+ char *s = priv->escape_buf;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Set cursor position: [%d;%df or [%d;%dH
|
||||||
|
+ */
|
||||||
|
+ s++; /* [ */
|
||||||
|
+ s = parsenum(s, &row);
|
||||||
|
+ s++; /* ; */
|
||||||
|
+ s = parsenum(s, &col);
|
||||||
|
+
|
||||||
|
+ priv->ycur = row * priv->y_charsize;
|
||||||
|
+ priv->xcur_frac = priv->xstart_frac +
|
||||||
|
+ VID_TO_POS(col * priv->x_charsize);
|
||||||
|
+
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ case 'J': {
|
||||||
|
+ int mode;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Clear part/all screen:
|
||||||
|
+ * [J or [0J - clear screen from cursor down
|
||||||
|
+ * [1J - clear screen from cursor up
|
||||||
|
+ * [2J - clear entire screen
|
||||||
|
+ *
|
||||||
|
+ * TODO we really only handle entire-screen case, others
|
||||||
|
+ * probably require some additions to video-uclass (and
|
||||||
|
+ * are not really needed yet by efi_console)
|
||||||
|
+ */
|
||||||
|
+ parsenum(priv->escape_buf + 1, &mode);
|
||||||
|
+
|
||||||
|
+ if (mode == 2) {
|
||||||
|
+ video_clear(dev->parent);
|
||||||
|
+ video_sync(dev->parent);
|
||||||
|
+ priv->ycur = 0;
|
||||||
|
+ priv->xcur_frac = priv->xstart_frac;
|
||||||
|
+ } else {
|
||||||
|
+ debug("unsupported clear mode: %d\n", mode);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ default:
|
||||||
|
+ debug("unrecognized escape sequence: %*s\n",
|
||||||
|
+ priv->escape_len, priv->escape_buf);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+error:
|
||||||
|
+ /* something went wrong, just revert to normal mode: */
|
||||||
|
+ priv->escape = 0;
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int vidconsole_put_char(struct udevice *dev, char ch)
|
||||||
|
{
|
||||||
|
struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
+ if (priv->escape) {
|
||||||
|
+ vidconsole_escape_char(dev, ch);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
switch (ch) {
|
||||||
|
+ case '\x1b':
|
||||||
|
+ priv->escape_len = 0;
|
||||||
|
+ priv->escape = 1;
|
||||||
|
+ break;
|
||||||
|
case '\a':
|
||||||
|
/* beep */
|
||||||
|
break;
|
||||||
|
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
|
||||||
|
index 3036e3a1f2..0163039821 100644
|
||||||
|
--- a/drivers/video/video-uclass.c
|
||||||
|
+++ b/drivers/video/video-uclass.c
|
||||||
|
@@ -87,7 +87,7 @@ int video_reserve(ulong *addrp)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int video_clear(struct udevice *dev)
|
||||||
|
+void video_clear(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct video_priv *priv = dev_get_uclass_priv(dev);
|
||||||
|
|
||||||
|
@@ -100,8 +100,6 @@ static int video_clear(struct udevice *dev)
|
||||||
|
} else {
|
||||||
|
memset(priv->fb, priv->colour_bg, priv->fb_size);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Flush video activity to the caches */
|
||||||
|
diff --git a/include/video.h b/include/video.h
|
||||||
|
index 5b4e78b182..61ff653121 100644
|
||||||
|
--- a/include/video.h
|
||||||
|
+++ b/include/video.h
|
||||||
|
@@ -115,6 +115,13 @@ struct video_ops {
|
||||||
|
int video_reserve(ulong *addrp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * video_clear() - Clear a device's frame buffer to background color.
|
||||||
|
+ *
|
||||||
|
+ * @dev: Device to clear
|
||||||
|
+ */
|
||||||
|
+void video_clear(struct udevice *dev);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
* video_sync() - Sync a device's frame buffer with its hardware
|
||||||
|
*
|
||||||
|
* Some frame buffers are cached or have a secondary frame buffer. This
|
||||||
|
diff --git a/include/video_console.h b/include/video_console.h
|
||||||
|
index 26047934da..9dce234bd9 100644
|
||||||
|
--- a/include/video_console.h
|
||||||
|
+++ b/include/video_console.h
|
||||||
|
@@ -29,6 +29,9 @@
|
||||||
|
* @xsize_frac: Width of the display in fractional units
|
||||||
|
* @xstart_frac: Left margin for the text console in fractional units
|
||||||
|
* @last_ch: Last character written to the text console on this line
|
||||||
|
+ * @escape: TRUE if currently accumulating an ANSI escape sequence
|
||||||
|
+ * @escape_len: Length of accumulated escape sequence so far
|
||||||
|
+ * @escape_buf: Buffer to accumulate escape sequence
|
||||||
|
*/
|
||||||
|
struct vidconsole_priv {
|
||||||
|
struct stdio_dev sdev;
|
||||||
|
@@ -42,6 +45,14 @@ struct vidconsole_priv {
|
||||||
|
int xsize_frac;
|
||||||
|
int xstart_frac;
|
||||||
|
int last_ch;
|
||||||
|
+ /*
|
||||||
|
+ * ANSI escape sequences are accumulated character by character,
|
||||||
|
+ * starting after the ESC char (0x1b) until the entire sequence
|
||||||
|
+ * is consumed at which point it is acted upon.
|
||||||
|
+ */
|
||||||
|
+ int escape;
|
||||||
|
+ int escape_len;
|
||||||
|
+ char escape_buf[32];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
From patchwork Wed Sep 13 22:12:22 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,3/3] dm: video: Add color ANSI escape sequence support
|
||||||
|
X-Patchwork-Submitter: Rob Clark <robdclark@gmail.com>
|
||||||
|
X-Patchwork-Id: 813661
|
||||||
|
X-Patchwork-Delegate: sjg@chromium.org
|
||||||
|
Message-Id: <20170913221227.21091-4-robdclark@gmail.com>
|
||||||
|
To: U-Boot Mailing List <u-boot@lists.denx.de>
|
||||||
|
Date: Wed, 13 Sep 2017 18:12:22 -0400
|
||||||
|
From: Rob Clark <robdclark@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
Note that this doesn't differentiate (due to lack of information in
|
||||||
|
video_priv) between different possible component orders for 32bpp.
|
||||||
|
But the main user at this point is efi_loader, and GOP expects xBGR
|
||||||
|
so any video drivers that this is incorrect for already have problems.
|
||||||
|
(Also, conveniently, this matches what simple-framebuffer bindings
|
||||||
|
expect for kernels that use the simple-framebuffer DT binding to
|
||||||
|
take over the bootloader display.)
|
||||||
|
|
||||||
|
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/video/vidconsole-uclass.c | 94 +++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 94 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
|
||||||
|
index 0a88cc0a42..820540b1bf 100644
|
||||||
|
--- a/drivers/video/vidconsole-uclass.c
|
||||||
|
+++ b/drivers/video/vidconsole-uclass.c
|
||||||
|
@@ -108,6 +108,41 @@ static void vidconsole_newline(struct udevice *dev)
|
||||||
|
video_sync(dev->parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static const struct {
|
||||||
|
+ unsigned r;
|
||||||
|
+ unsigned g;
|
||||||
|
+ unsigned b;
|
||||||
|
+} colors[] = {
|
||||||
|
+ { 0x00, 0x00, 0x00 }, /* black */
|
||||||
|
+ { 0xff, 0x00, 0x00 }, /* red */
|
||||||
|
+ { 0x00, 0xff, 0x00 }, /* green */
|
||||||
|
+ { 0xff, 0xff, 0x00 }, /* yellow */
|
||||||
|
+ { 0x00, 0x00, 0xff }, /* blue */
|
||||||
|
+ { 0xff, 0x00, 0xff }, /* magenta */
|
||||||
|
+ { 0x00, 0xff, 0xff }, /* cyan */
|
||||||
|
+ { 0xff, 0xff, 0xff }, /* white */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static void set_color(struct video_priv *priv, unsigned idx, unsigned *c)
|
||||||
|
+{
|
||||||
|
+ switch (priv->bpix) {
|
||||||
|
+ case VIDEO_BPP16:
|
||||||
|
+ *c = ((colors[idx].r >> 3) << 0) |
|
||||||
|
+ ((colors[idx].g >> 2) << 5) |
|
||||||
|
+ ((colors[idx].b >> 3) << 11);
|
||||||
|
+ break;
|
||||||
|
+ case VIDEO_BPP32:
|
||||||
|
+ *c = 0xff000000 |
|
||||||
|
+ (colors[idx].r << 0) |
|
||||||
|
+ (colors[idx].g << 8) |
|
||||||
|
+ (colors[idx].b << 16);
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ /* unsupported, leave current color in place */
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static char *parsenum(char *s, int *num)
|
||||||
|
{
|
||||||
|
char *end;
|
||||||
|
@@ -194,6 +229,65 @@ static void vidconsole_escape_char(struct udevice *dev, char ch)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ case 'm': {
|
||||||
|
+ struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
|
||||||
|
+ char *s = priv->escape_buf;
|
||||||
|
+ char *end = &priv->escape_buf[priv->escape_len];
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Set graphics mode: [%d;...;%dm
|
||||||
|
+ *
|
||||||
|
+ * Currently only supports the color attributes:
|
||||||
|
+ *
|
||||||
|
+ * Foreground Colors:
|
||||||
|
+ *
|
||||||
|
+ * 30 Black
|
||||||
|
+ * 31 Red
|
||||||
|
+ * 32 Green
|
||||||
|
+ * 33 Yellow
|
||||||
|
+ * 34 Blue
|
||||||
|
+ * 35 Magenta
|
||||||
|
+ * 36 Cyan
|
||||||
|
+ * 37 White
|
||||||
|
+ *
|
||||||
|
+ * Background Colors:
|
||||||
|
+ *
|
||||||
|
+ * 40 Black
|
||||||
|
+ * 41 Red
|
||||||
|
+ * 42 Green
|
||||||
|
+ * 43 Yellow
|
||||||
|
+ * 44 Blue
|
||||||
|
+ * 45 Magenta
|
||||||
|
+ * 46 Cyan
|
||||||
|
+ * 47 White
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ s++; /* [ */
|
||||||
|
+ while (s < end) {
|
||||||
|
+ int val;
|
||||||
|
+
|
||||||
|
+ s = parsenum(s, &val);
|
||||||
|
+ s++;
|
||||||
|
+
|
||||||
|
+ switch (val) {
|
||||||
|
+ case 30 ... 37:
|
||||||
|
+ /* fg color */
|
||||||
|
+ set_color(vid_priv, val - 30,
|
||||||
|
+ (unsigned *)&vid_priv->colour_fg);
|
||||||
|
+ break;
|
||||||
|
+ case 40 ... 47:
|
||||||
|
+ /* bg color */
|
||||||
|
+ set_color(vid_priv, val - 40,
|
||||||
|
+ (unsigned *)&vid_priv->colour_bg);
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ /* unknown/unsupported */
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
default:
|
||||||
|
debug("unrecognized escape sequence: %*s\n",
|
||||||
|
priv->escape_len, priv->escape_buf);
|
|
@ -0,0 +1,330 @@
|
||||||
|
From patchwork Sat Sep 23 02:45:28 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,1/6] mx6sabresd: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817753
|
||||||
|
Message-Id: <1506134733-30962-1-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:28 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Reviewed-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
---
|
||||||
|
board/freescale/mx6sabresd/mx6sabresd.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
|
||||||
|
index 5b50bc8..f14b759 100644
|
||||||
|
--- a/board/freescale/mx6sabresd/mx6sabresd.c
|
||||||
|
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
|
||||||
|
@@ -620,9 +620,6 @@ int board_ehci_power(int port, int on)
|
||||||
|
int board_early_init_f(void)
|
||||||
|
{
|
||||||
|
setup_iomux_uart();
|
||||||
|
-#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
- setup_display();
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -639,6 +636,9 @@ int board_init(void)
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
|
||||||
|
else
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
|
||||||
|
+#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
+ setup_display();
|
||||||
|
+#endif
|
||||||
|
#ifdef CONFIG_USB_EHCI_MX6
|
||||||
|
setup_usb();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
From patchwork Sat Sep 23 02:45:29 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot, 2/6] cgtqmx6eval: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817755
|
||||||
|
Message-Id: <1506134733-30962-2-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:29 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Reviewed-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
---
|
||||||
|
board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
|
||||||
|
index 2ed66d3..d42cc94 100644
|
||||||
|
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
|
||||||
|
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
|
||||||
|
@@ -683,8 +683,6 @@ int overwrite_console(void)
|
||||||
|
int board_early_init_f(void)
|
||||||
|
{
|
||||||
|
setup_iomux_uart();
|
||||||
|
- setup_display();
|
||||||
|
-
|
||||||
|
#ifdef CONFIG_MXC_SPI
|
||||||
|
setup_spi();
|
||||||
|
#endif
|
||||||
|
@@ -702,6 +700,8 @@ int board_init(void)
|
||||||
|
else
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
|
||||||
|
|
||||||
|
+ setup_display();
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_SATA
|
||||||
|
setup_sata();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
From patchwork Sat Sep 23 02:45:30 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,3/6] wandboard: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817757
|
||||||
|
Message-Id: <1506134733-30962-3-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:30 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Reviewed-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
---
|
||||||
|
board/wandboard/wandboard.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
|
||||||
|
index adfcf48..dde4988 100644
|
||||||
|
--- a/board/wandboard/wandboard.c
|
||||||
|
+++ b/board/wandboard/wandboard.c
|
||||||
|
@@ -376,9 +376,6 @@ int board_eth_init(bd_t *bis)
|
||||||
|
int board_early_init_f(void)
|
||||||
|
{
|
||||||
|
setup_iomux_uart();
|
||||||
|
-#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
- setup_display();
|
||||||
|
-#endif
|
||||||
|
#ifdef CONFIG_SATA
|
||||||
|
/* Only mx6q wandboard has SATA */
|
||||||
|
if (is_cpu_type(MXC_CPU_MX6Q))
|
||||||
|
@@ -448,6 +445,8 @@ int board_init(void)
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info);
|
||||||
|
else
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info);
|
||||||
|
+
|
||||||
|
+ setup_display();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
From patchwork Sat Sep 23 02:45:31 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,4/6] mx6cuboxi: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817756
|
||||||
|
Message-Id: <1506134733-30962-4-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:31 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Reviewed-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
---
|
||||||
|
board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
|
||||||
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
|
||||||
|
index 1e4da4a..ee9e4f7 100644
|
||||||
|
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
|
||||||
|
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
|
||||||
|
@@ -308,13 +308,8 @@ int board_ehci_hcd_init(int port)
|
||||||
|
|
||||||
|
int board_early_init_f(void)
|
||||||
|
{
|
||||||
|
- int ret = 0;
|
||||||
|
setup_iomux_uart();
|
||||||
|
|
||||||
|
-#ifdef CONFIG_VIDEO_IPUV3
|
||||||
|
- ret = setup_display();
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef CONFIG_CMD_SATA
|
||||||
|
setup_sata();
|
||||||
|
#endif
|
||||||
|
@@ -322,15 +317,21 @@ int board_early_init_f(void)
|
||||||
|
#ifdef CONFIG_USB_EHCI_MX6
|
||||||
|
setup_usb();
|
||||||
|
#endif
|
||||||
|
- return ret;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int board_init(void)
|
||||||
|
{
|
||||||
|
+ int ret = 0;
|
||||||
|
+
|
||||||
|
/* address of boot parameters */
|
||||||
|
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+#ifdef CONFIG_VIDEO_IPUV3
|
||||||
|
+ ret = setup_display();
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_hummingboard(void)
|
||||||
|
|
||||||
|
From patchwork Sat Sep 23 02:45:32 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot, 5/6] apalis_imx6: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817754
|
||||||
|
Message-Id: <1506134733-30962-5-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:32 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
|
||||||
|
---
|
||||||
|
board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
|
||||||
|
index 628a61d..b86dde8 100644
|
||||||
|
--- a/board/toradex/apalis_imx6/apalis_imx6.c
|
||||||
|
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
|
||||||
|
@@ -756,10 +756,6 @@ int board_early_init_f(void)
|
||||||
|
#else
|
||||||
|
setup_iomux_dce_uart();
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
-#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
- setup_display();
|
||||||
|
-#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -781,6 +777,10 @@ int board_init(void)
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
|
||||||
|
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
|
||||||
|
|
||||||
|
+#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
+ setup_display();
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_TDX_CMD_IMX_MFGR
|
||||||
|
(void) pmic_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
From patchwork Sat Sep 23 02:45:33 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,
|
||||||
|
6/6] colibri_imx6: Avoid calling setup_display() from SPL code
|
||||||
|
X-Patchwork-Submitter: Fabio Estevam <festevam@gmail.com>
|
||||||
|
X-Patchwork-Id: 817758
|
||||||
|
Message-Id: <1506134733-30962-6-git-send-email-festevam@gmail.com>
|
||||||
|
To: sbabic@denx.de
|
||||||
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>, u-boot@lists.denx.de,
|
||||||
|
max.krummenacher@toradex.com
|
||||||
|
Date: Fri, 22 Sep 2017 23:45:33 -0300
|
||||||
|
From: Fabio Estevam <festevam@gmail.com>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
From: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
|
||||||
|
There is no need call setup_display() from SPL code, so move it to
|
||||||
|
board_init(), which executes only in U-Boot proper.
|
||||||
|
|
||||||
|
Reported-by: Stefano Babic <sbabic@denx.de>
|
||||||
|
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||||
|
Tested-by: Max Krummenacher <max.krummenacher@toradex.com>
|
||||||
|
---
|
||||||
|
board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
|
||||||
|
index 756e3f3..a2a4214 100644
|
||||||
|
--- a/board/toradex/colibri_imx6/colibri_imx6.c
|
||||||
|
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
|
||||||
|
@@ -630,9 +630,6 @@ int board_early_init_f(void)
|
||||||
|
ARRAY_SIZE(pwr_intb_pads));
|
||||||
|
setup_iomux_uart();
|
||||||
|
|
||||||
|
-#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
- setup_display();
|
||||||
|
-#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -653,6 +650,10 @@ int board_init(void)
|
||||||
|
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
|
||||||
|
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc);
|
||||||
|
|
||||||
|
+#if defined(CONFIG_VIDEO_IPUV3)
|
||||||
|
+ setup_display();
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_TDX_CMD_IMX_MFGR
|
||||||
|
(void) pmic_init();
|
||||||
|
#endif
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Name: uboot-tools
|
Name: uboot-tools
|
||||||
Version: 2017.09
|
Version: 2017.09
|
||||||
Release: 1%{?candidate:.%{candidate}}%{?dist}
|
Release: 2%{?candidate:.%{candidate}}%{?dist}
|
||||||
Summary: U-Boot utilities
|
Summary: U-Boot utilities
|
||||||
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
||||||
URL: http://www.denx.de/wiki/U-Boot
|
URL: http://www.denx.de/wiki/U-Boot
|
||||||
|
@ -18,12 +18,14 @@ Patch1: uefi-vsprintf.patch
|
||||||
Patch2: uefi-improve-fat.patch
|
Patch2: uefi-improve-fat.patch
|
||||||
Patch3: uefi-efi_loader-enough-UEFI-for-standard-distro-boot.patch
|
Patch3: uefi-efi_loader-enough-UEFI-for-standard-distro-boot.patch
|
||||||
Patch4: uefi-use-Fedora-specific-path-name.patch
|
Patch4: uefi-use-Fedora-specific-path-name.patch
|
||||||
|
Patch5: dm-video-enhancements-for-Shell.efi.patch
|
||||||
|
|
||||||
# Board fixes and enablement
|
# Board fixes and enablement
|
||||||
Patch10: dragonboard-fixes.patch
|
Patch10: dragonboard-fixes.patch
|
||||||
Patch11: qemu-machine-virt-ARM.patch
|
Patch11: qemu-machine-virt-ARM.patch
|
||||||
Patch12: sti-STiH410-B2260-support.patch
|
Patch12: sti-STiH410-B2260-support.patch
|
||||||
# Patch13: mvebu-enable-generic-distro-boot-config.patch
|
Patch13: mx6-Avoid-calling-setup_display-from-SPL-code.patch
|
||||||
|
# Patch14: mvebu-enable-generic-distro-boot-config.patch
|
||||||
# Patch15: mx6-Initial-Hummingboard-2-support.patch
|
# Patch15: mx6-Initial-Hummingboard-2-support.patch
|
||||||
|
|
||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
|
@ -276,6 +278,10 @@ cp -p board/warp7/README builds/docs/README.warp7
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 27 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-2
|
||||||
|
- Add patch to fix some uEFI console output
|
||||||
|
- Minor other tweaks
|
||||||
|
|
||||||
* Mon Sep 18 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-1
|
* Mon Sep 18 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-1
|
||||||
- 2017.09
|
- 2017.09
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue