From bb3d71b7eff4f137c1c4560950536aeb1740e004 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 12 Apr 2022 11:20:40 +0200 Subject: crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U-Boot CRC-16 implementation uses polynomial x^16 + x^12 + x^5 + 1 which is not standard CRC-16 algorithm, but it is known as CRC-16-CCITT. Rename file crc16.c to crc16-ccitt.c to reduce confusion. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- include/u-boot/crc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index 52ec6a9e2d4..eba8edfb4f3 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -25,7 +25,7 @@ */ unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); -/* lib/crc16.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ +/* lib/crc16-ccitt.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ uint16_t crc16_ccitt(uint16_t crc_start, const unsigned char *s, int len); /** * crc16_ccitt_wd_buf - Perform CRC16-CCIT on an input buffer and return the -- cgit v1.3.1 From e523f5d181ce66a36b5f9476b86be2fa03284a45 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 12 Apr 2022 11:20:41 +0200 Subject: crc16: Rename fs/ubifs/crc16.h to include/linux/crc16.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit File fs/ubifs/crc16.h is standard linux's crc16.h include file. So move it from fs/ubifs to include/linux where are also other linux include files. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- fs/ubifs/crc16.c | 2 +- fs/ubifs/crc16.h | 29 ----------------------------- fs/ubifs/lpt.c | 2 +- fs/ubifs/lpt_commit.c | 2 +- include/linux/crc16.h | 29 +++++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 fs/ubifs/crc16.h create mode 100644 include/linux/crc16.h (limited to 'include') diff --git a/fs/ubifs/crc16.c b/fs/ubifs/crc16.c index 443ccf855d5..7cf33fc7eb6 100644 --- a/fs/ubifs/crc16.c +++ b/fs/ubifs/crc16.c @@ -6,7 +6,7 @@ */ #include -#include "crc16.h" +#include /** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ u16 const crc16_table[256] = { diff --git a/fs/ubifs/crc16.h b/fs/ubifs/crc16.h deleted file mode 100644 index 052fd3311a9..00000000000 --- a/fs/ubifs/crc16.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * crc16.h - CRC-16 routine - * - * Implements the standard CRC-16: - * Width 16 - * Poly 0x8005 (x^16 + x^15 + x^2 + 1) - * Init 0 - * - * Copyright (c) 2005 Ben Gardner - * - * This source code is licensed under the GNU General Public License, - * Version 2. See the file COPYING for more details. - */ - -#ifndef __CRC16_H -#define __CRC16_H - -#include - -extern u16 const crc16_table[256]; - -extern u16 crc16(u16 crc, const u8 *buffer, size_t len); - -static inline u16 crc16_byte(u16 crc, const u8 data) -{ - return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff]; -} - -#endif /* __CRC16_H */ diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index 62748b0210b..27835e60d2c 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c @@ -42,7 +42,7 @@ #include #include #include -#include "crc16.h" +#include #endif /** diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 897d0014306..ba0b19a1f2b 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c @@ -23,7 +23,7 @@ #include #include #include -#include "crc16.h" +#include #endif #include "ubifs.h" diff --git a/include/linux/crc16.h b/include/linux/crc16.h new file mode 100644 index 00000000000..052fd3311a9 --- /dev/null +++ b/include/linux/crc16.h @@ -0,0 +1,29 @@ +/* + * crc16.h - CRC-16 routine + * + * Implements the standard CRC-16: + * Width 16 + * Poly 0x8005 (x^16 + x^15 + x^2 + 1) + * Init 0 + * + * Copyright (c) 2005 Ben Gardner + * + * This source code is licensed under the GNU General Public License, + * Version 2. See the file COPYING for more details. + */ + +#ifndef __CRC16_H +#define __CRC16_H + +#include + +extern u16 const crc16_table[256]; + +extern u16 crc16(u16 crc, const u8 *buffer, size_t len); + +static inline u16 crc16_byte(u16 crc, const u8 data) +{ + return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff]; +} + +#endif /* __CRC16_H */ -- cgit v1.3.1 From 1a47e6d47c7184b116bb58e8451dc0d4f141a609 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 12 Apr 2022 11:20:42 +0200 Subject: crc16: Move standard CRC-16 implementation from ubifs to lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This implementation provides standard CRC-16 algorithm with polynomial x^16 + x^15 + x^2 + 1. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- fs/ubifs/Makefile | 2 +- fs/ubifs/crc16.c | 60 ---------------------------------------------------- include/u-boot/crc.h | 3 +++ lib/Makefile | 1 + lib/crc16.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+), 61 deletions(-) delete mode 100644 fs/ubifs/crc16.c create mode 100644 lib/crc16.c (limited to 'include') diff --git a/fs/ubifs/Makefile b/fs/ubifs/Makefile index 64d64472945..631ba5f438c 100644 --- a/fs/ubifs/Makefile +++ b/fs/ubifs/Makefile @@ -9,5 +9,5 @@ obj-y := ubifs.o io.o super.o sb.o master.o lpt.o obj-y += lpt_commit.o scan.o lprops.o -obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o +obj-y += tnc.o tnc_misc.o debug.o budget.o obj-y += log.o orphan.o recovery.o replay.o gc.o diff --git a/fs/ubifs/crc16.c b/fs/ubifs/crc16.c deleted file mode 100644 index 7cf33fc7eb6..00000000000 --- a/fs/ubifs/crc16.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * crc16.c - * - * This source code is licensed under the GNU General Public License, - * Version 2. See the file COPYING for more details. - */ - -#include -#include - -/** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ -u16 const crc16_table[256] = { - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, - 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, - 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, - 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, - 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, - 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, - 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, - 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, - 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, - 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 -}; - -/** - * crc16 - compute the CRC-16 for the data buffer - * @crc: previous CRC value - * @buffer: data pointer - * @len: number of bytes in the buffer - * - * Returns the updated CRC value. - */ -u16 crc16(u16 crc, u8 const *buffer, size_t len) -{ - while (len--) - crc = crc16_byte(crc, *buffer++); - return crc; -} diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index eba8edfb4f3..5174bd7ac41 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -25,6 +25,9 @@ */ unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); +/* lib/crc16.c - 16 bit CRC with polynomial x^16 + x^15 + x^2 + 1 */ +uint16_t crc16(uint16_t crc, const unsigned char *buffer, size_t len); + /* lib/crc16-ccitt.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ uint16_t crc16_ccitt(uint16_t crc_start, const unsigned char *s, int len); /** diff --git a/lib/Makefile b/lib/Makefile index cf662a765a4..d9b1811f750 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_CIRCBUF) += circbuf.o endif obj-y += crc8.o +obj-y += crc16.o obj-y += crc16-ccitt.o obj-$(CONFIG_ERRNO_STR) += errno_str.o obj-$(CONFIG_FIT) += fdtdec_common.o diff --git a/lib/crc16.c b/lib/crc16.c new file mode 100644 index 00000000000..7cf33fc7eb6 --- /dev/null +++ b/lib/crc16.c @@ -0,0 +1,60 @@ +/* + * crc16.c + * + * This source code is licensed under the GNU General Public License, + * Version 2. See the file COPYING for more details. + */ + +#include +#include + +/** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ +u16 const crc16_table[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 +}; + +/** + * crc16 - compute the CRC-16 for the data buffer + * @crc: previous CRC value + * @buffer: data pointer + * @len: number of bytes in the buffer + * + * Returns the updated CRC value. + */ +u16 crc16(u16 crc, u8 const *buffer, size_t len) +{ + while (len--) + crc = crc16_byte(crc, *buffer++); + return crc; +} -- cgit v1.3.1 From c5b9bf5518411c72a3763371049cfabeb5f16633 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 13 Apr 2022 17:47:21 +0800 Subject: include/configs: drop COUNTER_FREQUENCY Since we have CONFIG_COUNTER_FREQUENCY enabled, no need COUNTER_FREQUENCY Signed-off-by: Peng Fan --- arch/arm/cpu/armv8/fsl-layerscape/spintable.S | 2 +- include/configs/apalis-imx8.h | 3 --- include/configs/apalis-imx8x.h | 3 --- include/configs/capricorn-common.h | 3 --- include/configs/cgtqmx8.h | 3 --- include/configs/colibri-imx8x.h | 1 - include/configs/condor.h | 3 --- include/configs/draak.h | 3 --- include/configs/dragonboard410c.h | 3 --- include/configs/dragonboard820c.h | 3 --- include/configs/eagle.h | 3 --- include/configs/ebisu.h | 3 --- include/configs/exynos-common.h | 1 - include/configs/exynos7420-common.h | 3 --- include/configs/exynos78x0-common.h | 3 --- include/configs/falcon.h | 3 --- include/configs/hihope-rzg2.h | 3 --- include/configs/hikey.h | 3 --- include/configs/hikey960.h | 3 --- include/configs/imx8qm_mek.h | 3 --- include/configs/imx8qm_rom7720.h | 3 --- include/configs/imx8qxp_mek.h | 3 --- include/configs/imx8ulp_evk.h | 2 -- include/configs/km/pg-wcom-ls102xa.h | 1 - include/configs/kontron_sl28.h | 1 - include/configs/ls1012a_common.h | 3 --- include/configs/ls1021aiot.h | 1 - include/configs/ls1021aqds.h | 1 - include/configs/ls1021atsn.h | 1 - include/configs/ls1021atwr.h | 1 - include/configs/ls1028a_common.h | 3 --- include/configs/ls1043a_common.h | 3 --- include/configs/ls1046a_common.h | 3 --- include/configs/ls1088aqds.h | 1 - include/configs/ls1088ardb.h | 1 - include/configs/ls2080a_common.h | 2 -- include/configs/lx2160a_common.h | 1 - include/configs/mt8183.h | 1 - include/configs/mt8512.h | 1 - include/configs/mt8516.h | 1 - include/configs/mt8518.h | 1 - include/configs/mx6_common.h | 1 - include/configs/mx7_common.h | 1 - include/configs/owl-common.h | 3 --- include/configs/p2371-2180.h | 3 --- include/configs/p2771-0000.h | 3 --- include/configs/p3450-0000.h | 3 --- include/configs/presidio_asic.h | 3 +-- include/configs/px30_common.h | 2 -- include/configs/rk3036_common.h | 1 - include/configs/rk3128_common.h | 1 - include/configs/rk322x_common.h | 1 - include/configs/rk3288_common.h | 1 - include/configs/rk3308_common.h | 1 - include/configs/rk3328_common.h | 2 -- include/configs/rk3368_common.h | 2 -- include/configs/rk3399_common.h | 2 -- include/configs/rk3568_common.h | 2 -- include/configs/salvator-x.h | 3 --- include/configs/sdm845.h | 3 --- include/configs/silinux-ek874.h | 3 --- include/configs/socfpga_soc64_common.h | 5 ----- include/configs/sunxi-common.h | 1 - include/configs/ten64.h | 1 - include/configs/thunderx_88xx.h | 3 --- include/configs/ulcb.h | 3 --- include/configs/vexpress_aemv8.h | 3 --- include/configs/xilinx_versal.h | 5 ----- include/configs/xilinx_zynqmp.h | 5 ----- 69 files changed, 2 insertions(+), 155 deletions(-) (limited to 'include') diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spintable.S b/arch/arm/cpu/armv8/fsl-layerscape/spintable.S index d6bd1884599..1eb0c2d4a7e 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spintable.S +++ b/arch/arm/cpu/armv8/fsl-layerscape/spintable.S @@ -113,6 +113,6 @@ _dead_loop: .align 3 .global __real_cntfrq __real_cntfrq: - .quad COUNTER_FREQUENCY + .quad CONFIG_COUNTER_FREQUENCY /* Secondary Boot Code ends here */ __secondary_boot_code_end: diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index c87bcd475ef..e759f18fe46 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -84,7 +84,4 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - #endif /* __APALIS_IMX8_H */ diff --git a/include/configs/apalis-imx8x.h b/include/configs/apalis-imx8x.h index 71a80f38bbb..17f1981643f 100644 --- a/include/configs/apalis-imx8x.h +++ b/include/configs/apalis-imx8x.h @@ -115,9 +115,6 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - /* Networking */ #define CONFIG_FEC_ENET_DEV 0 #define IMX_FEC_BASE 0x5b040000 diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h index 58d7a3a8ce2..1466be10fcd 100644 --- a/include/configs/capricorn-common.h +++ b/include/configs/capricorn-common.h @@ -123,9 +123,6 @@ #define CONFIG_SYS_MAXARGS 64 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - #define BOOTAUX_RESERVED_MEM_BASE 0x88000000 #define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */ diff --git a/include/configs/cgtqmx8.h b/include/configs/cgtqmx8.h index bd5c072382a..b5817f1e42d 100644 --- a/include/configs/cgtqmx8.h +++ b/include/configs/cgtqmx8.h @@ -131,9 +131,6 @@ #define PHYS_SDRAM_1_SIZE 0x80000000 /* 2 GB */ #define PHYS_SDRAM_2_SIZE 0x100000000 /* 4 GB */ -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - /* Networking */ #define CONFIG_FEC_MXC_PHYADDR -1 #define FEC_QUIRK_ENET_MAC diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 008fa6ef076..265b7294fed 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -119,7 +119,6 @@ sizeof(CONFIG_SYS_PROMPT) + 16) /* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ #define BOOTAUX_RESERVED_MEM_BASE 0x88000000 #define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */ diff --git a/include/configs/condor.h b/include/configs/condor.h index 213e68f1587..819184996e6 100644 --- a/include/configs/condor.h +++ b/include/configs/condor.h @@ -24,7 +24,4 @@ /* Board Clock */ /* XTAL_CLK : 33.33MHz */ -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - #endif /* __CONDOR_H */ diff --git a/include/configs/draak.h b/include/configs/draak.h index 5bd8740c6f8..476b4c3710a 100644 --- a/include/configs/draak.h +++ b/include/configs/draak.h @@ -11,9 +11,6 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_FLASH_SHOW_PROGRESS 45 diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index 43a179f013b..14ba52a2eb3 100644 --- a/include/configs/dragonboard410c.h +++ b/include/configs/dragonboard410c.h @@ -23,9 +23,6 @@ /* UART */ -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 19000000 - /* Fixup - in init code we switch from device to host mode, * it has to be done after each HCD reset */ #define CONFIG_EHCI_HCD_INIT_AFTER_RESET diff --git a/include/configs/dragonboard820c.h b/include/configs/dragonboard820c.h index 229e1a323b6..1e2b15b33f9 100644 --- a/include/configs/dragonboard820c.h +++ b/include/configs/dragonboard820c.h @@ -23,9 +23,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) #define CONFIG_SYS_BOOTM_LEN SZ_64M -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 19000000 - #ifndef CONFIG_SPL_BUILD #include #endif diff --git a/include/configs/eagle.h b/include/configs/eagle.h index 42fe0577167..c751f75a7d0 100644 --- a/include/configs/eagle.h +++ b/include/configs/eagle.h @@ -16,7 +16,4 @@ /* Board Clock */ /* XTAL_CLK : 33.33MHz */ -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - #endif /* __EAGLE_H */ diff --git a/include/configs/ebisu.h b/include/configs/ebisu.h index ce31a462fcf..3adc4180efd 100644 --- a/include/configs/ebisu.h +++ b/include/configs/ebisu.h @@ -13,9 +13,6 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_FLASH_SHOW_PROGRESS 45 diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h index eb2606905f8..dd1cbd7ab84 100644 --- a/include/configs/exynos-common.h +++ b/include/configs/exynos-common.h @@ -19,7 +19,6 @@ /* Keep L2 Cache Disabled */ /* input clock of PLL: 24MHz input clock */ -#define COUNTER_FREQUENCY 24000000 /* select serial console configuration */ diff --git a/include/configs/exynos7420-common.h b/include/configs/exynos7420-common.h index fcb238fb3e3..5658da474cb 100644 --- a/include/configs/exynos7420-common.h +++ b/include/configs/exynos7420-common.h @@ -24,9 +24,6 @@ /* select serial console configuration */ -/* Timer input clock frequency */ -#define COUNTER_FREQUENCY 24000000 - /* IRAM Layout */ #define CONFIG_IRAM_BASE 0x02100000 #define CONFIG_IRAM_SIZE 0x58000 diff --git a/include/configs/exynos78x0-common.h b/include/configs/exynos78x0-common.h index 457057ce71f..ec43e133dde 100644 --- a/include/configs/exynos78x0-common.h +++ b/include/configs/exynos78x0-common.h @@ -25,9 +25,6 @@ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE -/* Timer input clock frequency */ -#define COUNTER_FREQUENCY 26000000 - #define CPU_RELEASE_ADDR secondary_boot_addr #define CONFIG_SYS_BAUDRATE_TABLE \ diff --git a/include/configs/falcon.h b/include/configs/falcon.h index 52dcf19ccad..446261cedc7 100644 --- a/include/configs/falcon.h +++ b/include/configs/falcon.h @@ -24,7 +24,4 @@ /* Board Clock */ /* XTAL_CLK : 16.66MHz */ -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - #endif /* __FALCON_H */ diff --git a/include/configs/hihope-rzg2.h b/include/configs/hihope-rzg2.h index e46eb07a5e9..54702985b95 100644 --- a/include/configs/hihope-rzg2.h +++ b/include/configs/hihope-rzg2.h @@ -11,7 +11,4 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - #endif /* __HIHOPE_RZG2_H */ diff --git a/include/configs/hikey.h b/include/configs/hikey.h index 29a0d943864..19d5b6261f1 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -32,9 +32,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 19000000 - /* Generic Interrupt Controller Definitions */ #define GICD_BASE 0xf6801000 #define GICC_BASE 0xf6802000 diff --git a/include/configs/hikey960.h b/include/configs/hikey960.h index f446ecb8647..c088f2f2b69 100644 --- a/include/configs/hikey960.h +++ b/include/configs/hikey960.h @@ -24,9 +24,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 19000000 - /* Generic Interrupt Controller Definitions */ #define GICD_BASE 0xe82b1000 #define GICC_BASE 0xe82b2000 diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h index 0fe38e61c4b..a9c52d27500 100644 --- a/include/configs/imx8qm_mek.h +++ b/include/configs/imx8qm_mek.h @@ -130,7 +130,4 @@ #define PHYS_SDRAM_1_SIZE 0x80000000 /* 2 GB */ #define PHYS_SDRAM_2_SIZE 0x100000000 /* 4 GB */ -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - #endif /* __IMX8QM_MEK_H */ diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h index 7532c6e7551..c7cace2c36f 100644 --- a/include/configs/imx8qm_rom7720.h +++ b/include/configs/imx8qm_rom7720.h @@ -124,8 +124,5 @@ /* LPDDR4 board total DDR is 6GB, DDR4 board total DDR is 4 GB */ #define PHYS_SDRAM_2_SIZE 0x80000000 /* 2 GB */ -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - #include #endif /* __IMX8QM_ROM7720_H */ diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h index beb35c93435..9052a9142e2 100644 --- a/include/configs/imx8qxp_mek.h +++ b/include/configs/imx8qxp_mek.h @@ -129,9 +129,6 @@ /* LPDDR4 board total DDR is 3GB */ #define PHYS_SDRAM_2_SIZE 0x40000000 /* 1 GB */ -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 8000000 /* 8MHz */ - #ifndef CONFIG_DM_PCA953X #define CONFIG_PCA953X #endif diff --git a/include/configs/imx8ulp_evk.h b/include/configs/imx8ulp_evk.h index f078c37c2de..f274b66343b 100644 --- a/include/configs/imx8ulp_evk.h +++ b/include/configs/imx8ulp_evk.h @@ -27,8 +27,6 @@ #endif -#define COUNTER_FREQUENCY 1000000 /* 1MHz */ - /* ENET Config */ #if defined(CONFIG_FEC_MXC) #define PHY_ANEG_TIMEOUT 20000 diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h index 0494790c84f..dca5589a3ef 100644 --- a/include/configs/km/pg-wcom-ls102xa.h +++ b/include/configs/km/pg-wcom-ls102xa.h @@ -176,7 +176,6 @@ #define CONFIG_LAYERSCAPE_NS_ACCESS #define CONFIG_SMP_PEN_ADDR 0x01ee0200 -#define COUNTER_FREQUENCY 8333333 #define CONFIG_HWCONFIG #define HWCONFIG_BUFFER_SIZE 256 diff --git a/include/configs/kontron_sl28.h b/include/configs/kontron_sl28.h index c3ab049535a..c47b5940fb2 100644 --- a/include/configs/kontron_sl28.h +++ b/include/configs/kontron_sl28.h @@ -32,7 +32,6 @@ #define CPU_RELEASE_ADDR secondary_boot_addr /* generic timer */ -#define COUNTER_FREQUENCY 25000000 /* early heap for SPL DM */ #define CONFIG_MALLOC_F_ADDR CONFIG_SYS_FSL_OCRAM_BASE diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h index f92ff17eeb8..67da01f5e3a 100644 --- a/include/configs/ls1012a_common.h +++ b/include/configs/ls1012a_common.h @@ -21,9 +21,6 @@ #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE #define CONFIG_SYS_DDR_BLOCK2_BASE 0x880000000ULL -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ - /* CSU */ #define CONFIG_LAYERSCAPE_NS_ACCESS diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 97460818315..82ae3492a2f 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -119,7 +119,6 @@ #define CONFIG_PEN_ADDR_BIG_ENDIAN #define CONFIG_LAYERSCAPE_NS_ACCESS #define CONFIG_SMP_PEN_ADDR 0x01ee0200 -#define COUNTER_FREQUENCY 12500000 #define CONFIG_HWCONFIG #define HWCONFIG_BUFFER_SIZE 256 diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 010f3a16367..7b79e0841a5 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -334,7 +334,6 @@ #define CONFIG_PEN_ADDR_BIG_ENDIAN #define CONFIG_LAYERSCAPE_NS_ACCESS #define CONFIG_SMP_PEN_ADDR 0x01ee0200 -#define COUNTER_FREQUENCY 12500000 #define CONFIG_HWCONFIG #define HWCONFIG_BUFFER_SIZE 256 diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h index bc2a265c409..546c4fcdb95 100644 --- a/include/configs/ls1021atsn.h +++ b/include/configs/ls1021atsn.h @@ -99,7 +99,6 @@ #endif #define CONFIG_LAYERSCAPE_NS_ACCESS -#define COUNTER_FREQUENCY 12500000 #define CONFIG_HWCONFIG #define HWCONFIG_BUFFER_SIZE 256 diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 6b1ab875399..b4383d4bbdb 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -192,7 +192,6 @@ #define CONFIG_PEN_ADDR_BIG_ENDIAN #define CONFIG_LAYERSCAPE_NS_ACCESS #define CONFIG_SMP_PEN_ADDR 0x01ee0200 -#define COUNTER_FREQUENCY 12500000 #define CONFIG_HWCONFIG #define HWCONFIG_BUFFER_SIZE 256 diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h index 7bb6d416ea3..a98d8dd7200 100644 --- a/include/configs/ls1028a_common.h +++ b/include/configs/ls1028a_common.h @@ -25,9 +25,6 @@ */ #define CPU_RELEASE_ADDR secondary_boot_addr -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ - /* GPIO */ /* I2C */ diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index 83b95c242f0..61c6d456764 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -44,9 +44,6 @@ #define CPU_RELEASE_ADDR secondary_boot_addr -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ - /* Serial Port */ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1 diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h index 7552610e035..f9279e4ab46 100644 --- a/include/configs/ls1046a_common.h +++ b/include/configs/ls1046a_common.h @@ -44,9 +44,6 @@ #define CPU_RELEASE_ADDR secondary_boot_addr -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ - /* Serial Port */ #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1 diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h index 1ea6befa9b9..e532c343f48 100644 --- a/include/configs/ls1088aqds.h +++ b/include/configs/ls1088aqds.h @@ -13,7 +13,6 @@ #endif #define COUNTER_FREQUENCY_REAL (get_board_sys_clk()/4) -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ #define CONFIG_MEM_INIT_VALUE 0xdeadbeef #define SPD_EEPROM_ADDRESS 0x51 diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h index 1a9cda1e7da..693a2f64b6c 100644 --- a/include/configs/ls1088ardb.h +++ b/include/configs/ls1088ardb.h @@ -14,7 +14,6 @@ #endif #define COUNTER_FREQUENCY_REAL 25000000 /* 25MHz */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ #ifdef CONFIG_EMU #define CONFIG_SYS_FSL_DDR_EMU diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h index 82585f5dbfa..e77e9b7f376 100644 --- a/include/configs/ls2080a_common.h +++ b/include/configs/ls2080a_common.h @@ -41,12 +41,10 @@ #define CONFIG_SYS_FSL_OTHER_DDR_NUM_CTRLS -/* Generic Timer Definitions */ /* * This is not an accurate number. It is used in start.S. The frequency * will be udpated later when get_bus_freq(0) is available. */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ /* GPIO */ diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 96dfe49a7e5..d5690148195 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -46,7 +46,6 @@ * will be udpated later when get_bus_freq(0) is available. */ -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ /* Serial Port */ #define CONFIG_PL011_CLOCK (get_bus_freq(0) / 4) diff --git a/include/configs/mt8183.h b/include/configs/mt8183.h index 2b4e976aa1f..ee31c02e6ef 100644 --- a/include/configs/mt8183.h +++ b/include/configs/mt8183.h @@ -11,7 +11,6 @@ #include -#define COUNTER_FREQUENCY 13000000 #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE -4 diff --git a/include/configs/mt8512.h b/include/configs/mt8512.h index 9c443db9f52..1af8d2e480c 100644 --- a/include/configs/mt8512.h +++ b/include/configs/mt8512.h @@ -13,7 +13,6 @@ #define CONFIG_SYS_NONCACHED_MEMORY SZ_1M -#define COUNTER_FREQUENCY 13000000 #define CONFIG_SYS_BOOTM_LEN SZ_64M diff --git a/include/configs/mt8516.h b/include/configs/mt8516.h index 47132c1db1d..cb2af5843fc 100644 --- a/include/configs/mt8516.h +++ b/include/configs/mt8516.h @@ -11,7 +11,6 @@ #include -#define COUNTER_FREQUENCY 13000000 #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE -4 diff --git a/include/configs/mt8518.h b/include/configs/mt8518.h index 49ee926b0c9..8ca8d25148a 100644 --- a/include/configs/mt8518.h +++ b/include/configs/mt8518.h @@ -13,7 +13,6 @@ #define CONFIG_SYS_NONCACHED_MEMORY SZ_1M -#define COUNTER_FREQUENCY 13000000 /* DRAM definition */ #define CONFIG_SYS_SDRAM_BASE 0x40000000 diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index a0e481703bc..10e46c628d5 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -10,7 +10,6 @@ #if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)) #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */ -#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK #else #ifndef CONFIG_SYS_L2CACHE_OFF #define CONFIG_SYS_L2_PL310 diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index 76c374af253..9f7d60f8fbd 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -16,7 +16,6 @@ /* Timer settings */ #define CONFIG_MXC_GPT_HCLK #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */ -#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK #define CONFIG_SYS_BOOTM_LEN 0x1000000 diff --git a/include/configs/owl-common.h b/include/configs/owl-common.h index 96453214eeb..fabbb01e0c8 100644 --- a/include/configs/owl-common.h +++ b/include/configs/owl-common.h @@ -13,9 +13,6 @@ /* SDRAM Definitions */ #define CONFIG_SYS_SDRAM_BASE 0x0 -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY (24000000) /* 24MHz */ - /* Some commands use this as the default load address */ /* diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h index ef1fa2a5926..7f942888e74 100644 --- a/include/configs/p2371-2180.h +++ b/include/configs/p2371-2180.h @@ -24,7 +24,4 @@ #include "tegra-common-post.h" -/* Crystal is 38.4MHz. clk_m runs at half that rate */ -#define COUNTER_FREQUENCY 19200000 - #endif /* _P2371_2180_H */ diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h index 4c3da224c66..84cdd571962 100644 --- a/include/configs/p2771-0000.h +++ b/include/configs/p2771-0000.h @@ -37,7 +37,4 @@ #include "tegra-common-post.h" -/* Crystal is 38.4MHz. clk_m runs at half that rate */ -#define COUNTER_FREQUENCY 19200000 - #endif diff --git a/include/configs/p3450-0000.h b/include/configs/p3450-0000.h index 1c962be8b8e..ec1a8634e71 100644 --- a/include/configs/p3450-0000.h +++ b/include/configs/p3450-0000.h @@ -35,7 +35,4 @@ /* General networking support */ #include "tegra-common-post.h" -/* Crystal is 38.4MHz. clk_m runs at half that rate */ -#define COUNTER_FREQUENCY 19200000 - #endif /* _P3450_0000_H */ diff --git a/include/configs/presidio_asic.h b/include/configs/presidio_asic.h index 3295d43ed67..1d526a73802 100644 --- a/include/configs/presidio_asic.h +++ b/include/configs/presidio_asic.h @@ -12,8 +12,7 @@ #define CONFIG_SYS_BOOTM_LEN 0x00c00000 /* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 25000000 -#define CONFIG_SYS_TIMER_RATE COUNTER_FREQUENCY +#define CONFIG_SYS_TIMER_RATE 25000000 #define CONFIG_SYS_TIMER_COUNTER 0xf4321008 /* note: arch/arm/cpu/armv8/start.S which references GICD_BASE/GICC_BASE diff --git a/include/configs/px30_common.h b/include/configs/px30_common.h index dc609013f32..a7f5e911655 100644 --- a/include/configs/px30_common.h +++ b/include/configs/px30_common.h @@ -12,8 +12,6 @@ #define CONFIG_SYS_NS16550_MEM32 -#define COUNTER_FREQUENCY 24000000 - /* FIXME: ff020000 is pmu_mem (10k), while ff0e0000 is regular int_mem */ #define CONFIG_IRAM_BASE 0xff020000 diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index 5905518edf1..ab2b492d03f 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -10,7 +10,6 @@ #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 #define CONFIG_SYS_HZ_CLOCK 24000000 #define CONFIG_SYS_INIT_SP_ADDR 0x60100000 diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h index d77a7d7b098..8f04e9de5a3 100644 --- a/include/configs/rk3128_common.h +++ b/include/configs/rk3128_common.h @@ -11,7 +11,6 @@ #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 #define CONFIG_SYS_HZ_CLOCK 24000000 #define CONFIG_IRAM_BASE 0x10080000 diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h index 3258820fcdc..36191ee9c12 100644 --- a/include/configs/rk322x_common.h +++ b/include/configs/rk322x_common.h @@ -11,7 +11,6 @@ #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ -#define COUNTER_FREQUENCY 24000000 #define CONFIG_SYS_HZ_CLOCK 24000000 #define CONFIG_SYS_INIT_SP_ADDR 0x61100000 diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index e2e0f70a70c..075623f342a 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -13,7 +13,6 @@ #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 #define CONFIG_SYS_HZ_CLOCK 24000000 #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h index 9cda8d9c48b..44a3e7adf20 100644 --- a/include/configs/rk3308_common.h +++ b/include/configs/rk3308_common.h @@ -20,7 +20,6 @@ #define CONFIG_SPL_STACK 0x00400000 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ -#define COUNTER_FREQUENCY 24000000 #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64M */ diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h index 8a5f0c8999f..2b8d77c47ed 100644 --- a/include/configs/rk3328_common.h +++ b/include/configs/rk3328_common.h @@ -10,8 +10,6 @@ #define CONFIG_IRAM_BASE 0xff090000 -#define COUNTER_FREQUENCY 24000000 - #define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_INIT_SP_ADDR 0x00300000 diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h index 239296c1d22..2f71ce72df8 100644 --- a/include/configs/rk3368_common.h +++ b/include/configs/rk3368_common.h @@ -15,8 +15,6 @@ #define SDRAM_MAX_SIZE 0xff000000 #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 - #define CONFIG_IRAM_BASE 0xff8c0000 #define CONFIG_SYS_INIT_SP_ADDR 0x00300000 diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 4037dba58cc..8e137376661 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -10,8 +10,6 @@ #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 - #define CONFIG_IRAM_BASE 0xff8c0000 #define CONFIG_SYS_INIT_SP_ADDR 0x00300000 diff --git a/include/configs/rk3568_common.h b/include/configs/rk3568_common.h index 5649cd64e0e..e9947ea4923 100644 --- a/include/configs/rk3568_common.h +++ b/include/configs/rk3568_common.h @@ -10,8 +10,6 @@ #define CONFIG_SYS_CBSIZE 1024 -#define COUNTER_FREQUENCY 24000000 - #define CONFIG_IRAM_BASE 0xfdcc0000 #define CONFIG_SYS_INIT_SP_ADDR 0x00c00000 diff --git a/include/configs/salvator-x.h b/include/configs/salvator-x.h index 764bc1bbf29..eb00e2b004b 100644 --- a/include/configs/salvator-x.h +++ b/include/configs/salvator-x.h @@ -11,9 +11,6 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_FLASH_SHOW_PROGRESS 45 diff --git a/include/configs/sdm845.h b/include/configs/sdm845.h index ba57323c74b..835f05d63e2 100644 --- a/include/configs/sdm845.h +++ b/include/configs/sdm845.h @@ -13,9 +13,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE { 115200, 230400, 460800, 921600 } -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 19000000 - #define CONFIG_EXTRA_ENV_SETTINGS \ "bootm_size=0x4000000\0" \ "bootm_low=0x80000000\0" \ diff --git a/include/configs/silinux-ek874.h b/include/configs/silinux-ek874.h index a99babb48b0..346858c456c 100644 --- a/include/configs/silinux-ek874.h +++ b/include/configs/silinux-ek874.h @@ -11,7 +11,4 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - #endif /* __SILINUX_EK874_H */ diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h index c288d548f5b..3447b8f17c2 100644 --- a/include/configs/socfpga_soc64_common.h +++ b/include/configs/socfpga_soc64_common.h @@ -108,11 +108,6 @@ #define CONFIG_SYS_NS16550_CLK 100000000 #define CONFIG_SYS_NS16550_MEM32 -/* - * Timer & watchdog configurations - */ -#define COUNTER_FREQUENCY 400000000 - /* * SDMMC configurations */ diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index a9031035d74..068340aa964 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -38,7 +38,6 @@ #endif /* CPU */ -#define COUNTER_FREQUENCY 24000000 /* * The DRAM Base differs between some models. We cannot use macros for the diff --git a/include/configs/ten64.h b/include/configs/ten64.h index f82b1e0d212..04772c9e4ef 100644 --- a/include/configs/ten64.h +++ b/include/configs/ten64.h @@ -9,7 +9,6 @@ #include "ls1088a_common.h" -#define COUNTER_FREQUENCY 25000000 /* 25MHz */ #define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000 diff --git a/include/configs/thunderx_88xx.h b/include/configs/thunderx_88xx.h index d07a8fe86bc..3537ba30e1f 100644 --- a/include/configs/thunderx_88xx.h +++ b/include/configs/thunderx_88xx.h @@ -20,9 +20,6 @@ /* SMP Spin Table Definitions */ #define CPU_RELEASE_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY (0x1800000) /* 24MHz */ - /* PL011 Serial Configuration */ #define CONFIG_PL011_CLOCK 24000000 diff --git a/include/configs/ulcb.h b/include/configs/ulcb.h index c991bff0e88..14ea40bee3e 100644 --- a/include/configs/ulcb.h +++ b/include/configs/ulcb.h @@ -11,9 +11,6 @@ #include "rcar-gen3-common.h" -/* Generic Timer Definitions (use in assembler source) */ -#define COUNTER_FREQUENCY 0xFE502A /* 16.66MHz from CPclk */ - /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_FLASH_SHOW_PROGRESS 45 diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h index 4f0ff239e68..0632b367cad 100644 --- a/include/configs/vexpress_aemv8.h +++ b/include/configs/vexpress_aemv8.h @@ -73,9 +73,6 @@ #define V2M_SYS_CFGCTRL (V2M_SYSREGS + 0x0a4) #define V2M_SYS_CFGSTAT (V2M_SYSREGS + 0x0a8) -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY 24000000 /* 24MHz */ - /* Generic Interrupt Controller Definitions */ #ifdef CONFIG_GICV3 #define GICD_BASE (V2M_PA_BASE + 0x2f000000) diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h index b025d2638d8..b78c2429489 100644 --- a/include/configs/xilinx_versal.h +++ b/include/configs/xilinx_versal.h @@ -16,11 +16,6 @@ #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE -/* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ -#if CONFIG_COUNTER_FREQUENCY -# define COUNTER_FREQUENCY CONFIG_COUNTER_FREQUENCY -#endif - /* Serial setup */ #define CONFIG_SYS_BAUDRATE_TABLE \ { 4800, 9600, 19200, 38400, 57600, 115200 } diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index e5e700d8045..8eb44b18d20 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -16,11 +16,6 @@ #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE -/* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */ -#if !defined(COUNTER_FREQUENCY) -# define COUNTER_FREQUENCY 100000000 -#endif - /* Serial setup */ #define CONFIG_SYS_BAUDRATE_TABLE \ { 4800, 9600, 19200, 38400, 57600, 115200 } -- cgit v1.3.1