From patchwork Thu May 29 15:57:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 31153 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 58E2820671 for ; Fri, 30 May 2014 08:11:02 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id tp5sf7472206ieb.9 for ; Fri, 30 May 2014 01:11:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=0S6iOEPEqzJlFmI9nZYEvHzl5O0M90uIr6/sse/7ias=; b=C6KOGAzlPvacHFk6/BXjMM2CQ9CgYxD/1vay2wLWTyNl1biRFgdj0k41qxSHN1PClT eS6bMRNLHZmG3o4Gp4+U9Mqd9pBwL5uWt6Y7xDT5/ZwhYpoMNQF2cLQ3uF7pVuXaopLD j6uTBLUNCE2aAfIQOmiATVpL2psVEPnF0ag5bthG99WgWF9fJCdcZfedo5M+CUZ3VTw+ RG5QhK+8SnVRA2ABfmDhABa32DX5aS1MMHCTcvovFosjx/bwg8YjggQQQnvPKdJfLpop DcUUJ3ZYV/iB77Jytw9Eaum4JtThlQ50zPBUxKTx7Ww/LIPCGJWziBRE4aDoW4uvlB23 ExBQ== X-Gm-Message-State: ALoCoQkwKPPyglwfHUnddsGht7rvk0Ts+D3o+Ry1CnB99kBZTyu+Kn5DSZTKHndUOtIiw39YKpXT X-Received: by 10.42.177.5 with SMTP id bg5mr4670711icb.27.1401437461702; Fri, 30 May 2014 01:11:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.39 with SMTP id 36ls928465qgm.75.gmail; Fri, 30 May 2014 01:11:01 -0700 (PDT) X-Received: by 10.221.9.72 with SMTP id ov8mr6344164vcb.27.1401437461540; Fri, 30 May 2014 01:11:01 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id m20si923635vdh.71.2014.05.30.01.11.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 May 2014 01:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so1711902veb.35 for ; Fri, 30 May 2014 01:11:01 -0700 (PDT) X-Received: by 10.52.14.130 with SMTP id p2mr10161390vdc.39.1401437461438; Fri, 30 May 2014 01:11:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp92434vcb; Fri, 30 May 2014 01:11:00 -0700 (PDT) X-Received: by 10.180.14.196 with SMTP id r4mr4370319wic.2.1401437460505; Fri, 30 May 2014 01:11:00 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id bj10si6674632wjb.133.2014.05.30.01.10.59 for ; Fri, 30 May 2014 01:11:00 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9565A759F; Fri, 30 May 2014 10:07:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k9vItW03NW1l; Fri, 30 May 2014 10:07:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 047EE4B843; Fri, 30 May 2014 09:57:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EFFD54B832 for ; Fri, 30 May 2014 09:57:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NJmRkzZvEA4g for ; Fri, 30 May 2014 09:57:42 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id B0F56A74C7 for ; Thu, 29 May 2014 17:57:34 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4TFvMuD027481 for ; Thu, 29 May 2014 10:57:22 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4TFvMCc027021 for ; Thu, 29 May 2014 10:57:22 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 29 May 2014 10:57:22 -0500 Received: from khorivan.itg.ti.com (incasgf5a_e1_2.itg.ti.com [10.167.216.36]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4TFvKII017507; Thu, 29 May 2014 10:57:20 -0500 From: Ivan Khoronzhuk To: , Date: Thu, 29 May 2014 18:57:12 +0300 Message-ID: <1401379032-11344-1-git-send-email-ivan.khoronzhuk@ti.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Cc: santosh.shilimkar@ti.com, hzhang@ti.com Subject: [U-Boot] [U-boot] [PATCH] keystone: init: enable UART1 to be able use it from kernel X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Murali Karicheri Currently PWREMU_MGMT is not configured in the Linux generic UART driver as this register seems to be specific TI UART IP. So this needs to be enabled in u-boot to use UART1 from kernel space. Acked-By: Vitaly Andrianov Signed-off-by: Murali Karicheri Signed-off-by: Ivan Khoronzhuk --- arch/arm/cpu/armv7/keystone/init.c | 9 +++++++++ arch/arm/include/asm/arch-keystone/hardware-k2hk.h | 2 -- arch/arm/include/asm/arch-keystone/hardware.h | 3 +++ include/configs/k2hk_evm.h | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/keystone/init.c b/arch/arm/cpu/armv7/keystone/init.c index 044015a..4df5ae1 100644 --- a/arch/arm/cpu/armv7/keystone/init.c +++ b/arch/arm/cpu/armv7/keystone/init.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -30,6 +31,14 @@ int arch_cpu_init(void) share_all_segments(11); /* PCIE */ #endif + /* + * just initialise the COM2 port so that TI specific + * UART register PWREMU_MGMT is initialized. Linux UART + * driver doesn't handle this. + */ + NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM2), + CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); + return 0; } diff --git a/arch/arm/include/asm/arch-keystone/hardware-k2hk.h b/arch/arm/include/asm/arch-keystone/hardware-k2hk.h index 50ff13a..7ac2662 100644 --- a/arch/arm/include/asm/arch-keystone/hardware-k2hk.h +++ b/arch/arm/include/asm/arch-keystone/hardware-k2hk.h @@ -115,8 +115,6 @@ #define K2HK_LPSC_ARM_SREFLEX 51 #define K2HK_LPSC_TETRIS 52 -#define K2HK_UART0_BASE 0x02530c00 - /* DDR3A definitions */ #define K2HK_DDR3A_EMIF_CTRL_BASE 0x21010000 #define K2HK_DDR3A_EMIF_DATA_BASE 0x80000000 diff --git a/arch/arm/include/asm/arch-keystone/hardware.h b/arch/arm/include/asm/arch-keystone/hardware.h index a305a0c..6c532ca 100644 --- a/arch/arm/include/asm/arch-keystone/hardware.h +++ b/arch/arm/include/asm/arch-keystone/hardware.h @@ -142,6 +142,9 @@ struct ddr3_emif_config { #define KS2_DDR3_PMCTL_OFFSET 0x38 #define KS2_DDR3_ZQCFG_OFFSET 0xC8 +#define KS2_UART0_BASE 0x02530c00 +#define KS2_UART1_BASE 0x02531000 + #ifdef CONFIG_SOC_K2HK #include #endif diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index dde7329..998390e 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -71,7 +71,8 @@ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_MEM32 #define CONFIG_SYS_NS16550_REG_SIZE -4 -#define CONFIG_SYS_NS16550_COM1 K2HK_UART0_BASE +#define CONFIG_SYS_NS16550_COM1 KS2_UART0_BASE +#define CONFIG_SYS_NS16550_COM2 KS2_UART1_BASE #define CONFIG_SYS_NS16550_CLK clk_get_rate(K2HK_CLK1_6) #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE 115200