From patchwork Tue Jul 9 07:30:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pascal Linder X-Patchwork-Id: 1129572 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=edu.hefr.ch Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45jYvg5YKWz9sML for ; Tue, 9 Jul 2019 17:33:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2093FC21E3A; Tue, 9 Jul 2019 07:32:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2B694C21E07; Tue, 9 Jul 2019 07:31:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DC788C21DB3; Tue, 9 Jul 2019 07:30:38 +0000 (UTC) Received: from hefrmta2.hefr.ch (hefrmta2.hefr.ch [160.98.8.131]) by lists.denx.de (Postfix) with ESMTPS id A6517C21E0B for ; Tue, 9 Jul 2019 07:30:38 +0000 (UTC) X-ASG-Debug-ID: 1562657437-0bd46e356248f180001-4l7tJC Received: from smtp.hefr.ch (hefrexch02.hefr.ch [160.98.8.101]) by hefrmta2.hefr.ch with ESMTP id f1DEvyVQMNRAHk0Z (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO); Tue, 09 Jul 2019 09:30:38 +0200 (CEST) X-Barracuda-Envelope-From: Pascal.Linder@edu.hefr.ch X-Barracuda-Effective-Source-IP: hefrexch02.hefr.ch[160.98.8.101] X-Barracuda-Apparent-Source-IP: 160.98.8.101 Received: from localhost.localdomain (160.98.8.139) by HEFREXCH02.sofr.hefr.lan (160.98.226.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 9 Jul 2019 09:30:37 +0200 From: Pascal Linder To: Date: Tue, 9 Jul 2019 09:30:26 +0200 X-ASG-Orig-Subj: [PATCH 5/9] km/uart: port UART interface of KM Kirkwood boards to driver model Message-ID: <20190709073030.3328-1-pascal.linder@edu.hefr.ch> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Originating-IP: [160.98.8.139] X-ClientProxiedBy: HEFREXCH02.sofr.hefr.lan (160.98.226.101) To HEFREXCH02.sofr.hefr.lan (160.98.226.101) X-Barracuda-Connect: hefrexch02.hefr.ch[160.98.8.101] X-Barracuda-Start-Time: 1562657437 X-Barracuda-Encrypted: ECDHE-RSA-AES128-SHA256 X-Barracuda-URL: https://hefrmta1.hefr.ch:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hefr.ch X-Barracuda-Scan-Msg-Size: 1942 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.73714 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M Cc: Holger Brunck , sr@denx.de, Pascal Linder Subject: [U-Boot] [PATCH 5/9] km/uart: port UART interface of KM Kirkwood boards to driver model X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: holger.brunck@ch.abb.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Activate the driver model for the serial interface in the KM Kirkwood Kconfig file. The associated preprocessor definitions could be removed from the header file. However, the clock of 200 MHz needs to be declared in the device tree. Signed-off-by: Pascal Linder Signed-off-by: Holger Brunck --- arch/arm/dts/kirkwood-km_common.dtsi | 1 + board/keymile/km_arm/Kconfig | 1 + include/configs/km/km_arm.h | 9 --------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/kirkwood-km_common.dtsi b/arch/arm/dts/kirkwood-km_common.dtsi index 75dc83914f..9d0fc51c2d 100644 --- a/arch/arm/dts/kirkwood-km_common.dtsi +++ b/arch/arm/dts/kirkwood-km_common.dtsi @@ -22,6 +22,7 @@ serial@12000 { status = "okay"; + clock-frequency = <200000000>; }; }; diff --git a/board/keymile/km_arm/Kconfig b/board/keymile/km_arm/Kconfig index 7da052f4c4..335a45446a 100644 --- a/board/keymile/km_arm/Kconfig +++ b/board/keymile/km_arm/Kconfig @@ -42,6 +42,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select BOARD_LATE_INIT select DM + select DM_SERIAL select DM_SPI select DM_SPI_FLASH imply CMD_CRAMFS diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index b257c384dc..a6cdf1ca3e 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -58,15 +58,6 @@ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -/* - * NS16550 Configuration - */ -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE (-4) -#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK -#define CONFIG_SYS_NS16550_COM1 KW_UART0_BASE -#define CONFIG_SYS_NS16550_COM2 KW_UART1_BASE - /* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is