From patchwork Tue Jul 9 14:00:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 1129827 X-Patchwork-Delegate: ykai007@gmail.com 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=rock-chips.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NZelDxaz"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45jkmn64Knz9sBt for ; Wed, 10 Jul 2019 00:12:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4BD60C21F13; Tue, 9 Jul 2019 14:06:41 +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=T_DKIM_INVALID 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 2F9E1C21EBD; Tue, 9 Jul 2019 14:06:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BFEC3C21E2C; Tue, 9 Jul 2019 14:01:16 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id AD17CC21E07 for ; Tue, 9 Jul 2019 14:01:12 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id i18so9489540pgl.11 for ; Tue, 09 Jul 2019 07:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=8ZGGwER/2eN7ueH4U/uQoanuuQvArFB1iwqkuU/nYzc=; b=NZelDxazrQ1UDdjCDZh5oAZUEgvL+kR001h8IbqYf2eQGOBC9OBjpvh4sMEsEnbhbq f0t2ksoZHpOulEdbNsNStSlZD6z00WsiSvE2L97fCyNGvv1MFN2tZECxY/sKc2Tv/fP2 n/Li5wSSLpp1w36p1xDuvuECedhXnrULl+qpUhxFcFL7p857chLUsI8FE0CHyTKdlZQl K5sCos9JedRCG0Pyowi7WovZ6T4nDt8Cv8HIo0D3jUPDbFHAlFcQLk38m5pBZf3oq76/ tdPWLyAAMV/cDH0gGbdPMBycddsTtlAFXs/rwBllZlj2vakSHBBxbhkdFRw1/MgN7qp4 K/VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=8ZGGwER/2eN7ueH4U/uQoanuuQvArFB1iwqkuU/nYzc=; b=OwpkO0OmHEcOlWYV5RWNrOLr0QnudjCCFnw/9N6reriwtt9Ek5eTmnyBj2kRelinXX 9gf3LVS57apaVpDjoeb3ef/m/rjk1P3Cxd6T9gkuTcKpg2F3UMtqIGpUOAi80mlghhMd 1NuCQr3EZByUpFLB6IG96WW889u5ROUaAgvobjcxnvvKzbuxG5wHYt8yprvHzTioACo5 AG3rHohd78MFv3552q1ovnMOCyHAADvCfWB81RIxN77xFhmYI78hChZxHF1ja9UvkBF3 mdlb6Z3pQmJrOU5FQuauC3Gvau8aV5wDLJrmTpZt5dTvgbuDYDObCGOjq4fjKg9kZ0gI zZ7Q== X-Gm-Message-State: APjAAAV+s+dFPMb35q947KfCyk/EUqHYrTgUYMBKhaueTg3YBum8sGsb 7ISFL/G4q0ZpUeohBNLxfU4LKUj8 X-Google-Smtp-Source: APXvYqwlL90XLC0vqZveVPG1WYp/bgn2ZFFj77IQLJ+Drn3wcUZYKRxd1qWgPKhM2azY0JcGQd1HFw== X-Received: by 2002:a63:381d:: with SMTP id f29mr11103533pga.101.1562680871110; Tue, 09 Jul 2019 07:01:11 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id w1sm2543596pjt.30.2019.07.09.07.01.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 09 Jul 2019 07:01:10 -0700 (PDT) From: Kever Yang To: u-boot@lists.denx.de Date: Tue, 9 Jul 2019 22:00:27 +0800 Message-Id: <20190709140033.18773-7-kever.yang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190709140033.18773-1-kever.yang@rock-chips.com> References: <20190709140033.18773-1-kever.yang@rock-chips.com> Subject: [U-Boot] [PATCH 06/12] rockchip: rk3128: use ARM arch timer instead of rk_timer 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We prefer to use ARM arch timer instead of rockchip timer, so that we are using the same timer for SPL, U-Boot and Kernel, which will make things simple and easy to track to boot time. Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/Makefile | 6 ------ arch/arm/mach-rockchip/rk3128-board.c | 3 --- include/configs/rk3128_common.h | 7 ++++--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 3e3aa1c421..9afbb055d5 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -41,12 +41,6 @@ endif obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o -ifndef CONFIG_ARM64 -ifeq ($(CONFIG_ROCKCHIP_RK3188)$(CONFIG_ROCKCHIP_RK322X)$(CONFIG_ROCKCHIP_RK3036)$(CONFIG_ROCKCHIP_RK3288),) -obj-y += rk_timer.o -endif -endif - obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/ obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/ ifndef CONFIG_TPL_BUILD diff --git a/arch/arm/mach-rockchip/rk3128-board.c b/arch/arm/mach-rockchip/rk3128-board.c index fa71685af8..0945829d0e 100644 --- a/arch/arm/mach-rockchip/rk3128-board.c +++ b/arch/arm/mach-rockchip/rk3128-board.c @@ -12,7 +12,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -33,8 +32,6 @@ int board_init(void) { int ret = 0; - rockchip_timer_init(); - ret = regulators_enable_boot_on(false); if (ret) { debug("%s: Cannot enable boot on regulator\n", __func__); diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h index 0c08d7af5b..20d62439fb 100644 --- a/include/configs/rk3128_common.h +++ b/include/configs/rk3128_common.h @@ -14,9 +14,10 @@ #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SKIP_LOWLEVEL_INIT -#define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000) -#define CONFIG_SYS_TIMER_BASE 0x200440a0 /* TIMER5 */ -#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8) +#define CONFIG_ROCKCHIP_STIMER_BASE 0x200440a0 +#define COUNTER_FREQUENCY 24000000 +#define CONFIG_SYS_ARCH_TIMER +#define CONFIG_SYS_HZ_CLOCK 24000000 #define CONFIG_SYS_INIT_SP_ADDR 0x60100000 #define CONFIG_SYS_LOAD_ADDR 0x60800800