mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2024-11-23 09:49:39 +00:00
refactor(hw_crc32): renamed hw_crc32 to tf_crc32
Renamed hw_crc32 to tf_crc32 to make the file and function name more generic so that the same name can be used in upcoming software CRC32 implementation. Change-Id: Idff8f70c50ca700a4328a27b49d5e1f14d2095eb Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
parent
4b48f7b565
commit
c885d5c84d
@ -9,8 +9,9 @@
|
||||
|
||||
#include <arm_acle.h>
|
||||
#include <common/debug.h>
|
||||
#include <common/tf_crc32.h>
|
||||
|
||||
/* hw_crc32 - compute CRC using Arm intrinsic function
|
||||
/* compute CRC using Arm intrinsic function
|
||||
*
|
||||
* This function is useful for the platforms with the CPU ARMv8.0
|
||||
* (with CRC instructions supported), and onwards.
|
||||
@ -23,7 +24,7 @@
|
||||
*
|
||||
* Return calculated CRC value
|
||||
*/
|
||||
uint32_t hw_crc32(uint32_t crc, const unsigned char *buf, size_t size)
|
||||
uint32_t tf_crc32(uint32_t crc, const unsigned char *buf, size_t size)
|
||||
{
|
||||
assert(buf != NULL);
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <common/hw_crc32.h>
|
||||
#include <common/tf_crc32.h>
|
||||
#include <common/tbbr/tbbr_img_def.h>
|
||||
#include <drivers/fwu/fwu.h>
|
||||
#include <drivers/fwu/fwu_metadata.h>
|
||||
@ -37,7 +37,7 @@ static int fwu_metadata_crc_check(void)
|
||||
{
|
||||
unsigned char *data = (unsigned char *)&metadata;
|
||||
|
||||
uint32_t calc_crc = hw_crc32(0U, data + sizeof(metadata.crc_32),
|
||||
uint32_t calc_crc = tf_crc32(0U, data + sizeof(metadata.crc_32),
|
||||
(sizeof(metadata) -
|
||||
sizeof(metadata.crc_32)));
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef HW_CRC32_H
|
||||
#define HW_CRC32_H
|
||||
#ifndef TF_CRC32_H
|
||||
#define TF_CRC32_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* compute CRC using Arm intrinsic function */
|
||||
uint32_t hw_crc32(uint32_t crc, const unsigned char *buf, size_t size);
|
||||
uint32_t tf_crc32(uint32_t crc, const unsigned char *buf, size_t size);
|
||||
|
||||
#endif /* HW_CRC32_H */
|
||||
#endif /* TF_CRC32_H */
|
@ -242,7 +242,7 @@ BL2_SOURCES += drivers/delay_timer/delay_timer.c \
|
||||
drivers/io/io_storage.c \
|
||||
plat/arm/common/arm_bl2_setup.c \
|
||||
plat/arm/common/arm_err.c \
|
||||
common/hw_crc32.c \
|
||||
common/tf_crc32.c \
|
||||
${ARM_IO_SOURCES}
|
||||
|
||||
# Firmware Configuration Framework sources
|
||||
|
Loading…
Reference in New Issue
Block a user