From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wei Xu <xuwei5@hisilicon.com>, Rob Herring <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
<linux-arm-kernel@lists.infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>, <majun258@huawei.com>,
<guohanjun@huawei.com>, <linux-kernel@vger.kernel.org>,
Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH 5/5] tty: amba-pl011: Add earlycon support for SBSA UART
Date: Mon, 24 Oct 2016 11:59:20 +0800 [thread overview]
Message-ID: <7edb183d-2376-0f09-a3ea-3bf78971609d@huawei.com> (raw)
In-Reply-To: <281fb262-d9b8-9543-e35e-5db41fcea5d1@huawei.com>
Hi Greg, any more comments, thanks.
On 2016/9/27 21:15, Kefeng Wang wrote:
>
>
> On 2016/9/27 18:57, Greg Kroah-Hartman wrote:
>> On Sat, Sep 24, 2016 at 05:14:25PM +0800, Kefeng Wang wrote:
>>> Declare an OF early console for SBSA UART so that the early console device
>>> can be specified via the "stdout-path" property in device-tree.
>>>
>>> Cc: Russell King <linux@armlinux.org.uk>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>>> ---
>>> drivers/tty/serial/amba-pl011.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
>>> index 7d9b291..3688d3b 100644
>>> --- a/drivers/tty/serial/amba-pl011.c
>>> +++ b/drivers/tty/serial/amba-pl011.c
>>> @@ -2330,6 +2330,7 @@ static int __init pl011_early_console_setup(struct earlycon_device *device,
>>> return 0;
>>> }
>>> OF_EARLYCON_DECLARE(pl011, "arm,pl011", pl011_early_console_setup);
>>> +OF_EARLYCON_DECLARE(pl011, "arm,sbsa-uart", pl011_early_console_setup);
>>
>> Why do you need another option for the same thing?
>
>
> It is used to support earlycon(without option) for sbsa-uart in bootargs.
>
> chosen {
> stdout-path = "serial0:115200n8";
> bootargs = "earlycon"
> };
>
> uart0: uart@602b0000 {
> compatible = "arm,sbsa-uart";
> reg = <0x0 0x602b0000 0x0 0x1000>;
> ...
> };
>
> We setup a unique struct with compatible name by OF_EARLYCON_DECLARE,
> #define OF_EARLYCON_DECLARE(_name, compat, fn) \
> static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
> __used __section(__earlycon_table) \
> = { .name = __stringify(_name), \
> .compatible = compat, \
> .setup = fn }
>
> if without this patch(see drivers/of/fdt.c),
>
> early_init_dt_scan_chosen_serial()
> - for (match = __earlycon_table; match < __earlycon_table_end; match++)
> -- if (fdt_node_check_compatible(fdt, offset, match->compatible))
> countinue;
> -- of_setup_earlycon(match, offset, options); // will never touch here.
>
> Thanks,
> Kefeng
>
>>
>> confused,
>>
>> greg k-h
>>
>> .
>>
>
>
> .
>
next prev parent reply other threads:[~2016-10-24 4:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-24 9:14 [PATCH 0/5] arm64: dts: hisilicon: Hip06 fix and support Hip07 D05 board Kefeng Wang
2016-09-24 9:14 ` [PATCH 1/5] arm64: dts: hip06: Correct hardware pin number of usb node Kefeng Wang
2016-11-15 16:17 ` Wei Xu
2016-09-24 9:14 ` [PATCH 2/5] Documentation: arm64: Add Hisilicon Hip07 D05 dts binding Kefeng Wang
2016-11-15 16:17 ` Wei Xu
2016-09-24 9:14 ` [PATCH 3/5] arm64: dts: hisilicon: Add initial dts for Hip07 D05 board Kefeng Wang
2016-11-15 16:18 ` Wei Xu
2016-09-24 9:14 ` [PATCH 4/5] tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq Kefeng Wang
2016-09-24 9:14 ` [PATCH 5/5] tty: amba-pl011: Add earlycon support for SBSA UART Kefeng Wang
2016-09-27 10:57 ` Greg Kroah-Hartman
2016-09-27 13:15 ` Kefeng Wang
2016-10-24 3:59 ` Kefeng Wang [this message]
2016-10-27 15:18 ` Greg Kroah-Hartman
2016-10-30 8:49 ` Kefeng Wang
2016-10-30 13:31 ` Greg Kroah-Hartman
2016-10-31 2:04 ` [PATCH RESEND] " Kefeng Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7edb183d-2376-0f09-a3ea-3bf78971609d@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=guohanjun@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=majun258@huawei.com \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=will.deacon@arm.com \
--cc=xuwei5@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®