Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-13 Thread Michael Ellerman
Palmer Dabbelt writes: > On Thu, 13 Jul 2017 05:32:26 PDT (-0700), james.ho...@imgtec.com wrote: >> On Thu, Jul 13, 2017 at 09:59:53PM +1000, Michael Ellerman wrote: >>> >>> I think it's fairly uncontroversial to have the early console in arch >>> code, especially in a case

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-13 Thread Palmer Dabbelt
On Thu, 13 Jul 2017 05:32:26 PDT (-0700), james.ho...@imgtec.com wrote: > On Thu, Jul 13, 2017 at 09:59:53PM +1000, Michael Ellerman wrote: >> Palmer Dabbelt writes: >> >> > On Wed, 12 Jul 2017 04:04:00 PDT (-0700), m...@ellerman.id.au wrote: >> >> Palmer Dabbelt

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-13 Thread James Hogan
On Thu, Jul 13, 2017 at 09:59:53PM +1000, Michael Ellerman wrote: > Palmer Dabbelt writes: > > > On Wed, 12 Jul 2017 04:04:00 PDT (-0700), m...@ellerman.id.au wrote: > >> Palmer Dabbelt writes: > >> > >>> On Mon, 10 Jul 2017 23:21:07 PDT (-0700),

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-13 Thread Michael Ellerman
Palmer Dabbelt writes: > On Wed, 12 Jul 2017 04:04:00 PDT (-0700), m...@ellerman.id.au wrote: >> Palmer Dabbelt writes: >> >>> On Mon, 10 Jul 2017 23:21:07 PDT (-0700), m...@ellerman.id.au wrote: Palmer Dabbelt writes: >

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-12 Thread Palmer Dabbelt
On Wed, 12 Jul 2017 04:04:00 PDT (-0700), m...@ellerman.id.au wrote: > Palmer Dabbelt writes: > >> On Mon, 10 Jul 2017 23:21:07 PDT (-0700), m...@ellerman.id.au wrote: >>> Palmer Dabbelt writes: >>> ... +#ifdef CONFIG_EARLY_PRINTK +static

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-12 Thread Michael Ellerman
Palmer Dabbelt writes: > On Mon, 10 Jul 2017 23:21:07 PDT (-0700), m...@ellerman.id.au wrote: >> Palmer Dabbelt writes: >>> >> ... >>> +#ifdef CONFIG_EARLY_PRINTK >>> +static void sbi_console_write(struct console *co, const char *buf, >>> +

[PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-11 Thread Palmer Dabbelt
The RISC-V ISA defines a simple console that is availiable via SBI calls on all systems. This patch adds a driver for this console interface that can act as both a target for early printk and as the system console. Signed-off-by: Palmer Dabbelt --- drivers/tty/hvc/Kconfig

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-11 Thread Palmer Dabbelt
On Mon, 10 Jul 2017 23:21:07 PDT (-0700), m...@ellerman.id.au wrote: > Palmer Dabbelt writes: >> > ... >> +#ifdef CONFIG_EARLY_PRINTK >> +static void sbi_console_write(struct console *co, const char *buf, >> + unsigned int n) >> +{ >> +int i; >> +

Re: [PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-11 Thread Michael Ellerman
Palmer Dabbelt writes: > ... > +#ifdef CONFIG_EARLY_PRINTK > +static void sbi_console_write(struct console *co, const char *buf, > + unsigned int n) > +{ > + int i; > + > + for (i = 0; i < n; ++i) { > + if (buf[i] == '\n') > +

[PATCH 08/17] tty: New RISC-V SBI console driver

2017-07-10 Thread Palmer Dabbelt
The RISC-V ISA defines a simple console that is availiable via SBI calls on all systems. This patch adds a driver for this console interface that can act as both a target for early printk and as the system console. Signed-off-by: Palmer Dabbelt --- drivers/tty/hvc/Kconfig