* [PATCH 0/2] terminal: get this compiling again @ 2021-03-10 11:39 Asherah Connor 2021-03-10 11:39 ` [PATCH 1/2] terminal: correct stdio_dev invocations Asherah Connor 2021-03-10 11:39 ` [PATCH 2/2] terminal: only serial_reinit_all if available Asherah Connor 0 siblings, 2 replies; 7+ messages in thread From: Asherah Connor @ 2021-03-10 11:39 UTC (permalink / raw) To: u-boot `terminal' has not compiled in 7 years. We should fix it, per this series or something similar, or remove it. I've been trying to use it locally with a secondary UART on a RISC-V dev board (to no avail, but that's my own problem). P.S. Let me know if I'm sending too many patches, I realise I already have several outstanding. Asherah Connor (2): terminal: correct stdio_dev invocations terminal: only serial_reinit_all if available cmd/terminal.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] terminal: correct stdio_dev invocations 2021-03-10 11:39 [PATCH 0/2] terminal: get this compiling again Asherah Connor @ 2021-03-10 11:39 ` Asherah Connor 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini 2021-03-10 11:39 ` [PATCH 2/2] terminal: only serial_reinit_all if available Asherah Connor 1 sibling, 2 replies; 7+ messages in thread From: Asherah Connor @ 2021-03-10 11:39 UTC (permalink / raw) To: u-boot stdio_dev methods have taken a pointer to themselves since 709ea543 (nearly 7 years ago). Signed-off-by: Asherah Connor <ashe@kivikakk.ee> --- cmd/terminal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/terminal.c b/cmd/terminal.c index f6e4d2539e..733701e059 100644 --- a/cmd/terminal.c +++ b/cmd/terminal.c @@ -33,8 +33,8 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) int c; /* read from console and display on serial port */ - if (stdio_devices[0]->tstc()) { - c = stdio_devices[0]->getc(); + if (stdio_devices[0]->tstc(stdio_devices[0])) { + c = stdio_devices[0]->getc(stdio_devices[0]); if (last_tilde == 1) { if (c == '.') { putc(c); @@ -43,7 +43,7 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) } else { last_tilde = 0; /* write the delayed tilde */ - dev->putc('~'); + dev->putc(dev, '~'); /* fall-through to print current * character */ } @@ -53,12 +53,12 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) puts("[u-boot]"); putc(c); } - dev->putc(c); + dev->putc(dev, c); } /* read from serial port and display on console */ - if (dev->tstc()) { - c = dev->getc(); + if (dev->tstc(dev)) { + c = dev->getc(dev); putc(c); } } -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/2] terminal: correct stdio_dev invocations 2021-03-10 11:39 ` [PATCH 1/2] terminal: correct stdio_dev invocations Asherah Connor @ 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini 1 sibling, 0 replies; 7+ messages in thread From: Simon Glass @ 2021-03-12 4:45 UTC (permalink / raw) To: u-boot On Wed, 10 Mar 2021 at 04:39, Asherah Connor <ashe@kivikakk.ee> wrote: > > stdio_dev methods have taken a pointer to themselves since 709ea543 > (nearly 7 years ago). > > Signed-off-by: Asherah Connor <ashe@kivikakk.ee> > --- > > cmd/terminal.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] terminal: correct stdio_dev invocations 2021-03-10 11:39 ` [PATCH 1/2] terminal: correct stdio_dev invocations Asherah Connor 2021-03-12 4:45 ` Simon Glass @ 2021-04-13 14:28 ` Tom Rini 1 sibling, 0 replies; 7+ messages in thread From: Tom Rini @ 2021-04-13 14:28 UTC (permalink / raw) To: u-boot On Wed, Mar 10, 2021 at 10:39:23PM +1100, Asherah Connor wrote: > stdio_dev methods have taken a pointer to themselves since 709ea543 > (nearly 7 years ago). > > Signed-off-by: Asherah Connor <ashe@kivikakk.ee> > Reviewed-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210413/d6116723/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] terminal: only serial_reinit_all if available 2021-03-10 11:39 [PATCH 0/2] terminal: get this compiling again Asherah Connor 2021-03-10 11:39 ` [PATCH 1/2] terminal: correct stdio_dev invocations Asherah Connor @ 2021-03-10 11:39 ` Asherah Connor 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini 1 sibling, 2 replies; 7+ messages in thread From: Asherah Connor @ 2021-03-10 11:39 UTC (permalink / raw) To: u-boot serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e. !CONFIG_DM_SERIAL). Signed-off-by: Asherah Connor <ashe@kivikakk.ee> --- cmd/terminal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/terminal.c b/cmd/terminal.c index 733701e059..9e32a4191e 100644 --- a/cmd/terminal.c +++ b/cmd/terminal.c @@ -25,7 +25,9 @@ int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[]) if (!dev) return -1; - serial_reinit_all(); + if (IS_ENABLED(CONFIG_SERIAL)) + serial_reinit_all(); + printf("Entering terminal mode for port %s\n", dev->name); puts("Use '~.' to leave the terminal and get back to u-boot\n"); -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] terminal: only serial_reinit_all if available 2021-03-10 11:39 ` [PATCH 2/2] terminal: only serial_reinit_all if available Asherah Connor @ 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini 1 sibling, 0 replies; 7+ messages in thread From: Simon Glass @ 2021-03-12 4:45 UTC (permalink / raw) To: u-boot On Wed, 10 Mar 2021 at 04:39, Asherah Connor <ashe@kivikakk.ee> wrote: > > serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e. > !CONFIG_DM_SERIAL). > > Signed-off-by: Asherah Connor <ashe@kivikakk.ee> > > --- > > cmd/terminal.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] terminal: only serial_reinit_all if available 2021-03-10 11:39 ` [PATCH 2/2] terminal: only serial_reinit_all if available Asherah Connor 2021-03-12 4:45 ` Simon Glass @ 2021-04-13 14:28 ` Tom Rini 1 sibling, 0 replies; 7+ messages in thread From: Tom Rini @ 2021-04-13 14:28 UTC (permalink / raw) To: u-boot On Wed, Mar 10, 2021 at 10:39:24PM +1100, Asherah Connor wrote: > serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e. > !CONFIG_DM_SERIAL). > > Signed-off-by: Asherah Connor <ashe@kivikakk.ee> > Reviewed-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210413/6b526a76/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-04-13 14:28 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-10 11:39 [PATCH 0/2] terminal: get this compiling again Asherah Connor 2021-03-10 11:39 ` [PATCH 1/2] terminal: correct stdio_dev invocations Asherah Connor 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini 2021-03-10 11:39 ` [PATCH 2/2] terminal: only serial_reinit_all if available Asherah Connor 2021-03-12 4:45 ` Simon Glass 2021-04-13 14:28 ` Tom Rini
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.