diff mbox

[Xen-devel,for-4.5,1/4] xen: arm: Add earlyprintk for McDivitt.

Message ID 1416329088-23328-1-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell Nov. 18, 2014, 4:44 p.m. UTC
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/Rules.mk |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Julien Grall Nov. 18, 2014, 4:59 p.m. UTC | #1
Hi Ian,

On 11/18/2014 04:44 PM, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  xen/arch/arm/Rules.mk |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index 572d854..ef887a5 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -95,6 +95,12 @@ EARLY_PRINTK_BAUD := 115200
>  EARLY_UART_BASE_ADDRESS := 0x1c020000
>  EARLY_UART_REG_SHIFT := 2
>  endif
> +ifeq ($(CONFIG_EARLY_PRINTK), xgene-mcdivitt)
> +EARLY_PRINTK_INC := 8250
> +EARLY_PRINTK_BAUD := 9600

EARLY_PRINTK_BAUD is not necessary as we don't use the initialization
function (EARLY_PRINTK_INIT_UART is not set).

With the EARLY_PRINTK_BAUD dropped, this could be merged with the
xgene-storm  early printk (I didn't really understand why the baud rate
is different). But I don't think it's 4.5 material.

Regards,
Ian Campbell Nov. 19, 2014, 9:54 a.m. UTC | #2
On Tue, 2014-11-18 at 16:59 +0000, Julien Grall wrote:
> Hi Ian,
> 
> On 11/18/2014 04:44 PM, Ian Campbell wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> >  xen/arch/arm/Rules.mk |    6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> > index 572d854..ef887a5 100644
> > --- a/xen/arch/arm/Rules.mk
> > +++ b/xen/arch/arm/Rules.mk
> > @@ -95,6 +95,12 @@ EARLY_PRINTK_BAUD := 115200
> >  EARLY_UART_BASE_ADDRESS := 0x1c020000
> >  EARLY_UART_REG_SHIFT := 2
> >  endif
> > +ifeq ($(CONFIG_EARLY_PRINTK), xgene-mcdivitt)
> > +EARLY_PRINTK_INC := 8250
> > +EARLY_PRINTK_BAUD := 9600
> 
> EARLY_PRINTK_BAUD is not necessary as we don't use the initialization
> function (EARLY_PRINTK_INIT_UART is not set).

Oh yes, oops. Also the baud is not even what is actually used, so it's
not even serving a documentary purpose.

> With the EARLY_PRINTK_BAUD dropped, this could be merged with the
> xgene-storm  early printk

It's at a different base address. Long term I either want to make this
(somewhat) runtime configurable or at least to rationalise the options
into the form <soc/soc-family>-uart<N>, or perhaps even <8250|pl011|
etc>@<address>[,<rate><settings>], if it's not to skanky to arrange to
parse that somewhere in the build system. Not for 4.5 though.

> (I didn't really understand why the baud rate
> is different).

Different hardware might potentially have different baud rates
configured in firmware which we would want to seemlessly follow, but
it's moot since the right thing to do in most cases is leave the
bootloader provided cfg alone.

> But I don't think it's 4.5 material.

You mean the patch generally or the merging?

Ian.
Julien Grall Nov. 19, 2014, 10:02 a.m. UTC | #3
Hi,

On 19/11/2014 09:54, Ian Campbell wrote:
> On Tue, 2014-11-18 at 16:59 +0000, Julien Grall wrote:
>> Hi Ian,
>>
>> On 11/18/2014 04:44 PM, Ian Campbell wrote:
>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>> ---
>>>   xen/arch/arm/Rules.mk |    6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
>>> index 572d854..ef887a5 100644
>>> --- a/xen/arch/arm/Rules.mk
>>> +++ b/xen/arch/arm/Rules.mk
>>> @@ -95,6 +95,12 @@ EARLY_PRINTK_BAUD := 115200
>>>   EARLY_UART_BASE_ADDRESS := 0x1c020000
>>>   EARLY_UART_REG_SHIFT := 2
>>>   endif
>>> +ifeq ($(CONFIG_EARLY_PRINTK), xgene-mcdivitt)
>>> +EARLY_PRINTK_INC := 8250
>>> +EARLY_PRINTK_BAUD := 9600
>>
>> EARLY_PRINTK_BAUD is not necessary as we don't use the initialization
>> function (EARLY_PRINTK_INIT_UART is not set).
>
> Oh yes, oops. Also the baud is not even what is actually used, so it's
> not even serving a documentary purpose.
>
>> With the EARLY_PRINTK_BAUD dropped, this could be merged with the
>> xgene-storm  early printk
>
> It's at a different base address. Long term I either want to make this
> (somewhat) runtime configurable or at least to rationalise the options
> into the form <soc/soc-family>-uart<N>, or perhaps even <8250|pl011|
> etc>@<address>[,<rate><settings>], if it's not to skanky to arrange to
> parse that somewhere in the build system. Not for 4.5 though.

> You mean the patch generally or the merging?

I meant rationalise the number of early printk. This patch looks fine 
for me.

Regards,
diff mbox

Patch

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 572d854..ef887a5 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -95,6 +95,12 @@  EARLY_PRINTK_BAUD := 115200
 EARLY_UART_BASE_ADDRESS := 0x1c020000
 EARLY_UART_REG_SHIFT := 2
 endif
+ifeq ($(CONFIG_EARLY_PRINTK), xgene-mcdivitt)
+EARLY_PRINTK_INC := 8250
+EARLY_PRINTK_BAUD := 9600
+EARLY_UART_BASE_ADDRESS := 0x1c021000
+EARLY_UART_REG_SHIFT := 2
+endif
 ifeq ($(CONFIG_EARLY_PRINTK), juno)
 EARLY_PRINTK_INC := pl011
 EARLY_PRINTK_BAUD := 115200