Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1479096

Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC
Date 2016-09-08 13:10 +0200
Message-ID <sf5ns-53y-9@gated-at.bofh.it> (permalink)
References <seKVH-db-1@gated-at.bofh.it> <seMut-13P-9@gated-at.bofh.it> <sf4ro-4qN-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday, September 8, 2016 6:04:31 PM CEST zhichang wrote:
> Hi, Arnd,
> 
> On 2016年09月07日 22:52, Arnd Bergmann wrote:
> > On Wednesday, September 7, 2016 9:33:53 PM CEST Zhichang Yuan wrote:
> >> From: "zhichang.yuan" <yuanzhichang@hisilicon.com>
> >>
> >> This patch support the earlycon for UART connected to LPC on Hip06.
> >> This patch is depended on the LPC driver.
> >>
> >> Signed-off-by: zhichang.yuan <yuanzhichang@hisilicon.com>
> >>
> > 
> > I'm skeptical about this too. Is this just needed because the 8250
> > earlycon support comes before the lpc bus initialization?
> I think you wonder why early_serial8250_setup can not be used direclty for this earlycon of LPC uart.
> 
> 1. the earlycon kernel parameter format of LPC uart is different from 8250. something like that
> "earlycon=hisilpcuart,mmio,0xa01b0000,0,0x2f8". You see, there is one more parameter after the baudrate.

We should never need to specify the addresses manually like this,
it's actually supposed to work if you just list "earlycon" here.

The first membase is apparently only used during setup:

+       writel(LPC_IRQ_CLEAR, device->port.membase + LPC_REG_IRQ_ST);
+       /* ensure the LPC is available */
+       while (!(readl(device->port.membase + LPC_REG_OP_STATUS) &
+                       LPC_STATUS_IDLE))

Why doesn't the firmware do this before handing off control of
the kernel to the console?

> Hip06 LPC uart need two base addresses for earlycon.
> 2. the IO type is mmio to introduce a memory base address to access LPC register file. But the real uart
> IO type is UPIO_PORT. This is spcial...

This sounds like a deficiency in the of_setup_earlycon() function,
which can only handle MMIO addresses, and won't actually
be able to understand nodes without a "ranges" property like
you have here.

I think we need to add a special case for port ranges here.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 0/4] ARM64 LPC: legacy ISA I/O support Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-07 15:20 +0200
  [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-07 15:20 +0200
    Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC Arnd Bergmann <arnd@arndb.de> - 2016-09-07 17:00 +0200
      Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to  LPC zhichang <zhichang.yuan02@gmail.com> - 2016-09-08 12:10 +0200
        Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC Arnd Bergmann <arnd@arndb.de> - 2016-09-08 13:10 +0200
  [PATCH V2 3/4] ARM64 LPC: support serial based on low-pin-count Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-07 15:20 +0200
    Re: [PATCH V2 3/4] ARM64 LPC: support serial based on low-pin-count Arnd Bergmann <arnd@arndb.de> - 2016-09-07 17:00 +0200
      Re: [PATCH V2 3/4] ARM64 LPC: support serial based on low-pin-count Arnd Bergmann <arnd@arndb.de> - 2016-09-08 12:00 +0200
      Re: [PATCH V2 3/4] ARM64 LPC: support serial based on low-pin-count zhichang <zhichang.yuan02@gmail.com> - 2016-09-08 12:00 +0200
  [PATCH V2 2/4] ARM64 LPC: LPC driver implementation on Hip06 Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-07 15:20 +0200
    Re: [PATCH V2 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-07 17:30 +0200
      Re: [PATCH V2 2/4] ARM64 LPC: LPC driver implementation on Hip06 "zhichang.yuan" <yuanzhichang@hisilicon.com> - 2016-09-08 10:10 +0200
        Re: [PATCH V2 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-08 12:10 +0200
  [PATCH V2 1/4] ARM64 LPC: Indirect ISA port IO introduced Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-07 15:20 +0200
    Re: [PATCH V2 1/4] ARM64 LPC: Indirect ISA port IO introduced Arnd Bergmann <arnd@arndb.de> - 2016-09-07 17:10 +0200
      Re: [PATCH V2 1/4] ARM64 LPC: Indirect ISA port IO introduced "zhichang.yuan" <yuanzhichang@hisilicon.com> - 2016-09-08 09:50 +0200
        Re: [PATCH V2 1/4] ARM64 LPC: Indirect ISA port IO introduced Arnd Bergmann <arnd@arndb.de> - 2016-09-08 15:30 +0200
    Re: [PATCH V2 1/4] ARM64 LPC: Indirect ISA port IO introduced kbuild test robot <lkp@intel.com> - 2016-09-07 17:30 +0200

csiph-web