From patchwork Wed Sep 9 21:13:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 53348 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 3B0B022B05 for ; Wed, 9 Sep 2015 21:14:23 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf7658689lbb.2 for ; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FESeB3++B16HeMsY9RP0cXa1IzLS6Xn3srq1mKh3Ec8=; b=RTTpGHNuy8zYcSgnZ2pM0S8KWkYjgCzZ75SX7cAq9rG9hr22hnvBZ8qi/PJPtz+sio 1njkkohqsabHSJckrTwdgQx7h25+O4rmBnRzzCWJXY69Nkv+nIZbajZAWJ5Ri5kXkMk4 g+e8dKSOH/oiN7SULbdrpPe2YMxAs0GF9b1+HVb6TKyqjAHlTZ7enWs1ff9+do48UQ8w +NyIYPnA96hfpvM6xs4iDLsu3/+2PVwiyQ+hRJKj9tnaOTOct82Z/mE+jvFgMLD38m4h yI71D9Zx3AxGMsQtx2VFsVyQqx4YUc+hTlvM/QrZLa++dWwSbeYoPmcR7TWB1raS03in 5Evw== X-Gm-Message-State: ALoCoQl6kvFTmFVPyiJDusz6e++tZqp+8oc+lC6ut/XcuQ4Phy7mnxkuR1gvvLhyg8jE9oMdWbof X-Received: by 10.112.16.200 with SMTP id i8mr8765517lbd.20.1441833261946; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.166 with SMTP id n6ls99363laf.86.gmail; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) X-Received: by 10.112.184.137 with SMTP id eu9mr31183820lbc.21.1441833261652; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id x5si7926760laj.82.2015.09.09.14.14.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:14:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbcjc2 with SMTP id jc2so12957634lbc.0 for ; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) X-Received: by 10.112.168.100 with SMTP id zv4mr31052894lbb.117.1441833261551; Wed, 09 Sep 2015 14:14:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp561171lbq; Wed, 9 Sep 2015 14:14:20 -0700 (PDT) X-Received: by 10.180.19.68 with SMTP id c4mr7550565wie.50.1441833251559; Wed, 09 Sep 2015 14:14:11 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com. [209.85.212.178]) by mx.google.com with ESMTPS id nd16si7007760wic.70.2015.09.09.14.14.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 209.85.212.178 as permitted sender) client-ip=209.85.212.178; Received: by wicfx3 with SMTP id fx3so5946894wic.1 for ; Wed, 09 Sep 2015 14:14:11 -0700 (PDT) X-Received: by 10.180.214.70 with SMTP id ny6mr58265522wic.20.1441833251230; Wed, 09 Sep 2015 14:14:11 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by smtp.gmail.com with ESMTPSA id p20sm5797427wie.5.2015.09.09.14.14.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 14:14:10 -0700 (PDT) From: Peter Griffin To: u-boot@lists.denx.de, trini@konsulko.com, sjg@chromium.org, albert.u.boot@aribaud.net Cc: Peter Griffin Subject: [PATCH 7/8] ARM: hikey: hi6220: Migrate over to DM_SERIAL and UART3 for serial. Date: Wed, 9 Sep 2015 22:13:54 +0100 Message-Id: <1441833235-2359-8-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441833235-2359-1-git-send-email-peter.griffin@linaro.org> References: <1441833235-2359-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@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.217.173 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use DM for the pl01x serial driver on hikey. Also migrate over to UART3 as the latest version of ATF outputs to this UART. UART3 comes out on the LS connector, rather than UART1 which goes to a unpopulated header. NB: Upstream Linux kernel doesn't yet support UART3, so serial console will still be output on UART1 when booting a upstream kernel. Signed-off-by: Peter Griffin --- arch/arm/Kconfig | 2 +- board/hisilicon/hikey/hikey.c | 12 ++++++++++++ configs/hikey_defconfig | 1 + include/configs/hikey.h | 10 +++------- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 74a04e8..3958eaa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -744,6 +744,7 @@ config TARGET_HIKEY select ARM64 select DM select DM_GPIO + select DM_SERIAL help Support for HiKey 96boards platform. It features a HI6220 SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM. @@ -752,7 +753,6 @@ config TARGET_LS1021AQDS bool "Support ls1021aqds" select CPU_V7 select SUPPORT_SPL - config TARGET_LS1021ATWR bool "Support ls1021atwr" select CPU_V7 diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 9948747..1c34447 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include #include @@ -69,6 +70,17 @@ U_BOOT_DEVICES(hi6220_gpios) = { DECLARE_GLOBAL_DATA_PTR; +static const struct pl01x_serial_platdata serial_platdata = { + .base = HI6220_UART3_BASE, + .type = TYPE_PL011, + .clock = 19200000 +}; + +U_BOOT_DEVICE(hikey_serials) = { + .name = "serial_pl01x", + .platdata = &serial_platdata, +}; + struct peri_sc_periph_regs *peri_sc = (struct peri_sc_periph_regs *)HI6220_PERI_BASE; diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig index aa4fb0d..ee67c29 100644 --- a/configs/hikey_defconfig +++ b/configs/hikey_defconfig @@ -2,4 +2,5 @@ CONFIG_ARM=y CONFIG_TARGET_HIKEY=y CONFIG_NET=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 # CONFIG_CMD_IMLS is not set diff --git a/include/configs/hikey.h b/include/configs/hikey.h index d16f552..578cccd 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -59,14 +59,10 @@ /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN SZ_8M -/* PL011 Serial Configuration */ -#define CONFIG_PL011_SERIAL - -#define CONFIG_PL011_CLOCK 19200000 -#define CONFIG_PL01x_PORTS {(void *)0xF8015000} -#define CONFIG_CONS_INDEX 0 - +/* Serial port PL010/PL011 through the device model */ +#define CONFIG_PL01X_SERIAL #define CONFIG_BAUDRATE 115200 +#define CONFIG_CONS_INDEX 0 #define CONFIG_CMD_USB #ifdef CONFIG_CMD_USB