All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-10 14:13 ` Arun Chandran
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-10 14:13 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, Michal Simek, Sören Brinkmann,
	linux-arm-kernel, Arun Chandran

earlyprintk messages are not appearing on the terminal
emulator during a big endian kernel boot. If we
byte swap the sending data it comes properly.

Signed-off-by: Arun Chandran <achandran@mvista.com>
---
---
This can be tested by adding 'early_print("early print test\n");'
to setup_arch() in arch/arm/kernel/setup.c
---
 arch/arm/include/debug/zynq.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index bd13ded..0d274fe 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -38,6 +38,7 @@
 		.endm
 
 		.macro	senduart,rd,rx
+ARM_BE8(	rev	\rd, \rd )
 		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
 		.endm
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-10 14:13 ` Arun Chandran
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-10 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

earlyprintk messages are not appearing on the terminal
emulator during a big endian kernel boot. If we
byte swap the sending data it comes properly.

Signed-off-by: Arun Chandran <achandran@mvista.com>
---
---
This can be tested by adding 'early_print("early print test\n");'
to setup_arch() in arch/arm/kernel/setup.c
---
 arch/arm/include/debug/zynq.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index bd13ded..0d274fe 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -38,6 +38,7 @@
 		.endm
 
 		.macro	senduart,rd,rx
+ARM_BE8(	rev	\rd, \rd )
 		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
 		.endm
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
  2015-06-10 14:13 ` Arun Chandran
@ 2015-06-11 18:13   ` Michal Simek
  -1 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2015-06-11 18:13 UTC (permalink / raw)
  To: Arun Chandran, Michal Simek
  Cc: linux-kernel, Michal Simek, Sören Brinkmann, linux-arm-kernel

On 06/10/2015 04:13 PM, Arun Chandran wrote:
> earlyprintk messages are not appearing on the terminal
> emulator during a big endian kernel boot. If we
> byte swap the sending data it comes properly.
> 
> Signed-off-by: Arun Chandran <achandran@mvista.com>
> ---
> ---
> This can be tested by adding 'early_print("early print test\n");'
> to setup_arch() in arch/arm/kernel/setup.c
> ---
>  arch/arm/include/debug/zynq.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
> index bd13ded..0d274fe 100644
> --- a/arch/arm/include/debug/zynq.S
> +++ b/arch/arm/include/debug/zynq.S
> @@ -38,6 +38,7 @@
>  		.endm
>  
>  		.macro	senduart,rd,rx
> +ARM_BE8(	rev	\rd, \rd )
>  		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
>  		.endm
>  
> 

Tested-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-11 18:13   ` Michal Simek
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2015-06-11 18:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/10/2015 04:13 PM, Arun Chandran wrote:
> earlyprintk messages are not appearing on the terminal
> emulator during a big endian kernel boot. If we
> byte swap the sending data it comes properly.
> 
> Signed-off-by: Arun Chandran <achandran@mvista.com>
> ---
> ---
> This can be tested by adding 'early_print("early print test\n");'
> to setup_arch() in arch/arm/kernel/setup.c
> ---
>  arch/arm/include/debug/zynq.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
> index bd13ded..0d274fe 100644
> --- a/arch/arm/include/debug/zynq.S
> +++ b/arch/arm/include/debug/zynq.S
> @@ -38,6 +38,7 @@
>  		.endm
>  
>  		.macro	senduart,rd,rx
> +ARM_BE8(	rev	\rd, \rd )
>  		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
>  		.endm
>  
> 

Tested-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode
  2015-06-10 14:13 ` Arun Chandran
@ 2015-06-12  6:53   ` Arun Chandran
  -1 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-12  6:53 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, Michal Simek, Sören Brinkmann,
	linux-arm-kernel, Arun Chandran

earlyprintk messages are not appearing on the terminal
emulator during a big endian kernel boot. In BE mode
sending full words to UART will result in unprintable
characters as they are byte swapped versions of printable
ones. So send only bytes.

Signed-off-by: Arun Chandran <achandran@mvista.com>
---
---
Changes since v1:
	removed the byte swapping logic. Just send characters instead.
---
 arch/arm/include/debug/zynq.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index bd13ded..de86b92 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -38,7 +38,7 @@
 		.endm
 
 		.macro	senduart,rd,rx
-		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
+		strb	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
 		.endm
 
 		.macro	waituart,rd,rx
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-12  6:53   ` Arun Chandran
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-12  6:53 UTC (permalink / raw)
  To: linux-arm-kernel

earlyprintk messages are not appearing on the terminal
emulator during a big endian kernel boot. In BE mode
sending full words to UART will result in unprintable
characters as they are byte swapped versions of printable
ones. So send only bytes.

Signed-off-by: Arun Chandran <achandran@mvista.com>
---
---
Changes since v1:
	removed the byte swapping logic. Just send characters instead.
---
 arch/arm/include/debug/zynq.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
index bd13ded..de86b92 100644
--- a/arch/arm/include/debug/zynq.S
+++ b/arch/arm/include/debug/zynq.S
@@ -38,7 +38,7 @@
 		.endm
 
 		.macro	senduart,rd,rx
-		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
+		strb	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
 		.endm
 
 		.macro	waituart,rd,rx
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
  2015-06-11 18:13   ` Michal Simek
@ 2015-06-12  6:58     ` Arun Chandran
  -1 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-12  6:58 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, Michal Simek, Sören Brinkmann, linux-arm-kernel

On Thu, Jun 11, 2015 at 11:43 PM, Michal Simek <michal.simek@xilinx.com> wrote:
> On 06/10/2015 04:13 PM, Arun Chandran wrote:
>> earlyprintk messages are not appearing on the terminal
>> emulator during a big endian kernel boot. If we
>> byte swap the sending data it comes properly.
>>
>> Signed-off-by: Arun Chandran <achandran@mvista.com>
>> ---
>> ---
>> This can be tested by adding 'early_print("early print test\n");'
>> to setup_arch() in arch/arm/kernel/setup.c
>> ---
>>  arch/arm/include/debug/zynq.S | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
>> index bd13ded..0d274fe 100644
>> --- a/arch/arm/include/debug/zynq.S
>> +++ b/arch/arm/include/debug/zynq.S
>> @@ -38,6 +38,7 @@
>>               .endm
>>
>>               .macro  senduart,rd,rx
>> +ARM_BE8(     rev     \rd, \rd )
>>               str     \rd, [\rx, #UART_FIFO_OFFSET]   @ TXDATA
>>               .endm
>>
>>
>
> Tested-by: Michal Simek <michal.simek@xilinx.com>
>

I think just using strb instead of str will do the work
much better. I have send v2 with that logic

Thanks for testing it.

--Arun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-12  6:58     ` Arun Chandran
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Chandran @ 2015-06-12  6:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 11, 2015 at 11:43 PM, Michal Simek <michal.simek@xilinx.com> wrote:
> On 06/10/2015 04:13 PM, Arun Chandran wrote:
>> earlyprintk messages are not appearing on the terminal
>> emulator during a big endian kernel boot. If we
>> byte swap the sending data it comes properly.
>>
>> Signed-off-by: Arun Chandran <achandran@mvista.com>
>> ---
>> ---
>> This can be tested by adding 'early_print("early print test\n");'
>> to setup_arch() in arch/arm/kernel/setup.c
>> ---
>>  arch/arm/include/debug/zynq.S | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
>> index bd13ded..0d274fe 100644
>> --- a/arch/arm/include/debug/zynq.S
>> +++ b/arch/arm/include/debug/zynq.S
>> @@ -38,6 +38,7 @@
>>               .endm
>>
>>               .macro  senduart,rd,rx
>> +ARM_BE8(     rev     \rd, \rd )
>>               str     \rd, [\rx, #UART_FIFO_OFFSET]   @ TXDATA
>>               .endm
>>
>>
>
> Tested-by: Michal Simek <michal.simek@xilinx.com>
>

I think just using strb instead of str will do the work
much better. I have send v2 with that logic

Thanks for testing it.

--Arun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode
  2015-06-12  6:53   ` Arun Chandran
@ 2015-06-12  9:25     ` Michal Simek
  -1 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2015-06-12  9:25 UTC (permalink / raw)
  To: Arun Chandran, Michal Simek
  Cc: linux-kernel, Michal Simek, Sören Brinkmann, linux-arm-kernel

On 06/12/2015 08:53 AM, Arun Chandran wrote:
> earlyprintk messages are not appearing on the terminal
> emulator during a big endian kernel boot. In BE mode
> sending full words to UART will result in unprintable
> characters as they are byte swapped versions of printable
> ones. So send only bytes.
> 
> Signed-off-by: Arun Chandran <achandran@mvista.com>
> ---
> ---
> Changes since v1:
> 	removed the byte swapping logic. Just send characters instead.
> ---
>  arch/arm/include/debug/zynq.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
> index bd13ded..de86b92 100644
> --- a/arch/arm/include/debug/zynq.S
> +++ b/arch/arm/include/debug/zynq.S
> @@ -38,7 +38,7 @@
>  		.endm
>  
>  		.macro	senduart,rd,rx
> -		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
> +		strb	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
>  		.endm
>  
>  		.macro	waituart,rd,rx
> 

ok - this works too.

Tested-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode
@ 2015-06-12  9:25     ` Michal Simek
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Simek @ 2015-06-12  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/12/2015 08:53 AM, Arun Chandran wrote:
> earlyprintk messages are not appearing on the terminal
> emulator during a big endian kernel boot. In BE mode
> sending full words to UART will result in unprintable
> characters as they are byte swapped versions of printable
> ones. So send only bytes.
> 
> Signed-off-by: Arun Chandran <achandran@mvista.com>
> ---
> ---
> Changes since v1:
> 	removed the byte swapping logic. Just send characters instead.
> ---
>  arch/arm/include/debug/zynq.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/debug/zynq.S b/arch/arm/include/debug/zynq.S
> index bd13ded..de86b92 100644
> --- a/arch/arm/include/debug/zynq.S
> +++ b/arch/arm/include/debug/zynq.S
> @@ -38,7 +38,7 @@
>  		.endm
>  
>  		.macro	senduart,rd,rx
> -		str	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
> +		strb	\rd, [\rx, #UART_FIFO_OFFSET]	@ TXDATA
>  		.endm
>  
>  		.macro	waituart,rd,rx
> 

ok - this works too.

Tested-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-12  9:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 14:13 [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode Arun Chandran
2015-06-10 14:13 ` Arun Chandran
2015-06-11 18:13 ` Michal Simek
2015-06-11 18:13   ` Michal Simek
2015-06-12  6:58   ` Arun Chandran
2015-06-12  6:58     ` Arun Chandran
2015-06-12  6:53 ` [PATCH v2] " Arun Chandran
2015-06-12  6:53   ` Arun Chandran
2015-06-12  9:25   ` Michal Simek
2015-06-12  9:25     ` Michal Simek

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.