1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-11-13 19:20:41 +01:00
Files
flashrom/sst49lfxxxc.c
Anastasia Klimchuk c09a2f5387 core: Use SPDX in headers
Change-Id: Ic24a54ab520053e49efcba02bd9fa5b8ce69b20a
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/89956
Reviewed-by: Antonio Vázquez Blanco <antoniovazquezblanco@gmail.com>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2025-11-12 11:30:28 +00:00

29 lines
729 B
C

/*
* This file is part of the flashrom project.
*
* SPDX-License-Identifier: GPL-2.0-or-later
* SPDX-FileCopyrightText: 2000 Silicon Integrated System Corporation
* SPDX-FileCopyrightText: 2005-2007 coresystems GmbH
* SPDX-FileCopyrightText: 2009 Sean Nelson <audiohacked@gmail.com>
*/
#include "flash.h"
#include "parallel.h"
#include "chipdrivers.h"
int erase_sector_49lfxxxc(struct flashctx *flash, unsigned int address,
unsigned int sector_size)
{
uint8_t status;
chipaddr bios = flash->virtual_memory;
chip_writeb(flash, 0x30, bios);
chip_writeb(flash, 0xD0, bios + address);
status = wait_82802ab(flash);
print_status_82802ab(status);
/* FIXME: Check the status register for errors. */
return 0;
}