From patchwork Fri Nov 13 08:11:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 544109 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 6C9731409A0 for ; Fri, 13 Nov 2015 19:10:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=vJPeOUJl; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C86FB4BAEB; Fri, 13 Nov 2015 09:09:25 +0100 (CET) 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 Ujz9xcwtHZsA; Fri, 13 Nov 2015 09:09:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 309D84BB20; Fri, 13 Nov 2015 09:09:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2DA64BAC2 for ; Fri, 13 Nov 2015 09:08:46 +0100 (CET) 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 zofrdYRRAK5i for ; Fri, 13 Nov 2015 09:08:46 +0100 (CET) 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 mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by theia.denx.de (Postfix) with ESMTPS id 37C974BAB8 for ; Fri, 13 Nov 2015 09:08:43 +0100 (CET) Received: by pabfh17 with SMTP id fh17so93217632pab.0 for ; Fri, 13 Nov 2015 00:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=7ytkwkrw/tz7WxUdVhkl7JIiNrcUVGXoozWa3uNlxUM=; b=vJPeOUJljRmwC/f3kTzcocAsE2KukNbjKqsPH7K2RiJcTz/a66l74RZ6ZpYTwJBrKS FXqEd2iF6vTlRyM0nzxxia6BQj6EDvqQ1GRJSJKW88tzhFwMGKXuLhd5M/B5bJpzv+vM JL6kZzpW3Gdkd0hiNRh+pZsqD5GD1FQ0QuCz9hODaBL6bOuqGrMEniafYT8QBMONucXL yKnUU5LPg6fZBuDtXhhPXocIuuIh+XjJANePikYvA2HDmuKBV7KTWGm5gfdZ+/yRFtYA suZpqowUJYxbc5iGJTsNg61SAbjL2sTSMoGlZGVwgP2rTGkWmDj7qU3pA8ZDNPOIiNQm HiGQ== X-Received: by 10.66.221.163 with SMTP id qf3mr846212pac.121.1447402122100; Fri, 13 Nov 2015 00:08:42 -0800 (PST) Received: from ala-d2121-lx1.wrs.com (unknown-157-139.windriver.com. [147.11.157.139]) by smtp.gmail.com with ESMTPSA id h10sm18857209pat.7.2015.11.13.00.08.41 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Nov 2015 00:08:41 -0800 (PST) From: Bin Meng To: Simon Glass , Thomas Chou , U-Boot Mailing List Date: Fri, 13 Nov 2015 00:11:17 -0800 Message-Id: <1447402284-26598-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1447402284-26598-1-git-send-email-bmeng.cn@gmail.com> References: <1447402284-26598-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH v3 04/11] timer: sandbox: Use device tree to pass the clock frequency X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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 should use device tree to pass the clock frequency of the timer instead of hardcoded in the driver codes. Signed-off-by: Bin Meng Acked-by: Simon Glass --- Changes in v3: None Changes in v2: - New patch to use device tree to pass the clock frequency arch/sandbox/dts/sandbox.dts | 1 + drivers/timer/sandbox_timer.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 720ef93..d2addb4 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -179,6 +179,7 @@ timer { compatible = "sandbox,timer"; + clock-frequency = <1000000>; }; tpm { diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c index 38de763..4b20af2 100644 --- a/drivers/timer/sandbox_timer.c +++ b/drivers/timer/sandbox_timer.c @@ -27,10 +27,6 @@ static int sandbox_timer_get_count(struct udevice *dev, unsigned long *count) static int sandbox_timer_probe(struct udevice *dev) { - struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); - - uc_priv->clock_rate = 1000000; - return 0; }