From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965862AbcIHKEQ (ORCPT ); Thu, 8 Sep 2016 06:04:16 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34438 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbcIHKEO (ORCPT ); Thu, 8 Sep 2016 06:04:14 -0400 Subject: Re: [PATCH V2 4/4] ARM64 LPC: support earlycon for UART connected to LPC To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org References: <1473255233-154297-1-git-send-email-yuanzhichang@hisilicon.com> <1473255233-154297-5-git-send-email-yuanzhichang@hisilicon.com> <4291379.IHAA72aKCk@wuerfel> Cc: Zhichang Yuan , linuxarm@huawei.com, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, minyard@acm.org, benh@kernel.crashing.org, gabriele.paoloni@huawei.com, john.garry@huawei.com, liviu.dudau@arm.com, zourongrong@gmail.com From: zhichang X-Enigmail-Draft-Status: N1110 Message-ID: <57D137AF.9070306@gmail.com> Date: Thu, 8 Sep 2016 18:04:31 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <4291379.IHAA72aKCk@wuerfel> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" >> >> 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 >> > > 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. 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... 3. Just as your guess, earlycon should be earlier than lpc initialization. Best, Zhichang > > Could we start the LPC driver earlier to work around that? > > Arnd >