From patchwork Fri Nov 8 18:54:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 289908 X-Patchwork-Delegate: trini@ti.com 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 02CE42C00CD for ; Sat, 9 Nov 2013 05:55:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C711D4A461; Fri, 8 Nov 2013 19:55:02 +0100 (CET) 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 VeKgzoEf6-Qd; Fri, 8 Nov 2013 19:55:02 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3B91C4A454; Fri, 8 Nov 2013 19:55:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 667924A446 for ; Fri, 8 Nov 2013 19:54:52 +0100 (CET) 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 w8yXcrued0qo for ; Fri, 8 Nov 2013 19:54: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-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by theia.denx.de (Postfix) with ESMTPS id 3F6394A434 for ; Fri, 8 Nov 2013 19:54:39 +0100 (CET) Received: by mail-qa0-f47.google.com with SMTP id w8so2027958qac.20 for ; Fri, 08 Nov 2013 10:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=SRqSOeCAfneeU6vhgDfUhILJ+RXqWacz7/61c0VcpbA=; b=K/a2psgyhj37M0+ty41sD3O9tx7MJe08JkpyVj1p0zqB7n9FTRaKRstlkxNimWWRjQ izVRjzTr6ZM+A8VGblo11slBLg+KCXTBTn5zTCR5N+khflrsJbXHtNr1sZXc5upYZSER ECQOrDdUZAB7EjS1y2Ey4+iCCCEr3fEFKX2XF3C7gnzvekraH9x27ynVJ1ljy+flyGRg 89BkOPKSeZog1tydMKjboPfnFuqPvjcoNSLDANUMPCg1tcqKh20MY8nVYRqkjYGqkS77 FRXhUkNGtyWFXLrT9hh/oYEOMbswZsfR4mT9HpNJcdaKU0+yLb3xDffhrlHdlE7Jn7A3 VNuw== X-Received: by 10.224.114.196 with SMTP id f4mr26466607qaq.96.1383936876976; Fri, 08 Nov 2013 10:54:36 -0800 (PST) Received: from localhost.localdomain (cpe-174-106-216-211.ec.res.rr.com. [174.106.216.211]) by mx.google.com with ESMTPSA id j1sm25150562qaa.6.2013.11.08.10.54.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Nov 2013 10:54:35 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 8 Nov 2013 13:54:32 -0500 Message-Id: <1383936872-26441-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH] am33xx: Make SoC bootcount driver have its own symbol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Some am33xx boards may not use the RTC block for bootcount (as it may not be wired up for the board) and use some other facility. So add another symbol for the bootcount driver for the IP block. Cc: Heiko Schocher Signed-off-by: Tom Rini Acked-by: Heiko Schocher --- drivers/bootcount/Makefile | 2 +- drivers/bootcount/bootcount_davinci.c | 4 ++++ include/configs/am335x_evm.h | 4 ++++ include/configs/ti_am335x_common.h | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile index d0b8a79..4154352 100644 --- a/drivers/bootcount/Makefile +++ b/drivers/bootcount/Makefile @@ -10,7 +10,7 @@ COBJS-y += bootcount.o COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o COBJS-$(CONFIG_BLACKFIN) += bootcount_blackfin.o COBJS-$(CONFIG_SOC_DA8XX) += bootcount_davinci.o -COBJS-$(CONFIG_AM33XX) += bootcount_davinci.o +COBJS-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o COBJS-$(CONFIG_BOOTCOUNT_RAM) += bootcount_ram.o COBJS-$(CONFIG_BOOTCOUNT_ENV) += bootcount_env.o diff --git a/drivers/bootcount/bootcount_davinci.c b/drivers/bootcount/bootcount_davinci.c index f0acfad..fa87b5e 100644 --- a/drivers/bootcount/bootcount_davinci.c +++ b/drivers/bootcount/bootcount_davinci.c @@ -2,6 +2,10 @@ * (C) Copyright 2011 * Heiko Schocher, DENX Software Engineering, hs@denx.de. * + * A bootcount driver for the RTC IP block found on many TI platforms. + * This requires the RTC clocks, etc, to be enabled prior to use and + * not all boards with this IP block on it will have the RTC in use. + * * SPDX-License-Identifier: GPL-2.0+ */ diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index c2ba7e3..9015927 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -199,6 +199,10 @@ #define CONFIG_SPL_POWER_SUPPORT #define CONFIG_SPL_YMODEM_SUPPORT +/* Bootcount using the RTC block */ +#define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_BOOTCOUNT_AM33XX + /* CPSW support */ #define CONFIG_SPL_ETH_SUPPORT diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index 0f6fa62..4364eef 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -43,9 +43,9 @@ /* * RTC related defines. To use bootcount you must set bootlimit in the - * environment to a non-zero value. + * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT + * in the board config. */ -#define CONFIG_BOOTCOUNT_LIMIT #define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 /* Enable the HW watchdog, since we can use this with bootcount */