From patchwork Thu Feb 15 13:55:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 873904 X-Patchwork-Delegate: trini@ti.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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lt7/5Ez0"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zhzHX3k9bz9sRm for ; Fri, 16 Feb 2018 01:31:52 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2A4BBC221A6; Thu, 15 Feb 2018 14:31:48 +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=FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_MSPIKE_H2, 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 ECDAAC22162; Thu, 15 Feb 2018 14:31:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 30D6FC22153; Thu, 15 Feb 2018 13:56:46 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id DC392C22153 for ; Thu, 15 Feb 2018 13:56:42 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id s5so3459380wra.0 for ; Thu, 15 Feb 2018 05:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eqE00KL3Uii2E1i88HKee6cd7XNzotvjqfSGFFLinXo=; b=lt7/5Ez04qmTf5ML0o//pkTBajDtq8zCcL6TV0iK0252FrkAoD+XfuAkmxtEOkh2Bv mV5cH7/Rehw0Vt9RdmZO2cN12PNYyrCkyvZpek6vboy4XxoQFdz3E1L73yOHX1hJwmWW Qnbx3+z+l+j3M31JxuHoq5SirDSy6c2EuKL8N+N7DCLclT96lBzE0gdjbSAHPHNvawY6 2zty0LhfCflB8oI/r8k4UK7YQfsv/uBjzUBRe35QWLndX8g7ltNmD577z7zHRBr5el8U a6xXQoq0dGgGY2pqCEOdPd9oB1sLNuJC6MWJDGyY5hesyaoGTHlc2uaV5SyAUGNBP4is dW5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eqE00KL3Uii2E1i88HKee6cd7XNzotvjqfSGFFLinXo=; b=A98Soq7EMtpBvGkGq1pzdO3s+PQV9+Xc4Udb//sNxs2hQvHBlHgdmsiun2mHDV/FdM E1j4JgoVj7G9Y8SBmOXfO6y/t4LZLU1T+DTpmQFjW4TvQNTxVo64fdrpyRCKozkSzF2L Ld0HJFenPfSYCOmhWNym4GC9Rupz9KVBDIEmYa5bIA+wKJ+pg/uohnesBdxl/ykwGiR+ DMf0cvKfobJQ0+MzfxggT5kpDC2CzQx3DD206lkWB8Ef/NUZZEhWgMZA57LQVN3nDe3V Nohgmj/fwdedXuNKAlTHomNVLadz4iUer33a7ZcY1E8z6oov4zCYqTE6jTsP5sjx/lOk /AEg== X-Gm-Message-State: APf1xPCAlHzv753F8Wp7iEke01M79bN9aIJQGnWL6d04iAs4A0TdOUcf aeNqvM+sQlSrpwqMKFT6W9h0YZHsXYw= X-Google-Smtp-Source: AH8x225qpDf8eiIpXZQe4Okb5NJZeR9p7NBOJqecUQ2UmqsALdHCizyNDYJf5UYuhlK4sub8edI2vg== X-Received: by 10.223.179.209 with SMTP id x17mr2597717wrd.162.1518703002043; Thu, 15 Feb 2018 05:56:42 -0800 (PST) Received: from localhost.localdomain (193.164.125.18.ip.redstone-isp.net. [193.164.125.18]) by smtp.gmail.com with ESMTPSA id i33sm15184811wri.70.2018.02.15.05.56.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 05:56:41 -0800 (PST) From: Alex Kiernan To: u-boot@lists.denx.de Date: Thu, 15 Feb 2018 13:55:24 +0000 Message-Id: <1518702926-18874-12-git-send-email-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518702926-18874-1-git-send-email-alex.kiernan@gmail.com> References: <1518702926-18874-1-git-send-email-alex.kiernan@gmail.com> X-Mailman-Approved-At: Thu, 15 Feb 2018 14:31:23 +0000 Cc: Martyn Welch , Joe Hershberger , Stefan Roese , Chris Packham , Ian Ray , Martin Donnelly , Andreas Geisreiter , =?utf-8?q?Christoph_R=C3=BCdisser?= , Manfred Rudigier , Ludwig Zenz , Alexandru Gagniuc , =?utf-8?q?Antti_M=C3=A4entau?= =?utf-8?q?sta?= , Pavel Machek Subject: [U-Boot] [PATCH v2 11/13] Rename CONFIG_SYS_BOOTCOUNT_ADDR to BOOTCOUNT_ADDR 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" Remove CONFIG_SYS_BOOTCOUNT_ADDR from Kconfig. Signed-off-by: Alex Kiernan --- Changes in v2: None drivers/bootcount/Kconfig | 10 ++++++---- drivers/bootcount/bootcount.c | 16 ++++++++-------- drivers/bootcount/bootcount_davinci.c | 4 ++-- drivers/bootcount/bootcount_ext.c | 8 ++++---- drivers/bootcount/bootcount_i2c.c | 6 +++--- include/configs/brppt1.h | 2 +- include/configs/calimain.h | 2 +- include/configs/dh_imx6.h | 2 +- include/configs/ge_bx50v3.h | 2 +- include/configs/highbank.h | 2 +- include/configs/ids8313.h | 2 +- include/configs/km/kmp204x-common.h | 2 +- include/configs/mx53ppd.h | 2 +- include/configs/socfpga_is1.h | 2 +- include/configs/socfpga_sr1500.h | 2 +- include/configs/ti_am335x_common.h | 2 +- include/configs/tqma6_wru4.h | 2 +- include/configs/x600.h | 2 +- 18 files changed, 36 insertions(+), 34 deletions(-) diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index 583d6a6..ce26e38 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -19,9 +19,9 @@ choice config BOOTCOUNT_GENERIC bool "Generic default boot counter" help - Generic bootcount stored at SYS_BOOTCOUNT_ADDR. + Generic bootcount stored at BOOTCOUNT_ADDR. - SYS_BOOTCOUNT_ADDR: + BOOTCOUNT_ADDR: Set to the address where the bootcount and bootcount magic will be stored. @@ -31,6 +31,9 @@ config BOOTCOUNT_EXT Add support for maintaining boot count in a file on an EXT filesystem. + BOOTCOUNT_ADDR + Set to the RAM address used for read and write. + config BOOTCOUNT_AM33XX bool "Boot counter in AM33XX RTC IP block" depends on AM33XX || SOC_DA8XX @@ -62,8 +65,7 @@ config BOOTCOUNT_I2C help Enable support for the bootcounter on an i2c (like RTC) device. CONFIG_SYS_I2C_RTC_ADDR = i2c chip address - CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for - the bootcounter. + BOOTCOUNT_ADDR = i2c addr which is used for the bootcounter. CONFIG_BOOTCOUNT_ALEN = address len config BOOTCOUNT_AT91 diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c index 8b499fe..82ef426 100644 --- a/drivers/bootcount/bootcount.c +++ b/drivers/bootcount/bootcount.c @@ -9,24 +9,24 @@ #include /* - * Only override CONFIG_SYS_BOOTCOUNT_ADDR if not already defined. This + * Only override BOOTCOUNT_ADDR if not already defined. This * way, some boards can define it directly in their config header. */ -#if !defined(CONFIG_SYS_BOOTCOUNT_ADDR) +#if !defined(BOOTCOUNT_ADDR) #if defined(CONFIG_QE) #include -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \ +#define BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \ QE_MURAM_SIZE - 2 * sizeof(u32)) #endif /* defined(CONFIG_QE) */ -#endif /* !defined(CONFIG_SYS_BOOTCOUNT_ADDR) */ +#endif /* !defined(BOOTCOUNT_ADDR) */ /* Now implement the generic default functions */ -#if defined(CONFIG_SYS_BOOTCOUNT_ADDR) +#if defined(BOOTCOUNT_ADDR) __weak void bootcount_store(ulong a) { - void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR; + void *reg = (void *)BOOTCOUNT_ADDR; #if defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) raw_bootcount_store(reg, (BOOTCOUNT_MAGIC & 0xffff0000) | a); @@ -38,7 +38,7 @@ __weak void bootcount_store(ulong a) __weak ulong bootcount_load(void) { - void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR; + void *reg = (void *)BOOTCOUNT_ADDR; #if defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) u32 tmp = raw_bootcount_load(reg); @@ -54,4 +54,4 @@ __weak ulong bootcount_load(void) return raw_bootcount_load(reg); #endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) */ } -#endif /* defined(CONFIG_SYS_BOOTCOUNT_ADDR) */ +#endif /* defined(BOOTCOUNT_ADDR) */ diff --git a/drivers/bootcount/bootcount_davinci.c b/drivers/bootcount/bootcount_davinci.c index 17829be..d00fd7a 100644 --- a/drivers/bootcount/bootcount_davinci.c +++ b/drivers/bootcount/bootcount_davinci.c @@ -15,7 +15,7 @@ void bootcount_store(ulong a) { struct davinci_rtc *reg = - (struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR; + (struct davinci_rtc *)BOOTCOUNT_ADDR; /* * write RTC kick registers to enable write @@ -32,7 +32,7 @@ ulong bootcount_load(void) { unsigned long val; struct davinci_rtc *reg = - (struct davinci_rtc *)CONFIG_SYS_BOOTCOUNT_ADDR; + (struct davinci_rtc *)BOOTCOUNT_ADDR; val = raw_bootcount_load(®->scratch2); if ((val & 0xffff0000) != (BOOTCOUNT_MAGIC & 0xffff0000)) diff --git a/drivers/bootcount/bootcount_ext.c b/drivers/bootcount/bootcount_ext.c index e0dd21b..e176ec1 100644 --- a/drivers/bootcount/bootcount_ext.c +++ b/drivers/bootcount/bootcount_ext.c @@ -22,13 +22,13 @@ void bootcount_store(ulong a) return; } - buf = map_sysmem(CONFIG_SYS_BOOTCOUNT_ADDR, 2); + buf = map_sysmem(BOOTCOUNT_ADDR, 2); buf[0] = BC_MAGIC; buf[1] = (a & 0xff); unmap_sysmem(buf); ret = fs_write(CONFIG_SYS_BOOTCOUNT_EXT_NAME, - CONFIG_SYS_BOOTCOUNT_ADDR, 0, 2, &len); + BOOTCOUNT_ADDR, 0, 2, &len); if (ret != 0) puts("Error storing bootcount\n"); } @@ -45,14 +45,14 @@ ulong bootcount_load(void) return 0; } - ret = fs_read(CONFIG_SYS_BOOTCOUNT_EXT_NAME, CONFIG_SYS_BOOTCOUNT_ADDR, + ret = fs_read(CONFIG_SYS_BOOTCOUNT_EXT_NAME, BOOTCOUNT_ADDR, 0, 2, &len_read); if (ret != 0 || len_read != 2) { puts("Error loading bootcount\n"); return 0; } - buf = map_sysmem(CONFIG_SYS_BOOTCOUNT_ADDR, 2); + buf = map_sysmem(BOOTCOUNT_ADDR, 2); if (buf[0] == BC_MAGIC) ret = buf[1]; diff --git a/drivers/bootcount/bootcount_i2c.c b/drivers/bootcount/bootcount_i2c.c index e27b168..1dba141 100644 --- a/drivers/bootcount/bootcount_i2c.c +++ b/drivers/bootcount/bootcount_i2c.c @@ -18,8 +18,8 @@ void bootcount_store(ulong a) buf[0] = BC_MAGIC; buf[1] = (a & 0xff); - ret = i2c_write(CONFIG_SYS_I2C_RTC_ADDR, CONFIG_SYS_BOOTCOUNT_ADDR, - CONFIG_BOOTCOUNT_ALEN, buf, 2); + ret = i2c_write(CONFIG_SYS_I2C_RTC_ADDR, BOOTCOUNT_ADDR, + CONFIG_BOOTCOUNT_ALEN, buf, 2); if (ret != 0) puts("Error writing bootcount\n"); } @@ -29,7 +29,7 @@ ulong bootcount_load(void) unsigned char buf[3]; int ret; - ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, CONFIG_SYS_BOOTCOUNT_ADDR, + ret = i2c_read(CONFIG_SYS_I2C_RTC_ADDR, BOOTCOUNT_ADDR, CONFIG_BOOTCOUNT_ALEN, buf, 2); if (ret != 0) { puts("Error loading bootcount\n"); diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h index 30ea2d2..e32ac7d 100644 --- a/include/configs/brppt1.h +++ b/include/configs/brppt1.h @@ -21,7 +21,7 @@ #define LCD_BPP LCD_COLOR32 /* Bootcount using the RTC block */ -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 +#define BOOTCOUNT_ADDR 0x44E3E000 /* memory */ #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) diff --git a/include/configs/calimain.h b/include/configs/calimain.h index 4c47617..255036d 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -278,7 +278,7 @@ #define CONFIG_SYS_INIT_SP_ADDR (0x8001ff00) #define CONFIG_SYS_BOOTCOUNT_LE /* Use little-endian accessors */ -#define CONFIG_SYS_BOOTCOUNT_ADDR DAVINCI_RTC_BASE +#define BOOTCOUNT_ADDR DAVINCI_RTC_BASE #ifndef __ASSEMBLY__ int calimain_get_osc_freq(void); diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index 464b8d7..474511d 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -47,7 +47,7 @@ #define CONFIG_SYS_MALLOC_LEN (4 * SZ_1M) /* Bootcounter */ -#define CONFIG_SYS_BOOTCOUNT_ADDR IRAM_BASE_ADDR +#define BOOTCOUNT_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_BOOTCOUNT_BE /* FEC ethernet */ diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index 0a72b58..1db9bad 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -267,6 +267,6 @@ #define CONFIG_BCH -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x7000A000 +#define BOOTCOUNT_ADDR 0x7000A000 #endif /* __GE_BX50V3_CONFIG_H */ diff --git a/include/configs/highbank.h b/include/configs/highbank.h index 9dc0c6c..a734181 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -27,7 +27,7 @@ #define CONFIG_CONS_INDEX 0 #define CONFIG_SYS_BOOTCOUNT_LE /* Use little-endian accessors */ -#define CONFIG_SYS_BOOTCOUNT_ADDR 0xfff3cf0c +#define BOOTCOUNT_ADDR 0xfff3cf0c #define CONFIG_MISC_INIT_R #define CONFIG_SCSI_AHCI_PLAT diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index 099d7bd..4449e27 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -516,7 +516,7 @@ /* bootcount support */ #define CONFIG_BOOTCOUNT_ALEN 1 -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x9 +#define BOOTCOUNT_ADDR 0x9 #define CONFIG_IMAGE_FORMAT_LEGACY diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h index 7f735e0..19627ff 100644 --- a/include/configs/km/kmp204x-common.h +++ b/include/configs/km/kmp204x-common.h @@ -189,7 +189,7 @@ unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_QRIO_OR_PRELIM /* QRIO Options */ /* bootcounter in QRIO */ -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_QRIO_BASE + 0x20) +#define BOOTCOUNT_ADDR (CONFIG_SYS_QRIO_BASE + 0x20) #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ #define CONFIG_MISC_INIT_F diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h index aa1480c..c73d73a 100644 --- a/include/configs/mx53ppd.h +++ b/include/configs/mx53ppd.h @@ -241,6 +241,6 @@ #define CONFIG_VIDEO_IPUV3 #endif -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x7000A000 +#define BOOTCOUNT_ADDR 0x7000A000 #endif /* __CONFIG_H */ diff --git a/include/configs/socfpga_is1.h b/include/configs/socfpga_is1.h index 883ffb7..70ff295 100644 --- a/include/configs/socfpga_is1.h +++ b/include/configs/socfpga_is1.h @@ -33,7 +33,7 @@ * Bootcounter */ /* last 2 lwords in OCRAM */ -#define CONFIG_SYS_BOOTCOUNT_ADDR 0xfffffff8 +#define BOOTCOUNT_ADDR 0xfffffff8 #define CONFIG_SYS_BOOTCOUNT_BE #endif /* __CONFIG_SOCFPGA_IS1_H__ */ diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h index 8c9069c..1fe1d60 100644 --- a/include/configs/socfpga_sr1500.h +++ b/include/configs/socfpga_sr1500.h @@ -32,7 +32,7 @@ * Bootcounter */ /* last 2 lwords in OCRAM */ -#define CONFIG_SYS_BOOTCOUNT_ADDR 0xfffffff8 +#define BOOTCOUNT_ADDR 0xfffffff8 #define CONFIG_SYS_BOOTCOUNT_BE /* Environment setting for SPI flash */ diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index 66cacdf..d204809 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -45,7 +45,7 @@ * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT * in the board config. */ -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 +#define BOOTCOUNT_ADDR 0x44E3E000 /* * SPL related defines. The Public RAM memory map the ROM defines the diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h index d94f790..00a2dea 100644 --- a/include/configs/tqma6_wru4.h +++ b/include/configs/tqma6_wru4.h @@ -34,7 +34,7 @@ /* LED */ /* Bootcounter */ -#define CONFIG_SYS_BOOTCOUNT_ADDR IRAM_BASE_ADDR +#define BOOTCOUNT_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_BOOTCOUNT_BE #endif /* __CONFIG_TQMA6_WRU4_H */ diff --git a/include/configs/x600.h b/include/configs/x600.h index 80e5b1c..a13f7e1 100644 --- a/include/configs/x600.h +++ b/include/configs/x600.h @@ -120,7 +120,7 @@ #define CONFIG_SYS_LOAD_ADDR 0x00800000 /* Use last 2 lwords in internal SRAM for bootcounter */ -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SRAM_BASE + \ +#define BOOTCOUNT_ADDR (CONFIG_SRAM_BASE + \ CONFIG_SRAM_SIZE) #define CONFIG_HOSTNAME x600