linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] ARM: sunxi: Add earlyprintk support
Date: Fri, 16 Nov 2012 11:41:36 +0100	[thread overview]
Message-ID: <20121116114136.592dfa12@skate> (raw)
In-Reply-To: <1353019586-21043-5-git-send-email-maxime.ripard@free-electrons.com>

Dear Maxime Ripard,

On Thu, 15 Nov 2012 23:46:23 +0100, Maxime Ripard wrote:
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/Kconfig.debug         |    8 ++++++++
>  arch/arm/include/debug/sunxi.S |   22 ++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 arch/arm/include/debug/sunxi.S
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index b0f3857..6672b02 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -345,6 +345,13 @@ choice
>  		  Say Y here if you want kernel low-level debugging support
>  		  on SOCFPGA based platforms.
>  
> +	config DEBUG_SUNXI_UART

Should be DEBUG_SUNXI_UART1

> +		bool "Kernel low-level debugging messages via sunXi UART"

UART1.

> +		depends on ARCH_SUNXI
> +		help
> +		  Say Y here if you want kernel low-level debugging support
> +		  on Allwinner A1X based platforms.

Say a few words about UART1 here.

> +
>  	config DEBUG_VEXPRESS_UART0_DETECT
>  		bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
>  		depends on ARCH_VEXPRESS && CPU_CP15_MMU
> @@ -416,6 +423,7 @@ config DEBUG_LL_INCLUDE
>  	default "debug/mvebu.S" if DEBUG_MVEBU_UART
>  	default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
>  	default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
> +	default "debug/sunxi.S" if DEBUG_SUNXI_UART

UART1

>  	default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
>  		DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
>  	default "mach/debug-macro.S"
> diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S
> new file mode 100644
> index 0000000..ffd101f
> --- /dev/null
> +++ b/arch/arm/include/debug/sunxi.S
> @@ -0,0 +1,22 @@
> +/*
> + * Early serial output macro for Allwinner A1X SoCs
> + *
> + * Copyright (C) 2012 Maxime Ripard
> + *
> + * Maxime Ripard <maxime.ripard@free-electrons.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#define SUNXI_UART1_PHYS_BASE	0x01c28400
> +#define SUNXI_UART1_VIRT_BASE	0xf1c28400

Maybe:

#ifdef CONFIG_DEBUG_SUNXI_UART1
#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400
#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400
#endif

> +	.macro	addruart, rp, rv, tmp
> +	ldr	\rp, =SUNXI_UART1_PHYS_BASE
> +	ldr	\rv, =SUNXI_UART1_VIRT_BASE

And use SUNXI_UART_DEBUG_{VIRT,PHYS}_BASE here.

So that people can come and add CONFIG_DEBUG_SUNXI_UART0 for the
Cubieboard a bit more easily. Or you can even provision the code for
the UART0 as well.

Best regards,

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

  parent reply	other threads:[~2012-11-16 10:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 22:46 [PATCH 0/6] Add basic support for Allwinner A1X SoCs Maxime Ripard
2012-11-15 22:46 ` [PATCH 1/6] clocksource: sunxi: Add Allwinner A1X Timer Driver Maxime Ripard
2012-11-16 13:13   ` Thomas Petazzoni
2012-11-16 13:14   ` Thomas Petazzoni
2012-11-15 22:46 ` [PATCH 2/6] irqchip: sunxi: Add irq controller driver Maxime Ripard
2012-11-16  7:35   ` Stefan Roese
2012-11-16  9:16     ` Maxime Ripard
2012-11-16 10:38       ` Thomas Petazzoni
2012-11-16 10:47         ` Stefan Roese
2012-11-15 22:46 ` [PATCH 3/6] ARM: sunxi: Add basic support for Allwinner A1x SoCs Maxime Ripard
2012-11-16  7:42   ` Stefan Roese
2012-11-16  9:17     ` Maxime Ripard
2012-11-15 22:46 ` [PATCH 4/6] ARM: sunxi: Add earlyprintk support Maxime Ripard
2012-11-16  7:47   ` Stefan Roese
2012-11-16  9:20     ` Maxime Ripard
2012-11-16 10:41   ` Thomas Petazzoni [this message]
2012-11-15 22:46 ` [PATCH 5/6] ARM: sunxi: Add device tree for the A13 and the Olinuxino board Maxime Ripard
2012-11-16  7:57   ` Stefan Roese
2012-11-16  9:24     ` Maxime Ripard
2012-11-15 22:46 ` [PATCH 6/6] ARM: sunxi: Add entry to MAINTAINERS Maxime Ripard
2012-11-16  7:16 ` [PATCH 0/6] Add basic support for Allwinner A1X SoCs Stefan Roese
2012-11-16  7:51 ` Arnd Bergmann
2012-11-16  9:00   ` Stefan Roese
2012-11-16  9:26   ` Maxime Ripard
2012-11-16 13:11 ` Thomas Petazzoni

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=20121116114136.592dfa12@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).