On 2017-11-20 11:51, [email protected] wrote:
> From: Ruediger Fichter <[email protected]>
> 
> Enable the clock gate of the debug console, even in the case it has been 
> turned off i.e. because the root cell is not using the UART.
> 
> Signed-off-by: Ruediger Fichter <[email protected]>
> Signed-off-by: Jan von Wiarda <[email protected]>
> ---
>  hypervisor/arch/arm-common/uart-hscif.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hypervisor/arch/arm-common/uart-hscif.c 
> b/hypervisor/arch/arm-common/uart-hscif.c
> index 4eb7534..a3cab70 100644
> --- a/hypervisor/arch/arm-common/uart-hscif.c
> +++ b/hypervisor/arch/arm-common/uart-hscif.c
> @@ -30,8 +30,12 @@
>  
>  static void uart_init(struct uart_chip *chip)
>  {
> +     void *clock_reg = (void*)(unsigned long)chip->virt_clock_reg;
> +     unsigned int gate_nr = chip->debug_console->gate_nr;
>       u16 hsscr;
>  
> +     mmio_write32(clock_reg, mmio_read32(clock_reg) & ~(1 << gate_nr));
> +
>       if (chip->debug_console->divider) {
>               hsscr = mmio_read16(chip->virt_base + HSCIF_HSSCR);
>               mmio_write16(chip->virt_base + HSCIF_HSSCR,
> 

Merged, but I made the write conditional ("if (clock_reg)") because the
user may decide to not specify the register in the config and rather
rely on Linux having opened the gate.

Jan
-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to