Skip to content

Commit 909fbeb

Browse files
committed
(review comment) remove hal_otp.h
1 parent 6b6d27d commit 909fbeb

File tree

4 files changed

+2
-114
lines changed

4 files changed

+2
-114
lines changed

hal/stm32h5.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <string.h>
2626

2727
#include "hal.h"
28-
#include "hal_otp.h"
2928
#include "hal/stm32h5.h"
3029
#include "hal/armv8m_tz.h"
3130

@@ -765,7 +764,7 @@ void hal_prepare_boot(void)
765764
int hal_flash_otp_set_readonly(uint32_t flashAddress, uint16_t length)
766765
{
767766
uint32_t start_block = (flashAddress - FLASH_OTP_BASE) / FLASH_OTP_BLOCK_SIZE;
768-
uint32_t count = hal_otp_blocks_for_length(length, FLASH_OTP_BLOCK_SIZE);
767+
uint32_t count = (length + FLASH_OTP_BLOCK_SIZE - 1U) / FLASH_OTP_BLOCK_SIZE;
769768
uint32_t bmap = 0;
770769
unsigned int i;
771770
if (start_block + count > 32)

include/hal_otp.h

Lines changed: 0 additions & 35 deletions
This file was deleted.

tools/unit-tests/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TESTS:=unit-parser unit-fdt unit-extflash unit-string unit-spi-flash unit-aes128
4949
unit-update-flash-enc unit-update-ram unit-pkcs11_store unit-psa_store unit-disk \
5050
unit-update-disk unit-multiboot unit-boot-x86-fsp unit-qspi-flash unit-tpm-rsa-exp \
5151
unit-image-nopart unit-image-sha384 unit-image-sha3-384 unit-store-sbrk \
52-
unit-tpm-blob unit-policy-sign unit-rot-auth unit-sdhci-response-bits unit-hal-otp
52+
unit-tpm-blob unit-policy-sign unit-rot-auth unit-sdhci-response-bits
5353
TESTS+=unit-tpm-check-rot-auth
5454

5555
all: $(TESTS)
@@ -167,9 +167,6 @@ unit-sdhci-response-bits: ../../include/target.h unit-sdhci-response-bits.c
167167
gcc -o $@ $^ $(CFLAGS) -ffunction-sections -fdata-sections $(LDFLAGS) \
168168
-Wl,--gc-sections
169169

170-
unit-hal-otp: ../../include/target.h unit-hal-otp.c
171-
gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
172-
173170
unit-aes128: ../../include/target.h unit-extflash.c
174171
gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
175172

tools/unit-tests/unit-hal-otp.c

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)