linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* DEBUG_LL broken for socfpga
@ 2012-10-25 16:18 Thomas Petazzoni
  2012-10-25 17:39 ` Dinh Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2012-10-25 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

Dinh,

The arch/arm/include/debug/socfpga.S file implements only addruart, and
forgets to implement waituart, senduart, busyuart:

  AS      arch/arm/kernel/debug.o
/home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S: Assembler messages:
/home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:83: Error: bad instruction `waituart r2,r3'
/home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:84: Error: bad instruction `senduart r1,r3'
/home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:85: Error: bad instruction `busyuart r2,r3'

Since the socfpga UART is apparently 8250 compatible, adding:

#define UART_SHIFT      2
#include <asm/hardware/debug-8250.S>

at the end of socfpga.S should be sufficient. However, socfpga.S uses
an undefined DEBUG_LL_UART_OFFSET. And also most likely there is a
missing static mapping for the UART registers in
arch/arm/mach-socfpga/socfpga.c in order to get a virtual address for
the UART registers soon enough for earlyprintk to work.

Probably easy to fix, but I have no hardware and no datasheet.
Certainly better if someone having those could handle the
implementation of the fix.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* DEBUG_LL broken for socfpga
  2012-10-25 17:39 ` Dinh Nguyen
@ 2012-10-25 16:42   ` Thomas Petazzoni
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2012-10-25 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

Dinh,

On Thu, 25 Oct 2012 11:39:52 -0600, Dinh Nguyen wrote:

> Doesn't this patch address the fix?
> 
> in arm-soc for-next
> commit  ef3f94412a4d7e107392e7c7cfc3e2d0668aa1aa
> 
> http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=ef3f94412a4d7e107392e7c7cfc3e2d0668aa1aa

Indeed, it fixes the problem. I was looking at 3.7-rc2, and forgot to
check in arm-soc/for-next before reporting the issue.

Sorry for the noise.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* DEBUG_LL broken for socfpga
  2012-10-25 16:18 DEBUG_LL broken for socfpga Thomas Petazzoni
@ 2012-10-25 17:39 ` Dinh Nguyen
  2012-10-25 16:42   ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Dinh Nguyen @ 2012-10-25 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Thomas,

On Thu, 2012-10-25 at 18:18 +0200, Thomas Petazzoni wrote:
> Dinh,
> 
> The arch/arm/include/debug/socfpga.S file implements only addruart, and
> forgets to implement waituart, senduart, busyuart:
> 
>   AS      arch/arm/kernel/debug.o
> /home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S: Assembler messages:
> /home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:83: Error: bad instruction `waituart r2,r3'
> /home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:84: Error: bad instruction `senduart r1,r3'
> /home/thomas/projets/linux-2.6/arch/arm/kernel/debug.S:85: Error: bad instruction `busyuart r2,r3'
> 
> Since the socfpga UART is apparently 8250 compatible, adding:
> 
> #define UART_SHIFT      2
> #include <asm/hardware/debug-8250.S>
> 
> at the end of socfpga.S should be sufficient. However, socfpga.S uses
> an undefined DEBUG_LL_UART_OFFSET. And also most likely there is a
> missing static mapping for the UART registers in
> arch/arm/mach-socfpga/socfpga.c in order to get a virtual address for
> the UART registers soon enough for earlyprintk to work.
> 
> Probably easy to fix, but I have no hardware and no datasheet.
> Certainly better if someone having those could handle the
> implementation of the fix.

Doesn't this patch address the fix?

in arm-soc for-next
commit  ef3f94412a4d7e107392e7c7cfc3e2d0668aa1aa


http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=commit;h=ef3f94412a4d7e107392e7c7cfc3e2d0668aa1aa


Thanks,
Dinh
> 
> Best regards,
> 
> Thomas

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

end of thread, other threads:[~2012-10-25 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 16:18 DEBUG_LL broken for socfpga Thomas Petazzoni
2012-10-25 17:39 ` Dinh Nguyen
2012-10-25 16:42   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).