mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 14:11:15 +02:00
programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:

committed by
Nico Huber

parent
085db626fb
commit
4f5169df5f
16
linux_mtd.c
16
linux_mtd.c
@ -295,7 +295,7 @@ static int linux_mtd_erase(struct flashctx *flash,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct opaque_master programmer_linux_mtd = {
|
||||
static const struct opaque_master linux_mtd_opaque_master = {
|
||||
/* max_data_{read,write} don't have any effect for this programmer */
|
||||
.max_data_read = MAX_DATA_UNSPECIFIED,
|
||||
.max_data_write = MAX_DATA_UNSPECIFIED,
|
||||
@ -367,7 +367,7 @@ static int linux_mtd_shutdown(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int linux_mtd_init(void)
|
||||
static int linux_mtd_init(void)
|
||||
{
|
||||
char *param;
|
||||
int dev_num = 0;
|
||||
@ -422,10 +422,20 @@ int linux_mtd_init(void)
|
||||
goto linux_mtd_init_exit;
|
||||
}
|
||||
|
||||
register_opaque_master(&programmer_linux_mtd, data);
|
||||
register_opaque_master(&linux_mtd_opaque_master, data);
|
||||
|
||||
ret = 0;
|
||||
linux_mtd_init_exit:
|
||||
free(param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
const struct programmer_entry programmer_linux_mtd = {
|
||||
.name = "linux_mtd",
|
||||
.type = OTHER,
|
||||
.devs.note = "Device files /dev/mtd*\n",
|
||||
.init = linux_mtd_init,
|
||||
.map_flash_region = fallback_map,
|
||||
.unmap_flash_region = fallback_unmap,
|
||||
.delay = internal_delay,
|
||||
};
|
||||
|
Reference in New Issue
Block a user