linux-mips
[Top] [All Lists]

Re: [PATCH v3 2/2] MIPS: BCM47XX: add EARLY_PRINTK_8250 support

To: Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [PATCH v3 2/2] MIPS: BCM47XX: add EARLY_PRINTK_8250 support
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: Sun, 1 Dec 2013 22:26:41 +0200
Cc: ralf@linux-mips.org, sergei.shtylyov@cogentembedded.com, zajec5@gmail.com, linux-mips@linux-mips.org
In-reply-to: <1380062216-24031-2-git-send-email-hauke@hauke-m.de>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1380062216-24031-1-git-send-email-hauke@hauke-m.de> <1380062216-24031-2-git-send-email-hauke@hauke-m.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
Hi,

On Wed, Sep 25, 2013 at 12:36:56AM +0200, Hauke Mehrtens wrote:
> The BCM47xx SoCs have a 8250 serial compatible console at address
> 0x18000300 and an other at 0x18000400. On most devices 0x18000300 is
> wired to some pins on the board, we should use that.
> This is the smae for the AI (bcma) and the SB (ssb) bus, this is some
> offset on the chip common core.
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>

A.

> ---
>  arch/mips/Kconfig        |    2 ++
>  arch/mips/bcm47xx/prom.c |    9 +++++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index f73cb81..02a3a66 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -117,6 +117,8 @@ config BCM47XX
>       select NO_EXCEPT_FILL
>       select SYS_SUPPORTS_32BIT_KERNEL
>       select SYS_SUPPORTS_LITTLE_ENDIAN
> +     select SYS_HAS_EARLY_PRINTK
> +     select EARLY_PRINTK_8250 if EARLY_PRINTK
>       help
>        Support for BCM47XX based boards
>  
> diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
> index 99c3ce2..0af808d 100644
> --- a/arch/mips/bcm47xx/prom.c
> +++ b/arch/mips/bcm47xx/prom.c
> @@ -28,6 +28,8 @@
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/spinlock.h>
> +#include <linux/ssb/ssb_driver_chipcommon.h>
> +#include <linux/ssb/ssb_regs.h>
>  #include <linux/smp.h>
>  #include <asm/bootinfo.h>
>  #include <bcm47xx.h>
> @@ -94,9 +96,16 @@ static __init void prom_init_mem(void)
>       add_memory_region(0, mem, BOOT_MEM_RAM);
>  }
>  
> +/*
> + * This is the first serial on the chip common core, it is at this position
> + * for sb (ssb) and ai (bcma) bus.
> + */
> +#define BCM47XX_SERIAL_ADDR (SSB_ENUM_BASE + SSB_CHIPCO_UART0_DATA)
> +
>  void __init prom_init(void)
>  {
>       prom_init_mem();
> +     setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0);
>  }
>  
>  void __init prom_free_prom_memory(void)
> -- 
> 1.7.10.4
> 
> 

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH v3 2/2] MIPS: BCM47XX: add EARLY_PRINTK_8250 support, Aaro Koskinen <=