* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-10-27 12:57 ` Mans Rullgard
0 siblings, 0 replies; 14+ messages in thread
From: Mans Rullgard @ 2015-10-27 12:57 UTC (permalink / raw)
To: Russell King, linux-arm-kernel, linux-kernel
Some SoCs have a Palmchip UART with a non-standard register layout.
This allows the debug console to work with these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
arch/arm/Kconfig.debug | 8 ++++++++
arch/arm/include/debug/8250.S | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0cfd7f9..9039fff 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
DEBUG_BRCMSTB_UART
+config DEBUG_UART_8250_PALMCHIP
+ bool "8250 UART is Palmchip variant"
+ depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
+ help
+ Palmchip provides a UART implementation compatible with 16550
+ except for having a different register layout. Say Y here if
+ the debug UART is of this type.
+
config DEBUG_UART_8250_FLOW_CONTROL
bool "Enable flow control for 8250 UART"
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
index 7f7446f..2332f40 100644
--- a/arch/arm/include/debug/8250.S
+++ b/arch/arm/include/debug/8250.S
@@ -9,6 +9,18 @@
*/
#include <linux/serial_reg.h>
+#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
+
+#undef UART_TX
+#undef UART_LSR
+#undef UART_MSR
+
+#define UART_TX 1
+#define UART_LSR 7
+#define UART_MSR 8
+
+#endif
+
.macro addruart, rp, rv, tmp
ldr \rp, =CONFIG_DEBUG_UART_PHYS
ldr \rv, =CONFIG_DEBUG_UART_VIRT
--
2.6.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-10-27 12:57 ` Mans Rullgard
0 siblings, 0 replies; 14+ messages in thread
From: Mans Rullgard @ 2015-10-27 12:57 UTC (permalink / raw)
To: linux-arm-kernel
Some SoCs have a Palmchip UART with a non-standard register layout.
This allows the debug console to work with these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
arch/arm/Kconfig.debug | 8 ++++++++
arch/arm/include/debug/8250.S | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0cfd7f9..9039fff 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
DEBUG_BRCMSTB_UART
+config DEBUG_UART_8250_PALMCHIP
+ bool "8250 UART is Palmchip variant"
+ depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
+ help
+ Palmchip provides a UART implementation compatible with 16550
+ except for having a different register layout. Say Y here if
+ the debug UART is of this type.
+
config DEBUG_UART_8250_FLOW_CONTROL
bool "Enable flow control for 8250 UART"
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
index 7f7446f..2332f40 100644
--- a/arch/arm/include/debug/8250.S
+++ b/arch/arm/include/debug/8250.S
@@ -9,6 +9,18 @@
*/
#include <linux/serial_reg.h>
+#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
+
+#undef UART_TX
+#undef UART_LSR
+#undef UART_MSR
+
+#define UART_TX 1
+#define UART_LSR 7
+#define UART_MSR 8
+
+#endif
+
.macro addruart, rp, rv, tmp
ldr \rp, =CONFIG_DEBUG_UART_PHYS
ldr \rv, =CONFIG_DEBUG_UART_VIRT
--
2.6.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-10-27 12:57 ` Mans Rullgard
@ 2015-11-04 15:39 ` Mason
-1 siblings, 0 replies; 14+ messages in thread
From: Mason @ 2015-11-04 15:39 UTC (permalink / raw)
To: Mans Rullgard, Russell King; +Cc: linux-serial, Linux ARM
On 27/10/2015 13:57, Mans Rullgard wrote:
> Some SoCs have a Palmchip UART with a non-standard register layout.
> This allows the debug console to work with these.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> arch/arm/Kconfig.debug | 8 ++++++++
> arch/arm/include/debug/8250.S | 12 ++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 0cfd7f9..9039fff 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
> DEBUG_BRCMSTB_UART
>
> +config DEBUG_UART_8250_PALMCHIP
> + bool "8250 UART is Palmchip variant"
> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
I am 100% clueless about the UART sequence in Linux.
There's earlyprintk, the boot console (polled?), the "full-blown"
console (with IRQs)...
If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
in menuconfig, is there?
So I picked the following options:
CONFIG_DEBUG_LL=y
# CONFIG_DEBUG_ICEDCC is not set
# CONFIG_DEBUG_SEMIHOSTING is not set
CONFIG_DEBUG_LL_UART_8250=y
# CONFIG_DEBUG_LL_UART_PL01X is not set
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
# CONFIG_DEBUG_UART_8250 is not set
# CONFIG_DEBUG_UART_BCM63XX is not set
CONFIG_DEBUG_UART_PHYS=0x10700
CONFIG_DEBUG_UART_VIRT=0xf0010700
CONFIG_DEBUG_UART_8250_SHIFT=2
CONFIG_DEBUG_UART_8250_WORD=y
CONFIG_DEBUG_UART_8250_PALMCHIP=y
# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
CONFIG_DEBUG_UNCOMPRESS=y
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
CONFIG_EARLY_PRINTK=y
I suppose I have to provide DEBUG_UART_PHYS because it needs
the address before it can parse the DT? But how am I supposed
to know the virtual address? Isn't that from iomap(UART_PHYS)?
'make' wouldn't let me proceed unless I gave something...
Then I have to add earlyprintk to my boot command line, right?
Do I need to specify more than that?
According to the documentation,
earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
earlyprintk=vga
earlyprintk=efi
earlyprintk=xen
earlyprintk=serial[,ttySn[,baudrate]]
earlyprintk=serial[,0x...[,baudrate]]
earlyprintk=ttySn[,baudrate]
earlyprintk=dbgp[debugController#]
earlyprintk=pciserial,bus:device.function[,baudrate]
> + help
> + Palmchip provides a UART implementation compatible with 16550
> + except for having a different register layout. Say Y here if
> + the debug UART is of this type.
> +
> config DEBUG_UART_8250_FLOW_CONTROL
> bool "Enable flow control for 8250 UART"
> depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
> diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
> index 7f7446f..2332f40 100644
> --- a/arch/arm/include/debug/8250.S
> +++ b/arch/arm/include/debug/8250.S
> @@ -9,6 +9,18 @@
> */
> #include <linux/serial_reg.h>
>
> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
> +
> +#undef UART_TX
> +#undef UART_LSR
> +#undef UART_MSR
> +
> +#define UART_TX 1
> +#define UART_LSR 7
> +#define UART_MSR 8
> +
> +#endif
> +
> .macro addruart, rp, rv, tmp
> ldr \rp, =CONFIG_DEBUG_UART_PHYS
> ldr \rv, =CONFIG_DEBUG_UART_VIRT
>
Regards.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 15:39 ` Mason
0 siblings, 0 replies; 14+ messages in thread
From: Mason @ 2015-11-04 15:39 UTC (permalink / raw)
To: linux-arm-kernel
On 27/10/2015 13:57, Mans Rullgard wrote:
> Some SoCs have a Palmchip UART with a non-standard register layout.
> This allows the debug console to work with these.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> arch/arm/Kconfig.debug | 8 ++++++++
> arch/arm/include/debug/8250.S | 12 ++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 0cfd7f9..9039fff 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
> DEBUG_BRCMSTB_UART
>
> +config DEBUG_UART_8250_PALMCHIP
> + bool "8250 UART is Palmchip variant"
> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
I am 100% clueless about the UART sequence in Linux.
There's earlyprintk, the boot console (polled?), the "full-blown"
console (with IRQs)...
If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
in menuconfig, is there?
So I picked the following options:
CONFIG_DEBUG_LL=y
# CONFIG_DEBUG_ICEDCC is not set
# CONFIG_DEBUG_SEMIHOSTING is not set
CONFIG_DEBUG_LL_UART_8250=y
# CONFIG_DEBUG_LL_UART_PL01X is not set
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
# CONFIG_DEBUG_UART_8250 is not set
# CONFIG_DEBUG_UART_BCM63XX is not set
CONFIG_DEBUG_UART_PHYS=0x10700
CONFIG_DEBUG_UART_VIRT=0xf0010700
CONFIG_DEBUG_UART_8250_SHIFT=2
CONFIG_DEBUG_UART_8250_WORD=y
CONFIG_DEBUG_UART_8250_PALMCHIP=y
# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
CONFIG_DEBUG_UNCOMPRESS=y
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
CONFIG_EARLY_PRINTK=y
I suppose I have to provide DEBUG_UART_PHYS because it needs
the address before it can parse the DT? But how am I supposed
to know the virtual address? Isn't that from iomap(UART_PHYS)?
'make' wouldn't let me proceed unless I gave something...
Then I have to add earlyprintk to my boot command line, right?
Do I need to specify more than that?
According to the documentation,
earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
earlyprintk=vga
earlyprintk=efi
earlyprintk=xen
earlyprintk=serial[,ttySn[,baudrate]]
earlyprintk=serial[,0x...[,baudrate]]
earlyprintk=ttySn[,baudrate]
earlyprintk=dbgp[debugController#]
earlyprintk=pciserial,bus:device.function[,baudrate]
> + help
> + Palmchip provides a UART implementation compatible with 16550
> + except for having a different register layout. Say Y here if
> + the debug UART is of this type.
> +
> config DEBUG_UART_8250_FLOW_CONTROL
> bool "Enable flow control for 8250 UART"
> depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
> diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
> index 7f7446f..2332f40 100644
> --- a/arch/arm/include/debug/8250.S
> +++ b/arch/arm/include/debug/8250.S
> @@ -9,6 +9,18 @@
> */
> #include <linux/serial_reg.h>
>
> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
> +
> +#undef UART_TX
> +#undef UART_LSR
> +#undef UART_MSR
> +
> +#define UART_TX 1
> +#define UART_LSR 7
> +#define UART_MSR 8
> +
> +#endif
> +
> .macro addruart, rp, rv, tmp
> ldr \rp, =CONFIG_DEBUG_UART_PHYS
> ldr \rv, =CONFIG_DEBUG_UART_VIRT
>
Regards.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-11-04 15:39 ` Mason
@ 2015-11-04 15:47 ` Måns Rullgård
-1 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 15:47 UTC (permalink / raw)
To: Mason; +Cc: Russell King, linux-serial, Linux ARM
Mason <slash.tmp@free.fr> writes:
> On 27/10/2015 13:57, Mans Rullgard wrote:
>
>> Some SoCs have a Palmchip UART with a non-standard register layout.
>> This allows the debug console to work with these.
>>
>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>> ---
>> arch/arm/Kconfig.debug | 8 ++++++++
>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>> 2 files changed, 20 insertions(+)
>>
>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>> index 0cfd7f9..9039fff 100644
>> --- a/arch/arm/Kconfig.debug
>> +++ b/arch/arm/Kconfig.debug
>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>> DEBUG_BRCMSTB_UART
>>
>> +config DEBUG_UART_8250_PALMCHIP
>> + bool "8250 UART is Palmchip variant"
>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>
> I am 100% clueless about the UART sequence in Linux.
>
> There's earlyprintk, the boot console (polled?), the "full-blown"
> console (with IRQs)...
>
> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
> in menuconfig, is there?
>
> So I picked the following options:
>
> CONFIG_DEBUG_LL=y
> # CONFIG_DEBUG_ICEDCC is not set
> # CONFIG_DEBUG_SEMIHOSTING is not set
> CONFIG_DEBUG_LL_UART_8250=y
> # CONFIG_DEBUG_LL_UART_PL01X is not set
> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
> # CONFIG_DEBUG_UART_8250 is not set
> # CONFIG_DEBUG_UART_BCM63XX is not set
> CONFIG_DEBUG_UART_PHYS=0x10700
> CONFIG_DEBUG_UART_VIRT=0xf0010700
> CONFIG_DEBUG_UART_8250_SHIFT=2
> CONFIG_DEBUG_UART_8250_WORD=y
> CONFIG_DEBUG_UART_8250_PALMCHIP=y
> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
> CONFIG_DEBUG_UNCOMPRESS=y
> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
> CONFIG_EARLY_PRINTK=y
Those are the settings I use.
> I suppose I have to provide DEBUG_UART_PHYS because it needs
> the address before it can parse the DT? But how am I supposed
> to know the virtual address? Isn't that from iomap(UART_PHYS)?
The decompression code and early setup don't have that luxury.
> 'make' wouldn't let me proceed unless I gave something...
>
> Then I have to add earlyprintk to my boot command line, right?
> Do I need to specify more than that?
Just earlyprintk without any parameters works.
--
Måns Rullgård
mans@mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 15:47 ` Måns Rullgård
0 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 15:47 UTC (permalink / raw)
To: linux-arm-kernel
Mason <slash.tmp@free.fr> writes:
> On 27/10/2015 13:57, Mans Rullgard wrote:
>
>> Some SoCs have a Palmchip UART with a non-standard register layout.
>> This allows the debug console to work with these.
>>
>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>> ---
>> arch/arm/Kconfig.debug | 8 ++++++++
>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>> 2 files changed, 20 insertions(+)
>>
>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>> index 0cfd7f9..9039fff 100644
>> --- a/arch/arm/Kconfig.debug
>> +++ b/arch/arm/Kconfig.debug
>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>> DEBUG_BRCMSTB_UART
>>
>> +config DEBUG_UART_8250_PALMCHIP
>> + bool "8250 UART is Palmchip variant"
>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>
> I am 100% clueless about the UART sequence in Linux.
>
> There's earlyprintk, the boot console (polled?), the "full-blown"
> console (with IRQs)...
>
> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
> in menuconfig, is there?
>
> So I picked the following options:
>
> CONFIG_DEBUG_LL=y
> # CONFIG_DEBUG_ICEDCC is not set
> # CONFIG_DEBUG_SEMIHOSTING is not set
> CONFIG_DEBUG_LL_UART_8250=y
> # CONFIG_DEBUG_LL_UART_PL01X is not set
> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
> # CONFIG_DEBUG_UART_8250 is not set
> # CONFIG_DEBUG_UART_BCM63XX is not set
> CONFIG_DEBUG_UART_PHYS=0x10700
> CONFIG_DEBUG_UART_VIRT=0xf0010700
> CONFIG_DEBUG_UART_8250_SHIFT=2
> CONFIG_DEBUG_UART_8250_WORD=y
> CONFIG_DEBUG_UART_8250_PALMCHIP=y
> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
> CONFIG_DEBUG_UNCOMPRESS=y
> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
> CONFIG_EARLY_PRINTK=y
Those are the settings I use.
> I suppose I have to provide DEBUG_UART_PHYS because it needs
> the address before it can parse the DT? But how am I supposed
> to know the virtual address? Isn't that from iomap(UART_PHYS)?
The decompression code and early setup don't have that luxury.
> 'make' wouldn't let me proceed unless I gave something...
>
> Then I have to add earlyprintk to my boot command line, right?
> Do I need to specify more than that?
Just earlyprintk without any parameters works.
--
M?ns Rullg?rd
mans at mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-11-04 15:47 ` Måns Rullgård
@ 2015-11-04 15:59 ` Mason
-1 siblings, 0 replies; 14+ messages in thread
From: Mason @ 2015-11-04 15:59 UTC (permalink / raw)
To: Mans Rullgard; +Cc: Russell King, linux-serial, Linux ARM
On 04/11/2015 16:47, Måns Rullgård wrote:
> Mason writes:
>
>> On 27/10/2015 13:57, Mans Rullgard wrote:
>>
>>> Some SoCs have a Palmchip UART with a non-standard register layout.
>>> This allows the debug console to work with these.
>>>
>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>> ---
>>> arch/arm/Kconfig.debug | 8 ++++++++
>>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>>> 2 files changed, 20 insertions(+)
>>>
>>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>>> index 0cfd7f9..9039fff 100644
>>> --- a/arch/arm/Kconfig.debug
>>> +++ b/arch/arm/Kconfig.debug
>>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>>> DEBUG_BRCMSTB_UART
>>>
>>> +config DEBUG_UART_8250_PALMCHIP
>>> + bool "8250 UART is Palmchip variant"
>>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>>
>> I am 100% clueless about the UART sequence in Linux.
>>
>> There's earlyprintk, the boot console (polled?), the "full-blown"
>> console (with IRQs)...
>>
>> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
>> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
>> in menuconfig, is there?
>>
>> So I picked the following options:
>>
>> CONFIG_DEBUG_LL=y
>> # CONFIG_DEBUG_ICEDCC is not set
>> # CONFIG_DEBUG_SEMIHOSTING is not set
>> CONFIG_DEBUG_LL_UART_8250=y
>> # CONFIG_DEBUG_LL_UART_PL01X is not set
>> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
>> # CONFIG_DEBUG_UART_8250 is not set
>> # CONFIG_DEBUG_UART_BCM63XX is not set
>> CONFIG_DEBUG_UART_PHYS=0x10700
>> CONFIG_DEBUG_UART_VIRT=0xf0010700
>> CONFIG_DEBUG_UART_8250_SHIFT=2
>> CONFIG_DEBUG_UART_8250_WORD=y
>> CONFIG_DEBUG_UART_8250_PALMCHIP=y
>> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
>> CONFIG_DEBUG_UNCOMPRESS=y
>> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
>> CONFIG_EARLY_PRINTK=y
>
> Those are the settings I use.
>
>> I suppose I have to provide DEBUG_UART_PHYS because it needs
>> the address before it can parse the DT? But how am I supposed
>> to know the virtual address? Isn't that from iomap(UART_PHYS)?
>
> The decompression code and early setup don't have that luxury.
But how am I supposed to compute the virtual address?
Can I set DEBUG_UART_VIRT to 0xdeadbeef? :-)
Also is it expected that setting DEBUG_LL forces make to recompile
every source file in the source tree?
Regards.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 15:59 ` Mason
0 siblings, 0 replies; 14+ messages in thread
From: Mason @ 2015-11-04 15:59 UTC (permalink / raw)
To: linux-arm-kernel
On 04/11/2015 16:47, M?ns Rullg?rd wrote:
> Mason writes:
>
>> On 27/10/2015 13:57, Mans Rullgard wrote:
>>
>>> Some SoCs have a Palmchip UART with a non-standard register layout.
>>> This allows the debug console to work with these.
>>>
>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>> ---
>>> arch/arm/Kconfig.debug | 8 ++++++++
>>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>>> 2 files changed, 20 insertions(+)
>>>
>>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>>> index 0cfd7f9..9039fff 100644
>>> --- a/arch/arm/Kconfig.debug
>>> +++ b/arch/arm/Kconfig.debug
>>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>>> DEBUG_BRCMSTB_UART
>>>
>>> +config DEBUG_UART_8250_PALMCHIP
>>> + bool "8250 UART is Palmchip variant"
>>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>>
>> I am 100% clueless about the UART sequence in Linux.
>>
>> There's earlyprintk, the boot console (polled?), the "full-blown"
>> console (with IRQs)...
>>
>> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
>> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
>> in menuconfig, is there?
>>
>> So I picked the following options:
>>
>> CONFIG_DEBUG_LL=y
>> # CONFIG_DEBUG_ICEDCC is not set
>> # CONFIG_DEBUG_SEMIHOSTING is not set
>> CONFIG_DEBUG_LL_UART_8250=y
>> # CONFIG_DEBUG_LL_UART_PL01X is not set
>> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
>> # CONFIG_DEBUG_UART_8250 is not set
>> # CONFIG_DEBUG_UART_BCM63XX is not set
>> CONFIG_DEBUG_UART_PHYS=0x10700
>> CONFIG_DEBUG_UART_VIRT=0xf0010700
>> CONFIG_DEBUG_UART_8250_SHIFT=2
>> CONFIG_DEBUG_UART_8250_WORD=y
>> CONFIG_DEBUG_UART_8250_PALMCHIP=y
>> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
>> CONFIG_DEBUG_UNCOMPRESS=y
>> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
>> CONFIG_EARLY_PRINTK=y
>
> Those are the settings I use.
>
>> I suppose I have to provide DEBUG_UART_PHYS because it needs
>> the address before it can parse the DT? But how am I supposed
>> to know the virtual address? Isn't that from iomap(UART_PHYS)?
>
> The decompression code and early setup don't have that luxury.
But how am I supposed to compute the virtual address?
Can I set DEBUG_UART_VIRT to 0xdeadbeef? :-)
Also is it expected that setting DEBUG_LL forces make to recompile
every source file in the source tree?
Regards.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-11-04 15:59 ` Mason
@ 2015-11-04 16:08 ` Måns Rullgård
-1 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 16:08 UTC (permalink / raw)
To: Mason; +Cc: Russell King, linux-serial, Linux ARM
Mason <slash.tmp@free.fr> writes:
> On 04/11/2015 16:47, Måns Rullgård wrote:
>
>> Mason writes:
>>
>>> On 27/10/2015 13:57, Mans Rullgard wrote:
>>>
>>>> Some SoCs have a Palmchip UART with a non-standard register layout.
>>>> This allows the debug console to work with these.
>>>>
>>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>>> ---
>>>> arch/arm/Kconfig.debug | 8 ++++++++
>>>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>>>> 2 files changed, 20 insertions(+)
>>>>
>>>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>>>> index 0cfd7f9..9039fff 100644
>>>> --- a/arch/arm/Kconfig.debug
>>>> +++ b/arch/arm/Kconfig.debug
>>>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>>>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>>>> DEBUG_BRCMSTB_UART
>>>>
>>>> +config DEBUG_UART_8250_PALMCHIP
>>>> + bool "8250 UART is Palmchip variant"
>>>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>>>
>>> I am 100% clueless about the UART sequence in Linux.
>>>
>>> There's earlyprintk, the boot console (polled?), the "full-blown"
>>> console (with IRQs)...
>>>
>>> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
>>> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
>>> in menuconfig, is there?
>>>
>>> So I picked the following options:
>>>
>>> CONFIG_DEBUG_LL=y
>>> # CONFIG_DEBUG_ICEDCC is not set
>>> # CONFIG_DEBUG_SEMIHOSTING is not set
>>> CONFIG_DEBUG_LL_UART_8250=y
>>> # CONFIG_DEBUG_LL_UART_PL01X is not set
>>> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
>>> # CONFIG_DEBUG_UART_8250 is not set
>>> # CONFIG_DEBUG_UART_BCM63XX is not set
>>> CONFIG_DEBUG_UART_PHYS=0x10700
>>> CONFIG_DEBUG_UART_VIRT=0xf0010700
>>> CONFIG_DEBUG_UART_8250_SHIFT=2
>>> CONFIG_DEBUG_UART_8250_WORD=y
>>> CONFIG_DEBUG_UART_8250_PALMCHIP=y
>>> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
>>> CONFIG_DEBUG_UNCOMPRESS=y
>>> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
>>> CONFIG_EARLY_PRINTK=y
>>
>> Those are the settings I use.
>>
>>> I suppose I have to provide DEBUG_UART_PHYS because it needs
>>> the address before it can parse the DT? But how am I supposed
>>> to know the virtual address? Isn't that from iomap(UART_PHYS)?
>>
>> The decompression code and early setup don't have that luxury.
>
> But how am I supposed to compute the virtual address?
> Can I set DEBUG_UART_VIRT to 0xdeadbeef? :-)
Add 0xf0000000.
> Also is it expected that setting DEBUG_LL forces make to recompile
> every source file in the source tree?
Apparently. :)
--
Måns Rullgård
mans@mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 16:08 ` Måns Rullgård
0 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 16:08 UTC (permalink / raw)
To: linux-arm-kernel
Mason <slash.tmp@free.fr> writes:
> On 04/11/2015 16:47, M?ns Rullg?rd wrote:
>
>> Mason writes:
>>
>>> On 27/10/2015 13:57, Mans Rullgard wrote:
>>>
>>>> Some SoCs have a Palmchip UART with a non-standard register layout.
>>>> This allows the debug console to work with these.
>>>>
>>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>>> ---
>>>> arch/arm/Kconfig.debug | 8 ++++++++
>>>> arch/arm/include/debug/8250.S | 12 ++++++++++++
>>>> 2 files changed, 20 insertions(+)
>>>>
>>>> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
>>>> index 0cfd7f9..9039fff 100644
>>>> --- a/arch/arm/Kconfig.debug
>>>> +++ b/arch/arm/Kconfig.debug
>>>> @@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
>>>> DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
>>>> DEBUG_BRCMSTB_UART
>>>>
>>>> +config DEBUG_UART_8250_PALMCHIP
>>>> + bool "8250 UART is Palmchip variant"
>>>> + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
>>>
>>> I am 100% clueless about the UART sequence in Linux.
>>>
>>> There's earlyprintk, the boot console (polled?), the "full-blown"
>>> console (with IRQs)...
>>>
>>> If I want earlyprintk, I have to enable DEBUG_LL (?) so I'll have
>>> DEBUG_LL_UART_8250, right? There's no way to pick DEBUG_UART_8250
>>> in menuconfig, is there?
>>>
>>> So I picked the following options:
>>>
>>> CONFIG_DEBUG_LL=y
>>> # CONFIG_DEBUG_ICEDCC is not set
>>> # CONFIG_DEBUG_SEMIHOSTING is not set
>>> CONFIG_DEBUG_LL_UART_8250=y
>>> # CONFIG_DEBUG_LL_UART_PL01X is not set
>>> CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
>>> # CONFIG_DEBUG_UART_8250 is not set
>>> # CONFIG_DEBUG_UART_BCM63XX is not set
>>> CONFIG_DEBUG_UART_PHYS=0x10700
>>> CONFIG_DEBUG_UART_VIRT=0xf0010700
>>> CONFIG_DEBUG_UART_8250_SHIFT=2
>>> CONFIG_DEBUG_UART_8250_WORD=y
>>> CONFIG_DEBUG_UART_8250_PALMCHIP=y
>>> # CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
>>> CONFIG_DEBUG_UNCOMPRESS=y
>>> CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
>>> CONFIG_EARLY_PRINTK=y
>>
>> Those are the settings I use.
>>
>>> I suppose I have to provide DEBUG_UART_PHYS because it needs
>>> the address before it can parse the DT? But how am I supposed
>>> to know the virtual address? Isn't that from iomap(UART_PHYS)?
>>
>> The decompression code and early setup don't have that luxury.
>
> But how am I supposed to compute the virtual address?
> Can I set DEBUG_UART_VIRT to 0xdeadbeef? :-)
Add 0xf0000000.
> Also is it expected that setting DEBUG_LL forces make to recompile
> every source file in the source tree?
Apparently. :)
--
M?ns Rullg?rd
mans at mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-10-27 12:57 ` Mans Rullgard
@ 2015-11-04 20:39 ` Arnd Bergmann
-1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-11-04 20:39 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Mans Rullgard, Russell King, linux-kernel
On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
> --- a/arch/arm/include/debug/8250.S
> +++ b/arch/arm/include/debug/8250.S
> @@ -9,6 +9,18 @@
> */
> #include <linux/serial_reg.h>
>
> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
> +
> +#undef UART_TX
> +#undef UART_LSR
> +#undef UART_MSR
> +
> +#define UART_TX 1
> +#define UART_LSR 7
> +#define UART_MSR 8
> +
> +#endif
>
Maybe use a separate file instead of an #ifdef?
Something like
arch/arm/include/debug/8250-palmchip.S:
#include <linux/serial_reg.h>
#undef UART_TX
#undef UART_LSR
#undef UART_MSR
#define UART_TX 1
#define UART_LSR 7
#define UART_MSR 8
#include "8250.S"
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 20:39 ` Arnd Bergmann
0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-11-04 20:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
> --- a/arch/arm/include/debug/8250.S
> +++ b/arch/arm/include/debug/8250.S
> @@ -9,6 +9,18 @@
> */
> #include <linux/serial_reg.h>
>
> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
> +
> +#undef UART_TX
> +#undef UART_LSR
> +#undef UART_MSR
> +
> +#define UART_TX 1
> +#define UART_LSR 7
> +#define UART_MSR 8
> +
> +#endif
>
Maybe use a separate file instead of an #ifdef?
Something like
arch/arm/include/debug/8250-palmchip.S:
#include <linux/serial_reg.h>
#undef UART_TX
#undef UART_LSR
#undef UART_MSR
#define UART_TX 1
#define UART_LSR 7
#define UART_MSR 8
#include "8250.S"
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
2015-11-04 20:39 ` Arnd Bergmann
@ 2015-11-04 21:41 ` Måns Rullgård
-1 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 21:41 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-arm-kernel, Russell King, linux-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
>> --- a/arch/arm/include/debug/8250.S
>> +++ b/arch/arm/include/debug/8250.S
>> @@ -9,6 +9,18 @@
>> */
>> #include <linux/serial_reg.h>
>>
>> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
>> +
>> +#undef UART_TX
>> +#undef UART_LSR
>> +#undef UART_MSR
>> +
>> +#define UART_TX 1
>> +#define UART_LSR 7
>> +#define UART_MSR 8
>> +
>> +#endif
>>
>
> Maybe use a separate file instead of an #ifdef?
>
> Something like
>
> arch/arm/include/debug/8250-palmchip.S:
>
> #include <linux/serial_reg.h>
>
> #undef UART_TX
> #undef UART_LSR
> #undef UART_MSR
>
> #define UART_TX 1
> #define UART_LSR 7
> #define UART_MSR 8
>
> #include "8250.S"
Good idea. I'll make a new patch.
--
Måns Rullgård
mans@mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
@ 2015-11-04 21:41 ` Måns Rullgård
0 siblings, 0 replies; 14+ messages in thread
From: Måns Rullgård @ 2015-11-04 21:41 UTC (permalink / raw)
To: linux-arm-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> On Tuesday 27 October 2015 12:57:57 Mans Rullgard wrote:
>> --- a/arch/arm/include/debug/8250.S
>> +++ b/arch/arm/include/debug/8250.S
>> @@ -9,6 +9,18 @@
>> */
>> #include <linux/serial_reg.h>
>>
>> +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
>> +
>> +#undef UART_TX
>> +#undef UART_LSR
>> +#undef UART_MSR
>> +
>> +#define UART_TX 1
>> +#define UART_LSR 7
>> +#define UART_MSR 8
>> +
>> +#endif
>>
>
> Maybe use a separate file instead of an #ifdef?
>
> Something like
>
> arch/arm/include/debug/8250-palmchip.S:
>
> #include <linux/serial_reg.h>
>
> #undef UART_TX
> #undef UART_LSR
> #undef UART_MSR
>
> #define UART_TX 1
> #define UART_LSR 7
> #define UART_MSR 8
>
> #include "8250.S"
Good idea. I'll make a new patch.
--
M?ns Rullg?rd
mans at mansr.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-11-04 21:41 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 12:57 [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART Mans Rullgard
2015-10-27 12:57 ` Mans Rullgard
2015-11-04 15:39 ` Mason
2015-11-04 15:39 ` Mason
2015-11-04 15:47 ` Måns Rullgård
2015-11-04 15:47 ` Måns Rullgård
2015-11-04 15:59 ` Mason
2015-11-04 15:59 ` Mason
2015-11-04 16:08 ` Måns Rullgård
2015-11-04 16:08 ` Måns Rullgård
2015-11-04 20:39 ` Arnd Bergmann
2015-11-04 20:39 ` Arnd Bergmann
2015-11-04 21:41 ` Måns Rullgård
2015-11-04 21:41 ` Måns Rullgård
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.