Skip to content

Commit bb0d0ce

Browse files
author
Josh Tsai
committed
Rename SPI_BLANK_OFFSET to SPI_FLAGS_REGION
Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
1 parent cf8ad55 commit bb0d0ce

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

board/hx30/board.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void board_reset_pd_mcu(void)
371371

372372
}
373373

374-
#define SPI_BLANK_OFFSET 0x3A000
374+
#define SPI_FLAGS_REGION 0x80000
375375

376376
void spi_mux_control(int enable)
377377
{
@@ -397,7 +397,7 @@ void board_spi_read_byte(uint8_t offset, uint8_t *data)
397397

398398
spi_mux_control(1);
399399

400-
rv = spi_flash_read(data, SPI_BLANK_OFFSET + offset, 0x01);
400+
rv = spi_flash_read(data, SPI_FLAGS_REGION + offset, 0x01);
401401
if (rv != EC_SUCCESS)
402402
CPRINTS("SPI fail to read");
403403

@@ -410,12 +410,12 @@ void board_spi_write_byte(uint8_t offset, uint8_t data)
410410

411411
spi_mux_control(1);
412412

413-
rv = spi_flash_erase(SPI_BLANK_OFFSET, 0x1000);
413+
rv = spi_flash_erase(SPI_FLAGS_REGION, 0x1000);
414414

415415
if (rv != EC_SUCCESS)
416416
CPRINTS("SPI fail to erase");
417417

418-
rv = spi_flash_write(SPI_BLANK_OFFSET + offset, 0x01, &data);
418+
rv = spi_flash_write(SPI_FLAGS_REGION + offset, 0x01, &data);
419419

420420
if (rv != EC_SUCCESS)
421421
CPRINTS("SPI fail to write");

0 commit comments

Comments
 (0)